Advertisement
Guest User

Untitled

a guest
Jun 26th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.79 KB | None | 0 0
  1. documentclass[10pt,final]{scrbook}
  2.  
  3. usepackage{titletoc} % modify toc title
  4. usepackage{lipsum} % dummy text
  5. usepackage{anyfontsize} % change fontsize
  6. usepackage{tocloft} % design toc
  7. usepackage{framed, xcolor}
  8. usepackage[english,ngerman]{babel}
  9. usepackage[latin1]{inputenc}
  10. usepackage[T1]{fontenc}
  11. usepackage{times}
  12. usepackage{helvet}
  13. usepackage{endnotes}
  14. usepackage{titlesec}
  15. usepackage[hyphens]{url}
  16. usepackage{multicol}
  17. usepackage[colorlinks=false, pdfborder={0 0 0}]{hyperref}
  18. urlstyle{same}
  19.  
  20.  
  21. addtocaptionsngerman{renewcommand{contentsname}{normalfont{Contents}}}
  22. % section itshape
  23. titleformat*{section}{itshape}
  24. titleformat*{subsection}{itshape}
  25. titlespacing*{subsection}{0cm}{0.84cm}{0.42cm}
  26. titlespacing*{section}{0cm}{0.84cm}{0.42cm}
  27. % Spacing between chapter and author
  28. titlespacing*{chapter}{0cm}{0.84cm}{0.42cm}
  29. %%% Chapter style
  30. titleformat{chapter}[display]
  31. {normalfont}{chaptertitlename thechapter}{12pt}{Large}
  32.  
  33. % Display chapters in the Table of Contents
  34. titlecontents{chapter}
  35. [0pt]% Left margin, optional
  36. {}% Code insertet above
  37. {mdseries}% Numbered-entryformat
  38. {mdseries}% Numberless-format
  39. {contentspage} % add dotfill and pagenumber, and some vertical space between entries
  40.  
  41. % Custom command to keep the author on the same page of chaptertitle, and above it.
  42. newcommand{chapterAndAuthor} [2]{
  43. % #1: Author
  44. % #2: Chaptertitle
  45. clearpage%
  46. % Minipage to keep the author and chaptertitle on same page
  47. noindentbegin{minipage}{textwidth}
  48. % Set the author style
  49. {selectfontfontsize{12}{14} itshape{#1}}
  50. % Bring the chaptertitle closer to the authortitle
  51. vspace{-3baselineskip}
  52. % Add an entry to the Table of Contents, with the name of the author in emph and the chapter title
  53. addcontentsline{toc}{chapter}{texorpdfstring{normalfont #1vspace{1ex}newline
  54. % For long chapter titles using a parbox
  55. hspace*{1em}protectparbox[b]{textwidth}{#2 dotfill}}{#2}}
  56. % Print the chapter
  57. chapter*{#2}
  58. end{minipage}
  59. }
  60.  
  61.  
  62. % space between table of contents
  63. setlengthcftparskip{0.21cm}
  64. setlengthcftbeforesecskip{10pt}
  65. setlengthcftaftertoctitleskip{10pt}
  66. %pagestyle%
  67. usepackage[paperheight=21.0cm,paperwidth=13.5cm,twoside,textwidth=10.3cm,textheight=16.3cm,nohead,pdftex]{geometry}
  68. pagestyle{plain}
  69.  
  70. begin{document}
  71. tableofcontents
  72.  
  73. clearpage
  74.  
  75. chapterAndAuthor{The name of the first author, The name of second author and The name of the third author}{Test Chapter One Test Chapter One Test Chapter One Test Chapter One Test Chapter One Test Chapter One Test Chapter One}
  76. lipsum[1-4]
  77. vspace{0.84cm}
  78. subsection*{Subheading1 without indentation}
  79. lipsum[1-4]
  80. subsection*{Subheading2 without indentation}
  81. lipsum[1-2]
  82. subsection*{Subheading3 without indentation}
  83. lipsum[1-2]
  84. chapterAndAuthor{The name of the second author}{Test Chapter Two}
  85. lipsum[1-5]
  86.  
  87. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement