Kaynağa Gözat

* 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 17 yıl önce
ebeveyn
işleme
7e8524273b
2 değiştirilmiş dosya ile 40 ekleme ve 9 silme
  1. +32
    -9
      tufte-common.sty
  2. +8
    -0
      tufte-handout.cls

+ 32
- 9
tufte-common.sty Dosyayı Görüntüle

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


%% %%
% `symmetric' option -- puts marginpar space to the outside edge of the page % `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} \newboolean{@tufte@symmetric}
\DeclareOption{symmetric}{ \DeclareOption{symmetric}{
\setboolean{@tufte@symmetric}{true} \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 % `justified' option -- uses fully justified text (flush left and flush
% right) instead of ragged right. % right) instead of ragged right.
@@ -89,16 +99,15 @@
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\@tufte@class}} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{\@tufte@class}}
\ProcessOptions \ProcessOptions


%\LoadClass{\@tufte@class}

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


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




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


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




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


\newcommand{\typeoutbool}[2]{% \newcommand{\typeoutbool}[2]{%
\ifthenelse{\boolean{#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}{% \newcommand{\PrintTufteSettings}{%
\typeout{-------------------- Tufte-LaTeX settings ----------} \typeout{-------------------- Tufte-LaTeX settings ----------}
\typeout{Class: \@tufte@pkgname}
\typeout{}
\typeout{Class options:}
\typeoutbool{a4paper}{@tufte@afourpaper} \typeoutbool{a4paper}{@tufte@afourpaper}
\typeoutbool{load fonts}{@tufte@loadfonts} \typeoutbool{load fonts}{@tufte@loadfonts}
\typeoutbool{fully-justified}{@tufte@justified} \typeoutbool{fully-justified}{@tufte@justified}
@@ -618,6 +634,13 @@
\typeoutbool{sans-serif sidenotes}{@tufte@sfsidenotes} \typeoutbool{sans-serif sidenotes}{@tufte@sfsidenotes}
\typeoutbool{symmetric margins}{@tufte@symmetric} \typeoutbool{symmetric margins}{@tufte@symmetric}
\typeoutbool{titlepage}{@tufte@titlepage} \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{----------------------------------------------------} \typeout{----------------------------------------------------}
} }




+ 8
- 0
tufte-handout.cls Dosyayı Görüntüle

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


\ProvidesClass{tufte-handout}[2008/11/16 v3.0.0 Tufte-handout class] \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} \PassOptionsToPackage{handout}{tufte-common}
\DeclareOption*{% pass options to tufte-common package and the article class \DeclareOption*{% pass options to tufte-common package and the article class


Yükleniyor…
İptal
Kaydet