LaTeX forum ⇒ Text FormattingChange the dot size and hyphenation problem in Table of content Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
feryee
Posts: 20
Joined: Sun Aug 09, 2015 12:57 pm

Change the dot size and hyphenation problem in Table of content

Postby feryee » Wed Jul 12, 2017 2:33 pm

As you can see from my table of content, i have faced with a problems:

1) The dotted line should be started right after the item in TOC with smaller dot indention. I have also attach the true sample(correct.png).
I checked the style file I guess the responsible line is :

\hskip -\leftskip
#1\nobreak\leaders[b][b]\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep
mu$}
[/b][/b]\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
\penalty\@highpenalty



I did some change @dotsep but it didn't work.



I appreciate if you can help me!
Attachments
Correct.png
Correct.png (51.37 KiB) Viewed 654 times
wrong.png
wrong.png (44.32 KiB) Viewed 654 times

User avatar
Johannes_B
Site Moderator
Posts: 3551
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Thu Jul 13, 2017 7:19 am

Please show the exact compilable code that reproduces that problem. It is very hard to help otherwise.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

feryee
Posts: 20
Joined: Sun Aug 09, 2015 12:57 pm

Postby feryee » Thu Jul 13, 2017 3:54 pm

Oh, It is my thesis that i am afaid i can't share the whole repreducible code. However , in main document (report class) the table of contents is called simply by: \tableofcontents.

It is the style file that does the problem i described shown in image. I'm sharing the whole style file, Hope that helps.


  1. %%
  2. %%
  3. %%
  4. \typeout{Thesis style for IGSR Mediterranean University, Version 1.0}
  5. %
  6. % Definitions for title and approval pages
  7. %
  8. \def\degree#1{\gdef\@degree{#1}}
  9. %\def\program#1{\gdef\@program{#1}}
  10. \def\Dept#1{\gdef\@Dept{#1}}
  11. \def\subyear#1{\gdef\@subyear{#1}}
  12. \def\InstituteDirector#1{\gdef\@InstituteDirector{#1}}
  13. \def\DeptChair#1{\gdef\@DeptChair{#1}}
  14. \def\cosuperi#1{\gdef\@cosuperi{#1}}
  15. \def\cosuperii#1{\gdef\@cosuperii{#1}}
  16. \def\examineri#1{\gdef\@examineri{#1}}
  17. \def\examinerii#1{\gdef\@examinerii{#1}}
  18. \def\supervisor#1{\gdef\@supervisor{#1}}
  19. \def\examineriii#1{\gdef\@examineriii{#1}}
  20. \def\examineriv#1{\gdef\@examineriv{#1}}
  21. \def\examinerv#1{\gdef\@examinerv{#1}}
  22. \def\dateofapproval#1{\gdef\@dateofapproval{#1}}
  23. %
  24. \global\let\@degree\empty
  25. %\global\let\@program\empty
  26. \global\let\@Dept\empty
  27. \global\let\@InstituteDirector\empty
  28. \global\let\@DeptChair\empty
  29. \global\let\@cosuperi\empty
  30. \global\let\@cosuperii\empty
  31. \global\let\@examineri\empty
  32. \global\let\@examinerii\empty
  33. \global\let\@supervisor\empty
  34. \global\let\@examineriii\empty
  35. \global\let\@examineriv\empty
  36. \global\let\@examinerv\empty
  37. \global\let\@examinervi\empty
  38. \global\let\@dateofapproval\empty
  39. \def\nyear{\number\year}
  40. \def\nmonth{\number\month}
  41. \global\let\@subyear\nyear
  42. \global\let\@submonth\nmonth
  43. %
  44. % Other definitions
  45. %
  46. \xdef\@singlespaced{1}
  47. \xdef\@onehalfspaced{1.5}
  48. %
  49. \newlength{\insd}
  50. \newlength{\dc}
  51. \newlength{\dpt}
  52. \newlength{\spv}
  53. \newlength{\ei}
  54. \newlength{\csi}
  55. \newlength{\csii}
  56. \newlength{\eii}
  57. \newlength{\eiii}
  58. \newlength{\eiv}
  59. \newlength{\ev}
  60. \let\@app\empty
  61. \newcounter{thsfootcnt}
  62. %
  63. % Title page
  64. %
  65. \newcommand\uptitle{
  66. \ifx\@degree\empty \@@warning{No \string\degree\space given} \fi
  67. \null
  68. \vspace*{-45pt}
  69. \let\baselinestretch\@singlespaced{\fontsize{18.3}{1}{\textbf{\@title}} \\% %title font size
  70. \vskip 160pt %distance between title and author
  71. \fontsize{16.4}{1}{\textbf{\@author}} \\ %Author font size
  72. \vskip 110pt
  73. \large{Submitted to the\\Institute of Graduate Studies and Research\\ %%\large with the document class of 12pt corresponds to fontsize 14.4
  74. in partial fulfillment of the requirements for the degree of} \\[120pt]}}
  75. %\vskip 200pt
  76. \newcommand\downtitle{
  77. \vskip 120pt
  78. %\vskip 2\baselineskip
  79. \let\baselinestretch\@singlespaced{
  80. \vskip 00pt
  81. \large{Eastern Mediterranean University} \\ \large{August 2017}}\\[1pt] \large{Gazimagusa, North Cyprus}
  82. \null}
  83. %
  84. \newcommand\relaxtitlestuff{
  85. \setcounter{footnote}{0}%
  86. \global\let\thanks\relax
  87. \global\let\maketitle\relax
  88. \global\let\@thanks\@empty
  89. \global\let\@author\@empty
  90. \global\let\@date\@empty
  91. \global\let\author\relax
  92. \global\let\date\relax
  93. \global\let\and\relax}
  94. %
  95. \newcommand\makemstitle{\begin{titlepage}
  96. \let\baselinestretch\@singlespaced{
  97. \begin{center}
  98. \uptitle
  99. \vskip 56pt
  100. \large{Master of Science \\ in \\ \@Dept}
  101. \downtitle
  102. \end{center}}
  103. \end{titlepage}
  104. \relaxtitlestuff}
  105. %
  106.  
  107. \newcommand\makephdtitle{\begin{titlepage}
  108. \begin{center}
  109. \uptitle
  110. \large{Doctor of Philosophy} \\% \vspace{-0.5cm}
  111. \large{in}\\ %\vspace{-0.5cm}
  112. \large{\@Dept}
  113. \downtitle
  114. \end{center}
  115. \end{titlepage}
  116. \relaxtitlestuff}
  117. %
  118. % Approval page
  119. %
  120. \newcommand\makeapprovalpage{%
  121. \addtocounter{page}{-1}
  122. \settowidth{\insd}{\@InstituteDirector}
  123. \settowidth{\dc}{\@DeptChair}
  124. \settowidth{\dpt}{\@Dept}
  125. \settowidth{\ei}{\@examineri}
  126. \settowidth{\csi}{\@cosuperi}
  127. \settowidth{\csii}{\@cosuperii}
  128. \settowidth{\eii}{\@examinerii}
  129. \settowidth{\spv}{\@supervisor}
  130. \settowidth{\eiii}{\@examineriii}
  131. \settowidth{\eiv}{\@examineriv}
  132. \settowidth{\ev}{\@examinerv}
  133. \ifdim\ei>\spv \spv\ei \fi
  134. \ifdim\csii>\spv \spv\ei \fi
  135. \ifdim\eii>\spv \spv\eii \fi
  136. \ifdim\csi>\spv \spv\ei \fi
  137. \ifdim\eiii>\spv \spv\eiii \fi
  138. \ifdim\eiv>\spv \spv\eiv \fi
  139. \ifdim\ev>\spv \spv\ev \fi
  140. \vspace*{-1.6cm}
  141. \hspace{-0.5cm}Approval of the Institute of Graduate Studies and Research
  142. \vspace*{1cm}
  143. \begin{tabbing}
  144. \hspace*{3.0cm} \= \hspace*{\spv}\hspace*{1em} \= \kill
  145. \ifx\@InstituteDirector\empty \ifx\@cosuperi\empty \ifx\@cosuperi\empty
  146. \@@warning{No \string\InstituteDirector\space given} \fi \fi
  147. \else \hspace*{8.cm}\makebox[60mm]\hrulefill\> \\[-16pt]\hspace*{8.5cm}\@InstituteDirector \> \\[-16pt]
  148. \>\hspace*{7.5cm} Director \\\\ \> \fi
  149. \hspace{-3.1cm}\vspace*{6cm}I certify that this thesis satisfies the requirements as a
  150. thesis for the degree of Doctor\\[-12pt]
  151. of Philosophy in \@Dept.\\[1cm]
  152. \vspace*{-0.5cm}
  153. \ifx\@supervisor\empty \ifx\@cosuperi\empty \ifx\@cosuperi\empty
  154. \@@warning{No \string\supervisor\space given} \fi \fi
  155. \else \hspace*{7.9cm}\makebox[60mm]\hrulefill\> \\[-16pt]\hspace*{8.3cm}\@DeptChair\> \\[-16pt]
  156. \>\hspace*{4.8cm} Chair, Department of Electrical and\>\\[-16pt] %\hspace value can be change to change the position of expression"Electrical Engineering"
  157. \>\hspace*{5.8cm} Electronic Engineering\\[1cm]\> \fi
  158. \hspace{-3.1cm}We certify that we have read this thesis and that in our opinion it is fully adequate,\\[-12pt]
  159. in scope and quality as a thesis of the degree of Doctor of Philosophy in Electrical \\[-12pt]
  160. and Electronic Engineering.\\[1cm]
  161.  
  162. \ifx\@supervisor\empty \else \hspace*{8.1cm}\makebox[60mm]\hrulefill\> \\[-16pt]\hspace*{9cm}\@supervisor \> \\[-16pt]
  163. \>\hspace*{7cm} Supervisor \> \\[-1.9cm]
  164.  
  165. \hspace*{-0.0cm}\makebox[60mm]\hrulefill\> \\[-16pt]\hspace*{0.90cm}\@cosuperi \>
  166. \\[-16pt]
  167. \>\hspace*{-1.5cm} Cosupervisor \\ \>\\\\\fi
  168. \hspace*{10cm}Examining Committee\\*[-24pt]
  169. \makebox[14cm]\hrulefill\\
  170.  
  171. \ifx\@examineri\empty \else 1. \@examineri \> \hspace*{5cm}\makebox[60mm]\hrulefill \\ \fi
  172. \ifx\@examinerii\empty \else 2. \@examinerii \> \hspace*{5cm}\makebox[60mm]\hrulefill\\ \fi
  173. \ifx\@examineriii\empty \else 3. \@examineriii \> \hspace*{5cm}\makebox[60mm]\hrulefill\\ \fi
  174. 4. \@supervisor \> \hspace*{5cm}\makebox[60mm]\hrulefill \\
  175. \ifx\@examineriv\empty \else 5. \@examineriv \> \hspace*{5cm}\makebox[60mm]\hrulefill\\ \fi
  176. \end{tabbing}
  177. \vfill
  178. %\vspace*{2cm}
  179. %\global\let\@title\@empty
  180. %\global\let\title\relax
  181. \global\let\@dateofapproval\@empty
  182. \global\let\dateofapproval\relax
  183. \global\let\@supervisor\@empty
  184. \global\let\supervisor\relax
  185. \global\let\@cosuperi\@empty
  186. \global\let\cosuperi\relax
  187. \global\let\@cosuperii\@empty
  188. \global\let\cosuperii\relax
  189. \global\let\@examineri\@empty
  190. \global\let\examineri\relax
  191. \global\let\@examinerii\@empty
  192. \global\let\examinerii\relax
  193. \global\let\@examineriii\@empty
  194. \global\let\examinerii\relax
  195. \global\let\@examinervi\@empty
  196. \global\let\examinervi\relax
  197. \global\let\@examinerv\@empty
  198. \global\let\examinerv\relax
  199. }
  200. %
  201. % Abstract, Acknowledgements, Oz, etc.
  202. %
  203.  
  204. \newenvironment{preface}{\chapter*{\prefacename}}
  205. {\par\vfil\null}
  206. %
  207. \newenvironment{foreword}{\chapter*{\forewordname}}
  208. {\par\vfil\null}
  209.  
  210. %************************* ABSTRACT TITLE ***********************
  211.  
  212. \renewenvironment{abstract}{\chapter*{\abstractname }
  213. \begin{center}
  214. %{\LARGE\abstractname}}
  215. {\textbf{}}\end{center}}
  216. {\par\vfil\null}
  217.  
  218. \newenvironment{acknowledgements}{\chapter*{\ackname}}
  219. {\par\vfil\null}
  220. %
  221. \newenvironment{ozet}{\chapter*{\ozetname }
  222. \vspace{-0.cm}
  223. \begin{center}{\large \textbf{}}\end{center}}
  224. {\par\vfil\null}
  225. %
  226. \newenvironment{symbols}{%
  227. \clearpage
  228. \chapter*{\listsymbolname}
  229. \beginsymlist}
  230. {\closesymlist}
  231. %
  232. \newcommand{\beginsymlist}{%
  233. \begin{tabbing}
  234. \hspace*{\symtabi}\=\hspace*{\symtabii}\=\kill}
  235. %
  236. \newcommand{\closesymlist}{\end{tabbing}}
  237. %
  238. \newcommand{\sym}[2]{\>#1 \>#2 \\}
  239. \newlength{\symtabi}
  240. \newlength{\symtabii}
  241. \setlength{\symtabi}{1em}
  242. \setlength{\symtabii}{10em}
  243. %
  244. \newcommand\prefacename{\vskip-0.2cm \hskip -0.65cm\fontsize{16}{1} \textbf{ PREFACE}}
  245. \newcommand\forewordname{\vskip-0.2cm \hskip -0.65cm \fontsize{16.5}{1} \textbf{ APPENDICES}}
  246. \newcommand\ackname{\vskip-0.2cm \hskip -0.65cm \fontsize{16.5}{1} \textbf{ACKNOWLEDGMENT}}
  247. \newcommand\ozetname{\vskip-0.2cm \hskip -0.65cm \fontsize{16.5}{1} \textbf{\"OZ}}
  248. \newcommand{\listsymbolname}{\vskip-0.2cm \hskip -0.65cm\fontsize{16.5}{1} \textbf{LIST OF SYMBOLS}}
  249. %\renewcommand\indexname{\vskip-0.5cm \hskip -0.65cm\fontsize{16}{1} \textbf{INDEX}}
  250. \renewcommand\partname{\vskip-0.5cm \hskip -0.65cm \fontsize{16}{1} \textbf{PART}}
  251. \renewcommand\appendixname{\vskip-0.2cm \hskip -0.65cm \fontsize{16.5}{1} \textbf{APPENDIX}}
  252. \renewcommand\abstractname{\vskip-0.2cm \hskip -0.65cm \fontsize{16.5}{1} \textbf{ABSTRACT}}
  253. %
  254. % Sectional Units
  255. %
  256. \renewcommand\chapter{\clearpage
  257. \global\@topnum\z@
  258. \@afterindenttrue
  259. \secdef\@chapter\@schapter}
  260. %
  261. \renewcommand\@makechapterhead[1]{\begin{center}
  262. {\fontsize{16}{1}
  263. \ifnum \c@secnumdepth >\m@ne
  264. \ifx\@app\empty
  265. \vspace*{-0.8cm} \bfseries Chapter \hspace{0.5ex}\arabic{chapter} \\[0.95cm] %this line is used to set the chapter head margin in the first \vspace(i did \vspace{-1.98} corresponds to 3.5 cm top margin) and and the end of line\\[cm] is used to set the indent between chapter head and title that should be 24 pt which is aproximately 0.65cm after indent \\
  266. %\large\bfseries \hspace{1ex}
  267. \else
  268. \vspace*{-0.5cm}\large\bfseries \appendixname\ \thechapter.\hspace{1ex}
  269. \fi
  270. \fi
  271. \interlinepenalty\@M
  272. \large \bfseries #1\par\nobreak
  273. \vskip\baselineskip
  274. }\end{center}}
  275. %
  276. \renewcommand\@makeschapterhead[1]{\begin{center}
  277. { \normalfont
  278. \interlinepenalty\@M
  279. \vspace*{-1.5cm}\large \bfseries #1\par\nobreak %fo
  280. \vskip\baselineskip
  281. }\end{center}}
  282. %
  283. \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
  284. \refstepcounter{chapter}%
  285. \typeout{\@chapapp\space\thechapter}%
  286. \ifx\@app\empty
  287. \addcontentsline{toc}{chapter}%
  288. {\protect\numberline{\chaptocapp}#1}%
  289. \else
  290. \addtocontents{toc}{%
  291. \noindent
  292. \appendixname\ \thechapter\hspace{1.6ex}#1
  293. \nobreak\leaders
  294. \hbox{$\m@th \mkern \@dotsep mu\mkern
  295. \@dotsep mu$}
  296. \hfill \nobreak
  297. \hb@xt@\@pnumwidth{\hss \thepage}\par}
  298. \fi
  299. \else
  300. \addcontentsline{toc}{chapter}{#1}%
  301. \fi
  302. \chaptermark{#1}%
  303. \@makechapterhead{#2}%
  304. \@afterheading
  305. }
  306. %
  307. \renewcommand\@schapter[1]{\addcontentsline{toc}{chapter}{#1}%
  308. \@makeschapterhead{#1} \@afterheading}
  309. %
  310. \def\chaptocapp{\thechapter}
  311. %
  312. \renewcommand\section{\@startsection {section}{1}{\z@}%
  313. {7pt} %{-3.5ex \@plus -1ex \@minus -.2ex}
  314. {7pt} %{2.3ex \@plus.2ex}%
  315. {\fontsize{14}{1}\raggedright\bfseries\textbf\large}}
  316. \renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
  317. {7pt}%{-3.25ex\@plus -1ex \@minus -.2ex}%
  318. {7pt}%{1.5ex \@plus .2ex}%
  319. {\raggedright\bfseries\textbf\normalsize}}
  320. \renewcommand\subsubsection[1]{\@startsection{subsubsection}{3}{\z@}%
  321. {7pt}%{-3.25ex\@plus -1ex \@minus -.2ex}%
  322. {-0.5em}%
  323. %{-3.25ex\@plus -1ex \@minus -.2ex}%
  324. %{-1em}%
  325. {\normalsize}[#1]{\underbar{#1.}}}
  326. \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%]
  327. {3.25ex \@plus1ex \@minus.2ex}%
  328. {-1em}%
  329. {\normalfont\normalsize\itshape}}
  330. %
  331. % There should be a period after the section number.
  332. \def\@sect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth
  333. \let\@svsec\@empty\else
  334. \refstepcounter{#1}
  335. \ifnum#2=3
  336. \edef\@svsec{\underbar{\csname the#1\endcsname\hskip 0.5em}}
  337. \else
  338. \edef\@svsec{\csname the#1\endcsname\hskip 0.5em}\fi
  339. \fi
  340. \@tempskipa #5\relax
  341. \ifdim \@tempskipa>\z@
  342. \begingroup #6\relax
  343. \@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}%
  344. \endgroup
  345. \csname #1mark\endcsname{#7}
  346. \addcontentsline{toc}{#1}
  347. {\ifnum #2>\c@secnumdepth
  348. \else \protect\numberline{\csname the#1\endcsname}
  349. \fi
  350. #7}
  351. \else
  352. \def\@svsechd{#6\hskip #3\relax %% \relax added 2 May 90
  353. \@svsec #8\ifnum #2>\c@secnumdepth.\fi
  354. \csname #1mark\endcsname{#7}
  355. \addcontentsline{toc}{#1}
  356. {\ifnum #2>\c@secnumdepth
  357. \else \protect\numberline{\csname the#1\endcsname}
  358. \fi
  359. #7}}
  360. \fi
  361. \@xsect{#5}}
  362. %
  363. % First paragraf of a section should be indented
  364. %\def\@startsection#1#2#3#4#5#6{\if@noskipsec \leavevmode \fi
  365. % \par \@tempskipa #4\relax
  366. % \@afterindenttrue
  367. % \ifdim \@tempskipa <\z@ \@tempskipa -\@tempskipa \fi
  368. % \if@nobreak \everypar{}\else
  369. % \addpenalty{\@secpenalty}\addvspace{\@tempskipa}\fi \@ifstar
  370. % {\@ssect{#3}{#4}{#5}{#6}}{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
  371. %
  372. \addtocounter{secnumdepth}{1}
  373. \addtocounter{tocdepth}{1}
  374. %
  375. % Figures and Tables
  376. %
  377. \renewcommand\listfigurename{\vskip 0.85cm \hskip -0.65cm \fontsize{16.5}{1} \textbf{LIST OF FIGURES}}
  378. \renewcommand\listtablename{\vskip 0.85cm \hskip -0.65cm \fontsize{16.5}{1} \textbf{LIST OF TABLES}}
  379. \renewcommand\figurename{Figure}
  380. \renewcommand\tablename{Table}
  381. %
  382. \renewcommand\listoffigures{% \ev is used for temporary storage of \parskip
  383. \setlength{\baselineskip}{\baselineskip} % This is where the linespacing is changed in the list of tables. Aykut Hocanin
  384. \setlength{\ev}{\parskip}
  385. \parskip0pt
  386. \chapter*{\listfigurename
  387. \@mkboth{\listfigurename}%
  388. {\listfigurename}}%
  389. \@starttoc{lof}%
  390. \parskip\ev}
  391.  
  392. \renewcommand\listoftables{% \ev is used for temporary storage of \parskip
  393. \setlength{\baselineskip}{\baselineskip}
  394. \setlength{\ev}{\parskip}
  395. \parskip0pt
  396. \chapter*{\listtablename
  397. \@mkboth{%\vspace{-2cm}
  398. \MakeUppercase\listtablename}{\listtablename}}%
  399. \@starttoc{lot}%
  400. \parskip\ev}
  401. %
  402. % The expressions 'FIGURE' and 'TABLE' also appear in the LOF and LOT.
  403. \long\def\@caption#1[#2]#3{\par\addcontentsline{\csname
  404. ext@#1\endcsname}{#1}{\protect\numberline{
  405. \csname #1name\endcsname \space
  406. % This is where the linespacing is changed in the list of tables. Mohammad Ahmad
  407. % \csname the#1\endcsname .}{\ignorespaces #2}\protect\vspace{\baselineskip}}\begingroup
  408. \csname the#1\endcsname }{\ignorespaces #2}\protect\vspace{0.3\baselineskip}}\begingroup
  409.  
  410. \@parboxrestore
  411. \normalsize
  412. \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
  413. \endgroup}
  414. %
  415. % A period should appear after the caption number.
  416. \long\def\@makecaption#1#2{%
  417. \vskip\abovecaptionskip
  418. \sbox\@tempboxa{#1. #2}%
  419. \ifdim \wd\@tempboxa >\hsize
  420. \centering{#1. #2}\par
  421. \else
  422. \global \@minipagefalse
  423. \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
  424. \fi
  425. \vskip\belowcaptionskip}
  426. %
  427.  
  428. % The lines of LOF and LOT must not be dotted.
  429. \renewcommand\l@figure{\@dottedtocline{1}{0em}{6em}}
  430. \renewcommand\l@table{\@dottedtocline{1}{0em}{5.8em}}
  431. \def\@undottedtocline#1#2#3#4#5{\ifnum #1>\c@tocdepth \else
  432. \vskip \z@ plus.2\p@
  433. {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
  434. \parindent #2\relax\@afterindenttrue
  435. \interlinepenalty\@M
  436. \leavevmode
  437. \@tempdima #3\relax \advance\leftskip \@tempdima \hbox{}\hskip -\leftskip
  438. #4\nobreak\leaders\hbox{}\hfill \nobreak
  439. \hbox to\@pnumwidth{\hfil\reset@font\rm #5}
  440. % \\*[-2cm]
  441. \par}\fi}
  442.  
  443.  
  444. %
  445. % Table of Contents
  446. %
  447.  
  448.  
  449. %\renewcommand\contentsname{TABLE OF CONTENTS}
  450. %\renewcommand\tableofcontents{% \ev is used for temporary strage of \parskip
  451. %\setlength{\ev}{\parskip}
  452. %\parskip0pt
  453. % A line as 'TABLE OF CONTENTS' must not appear in the
  454. % Table of Contents. Hence we reproduce the \chapter* here except that
  455. % no entry is put into the toc file
  456. % \clearpage \global\@topnum\z@
  457. % \@afterindenttrue
  458. % \@makeschapterhead{\contentsname} \@afterheading
  459. %\@starttoc{toc}%
  460. %\parskip\ev}
  461. %
  462.  
  463. \renewcommand\contentsname{\vspace{-0.45cm}\fontsize{16.5}{1}\textbf{TABLE OF CONTENTS}\vspace{-1.2cm}}
  464. \renewcommand\tableofcontents{% \ev is used for temporary storage of \parskip
  465. \setlength{\ev}{\parskip}
  466. \parskip0pt
  467. % A line as 'TABLE OF CONTENTS' must not appear in the
  468. % Table of Contents. Hence we reproduce the \chapter* here except that
  469. % no entry is put into the toc file
  470. \clearpage\global\@topnum\z@
  471. \@afterindenttrue
  472. \begin{center}
  473. { \normalfont
  474. \interlinepenalty\@M
  475. \vspace*{-0.2cm}\large \bfseries \contentsname\par\nobreak
  476. \vskip\baselineskip \vskip\baselineskip % *********** bir vskip fazladan koyduk
  477. }\end{center}
  478. \@afterheading
  479. \@starttoc{toc}%
  480. \parskip\ev}
  481.  
  482.  
  483. % EMU IGER style TOC does not have bold lines
  484. \renewcommand\l@chapter[2]{%
  485. \ifnum \c@tocdepth >\m@ne
  486. \addpenalty{-\@highpenalty}%
  487. %EMU IGER style TOC does not have extra space between chapterlines
  488. \vskip 0.5em \@plus\p@
  489. \setlength\@tempdima{1.5em}%
  490. \begingroup
  491. \parindent \z@ \rightskip \@pnumwidth
  492. \parfillskip -\@pnumwidth
  493. \leavevmode % That is what we have to comment out: \bfseries
  494. \advance\leftskip\@tempdima
  495. \hskip -\leftskip
  496. #1\nobreak\leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep
  497. mu$}\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
  498. \penalty\@highpenalty
  499. \endgroup
  500. \fi}
  501. %
  502. % The spacing of the TOC lines has been redefined.
  503. \renewcommand*\l@section{\@dottedtocline{1}{5em}{2.em}}
  504. \renewcommand*\l@subsection{\@dottedtocline{2}{3.8em}{2.9em}}
  505. \renewcommand*\l@subsubsection{\@dottedtocline{3}{7em}{3.8em}}
  506. \renewcommand*\l@paragraph{\@dottedtocline{4}{11.1em}{4.7em}}
  507. \renewcommand*\l@subparagraph{\@dottedtocline{5}{16.1em}{5.7em}}
  508. %
  509. % Appendix
  510. %
  511. \renewcommand\appendix{\par
  512. \setcounter{chapter}{0}%
  513. \setcounter{section}{0}%
  514. \renewcommand\@chapapp{\appendixname}
  515. \renewcommand\thechapter{\@Alph\c@chapter}%
  516. \let\@app1
  517. }
  518. %
  519. % References
  520. %
  521. %\def\@biblabel#1{#1.} % This removes the square brackets AH
  522. %
  523. \newenvironment{harvardbibliography}{\chapter*{\bibname}%
  524. \begin{list}{}{\topsep0pt \leftmargin2em \rightmargin0pt
  525. \item indent-2em \item sep\parskip \parsep0pt}}
  526. {\def\@noitemerr
  527. {\@latex@warning{Empty `harvardbibliography' environment}}
  528. \end{list}}
  529. %
  530. \newenvironment{bibnotcited}[1]{\chapter*{\bibncname}%
  531. \list{\@biblabel{\@arabic\c@enumiv}}%
  532. {\settowidth\labelwidth{\@biblabel{#1}}%
  533. \leftmargin\labelwidth
  534. \advance\leftmargin\labelsep
  535. \@openbib@code
  536. \usecounter{enumiv}%
  537. \let\p@enumiv\@empty
  538. \renewcommand\theenumiv{\@arabic\c@enumiv}}%
  539. \sloppy
  540. \clubpenalty4000
  541. \@clubpenalty \clubpenalty
  542. \widowpenalty4000%
  543. \sfcode`\.\@m}
  544. {\def\@noitemerr
  545. {\@latex@warning{Empty `bibnotcited' environment}}%
  546. \endlist}
  547. %
  548. \newenvironment{harvardbibnotcited}{\chapter*{\bibncname}%
  549. \begin{list}{}{\topsep0pt \leftmargin2em \rightmargin0pt
  550. \itemindent-2em \itemsep\parskip \parsep0pt}}
  551. {\def\@noitemerr
  552. {\@latex@warning{Empty `harvardbibnotcited' environment}}%
  553. \end{list}}
  554. \renewcommand{\bibname}{\vskip -0.1cm \hskip -0.65cm \fontsize{16.5}{1}\textbf{ REFERENCES}}
  555. %\newcommand{\bibncname}{\vskip-1.3cm \hskip -0.65cm REFERENCES NOT CITED}
  556. %
  557. % Footnotes are numbered consecutively throughout the
  558. % whole thesis and single line-spacing is invoked
  559. %
  560. \def\footnote#1{%
  561. \@ifnextchar[{\@xfootnote}{%
  562. \setcounter{footnote}{\value{thsfootcnt}}%
  563. \addtocounter{thsfootcnt}{1}%
  564. \stepcounter{\@mpfn}%
  565. \begingroup\let\protect\noexpand
  566. \xdef\@thefnmark{\thempfn}\endgroup
  567. \let\baselinestretch\@singlespaced
  568. \@footnotemark\@footnotetext{#1}
  569. \let\baselinestretch\@onehalfspaced}
  570. }
  571. %
  572. % Single line spacing is required in in quotations
  573. %
  574. \renewenvironment{quotation}{%
  575. \par
  576. \list{}{%
  577. \let\baselinestretch\@singlespaced
  578. \listparindent 1.5em%
  579. \itemindent \listparindent
  580. \rightmargin \leftmargin
  581. \parsep \z@ \@plus\p@}%
  582. \item\relax}
  583. {\par
  584. \let\baselinestretch\@onehalfspaced
  585. \endlist}
  586. \renewenvironment{quote}{%
  587. \par
  588. \let\baselinestretch\@singlespaced
  589. \list{}{%
  590. \baselineskip0.67\baselineskip
  591. \listparindent 1.5em%
  592. \itemindent\listparindent
  593. \rightmargin\leftmargin}%
  594. \item\relax}
  595. {\par
  596. \let\baselinestretch\@onehalfspaced
  597. \endlist}
  598. %
  599. % Spacing for displayed formulas (redefine the \normalsize command
  600. % Note: In earlier implementations of LaTeX \@normalsize may need
  601. % to be redefined instead of \normalsize
  602. %
  603. \renewcommand{\normalsize}{\@setsize\normalsize{14.5pt}\xiipt\@xiipt
  604. \abovedisplayskip 20pt %\p@ plus3\p@ minus7\p@
  605. \belowdisplayskip \abovedisplayskip
  606. \abovedisplayshortskip \abovedisplayskip %\z@ plus3\p@
  607. \belowdisplayshortskip \abovedisplayskip %6.5\p@ plus3.5\p@ minus3\p@
  608. \let\@listi\@listI}
  609. %
  610. % Page style
  611. %
  612. \oddsidemargin 1.6cm
  613. \evensidemargin 2cm
  614. \topmargin -1.3cm
  615. %\headheight20pt
  616. \textwidth 146mm
  617. \textheight 249mm
  618. %\pagestyle{myheadings}
  619. %
  620. % Invoke double spacing
  621. \renewcommand{\baselinestretch}{2}
  622. \setlength{\parskip}{\baselineskip}
  623. %
  624. % This is end of emu_tez.sty

User avatar
Stefan Kottwitz
Site Admin
Posts: 8453
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Thu Jul 13, 2017 6:25 pm

Hi!

You don't need to post the whole thesis. Just a small sample (compilable) that lets us reproduce the code. In general, providing a Infominimal working example (you can click that link) is nearly a guarantee for getting a solution.

It can be a reduced copy, or a made-up one new file. In your case this is already enough, together with the style file:
  1. \documentclass{report}
  2. \usepackage{emu_tez}
  3. \begin{document}
  4. \tableofcontents
  5. \chapter{One}
  6. \section{First section}
  7. \chapter{Two}
  8. \section{Another section}
  9. \end{document}


A solution is to add this to your document preamble, reducing the dot separation by changing the internal value \@dotsep:

  1. \makeatletter
  2. \renewcommand\@dotsep{2}% default is 4.5
  3. \makeatother


The test document would look then:

  1. \documentclass{report}
  2. \usepackage{emu_tez}
  3. \makeatletter
  4. \renewcommand\@dotsep{2}% default is 4.5
  5. \makeatother
  6. \begin{document}
  7. \tableofcontents
  8. \chapter{One}
  9. \section{First section}
  10. \chapter{Two}
  11. \section{Another section}
  12. \end{document}


Stefan
Site admin

feryee
Posts: 20
Joined: Sun Aug 09, 2015 12:57 pm

Postby feryee » Thu Jul 13, 2017 7:05 pm

Stefan you are always great. Thank you.


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 4 guests