You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tufte-book.cls 2.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. \NeedsTeXFormat{LaTeX2e}[1994/06/01]
  2. \ProvidesClass{tufte-book}[2008/11/16 v3.0.0 Tufte-book class]
  3. \PassOptionsToPackage{book}{tufte-common}
  4. \DeclareOption*{% pass options to tufte-common package and the article class
  5. \PassOptionsToPackage{\CurrentOption}{tufte-common}
  6. \PassOptionsToClass{\CurrentOption}{book}
  7. \PackageInfo{tufte-book}{Passing \CurrentOption\space to `book' class}
  8. }
  9. \ProcessOptions
  10. \LoadClass{book}
  11. \RequirePackage{tufte-common}
  12. %%
  13. % Set up any book-specific stuff now
  14. %%
  15. % The front matter in Tufte's /Beautiful Evidence/ contains everything up
  16. % to the opening page of Chapter 1. The running heads, when they appear,
  17. % contain only the (arabic) page number in the outside corner.
  18. %\newif\if@mainmatter \@mainmattertrue
  19. \renewcommand\frontmatter{%
  20. \cleardoublepage
  21. \@mainmatterfalse
  22. \pagenumbering{arabic}
  23. %\pagestyle{plain}
  24. \fancyhf{}
  25. \if@tufte@twoside
  26. \fancyhead[LE,RO]{\thepage}
  27. \else
  28. \fancyhead[RE,RO]{\thepage}
  29. \fi
  30. }
  31. %%
  32. % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page
  33. % numbering---it continues where it left off in the front matter.
  34. \renewcommand\mainmatter{%
  35. \cleardoublepage
  36. \@mainmattertrue
  37. % TODO The book should have the book title on the left and the chapter
  38. % title on the right.
  39. \fancyhf{}
  40. \if@tufte@twoside
  41. \renewcommand{\chaptermark}[1]{\markboth{##1}{}}
  42. \fancyhead[LE]{\thepage\quad\smallcaps{\thetitle}}% book title
  43. \fancyhead[RO]{\smallcaps{\leftmark}\quad\thepage}% chapter title
  44. \else
  45. \fancyhead[RE,RO]{\smallcaps{\thetitle}\quad\thepage}% book title
  46. \fi
  47. }
  48. %%
  49. % The back matter contains appendices, indices, glossaries, endnotes,
  50. % biliographies, list of contributors, illustration credits, etc.
  51. \renewcommand\backmatter{%
  52. \if@openright
  53. \cleardoublepage
  54. \else
  55. \clearpage
  56. \fi
  57. \@mainmatterfalse
  58. }
  59. %%
  60. % If there is a `tufte-book-local.sty' file, load it.
  61. \IfFileExists{tufte-book-local.tex}
  62. {\input{tufte-book-local}}
  63. {}
  64. %%
  65. % End of file
  66. \endinput