Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.48 KB | None | 0 0
  1. \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$$if(papersize)$$papersize$,$endif$]{$documentclass$}
  2. \usepackage[T1]{fontenc}
  3. \usepackage{lmodern}
  4. \usepackage{amssymb,amsmath}
  5. \usepackage{euler}
  6. \usepackage{ifxetex,ifluatex}
  7. \usepackage{fixltx2e} % provides \textsubscript
  8. % use microtype if available
  9. \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  10. \IfFileExists{microtype.sty}{\usepackage{microtype}}{}
  11. \usepackage[utf8]{inputenc}
  12. $if(euro)$
  13. \usepackage{eurosym}
  14. $endif$
  15. \else % if luatex or xelatex
  16. \usepackage[nofonts,nocap,nopunct,fancyhdr,fntef,hyperref,UTF8]{ctex}
  17. \newcommand{\euro}{€}
  18. $if(mainfont)$
  19. \setmainfont{$mainfont$}
  20. %$else$
  21. %\setmainfont{Livory}
  22. $endif$
  23. $if(sansfont)$
  24. \setsansfont{$sansfont$}
  25. %$else$
  26. %\setsansfont{Myriad Pro}
  27. $endif$
  28. $if(monofont)$
  29. \setmonofont{$monofont$}
  30. $else$
  31. \setmonofont[Mapping={}]{Source Code Pro}
  32. $endif$
  33. $if(mathfont)$
  34. \setmathfont{$mathfont$}
  35. $endif$
  36. $if(cjkmainfont)$
  37. \setCJKmainfont{$mainfont$}
  38. $else$
  39. \setCJKmainfont[ItalicFont={Adobe Kaiti Std R}, BoldFont={方正小标宋_GBK}]{方正书宋_GBK}
  40. $endif$
  41. $if(cjksansfont)$
  42. \setCJKsansfont{$sansfont$}
  43. $else$
  44. %\setCJKsansfont[ItalicFont={Adobe Kaiti Std R},BoldFont={Adobe Heiti Std}]{华文细黑}
  45. \setCJKsansfont[ItalicFont={Adobe Kaiti Std R}, BoldFont={Hiragino Sans GB W6}]{Hiragino Sans GB}
  46. $endif$
  47. $if(cjkmonofont)$
  48. \setCJKmonofont{$monofont$}
  49. $else$
  50. \setCJKmonofont[BoldFont={Hiragino Sans GB W6}]{Adobe Fangsong Std}
  51. $endif$
  52. %\renewcommand\familydefault{\sfdefault}
  53. %\renewcommand\CJKfamilydefault{\CJKsfdefault}
  54. \fi
  55. $if(geometry)$
  56. \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
  57. $endif$
  58. $if(natbib)$
  59. \usepackage{natbib}
  60. \bibliographystyle{plainnat}
  61. $endif$
  62. $if(biblatex)$
  63. \usepackage{biblatex}
  64. $if(biblio-files)$
  65. \bibliography{$biblio-files$}
  66. $endif$
  67. $endif$
  68. $if(listings)$
  69. \usepackage{listings}
  70. \lstset{basicstyle=\ttfamily\small,breaklines}
  71. $endif$
  72. $if(lhs)$
  73. \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
  74. $endif$
  75. $if(highlighting-macros)$
  76. $highlighting-macros$
  77. $endif$
  78. $if(verbatim-in-note)$
  79. \usepackage{fancyvrb}
  80. $endif$
  81. $if(tables)$
  82. \usepackage{longtable}
  83. $endif$
  84. $if(graphics)$
  85. \usepackage{graphicx}
  86. % We will generate all images so they have a width \maxwidth. This means
  87. % that they will get their normal width if they fit onto the page, but
  88. % are scaled down if they would overflow the margins.
  89. \makeatletter
  90. \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth
  91. \else\Gin@nat@width\fi}
  92. \makeatother
  93. \let\Oldincludegraphics\includegraphics
  94. \renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}
  95. $endif$
  96. \ifxetex
  97. % \usepackage[setpagesize=false, % page size defined by xetex
  98. % xetex]{hyperref}
  99. \else
  100. \usepackage[unicode=true]{hyperref}
  101. \fi
  102. \hypersetup{breaklinks=true,
  103. bookmarks=true,
  104. pdfauthor={$author-meta$},
  105. pdftitle={$title-meta$},
  106. colorlinks=true,
  107. urlcolor=$if(urlcolor)$$urlcolor$$else$blue$endif$,
  108. linkcolor=$if(linkcolor)$$linkcolor$$else$magenta$endif$,
  109. pdfborder={0 0 0}}
  110. $if(links-as-notes)$
  111. % Make links footnotes instead of hotlinks:
  112. \renewcommand{\href}[2]{#2\footnote{\url{#1}}}
  113. $endif$
  114. $if(strikeout)$
  115. %\usepackage[normalem]{ulem}
  116. % avoid problems with \sout in headers with hyperref:
  117. \AtEndPreamble{\pdfstringdefDisableCommands{\renewcommand{\sout}{}}}
  118. $endif$
  119. \setlength{\parindent}{0pt}
  120. \setlength{\parskip}{6pt plus 2pt minus 1pt}
  121. \setlength{\emergencystretch}{3em} % prevent overfull lines
  122. $if(numbersections)$
  123. $else$
  124. \setcounter{secnumdepth}{0}
  125. $endif$
  126. $if(verbatim-in-note)$
  127. \AtEndPreamble{\VerbatimFootnotes} % allows verbatim text in footnotes
  128. $endif$
  129. $if(lang)$
  130. \ifxetex
  131. \usepackage{polyglossia}
  132. \setmainlanguage{$mainlang$}
  133. \else
  134. \usepackage[$lang$]{babel}
  135. \fi
  136. $endif$
  137. $for(header-includes)$
  138. $header-includes$
  139. $endfor$
  140.  
  141. $if(title)$
  142. \title{$title$}
  143. $endif$
  144. \author{$for(author)$$author$$sep$ \and $endfor$}
  145. \date{$date$}
  146.  
  147. \begin{document}
  148. $if(title)$
  149. \maketitle
  150. $endif$
  151.  
  152. $for(include-before)$
  153. $include-before$
  154.  
  155. $endfor$
  156. $if(toc)$
  157. {
  158. \hypersetup{linkcolor=black}
  159. \tableofcontents
  160. }
  161. $endif$
  162. $body$
  163.  
  164. $if(natbib)$
  165. $if(biblio-files)$
  166. $if(biblio-title)$
  167. $if(book-class)$
  168. \renewcommand\bibname{$biblio-title$}
  169. $else$
  170. \renewcommand\refname{$biblio-title$}
  171. $endif$
  172. $endif$
  173. \bibliography{$biblio-files$}
  174.  
  175. $endif$
  176. $endif$
  177. $if(biblatex)$
  178. \printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$
  179.  
  180. $endif$
  181. $for(include-after)$
  182. $include-after$
  183.  
  184. $endfor$
  185. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement