Procházet zdrojové kódy

* Using the `symmetric' option now executes the `twoside' option automatically.

This fixes issue #7.
* Added some debug output and cleaned up its appearance.


git-svn-id: https://tufte-latex.googlecode.com/svn/trunk@65 516e2f36-ce3a-0410-bea4-1d4a03f5df72
master
Kevin M. Godby před 17 roky
rodič
revize
7e8524273b
2 změnil soubory, kde provedl 40 přidání a 9 odebrání
  1. +32
    -9
      tufte-common.sty
  2. +8
    -0
      tufte-handout.cls

+ 32
- 9
tufte-common.sty Zobrazit soubor

@@ -68,14 +68,24 @@

%%
% `symmetric' option -- puts marginpar space to the outside edge of the page
% Note: this option forces the twoside option
% Note: this option forces the twoside option (see the .cls files)

\newboolean{@tufte@symmetric}
\DeclareOption{symmetric}{
\setboolean{@tufte@symmetric}{true}
\PassOptionsToClass{twoside}{\@tufte@class}
\PackageInfo{\@tufte@pkgname}{The `symmetric' option implies `twoside'.}
%\ExecuteOptions{twoside}
}

%%
% `twoside' option -- alternates running heads

\newboolean{@tufte@twoside}
\DeclareOption{twoside}{
\setboolean{@tufte@twoside}{true}
}


%%
% `justified' option -- uses fully justified text (flush left and flush
% right) instead of ragged right.
@@ -89,16 +99,15 @@
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\@tufte@class}}
\ProcessOptions

%\LoadClass{\@tufte@class}

%%
% Detect whether we're in two-side mode or not. (Used to set up running
% heads later.)

\newboolean{@tufte@twoside}
\ifthenelse{\boolean{@twoside}}
{\setboolean{@tufte@twoside}{true}}
{\setboolean{@tufte@twoside}{false}}
{}



%%
% Detect if we're using pdfLaTeX
@@ -148,7 +157,7 @@

\ifthenelse{\boolean{@tufte@symmetric}}
{}
{\geometry{asymmetric}}
{\geometry{asymmetric}}% forces internal LaTeX `twoside'


%%
@@ -605,12 +614,19 @@

\newcommand{\typeoutbool}[2]{%
\ifthenelse{\boolean{#2}}
{\typeout{#1: true}}
{\typeout{#1: false}}
{\typeout{\space\space#1: true}}
{\typeout{\space\space#1: false}}
}

\newcommand{\typeoutstr}[2]{%
\typeout{\space\space#1: #2}
}

\newcommand{\PrintTufteSettings}{%
\typeout{-------------------- Tufte-LaTeX settings ----------}
\typeout{Class: \@tufte@pkgname}
\typeout{}
\typeout{Class options:}
\typeoutbool{a4paper}{@tufte@afourpaper}
\typeoutbool{load fonts}{@tufte@loadfonts}
\typeoutbool{fully-justified}{@tufte@justified}
@@ -618,6 +634,13 @@
\typeoutbool{sans-serif sidenotes}{@tufte@sfsidenotes}
\typeoutbool{symmetric margins}{@tufte@symmetric}
\typeoutbool{titlepage}{@tufte@titlepage}
\typeoutbool{twoside}{@tufte@twoside}
\typeoutbool{debug}{@tufte@debug}
\typeout{}
\typeout{Internal variables:}
\typeoutbool{[twoside]}{@twoside}
\typeoutbool{pdflatex}{@tufte@pdf}
\typeoutbool{xelatex}{@tufte@xetex}
\typeout{----------------------------------------------------}
}



+ 8
- 0
tufte-handout.cls Zobrazit soubor

@@ -2,6 +2,14 @@

\ProvidesClass{tufte-handout}[2008/11/16 v3.0.0 Tufte-handout class]

%%
% The symmetric option forces twoside.
\DeclareOption{symmetric}{%
\ExecuteOptions{twoside}
\PassOptionsToPackage{twoside}{tufte-common}
\PassOptionsToClass{twoside}{article}
\PackageInfo{tufte-handout}{Passing twoside to `article' class}
}

\PassOptionsToPackage{handout}{tufte-common}
\DeclareOption*{% pass options to tufte-common package and the article class


Načítá se…
Zrušit
Uložit