我正在尝试关闭附录小节标题下的虚线。但似乎找不到办法做到这一点。这是我的代码:
`% Remove page numbering of appendix figure and tables in the list of table and list of figures.
\let\svaddcontentsline\addcontentsline
\renewcommand\addcontentsline[3]{%
\ifthenelse{\equal{#1}{lof}}{}%
{\ifthenelse{\equal{#1}{lot}}{}{\svaddcontentsline{#1}{#2}{#3}}}}
\appendix
\addcontentsline{toc}{section}{Appendix}
%Disable appendix page numbers in Table of Contents
%\addtocontents{toc}{\cftpagenumbersoff{section}}
%Disable appendix page numbers in Table of Contents
%\addtocontents{toc}{\cftpagenumbersoff{section}}
% Disable appendix subsection page numbers in ToC
%\addtocontents{toc}{\cftpagenumbersoff{subsection}}
\pagenumbering{gobble}
%\pagestyle{plain}
%\pagenumbering{roman}
%\setcounter{page}{1}
\section*{Appendix}`
这样做的目的是删除附录中图表的页码。但是,我无法从目录中删除虚线:
上面的代码似乎只能删除目录中的页码,但无法删除与其关联的虚线。我想知道如何设置它才能同时删除虚线?
这是我的目录设置的代码:
\newpage
\tableofcontents
\cleardoublepage
\setcounter{tocdepth}{1}
\listoffigures
\listoftables
\clearpage
\pagenumbering{arabic}
\setcounter{page}{1}
\raggedright
\section{Introduction}
可编译的完整代码如下:
\documentclass[10pt]{article}
\usepackage[left=2.54cm,top=2.54cm,right=2.54cm,bottom=2.54cm]{geometry}
\usepackage{fancyhdr}
\usepackage[table]{xcolor}
\usepackage{url}
\usepackage{float}
\usepackage{afterpage}
\usepackage{caption}
\usepackage{setspace}
\usepackage{pdfpages}
\usepackage{booktabs}
\usepackage{bibspacing}
\usepackage{tikz}
\usepackage{helvet}
\usepackage{array}
\usepackage{listings}
\usepackage{adjustbox}
\usepackage{color} %May be necessary if you want to color links
\usepackage{hyperref}
\hypersetup{
colorlinks=true, %set true if you want colored links
linktoc=all, %set to all if you want both sections and subsections linked
linkcolor=black, %choose some color if you want links to stand out
}
\singlespacing
%%%% YOU CAN PUT YOUR OWN DEFINITIONS HERE
\newfont{\toto}{msbm10 at 12 pt}
\newfont{\ithd}{cmr9}
\newcommand{\equa}[1]{(\ref{eq:#1})}
\newcommand{\laeq}[1]{\label{eq:#1}}
\newcommand{\figu}[1]{\ref{fig:#1}}
\newcommand{\lafi}[1]{\label{fig:#1}}
\newcommand{\fmo}{\tilde{U}}
\newcommand{\fve}{\tilde{u}}
\newcommand{\Dt}{\Delta t}
\newcommand{\AoAInt}{$2.5^{\circ}$}
\newcommand{\dY}{$\Delta Y$}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\si}[1]{\rm\scriptscriptstyle{#1}}
%%%% END OF YOUR DEFINITIONS
\pagestyle{fancyplain}
\renewcommand{\headrulewidth}{0pt}
\newcommand{\HRule}{\rule{\linewidth}{1mm}} % Defines a new command for horizontal lines, change thickness here
\usepackage{amsmath,amsthm,amsfonts,amssymb}
\usepackage[pdftex]{graphicx}
\usepackage[T1]{fontenc}
%%%% CONFERENCE HEADER. REPLACE xxxx WITH 4-DIGIT PAPER NUMBER ASSIGNED BY CONFERENCE COMMITTEE.
\rhead{}
\lhead{}
\title{
\raggedleft {\large \today}
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,yshift=20pt,xshift=10pt]%
at (current page.north west)
{};
\end{tikzpicture}
\HRule \\
\vspace{0.5cm}
\centering
{\Huge \bf Major Project Report } \\
\vspace{0.5cm}
{\Large \bf Comparison of Different Locations of Step on NACA 2412 Airfoil Aerodynamic Performance}
}
\author{
\textit{Author:
}}
\date{}
% Change the name from contents to table of contents
\renewcommand{\contentsname}{Table of Contents}
\begin{document}
%%%% TITLE
\maketitle
\afterpage{\fancyhead{}}
\HRule
\pagenumbering{gobble}
%%%% ABSTRACT AND KEYWORDS
\vskip
\vskip 0.5cm
\newpage
\centering
\textbf{EXECUTIVE SUMMARY} \\\\
\vspace{1cm}
This report aims to evaluate the performance of NACA 2412 in both high Reynolds number flow where many airliners operate in and low Reynolds number flow for RC airplane models. Four different types turbulent models are compared in high Reynolds number flow, $k-\omega$ SST model shows the best performance in aspect of accuracy and computational cost. And this report also finds that all turbulent models has its own applicable conditions, and can not fully describe the turbulent flow over the airfoil. In order to the get the accurate estimation of drag coefficient from simulation, the grid size is small enough to ensure the first grid located in the viscous sub-layer region of boundary layer. From the simulation results, the airfoil with step located in the upper plane degrade the lift to drag ratio by $56.14\%$ and $59.78\%$ for high Re number flow and low Re number flow respectively, and down step case shows a $27.43\%$ and $29.52\%$ reduction for the lift to drag ratio. So, both case of stepped airfoil could not provide a better performance for airliners and RC models.\\
\vspace{1cm}
{\it Keywords:} Kline-Fogelman Airfoil, Computational Fluid Dynamics, Turbulence Model, Lift-Drag Ratio.
%%%% MAIN PART
\newpage
\centering
\textbf{\Large ABBREVIATIONS} \\\\
\raggedright
\textbf{RC:} Remote Control\\
\textbf{Re:} Reynolds Number \\
\textbf{AoA:} Angle of Attack \\
%------------------------------------------
\newpage
\tableofcontents
\cleardoublepage
\setcounter{tocdepth}{1}
\listoffigures
\newpage
\listoftables
\clearpage
\pagenumbering{arabic}
\setcounter{page}{1}
\raggedright
\section{Introduction}
\vspace{-0.4cm}
\section{Problem Statement}
\vspace{-0.3cm}
\section{Setup and Methodology}
\subsection{Geometry Definitions}
\subsection{Calculation of $\Delta Y$}
\subsection{Meshing Methodology for Incompressible Flow}
\subsection{Meshing Methodology for Compressible Flow}
\subsection{Boundary Conditions}
\subsection{Turbulence Models Comparison}
\label{section: Turbulence Model Comparison}
\subsubsection{Spalart-Allmaras (S-A model)}
\subsubsection{$k-\omega$ SST model}
\subsubsection{RNG $k-\epsilon$ model}
\subsubsection{$\gamma-Re_{\theta}$ SST (Transition SST) model}
\section{Results and Discussion}
\subsection{Results of different Turbulence Models}
\subsection{Residual and Order of Accuracy Analysis}
\subsection{Streamline comparison}
\subsection{Contour plots comparison}
\subsubsection{Different step positions for the same Reynolds number}
\subsubsection{Different Reynolds numbers for the same step position}
\subsection{Comparison between Pressure-based and Density-based Solvers}
\subsection{Comparison of different lift to drag ratios at AoA$=$\AoAInt at different Operating Conditions}
\section{Future Work}
\section{Conclusion}
\newpage
%%%% BIBLIOGRAPHY
\bibspacing=\dimen 100
\bibliographystyle{unsrt}
\bibliography{biblio}
%%%% APPENDIX section
% Remove page numbering of appendix figure and tables in the list of table and list of figures.
\let\svaddcontentsline\addcontentsline
\renewcommand\addcontentsline[3]{%
\ifthenelse{\equal{#1}{lof}}{}%
{\ifthenelse{\equal{#1}{lot}}{}{\svaddcontentsline{#1}{#2}{#3}}}}
\clearpage
\newpage
\thispagestyle{empty}
\appendix
\addcontentsline{toc}{section}{Appendix}
%Disable appendix page numbers in Table of Contents
%\addtocontents{toc}{\cftpagenumbersoff{section}}
%Disable appendix page numbers in Table of Contents
%\addtocontents{toc}{\cftpagenumbersoff{section}}
% Disable appendix subsection page numbers in ToC
%\addtocontents{toc}{\cftpagenumbersoff{subsection}}
\pagenumbering{gobble}
%\pagestyle{plain}
%\pagenumbering{roman}
%\setcounter{page}{1}
\section*{Appendix}
\section{Matlab Code for Calculating Coordinates of NACA 2412 Airfoil}
\newpage
\section{Matlab Code for Calculating $\Delta Y$, Order of Accuracy, and Residual Analysis}
\newpage
\section{Adapted 3 Times Model Comparison Residual Analysis}
\newpage
\section{Turbulence Model Comparison Simulation Settings}
\subsection{General Settings}
\subsection{S-A Model Simulation Settings}
\newpage
\subsection{$\gamma-Re_{\theta}$ SST Settings}
\subsection{$k-\omega$ SST Model Settings}
\subsection{$RNG \ k-\epsilon$ Model}
\newpage
\section{Simulation Setting for High Reynolds Pressure-Based and Density Based Solvers}
\subsection{General Settings}
\newpage
\subsection{Model Settings}
\newpage
\subsection{Density Setting}
\newpage
\subsection{Far-field Boundary Condition Settings}
\newpage
\subsection{Reference Value Settings}
\newpage
\subsection{Solution Methods Settings}
\newpage
\subsection{Initialisation Settings}
\newpage
\section{Residual Test for Density-based Simulation}
\subsection{Boundary Condition Settings}
\subsection{Reference Value Settings}
\subsection{Solution Method Settings}
\newpage
\section{Streamlines for low-Reynolds number flows}
\newpage
\section{Contour plots for low-Reynolds number flows around no-step and bottom-step airfoils}
\end{document}
`
答案1
使用 MWE(最小工作示例)可以更轻松地为您提供准确的解决方案,请参阅来自的评论斯蒂芬·平诺。
如果您使用 KOMA-Script,您可以将其添加\renewcommand\TOCLineLeaderFill[1][]{\hfill}
到您的序言中。
如果您正在使用该tocloft
软件包,您可以将\renewcommand{\cftsubsecleader}{\hfill}
for the\subsection
或\renewcommand{\cftsecleader}{\hfill}
for the添加\section
到您的序言中。
或者您是否想删除附录小节中的虚线而非全部?
编辑
我猜您只想从小appendix
节中删除虚线,而不是从其余内容中删除虚线。
因此,您可以添加tocloft
包,然后使用宏\cftlocalchange{〈file〉}{〈pnumwidth〉}{〈tocrmarg〉
和\cftnodots
(分别参见第 16 页和第 8 页)\appendix
。第一个宏重置全局参数,第二个宏是“太大”的分离值,例如10000
,参见第 5 页。
\cftlocalchange{toc}{\cftnodots}{0cm}% change settings to suppress dotted lines
如果需要,请考虑作者的建议:在输入任何特殊内容后都应再次调用该命令以将参数重置为其通常值。
代码(我刚刚注释了一些行\usepackage{bibspacing}
,\bibspacing=\dimen 100
或者\vspace
因为我没有包或者我遇到了编译问题):
\documentclass[10pt]{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amsthm,amsfonts,amssymb}
\usepackage[left=2.54cm,top=2.54cm,right=2.54cm,bottom=2.54cm]{geometry}
\usepackage{fancyhdr}
\usepackage[table]{xcolor}
\usepackage{url}
\usepackage{float}
\usepackage{afterpage}
\usepackage{caption}
\usepackage{setspace}
\usepackage{pdfpages}
\usepackage{booktabs}
%\usepackage{bibspacing}
\usepackage{tikz}
\usepackage{helvet}
\usepackage{array}
\usepackage{listings}
\usepackage{adjustbox}
\usepackage{color} %May be necessary if you want to color links
\usepackage{hyperref}
\hypersetup{
colorlinks=true, %set true if you want colored links
linktoc=all, %set to all if you want both sections and subsections linked
linkcolor=black, %choose some color if you want links to stand out
}
\usepackage{graphicx}
\usepackage{tocloft} %--> added
\singlespacing
%%%% YOU CAN PUT YOUR OWN DEFINITIONS HERE
\newfont{\toto}{msbm10 at 12 pt}
\newfont{\ithd}{cmr9}
\newcommand{\equa}[1]{(\ref{eq:#1})}
\newcommand{\laeq}[1]{\label{eq:#1}}
\newcommand{\figu}[1]{\ref{fig:#1}}
\newcommand{\lafi}[1]{\label{fig:#1}}
\newcommand{\fmo}{\tilde{U}}
\newcommand{\fve}{\tilde{u}}
\newcommand{\Dt}{\Delta t}
\newcommand{\AoAInt}{$2.5^{\circ}$}
\newcommand{\dY}{$\Delta Y$}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\si}[1]{\rm\scriptscriptstyle{#1}}
%%%% END OF YOUR DEFINITIONS
\pagestyle{fancyplain}
\renewcommand{\headrulewidth}{0pt}
\newcommand{\HRule}{\rule{\linewidth}{1mm}} % Defines a new command for horizontal lines, change thickness here
%%%% CONFERENCE HEADER. REPLACE xxxx WITH 4-DIGIT PAPER NUMBER ASSIGNED BY CONFERENCE COMMITTEE.
\rhead{}
\lhead{}
\title{
\raggedleft {\large \today}
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=north west,yshift=20pt,xshift=10pt]%
at (current page.north west)
{};
\end{tikzpicture}
\HRule \\
\vspace{0.5cm}
\centering
{\Huge \bf Major Project Report } \\
\vspace{0.5cm}
{\Large \bf Comparison of Different Locations of Step on NACA 2412 Airfoil Aerodynamic Performance}
}
\author{
\textit{Author:
}}
\date{}
% Change the name from contents to table of contents
\renewcommand{\contentsname}{Table of Contents}
\begin{document}
%%%% TITLE
\maketitle
\afterpage{\fancyhead{}}
\HRule
\pagenumbering{gobble}
%%%% ABSTRACT AND KEYWORDS
%\vskip
%
%\vskip 0.5cm
%
\newpage
\centering
\textbf{EXECUTIVE SUMMARY} \\
\vspace{1cm}
This report aims to evaluate the performance of NACA 2412 in both high Reynolds number flow where many airliners operate in and low Reynolds number flow for RC airplane models. Four different types turbulent models are compared in high Reynolds number flow, $k-\omega$ SST model shows the best performance in aspect of accuracy and computational cost. And this report also finds that all turbulent models has its own applicable conditions, and can not fully describe the turbulent flow over the airfoil. In order to the get the accurate estimation of drag coefficient from simulation, the grid size is small enough to ensure the first grid located in the viscous sub-layer region of boundary layer. From the simulation results, the airfoil with step located in the upper plane degrade the lift to drag ratio by $56.14\%$ and $59.78\%$ for high Re number flow and low Re number flow respectively, and down step case shows a $27.43\%$ and $29.52\%$ reduction for the lift to drag ratio. So, both case of stepped airfoil could not provide a better performance for airliners and RC models.\\
\vspace{1cm}
{\it Keywords:} Kline-Fogelman Airfoil, Computational Fluid Dynamics, Turbulence Model, Lift-Drag Ratio.
%%%% MAIN PART
\newpage
\centering
\textbf{\Large ABBREVIATIONS} \\
\raggedright
\textbf{RC:} Remote Control\\
\textbf{Re:} Reynolds Number \\
\textbf{AoA:} Angle of Attack \\
%------------------------------------------
\newpage
\tableofcontents
\cleardoublepage
\setcounter{tocdepth}{1}
\listoffigures
\newpage
\listoftables
\clearpage
\pagenumbering{arabic}
\setcounter{page}{1}
\raggedright
\section{Introduction}
\vspace{-0.4cm}
\section{Problem Statement}
\vspace{-0.3cm}
\section{Setup and Methodology}
\subsection{Geometry Definitions}
\subsection{Calculation of $\Delta Y$}
\subsection{Meshing Methodology for Incompressible Flow}
\subsection{Meshing Methodology for Compressible Flow}
\subsection{Boundary Conditions}
\subsection{Turbulence Models Comparison}
\label{section: Turbulence Model Comparison}
\subsubsection{Spalart-Allmaras (S-A model)}
\subsubsection{$k-\omega$ SST model}
\subsubsection{RNG $k-\epsilon$ model}
\subsubsection{$\gamma-Re_{\theta}$ SST (Transition SST) model}
\section{Results and Discussion}
\subsection{Results of different Turbulence Models}
\subsection{Residual and Order of Accuracy Analysis}
\subsection{Streamline comparison}
\subsection{Contour plots comparison}
\subsubsection{Different step positions for the same Reynolds number}
\subsubsection{Different Reynolds numbers for the same step position}
\subsection{Comparison between Pressure-based and Density-based Solvers}
\subsection{Comparison of different lift to drag ratios at AoA$=$\AoAInt at different Operating Conditions}
\section{Future Work}
\section{Conclusion}
\newpage
%%%% BIBLIOGRAPHY
%\bibspacing=\dimen 100
\bibliographystyle{unsrt}
\bibliography{biblio}
%%%% APPENDIX section
% Remove page numbering of appendix figure and tables in the list of table and list of figures.
\let\svaddcontentsline\addcontentsline
\renewcommand\addcontentsline[3]{%
\ifthenelse{\equal{#1}{lof}}{}%
{\ifthenelse{\equal{#1}{lot}}{}{\svaddcontentsline{#1}{#2}{#3}}}}
\clearpage
\newpage
\thispagestyle{empty}
\cftlocalchange{toc}{\cftnodots}{0cm}% change settings to suppress dotted lines
\appendix
\addcontentsline{toc}{section}{Appendix}
%Disable appendix page numbers in Table of Contents
%\addtocontents{toc}{\cftpagenumbersoff{section}}
%Disable appendix page numbers in Table of Contents
%\addtocontents{toc}{\cftpagenumbersoff{section}}
% Disable appendix subsection page numbers in ToC
%\addtocontents{toc}{\cftpagenumbersoff{subsection}}
\pagenumbering{gobble}
%\pagestyle{plain}
%\pagenumbering{roman}
%\setcounter{page}{1}
\section*{Appendix}
\section{Matlab Code for Calculating Coordinates of NACA 2412 Airfoil}
\newpage
\section{Matlab Code for Calculating $\Delta Y$, Order of Accuracy, and Residual Analysis}
\newpage
\section{Adapted 3 Times Model Comparison Residual Analysis}
\newpage
\section*{Turbulence Model Comparison Simulation Settings}
\subsection*{General Settings}
\subsection{S-A Model Simulation Settings}
\newpage
\subsection{$\gamma-Re_{\theta}$ SST Settings}
\subsection{$k-\omega$ SST Model Settings}
\subsection{$RNG \ k-\epsilon$ Model}
\newpage
\section{Simulation Setting for High Reynolds Pressure-Based and Density Based Solvers}
\subsection{General Settings}
\newpage
\subsection{Model Settings}
\newpage
\subsection{Density Setting}
\newpage
\subsection{Far-field Boundary Condition Settings}
\newpage
\subsection{Reference Value Settings}
\newpage
\subsection{Solution Methods Settings}
\newpage
\subsection{Initialisation Settings}
\newpage
\section{Residual Test for Density-based Simulation}
\subsection{Boundary Condition Settings}
\subsection{Reference Value Settings}
\subsection{Solution Method Settings}
\newpage
\section{Streamlines for low-Reynolds number flows}
\newpage
\section{Contour plots for low-Reynolds number flows around no-step and bottom-step airfoils}
\end{document}
输出: