diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2011-08-02 18:37:42 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2011-08-02 18:37:42 +0000 |
commit | ff94e44b3898f59065c492d5e5e597234f1b49b1 (patch) | |
tree | ca2da7b855c1964f46c29a41ed2e2c50be200d9f /Master/texmf-dist/tex/latex/bidi/bidituftetitle.sty | |
parent | 2880aaf97110f638a133d7ba59e8ecbd15150b2f (diff) |
bidi v1.2.4
git-svn-id: svn://tug.org/texlive/trunk@23326 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/bidi/bidituftetitle.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/bidi/bidituftetitle.sty | 166 |
1 files changed, 166 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/bidi/bidituftetitle.sty b/Master/texmf-dist/tex/latex/bidi/bidituftetitle.sty new file mode 100644 index 00000000000..58f40a764be --- /dev/null +++ b/Master/texmf-dist/tex/latex/bidi/bidituftetitle.sty @@ -0,0 +1,166 @@ +%% +%% This is file `bidituftetitle.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% bidi.dtx (with options: `bidituftetitle.sty') +%% +%% ______________________________________ +%% Copyright © 2009–2011 Vafa Khalighi +%% +%% License information appended. +%% +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{bidituftetitle}[2011/06/18 v0.1 +bidi implementation of tufte title] +\RequirePackage{etoolbox} +%% +\newboolean{@bidituftetitle@titlepage} +\DeclareOption{titlepage}{\setboolean{@bidituftetitle@titlepage}{true}} +\DeclareOption{notitlepage}{\setboolean{@bidituftetitle@titlepage}{false}} +\@ifclassloaded{book}{% +\ExecuteOptions{titlepage}}{% +\@ifclassloaded{article}{% +\ExecuteOptions{notitlepage}}% +{}} +\ProcessOptions +%% +\newcommand{\plaintitle}{}% plain-text-only title +\newcommand{\plainauthor}{}% plain-text-only author +\newcommand{\plainpublisher}{}% plain-text-only publisher +\newcommand{\thanklesstitle}{}% full title text minus \thanks{} +\newcommand{\thanklessauthor}{}% full author text minus \thanks{} +\newcommand{\thanklesspublisher}{}% full publisher minus \thanks{} +\newcommand{\@publisher}{}% full publisher with \thanks{} +\newcommand{\thedate}{\today} +\hopatch@AfterPackage{bidi}{% +\renewcommand{\thanks}[1]{\footnote{#1}} +\renewcommand{\LTRthanks}[1]{\LTRfootnote{#1}} +\renewcommand{\RTLthanks}[1]{\RTLfootnote{#1}} +} +\renewcommand{\title}[2][]{% + \gdef\@title{#2}% + \begingroup% + % TODO store contents of \thanks command + \renewcommand{\thanks}[1]{}% swallow \thanks contents + \renewcommand{\LTRthanks}[1]{}% swallow \LTRthanks contents + \renewcommand{\RTLthanks}[1]{}% swallow \RTLthanks contents + \protected@xdef\thanklesstitle{#2}% + \endgroup% + \ifthenelse{\isempty{#1}}% + {\renewcommand{\plaintitle}{\thanklesstitle}}% use thankless title + {\renewcommand{\plaintitle}{#1}}% use provided plain-text title + \@ifundefined{hypersetup}% + {}% hyperref is not loaded; do nothing + {\hypersetup{pdftitle={\plaintitle}}}% set the PDF metadata title +} +\let\@author\@empty% suppress default latex.ltx ``no author'' warning +\renewcommand{\author}[2][]{% + \ifthenelse{\isempty{#2}}{}{\gdef\@author{#2}}% + \begingroup% + % TODO store contents of \thanks command + \renewcommand{\thanks}[1]{}% swallow \thanks contents + \renewcommand{\LTRthanks}[1]{}% swallow \LTRthanks contents + \renewcommand{\RTLthanks}[1]{}% swallow \RTLthanks contents + \protected@xdef\thanklessauthor{#2}% + \endgroup% + \ifthenelse{\isempty{#1}}% + {\renewcommand{\plainauthor}{\thanklessauthor}}% use thankless author + {\renewcommand{\plainauthor}{#1}}% use provided plain-text author + \@ifundefined{hypersetup}% + {}% hyperref is not loaded; do nothing + {\hypersetup{pdfauthor={\plainauthor}}}% set the PDF metadata author +} +\renewcommand{\date}[1]{% + \gdef\@date{#1}% + \begingroup% + % TODO store contents of \thanks command + \renewcommand{\thanks}[1]{}% swallow \thanks contents + \renewcommand{\LTRthanks}[1]{}% swallow \LTRthanks contents + \renewcommand{\RTLthanks}[1]{}% swallow \RTLthanks contents + \protected@xdef\thedate{#1}% + \endgroup% +} +%% +\newcommand{\publisher}[2][]{% + \gdef\@publisher{#2}% + \begingroup% + \renewcommand{\thanks}[1]{}% swallow \thanks contents + \renewcommand{\LTRthanks}[1]{}% swallow \LTRthanks contents + \renewcommand{\RTLthanks}[1]{}% swallow \RTLthanks contents + \protected@xdef\thanklesspublisher{#2}% + \endgroup% + \ifthenelse{\isempty{#1}} + {\renewcommand{\plainpublisher}{\thanklesspublisher}}% use thankless publisher + {\renewcommand{\plainpublisher}{#1}}% use provided plain-text publisher +} +%% +\newcommand{\maketitlepage}[0]{% + \cleardoublepage% + {% + \bfseries% + \begin{fullwidth}% + \fontsize{18}{20}\selectfont\par\noindent\thanklessauthor% + \vspace{11.5pc}% + \fontsize{36}{40}\selectfont\par\noindent\thanklesstitle% + \vfill% + \fontsize{14}{16}\selectfont\par\noindent\thanklesspublisher% + \end{fullwidth}% + } + \thispagestyle{empty}% + \clearpage% +} +%% +\AfterEndPreamble{% +\renewcommand{\maketitle}{% + \newpage% + \global\@topnum\z@% prevent floats from being placed at the top of the page + \begingroup% + \setlength{\parindent}{0pt}% + \setlength{\parskip}{4pt}% + \let\@@title\@empty% + \let\@@author\@empty% + \let\@@date\@empty% + \gdef\@@title{\LARGE\itshape\@title\par}% + \gdef\@@author{\Large\itshape\@author\par}% + \gdef\@@date{\Large\itshape\@date\par}% + \@@title% + \@@author% + \@@date% + \endgroup% + \thispagestyle{plain}% suppress the running head +}% +} +%% +\AfterEndPreamble{% +\ifthenelse{\boolean{@bidituftetitle@titlepage}} + {\renewcommand{\maketitle}{\maketitlepage}} + {} +} +%% +\def\cleardoublepage{\clearpage\if@twoside\ifodd\c@page\else + \hbox{} + %\vspace*{\fill} + %\begin{center} + % This page intentionally contains only this sentence. + %\end{center} + %\vspace{\fill} + \thispagestyle{empty} + \newpage + \if@twocolumn\hbox{}\newpage\fi\fi\fi} +%% +%% Copyright © 2009–2011 Vafa Khalighi <vafa018@gmail.com> +%% +%% It may be distributed and/or modified under the LaTeX Project Public License, +%% version 1.3c or higher (your choice). The latest version of +%% this license is at: http://www.latex-project.org/lppl.txt +%% +%% This work is “author-maintained” (as per LPPL maintenance status) +%% by Vafa Khalighi. +%% +%% +%% +%% +%% End of file `bidituftetitle.sty'. |