25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.2KB

  1. \NeedsTeXFormat{LaTeX2e}[1994/06/01]
  2. \ProvidesClass{tufte-book}[2015/06/30 v3.5.3 Tufte-book class]
  3. %%
  4. % Declare we're tufte-book
  5. \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the book style)
  6. \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout)
  7. %%
  8. % Load the common style elements
  9. \input{tufte-common.def}
  10. %%
  11. % Set up any book-specific stuff now
  12. %%
  13. % The front matter in Tufte's /Beautiful Evidence/ contains everything up
  14. % to the opening page of Chapter 1. The running heads, when they appear,
  15. % contain only the (arabic) page number in the outside corner.
  16. %\newif\if@mainmatter \@mainmattertrue
  17. \renewcommand\frontmatter{%
  18. \if@openright%
  19. \cleardoublepage%
  20. \else%
  21. \clearpage%
  22. \fi%
  23. \@mainmatterfalse%
  24. \pagenumbering{arabic}%
  25. %\pagestyle{plain}%
  26. \fancyhf{}%
  27. \ifthenelse{\boolean{@tufte@twoside}}%
  28. {\fancyhead[LE,RO]{\thepage}}%
  29. {\fancyhead[RE,RO]{\thepage}}%
  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. \if@openright%
  36. \cleardoublepage%
  37. \else%
  38. \clearpage%
  39. \fi%
  40. \@mainmattertrue%
  41. \fancyhf{}%
  42. \ifthenelse{\boolean{@tufte@twoside}}%
  43. {% two-side
  44. \renewcommand{\chaptermark}[1]{\markboth{##1}{}}%
  45. \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title
  46. \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title
  47. }%
  48. {% one-side
  49. \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title
  50. }%
  51. }
  52. %%
  53. % The back matter contains appendices, indices, glossaries, endnotes,
  54. % bibliographies, list of contributors, illustration credits, etc.
  55. \renewcommand\backmatter{%
  56. \if@openright%
  57. \cleardoublepage%
  58. \else%
  59. \clearpage%
  60. \fi%
  61. \@mainmatterfalse%
  62. }
  63. %%
  64. % Only show the chapter titles in the table of contents
  65. \setcounter{tocdepth}{0}
  66. %%
  67. % If there is a `tufte-book-local.sty' file, load it.
  68. \IfFileExists{tufte-book-local.tex}{%
  69. \@tufte@info@noline{Loading tufte-book-local.tex}%
  70. \input{tufte-book-local}%
  71. }{}
  72. %%
  73. % End of file
  74. \endinput