I have next code for defining dots after chapter title in TOC:
\newcommand\l@chapter[2]{%
\ifnum \c@tocdepth >\m@ne
\addpenalty{-\@highpenalty}%
\vskip 1.0em \@plus\p@
\setlength\@tempdima{1.5em}%8em}%
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\leavevmode
\advance\leftskip\@tempdima
\hskip -\leftskip
{#1}\unskip\nobreak\leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep mu$}\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
\penalty\@highpenalty
\endgroup
\fi}
How can I get rid of dots behind chapter title? Thanks.
UPDATE
I found that if I put some static text before {#1} in the code above - dots respect the size of static text and start after it. I am not sure how latex (overleaf) calculates {#1} at this point. It seems that it renders dots first and then renders the content of given parameter #1. Do you have any idea how I can delay rendering of dots in the code above after content of #1 is ready? Or is it possible to "force" rendering of content? I would appreciate if you give me some background how latex does the rentering (in what stages or accroding to definitions in the file).
Here is another excerpt of how chpaters appear in the ToC:
\newcommand\@chapapp{Chapter}
\newcommand\chapter{%
\clearpage
\doublespacing
\thispagestyle{myotherheadings}
\global\@topnum\z@
%\@afterindentfalse
\@afterindenttrue
\secdef\@chapter\@schapter}
\def\@chapter[#1]#2{%
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter. #1}%
% 1999.6 Period after chapter number removed in TOC. HJG
\addcontentsline{toc}{chapter}{\protect\numberline{%
{\@chapapp\space\thechapter:\space#1}}}%
\chaptermark{#1}%
\@makechapterhead{#2}%
\@afterheading
}
\chapter is redefined and contains \addcontentsline - with last parameter {\protect\numberline{{@chapapp\space\thechapter:\space#1}}} which defines the content of ToC line - which is {#1} in the first excerpt. @makechapterhead forms the chapter title itself (code is ommited)
mu.\mkern
. If that does not help, consider posting a complete document that starts with\documentclass
, ends with\end{document}
, can be compiled and illustrates the issue. – user194703 Nov 6 '19 at 2:07