Advertisement
Guest User

Untitled

a guest
Jul 17th, 2015
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.09 KB | None | 0 0
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. % eBook
  3. % Structural Definitions File
  4. % Version 1.0 (29/12/14)
  5. %
  6. % Created by:
  7. % Vel (vel@latextemplates.com)
  8. %
  9. % This file has been downloaded from:
  10. % http://www.LaTeXTemplates.com
  11. %
  12. % License:
  13. % CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
  14. %
  15. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  16.  
  17. %----------------------------------------------------------------------------------------
  18. % REQUIRED PACKAGES
  19. %----------------------------------------------------------------------------------------
  20.  
  21. \usepackage[utf8]{inputenc} % Required for inputting international characters
  22. \usepackage[T1]{fontenc} % Output font encoding for international characters
  23.  
  24. \usepackage[osf]{libertine} % Use the Libertine font
  25. \usepackage{microtype} % Improves character and word spacing
  26.  
  27. \usepackage{tikz} % Required for drawing custom shapes
  28. \definecolor[named]{color01}{rgb}{.2,.4,.6} % Color used in the title page
  29. \usepackage{wallpaper} % Required for setting background images (title page)
  30. \usepackage{xpatch}
  31. \usepackage{tocloft}
  32. \usepackage[unicode=true,bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,breaklinks=false,pdfborder={0 0 1},backref=section,colorlinks=false]{hyperref} % PDF meta-information specification
  33.  
  34. %----------------------------------------------------------------------------------------
  35. % PAGE NUMBERING
  36. %----------------------------------------------------------------------------------------
  37.  
  38. % \makeatletter
  39. % \xpatchcmd{\@chapter}{\refstepcounter{chapter}}{\refstepcounter{chapter}\refstepcounter{page}}%
  40. % {}{\errmessage{problem in patching \noexpand\chapter}}
  41. % \@addtoreset{page}{chapter}
  42. % \renewcommand\thepage{\ifnum \c@chapter>\z@ \thechapter-\fi \@arabic\c@page}
  43. % \makeatother
  44.  
  45. %----------------------------------------------------------------------------------------
  46. % PAPER, MARGIN AND HEADER/FOOTER SIZES
  47. %----------------------------------------------------------------------------------------
  48.  
  49. \setstocksize{297mm}{210mm} % Paper size
  50. \settrimmedsize{\stockheight}{\stockwidth}{*} % No trims
  51. \setlrmarginsandblock{30pt}{30pt}{*} % Left/right margins
  52. \setulmarginsandblock{30pt}{36pt}{*} % Top/bottom margins
  53. \setheadfoot{14pt}{12pt} % Header/footer height
  54. \setheaderspaces{*}{8pt}{*} % Extra header space
  55.  
  56.  
  57. %----------------------------------------------------------------------------------------
  58. % TABLE OF CONTENTS
  59. %----------------------------------------------------------------------------------------
  60.  
  61.  
  62. %----------------------------------------------------------------------------------------
  63. % FOOTNOTE CUSTOMIZATION
  64. %----------------------------------------------------------------------------------------
  65.  
  66. \renewcommand{\foottextfont}{\itshape\footnotesize} % Font settings for footnotes
  67. \setlength{\footmarkwidth}{-.1em} % Space between the footnote number and the text
  68. \setlength{\footmarksep}{.1em} % Space between multiple footnotes on the same page
  69. \renewcommand*{\footnoterule}{} % Remove the rule above the first footnote
  70. \setlength{\skip\footins}{1\onelineskip} % Space between the body text and the footnote
  71.  
  72. %----------------------------------------------------------------------------------------
  73. % HEADER AND FOOTER FORMATS
  74. %----------------------------------------------------------------------------------------
  75.  
  76. % \makepagestyle{mio} % Define a new custom page style
  77. % \setlength{\headwidth}{\textwidth} % Header the same width as the text
  78. % \makeheadrule{mio}{\textwidth}{0.1mm} % Header rule height
  79. % \makeoddhead{mio}{}{}{} % Header specification
  80. % \makeevenhead{mio}{}{}{} % Header specification
  81. % \makeoddfoot{mio}{}{}{\scshape\thesection} % Footer specification
  82. % \makeevenfoot{mio}{}{}{\scshape\thesection} % Pages of chapters
  83. % \pagestyle{mio} % Set the page style to the custom style defined above
  84.  
  85. %----------------------------------------------------------------------------------------
  86. % PART FORMAT
  87. %----------------------------------------------------------------------------------------
  88.  
  89.  
  90.  
  91.  
  92. \renewcommand{\partnamefont}{\centering\sffamily\itshape\Huge} % Part name font specification
  93. \renewcommand{\partnumfont}{\sffamily\Huge} % Part number font specification
  94. \renewcommand{\parttitlefont}{\centering\sffamily\scshape} % Part title font specification
  95. \renewcommand{\beforepartskip}{\null\vskip.618\textheight} % Whitespace above the part heading
  96.  
  97. %----------------------------------------------------------------------------------------
  98. % CHAPTER FORMAT
  99. %----------------------------------------------------------------------------------------
  100.  
  101. \makechapterstyle{Tufte}{ % Define a new chapter style
  102. \renewcommand{\chapterheadstart}{\null \vskip0.0\onelineskip} % Whitespace before the chapter starts
  103. \renewcommand{\printchaptername}{\scshape\Huge\text{Chapter}} % "Chapter" text font specification
  104. \renewcommand{\printchapternum}{\scshape\Huge\thechapter} % Chapter number font specification (\large\itshape\chaptername)
  105. \renewcommand{\afterchapternum}{\quad\Huge\text{-}\quad} % Space between the chapter number and text
  106. \renewcommand{\printchaptertitle}[1]{ % Chapter title font specification
  107. \raggedright
  108. \scshape\Huge{##1}}
  109. \renewcommand{\afterchaptertitle}{
  110. \rule[0.5em]{\textwidth}{1pt}
  111. \vskip\onelineskip
  112. }}
  113. \chapterstyle{Tufte} % Set the chapter style to the custom style defined above
  114.  
  115. %----------------------------------------------------------------------------------------
  116. % SECTION FORMAT
  117. %----------------------------------------------------------------------------------------
  118.  
  119. \setsecheadstyle{\sethangfrom{\noindent ##1}\raggedright\sffamily\itshape\Large} % Section title font specification
  120. \setbeforesecskip{-.6\onelineskip} % Whitespace before the section
  121. \setaftersecskip{.3\onelineskip} % Whitespace after the section
  122.  
  123. %----------------------------------------------------------------------------------------
  124. % SUBSECTION FORMAT
  125. %----------------------------------------------------------------------------------------
  126.  
  127. \setsubsecheadstyle{\sethangfrom{\noindent ##1}\raggedright\sffamily\large\itshape} % Subsection title font specification
  128. \setbeforesubsecskip{-.5\onelineskip} % Whitespace before the subsection
  129. \setaftersubsecskip{.2\onelineskip} % Whitespace after the subsection
  130.  
  131. %----------------------------------------------------------------------------------------
  132. % SUBSUBSECTION FORMAT
  133. %----------------------------------------------------------------------------------------
  134.  
  135. \setsubsubsecheadstyle{\sethangfrom{\noindent ##1}\raggedright\sffamily\itshape} % Subsubsection title font specification
  136. \setbeforesubsubsecskip{-.5\onelineskip} % Whitespace before the subsubsection
  137. \setaftersubsubsecskip{.1\onelineskip} % Whitespace after the subsubsection
  138.  
  139. %----------------------------------------------------------------------------------------
  140. % CAPTION FORMAT
  141. %----------------------------------------------------------------------------------------
  142.  
  143. \captiontitlefont{\itshape\footnotesize} % Caption font specification
  144. \captionnamefont{\footnotesize} % "Caption" text font specification
  145.  
  146. %----------------------------------------------------------------------------------------
  147. % QUOTATION ENVIRONMENT FORMAT
  148. %----------------------------------------------------------------------------------------
  149.  
  150. \renewenvironment{quotation}
  151. {\par\leftskip=1em\vskip.5\onelineskip\em}
  152. {\par\vskip.5\onelineskip}
  153.  
  154. %----------------------------------------------------------------------------------------
  155. % QUOTE ENVIRONMENT FORMAT
  156. %----------------------------------------------------------------------------------------
  157.  
  158. \renewenvironment{quote}
  159. {\list{}{\em\leftmargin=1em}\item[]}{\endlist\relax}
  160.  
  161. %----------------------------------------------------------------------------------------
  162. % MISCELLANEOUS DOCUMENT SPECIFICATIONS
  163. %----------------------------------------------------------------------------------------
  164.  
  165. \setlength{\parindent}{1em} % Paragraph indentation
  166.  
  167. \midsloppy % Fewer overfull lines - used in the memoir class and allows a setting somewhere between \fussy and \sloppy
  168.  
  169. \checkandfixthelayout % Tell memoir to implement the above
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement