diff options
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/bidi/bidituftefloat.sty')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/bidi/bidituftefloat.sty | 45 |
1 files changed, 12 insertions, 33 deletions
diff --git a/Master/texmf-dist/tex/xelatex/bidi/bidituftefloat.sty b/Master/texmf-dist/tex/xelatex/bidi/bidituftefloat.sty index b29bbe19cee..88cf3209cab 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/bidituftefloat.sty +++ b/Master/texmf-dist/tex/xelatex/bidi/bidituftefloat.sty @@ -7,7 +7,7 @@ %% bidi.dtx (with options: `table,bidituftefloat.sty') %% %% __________________________________________________ -%% Copyright (c) 2009--2016 Vafa Khalighi <persian-tex@tug.org> +%% Copyright (c) 2009--2017 Vafa Khalighi <persian-tex@tug.org> %% %% It may be distributed and/or modified under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of @@ -17,7 +17,7 @@ %% by Vafa Khalighi. %% %% -%% \CheckSum{47593} +%% \CheckSum{47651} %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -42,10 +42,6 @@ bidi implementation of tufte float] \newcommand{\bidituftefloatError}[2]{\PackageError{\@bidituftefloat@pkgname}{#1}{#2}} \newcommand{\bidituftefloatDebugInfoNL}[1]{\ifthenelse{\boolean{@bidituftefloat@debug}}{\bidituftefloatInfoNL{#1}}{}} \newcommand{\bidituftefloatInfoNL}[1]{\PackageInfo{\@bidituftefloat@pkgname}{#1\@gobble}} -\newboolean{@bidituftefloat@RTLgeometry} -\setboolean{@bidituftefloat@RTLgeometry}{true} -\DeclareOption{RTLgeometry}{\setboolean{@bidituftefloat@RTLgeometry}{true}} -\DeclareOption{LTRgeometry}{\setboolean{@bidituftefloat@RTLgeometry}{false}} \newboolean{@bidituftefloat@afourpaper} \DeclareOption{a4paper}{\setboolean{@bidituftefloat@afourpaper}{true}} \newboolean{@bidituftefloat@bfivepaper} @@ -71,16 +67,7 @@ bidi implementation of tufte float] \setlength{#1}{#2}% \global#1=#1\relax% } -%% Globally sets a boolean -\newcommand*{\gsetboolean}[2]{% based on code from ifthen pkg - \lowercase{\def\@tempa{#2}}% - \@ifundefined{@tempswa\@tempa}% - {\PackageError{ifthen}{You can only set a boolean to `true' or `false'}\@ehc}% - {\@ifundefined{#1\@tempa}% - {\PackageError{ifthen}{Boolean #1 undefined}\@ehc}% - {\global\csname#1\@tempa\endcsname}% - }% -} + %% Set the font sizes and baselines to match bidituftefloat's books \renewcommand\normalsize{% \@setfontsize\normalsize\@xpt{14}% @@ -110,21 +97,13 @@ bidi implementation of tufte float] \setlength{\parskip}{0pt}% } \RequirePackage{ragged2e} -\ifthenelse{\boolean{@bidituftefloat@RTLgeometry}}{% -\RequirePackage[letterpaper,right=1in,top=1in,headsep=2\baselineskip,textwidth=26pc,marginparsep=2pc,marginparwidth=12pc,textheight=44\baselineskip,headheight=\baselineskip]{geometry} -\ifthenelse{\boolean{@bidituftefloat@afourpaper}} - {\geometry{a4paper,right=24.8mm,top=27.4mm,headsep=2\baselineskip,textwidth=107mm,marginparsep=8.2mm,marginparwidth=49.4mm,textheight=49\baselineskip,headheight=\baselineskip}} - {} -\ifthenelse{\boolean{@bidituftefloat@bfivepaper}} - {\geometry{paperwidth=176mm,paperheight=250mm,right=14.66mm,top=13.88mm,textwidth=102.66mm,marginparsep=7.33mm,marginparwidth=36.66mm,textheight=38\baselineskip,includehead}} - {}}{% \RequirePackage[letterpaper,left=1in,top=1in,headsep=2\baselineskip,textwidth=26pc,marginparsep=2pc,marginparwidth=12pc,textheight=44\baselineskip,headheight=\baselineskip]{geometry} \ifthenelse{\boolean{@bidituftefloat@afourpaper}} {\geometry{a4paper,left=24.8mm,top=27.4mm,headsep=2\baselineskip,textwidth=107mm,marginparsep=8.2mm,marginparwidth=49.4mm,textheight=49\baselineskip,headheight=\baselineskip}} {} \ifthenelse{\boolean{@bidituftefloat@bfivepaper}} {\geometry{paperwidth=176mm,paperheight=250mm,left=14.66mm,top=13.88mm,textwidth=102.66mm,marginparsep=7.33mm,marginparwidth=36.66mm,textheight=38\baselineskip,includehead}} - {}} + {} \ifthenelse{\boolean{@bidituftefloat@symmetric}} {} {\geometry{asymmetric}}% forces internal LaTeX `twoside' @@ -214,8 +193,8 @@ bidi implementation of tufte float] \newcommand{\floatalignment}{x}% holds the current float alignment (t, b, h, p) \newcommand{\setfloatalignment}[1]{\global\def\floatalignment{#1}\@bidituftefloat@float@debug{Forcing position: [#1]}}% manually sets the float alignment \newboolean{@bidituftefloat@float@recto} -\newcommand{\forcerectofloat}{\gsetboolean{@bidituftefloat@float@recto}{true}\@bidituftefloat@float@debug{Forcing page: [recto]}} -\newcommand{\forceversofloat}{\gsetboolean{@bidituftefloat@float@recto}{false}\@bidituftefloat@float@debug{Forcing page: [verso]}} +\newcommand{\forcerectofloat}{\GlobalSetBoolean{@bidituftefloat@float@recto}{true}\@bidituftefloat@float@debug{Forcing page: [recto]}} +\newcommand{\forceversofloat}{\GlobalSetBoolean{@bidituftefloat@float@recto}{false}\@bidituftefloat@float@debug{Forcing page: [verso]}} \newsavebox{\@bidituftefloat@figure@box} \newsavebox{\@bidituftefloat@caption@box} \let\@bidituftefloat@orig@float\@float @@ -242,13 +221,13 @@ bidi implementation of tufte float] {% begin @bidituftefloat@float % Should this float be full-width or just text-width? \ifthenelse{\equal{#3}{star}}% - {\gsetboolean{@bidituftefloat@float@star}{true}}% - {\gsetboolean{@bidituftefloat@float@star}{false}}% + {\GlobalSetBoolean{@bidituftefloat@float@star}{true}}% + {\GlobalSetBoolean{@bidituftefloat@float@star}{false}}% % Check page side (recto/verso) and store detected value -- can be overriden in environment contents \@bidituftefloat@checkoddpage% \ifthenelse{\boolean{@bidituftefloat@odd@page}}% - {\gsetboolean{@bidituftefloat@float@recto}{true}\@bidituftefloat@float@debug{Detected page: [recto/odd]}}% - {\gsetboolean{@bidituftefloat@float@recto}{false}\@bidituftefloat@float@debug{Detected page: [verso/even]}}% + {\GlobalSetBoolean{@bidituftefloat@float@recto}{true}\@bidituftefloat@float@debug{Detected page: [recto/odd]}}% + {\GlobalSetBoolean{@bidituftefloat@float@recto}{false}\@bidituftefloat@float@debug{Detected page: [verso/even]}}% % If the float placement specifier is 'b' and only 'b', then bottom-align the mini-pages, otherwise top-align them. \renewcommand{\@bidituftefloat@fps}{#1}% \@bidituftefloat@float@debug{Allowed positions: [#1]}% @@ -527,8 +506,8 @@ bidi implementation of tufte float] \setboolean{@bidituftefloat@packages@subfigure}{false} \AtBeginDocument{% \@ifpackageloaded{subfigure} - {\gsetboolean{@bidituftefloat@packages@subfigure}{true}} - {\gsetboolean{@bidituftefloat@packages@subfigure}{false}}% + {\GlobalSetBoolean{@bidituftefloat@packages@subfigure}{true}} + {\GlobalSetBoolean{@bidituftefloat@packages@subfigure}{false}}% } \AtBeginDocument{% \@ifpackageloaded{float}{% |