SHARE
TWEET

Some example LaTeX

atimholt Dec 16th, 2019 292 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. \documentclass{scrbook} %---------------------------------------------------v-1-
  2.  
  3. \usepackage{fontspec}
  4. \usepackage{scrlayer-scrpage}
  5. \usepackage{microtype}
  6.  
  7. \usepackage[ papersize={6in, 9in} ]{geometry}
  8.  
  9. \title{The Title of This Book}
  10. \subtitle{The Subtitle}
  11. \author{Some Person}
  12. \date{} % I seem to recall that the \maketitle command needs an empty
  13.         % \date{} command here, or it does some default thing.
  14.  
  15. % Don’t remember
  16. \usepackage[perpage,symbol*]{footmisc}
  17. % Literally for poetry. I’m guessing you don’t need this.
  18. \usepackage{verse}
  19.  
  20. % Special consideration for how ellipses (“...”) work.
  21. \usepackage{ellipsis}
  22. \renewcommand{\ellipsisgap}{0.075em}
  23.  
  24. \newcommand\ChapterWithSubtitle[2]{
  25.  \chapter[#1: {\itshape#2}]{#1\\[2ex]\Large\itshape#2}
  26. }
  27.  
  28. % This is that thing that makes the First letter of a chapter real big.
  29. % I doubt it's something you want, but look it up online for usage.
  30. \usepackage{lettrine}
  31.  
  32. % Makes the em-dash character play a bit nicer with line breaks and whitespace.
  33. \def\dash---{\kern.16667em---\penalty\exhyphenpenalty\hskip.16667em\relax}
  34.  
  35. \begin{document} %----------------------------------------------------------v-1-
  36.  
  37. \maketitle % Uses the metadata provided in the block above that starts with
  38.            % “\title{…”
  39.  
  40. \tableofcontents % Uses metadata generated by chapter headings below, which is
  41.                  % part of why you have to compile multiple times in LaTeX.
  42.  
  43. % Files that implicitly end in .tex. The \input command literally inserts them
  44. % character by character, which means compilation can’t cache per-file output.
  45. % Might be good enough, since \input makes other considerations much simpler
  46. % than the alternative I don’t recall the name of, lol.
  47. \input{"chapters/name_of_file_1"}
  48. \input{"chapters/name_of_file_2"}
  49. \input{"chapters/name_of_file_3"}
  50. \input{"chapters/name_of_file_4"}
  51. \input{"chapters/name_of_file_5"}
  52.  
  53. % …The idea being that you don’t have to follow the syntax of a complete,
  54. % independent .tex file. It also lets you do crazy, perhaps useful stuff like
  55. % this:
  56.  
  57. \chapter{Name of This Chapter}
  58.  
  59. \input{"chapters/name_of_this_chapter"}
  60.  
  61. \end{document} %------------------------------------------------------------^-1-
  62.  
  63. % Below: a Vim modeline that defines a special character sequence that allows
  64. % you to tell Vim where you want your code to fold. See “:help fold-marker”. It
  65. % also enforces some whitespace concerns.
  66.  
  67. % I’m pretty sure modelines are frowned upon nowadays, and insecure, but if you
  68. % change your 'foldmarker' setting per-file (which is also frowned on, probably
  69. % because it necessitates use of a modeline. lol), it’s literally the only way
  70. % to make it work. I just hate the default "fmr={{{,}}}".
  71.  
  72. % vim: set fmr=-v-,-^- fdm=marker et ts=2 sw=0 sts=-1 :
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top