Browse Source

* Changed the ``bidi'' option to load bidi at the end of the preamble.

git-svn-id: https://tufte-latex.googlecode.com/svn/trunk@164 516e2f36-ce3a-0410-bea4-1d4a03f5df72
master
Kevin M. Godby 15 years ago
parent
commit
4344cc13da
1 changed files with 38 additions and 6 deletions
  1. +38
    -6
      tufte-common.def

+ 38
- 6
tufte-common.def View File

@@ -284,6 +284,11 @@
\setboolean{@tufte@xetex}{false} \setboolean{@tufte@xetex}{false}
} }


\ifthenelse{\boolean{@tufte@xetex}}{%
\RequirePackage{xltxtra}% xltxtra loads xunicode and fontspec; must be loaded before bidi
}{}


%% %%
% Globally sets the length % Globally sets the length


@@ -786,11 +791,20 @@


\RequirePackage{setspace} \RequirePackage{setspace}


%%
% Color
\RequirePackage[usenames,dvipsnames,svgnames]{xcolor}% load before bidi

%% %%
% Load the bidi package if instructed to do so. This package must be loaded % Load the bidi package if instructed to do so. This package must be loaded
% prior to our redefining the \footnote and \cite commands. % prior to our redefining the \footnote and \cite commands.


\ifthenelse{\boolean{@tufte@loadbidi}}{\RequirePackage{bidi}}{}
\ifthenelse{\boolean{@tufte@loadbidi}}{%
\AtBeginDocument{%
\RequirePackage{bidi}
\@tufte@pkghook@post@bidi%
}%
}{}




%% %%
@@ -956,7 +970,6 @@
\marginpar{% \marginpar{%
\hbox{}\vspace*{#1}% \hbox{}\vspace*{#1}%
\def\baselinestretch {\setspace@singlespace}% \def\baselinestretch {\setspace@singlespace}%
\ifthenelse{\boolean{@tufte@loadbidi}}{\if@rl@footnote\@rltrue\else\@rlfalse\fi}{}%
\reset@font\footnotesize% \reset@font\footnotesize%
\@tufte@margin@par% use parindent and parskip settings for marginal text \@tufte@margin@par% use parindent and parskip settings for marginal text
\vspace*{-1\baselineskip}\noindent% \vspace*{-1\baselineskip}\noindent%
@@ -971,6 +984,29 @@
}% }%
}% }%


% Ensure this is run after the bidi package has been loaded
\def\@tufte@pkghook@post@bidi{}%
\g@addto@macro{\@tufte@pkghook@post@bidi}{%
\renewcommand\@footnotetext[2][0pt]{%
\marginpar{%
\hbox{}\vspace*{#1}%
\def\baselinestretch {\setspace@singlespace}%
\if@rl@footnote\@rltrue\else\@rlfalse\fi%
\reset@font\footnotesize%
\@tufte@margin@par% use parindent and parskip settings for marginal text
\vspace*{-1\baselineskip}\noindent%
\protected@edef\@currentlabel{%
\csname p@footnote\endcsname\@thefnmark%
}%
\color@begingroup%
\@makefntext{%
\ignorespaces#2%
}%
\color@endgroup%
}%
}%
}%

% %
% Define \sidenote command. Can handle \cite. % Define \sidenote command. Can handle \cite.


@@ -1449,10 +1485,6 @@






%%
% Color
\RequirePackage[usenames,dvipsnames,svgnames]{xcolor}

%% %%
% Produces a full title page % Produces a full title page




Loading…
Cancel
Save