summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/suftesi
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-03-23 22:58:44 +0000
committerKarl Berry <karl@freefriends.org>2013-03-23 22:58:44 +0000
commit3f4c77d66c5216e9a88c7305b5e6a7671a32361a (patch)
treed0f01e2dc7c66f7db7b0b6bdc3c2897a84be952f /Master/texmf-dist/source/latex/suftesi
parent095a7aacbb0570f22a9c11a51344b19a0d1864a3 (diff)
suftesi (23mar13)
git-svn-id: svn://tug.org/texlive/trunk@29484 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/suftesi')
-rw-r--r--Master/texmf-dist/source/latex/suftesi/suftesi.dtx268
1 files changed, 148 insertions, 120 deletions
diff --git a/Master/texmf-dist/source/latex/suftesi/suftesi.dtx b/Master/texmf-dist/source/latex/suftesi/suftesi.dtx
index 1d9d3dc1ff7..4daf6952e81 100644
--- a/Master/texmf-dist/source/latex/suftesi/suftesi.dtx
+++ b/Master/texmf-dist/source/latex/suftesi/suftesi.dtx
@@ -23,7 +23,7 @@
%<class>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
%<class>\ProvidesClass{suftesi}
%<*class>
- [2013/03/05 v1.3 A class for typesetting theses, books and articles]
+ [2013/03/22 v1.5 A class for typesetting theses, books and articles]
%</class>
%<*driver>
\documentclass{ltxdoc}
@@ -133,7 +133,7 @@
%</driver>
% \fi
%
-% \CheckSum{3291}
+% \CheckSum{3346}
%
% \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
@@ -150,9 +150,14 @@
% Right bracket \] Circumflex \^ Underscore \_
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
-% \changes{v1.3}{2013/03/05}{Updated documentation. Added \opt{FSPLa}, \opt{FSPLb} and \opt{FSPLc} styles.}
-% \changes{v1.2}{2012/10/24}{Maintenance release. Added the \cmd{toclabelspace} command.}
-% \changes{v1.1}{2012/10/20}{Added the \sty{fixltxhyph} package. Documentation updated.}
+% \changes{v1.5}{}{\sty{microtype} loaded for all engines. Improved compatibility with \sty{todonotes} package and with \sty{mdframed} and \sty{bookmark} packages when using \sty{style} class option}
+% \changes{v1.4}{2013/03/15}{New value \opt{periodicalaureo} for option \opt{pagelayout}. Changed code for \cmd{xfootnote} command.}
+% \changes{v1.3}{2013/03/05}{Updated documentation. Added \opt{FSPLa},
+% \opt{FSPLb} and \opt{FSPLc} styles.}
+% \changes{v1.2}{2012/10/24}{Maintenance release. Added the
+% \cmd{toclabelspace} command.}
+% \changes{v1.1}{2012/10/20}{Added the \sty{fixltxhyph} package.
+% Documentation updated.}
% \changes{v0.9c}{2012/09/25}{Maintenance release, no changes}
% \changes{v0.9b}{2012/09/23}{Restored \opt{11pt} and \opt{12pt} option
% to default}
@@ -162,13 +167,18 @@
% Changed code for toc, lot and lof elements. }
% \changes{v0.9}{2012/04/22}{Improved compatibility
% with \sty{mathspec}}
-% \changes{v0.8}{2012/03/19}{Added macro for using \sty{frontespizio} package with \opt{compact} and \opt{supercompact} options.}
-% \changes{v0.7}{2011/02/05}{Maintenance release, no changes. Provided a thesis template}
+% \changes{v0.8}{2012/03/19}{Added macro for using \sty{frontespizio}
+% package with \opt{compact} and \opt{supercompact} options.}
+% \changes{v0.7}{2011/02/05}{Maintenance release, no changes.
+% Provided a thesis template}
% \changes{v0.6c}{2011/11/16}{Maintenance release, no changes}
-% \changes{v0.6b}{2011/11/07}{Improved full compatibility with \XeLaTeX.
+% \changes{v0.6b}{2011/11/07}{Improved full compatibility with
+% \XeLaTeX.
% \sty{varioref} and \sty{footmisc} packages are no longer loaded}
% \changes{v0.6a}{2011/10/24}{Maintenance release, no changes}
-% \changes{v0.6}{2011/10/21}{English documentation. Renamed options \opt{plain} and \opt{fullplain} to \opt{centerheadings} and \opt{sufplain}.}
+% \changes{v0.6}{2011/10/21}{English documentation. Renamed options
+% \opt{plain} and \opt{fullplain} to \opt{centerheadings}
+% and \opt{sufplain}.}
% \changes{v0.5}{2011/10/21}{First public release.
% The frontispiece of \sty{suftesi}{} is now
% included in the package \sty{frontespizio}.
@@ -203,7 +213,8 @@
% \DoNotIndex{\huge,\large,\makebox,\ProcessOptions,\renewcommand}
%
% \title{\color{spot}\bfseries User's Guide to \textsf{suftesi}\\
-% \large\itshape A document class for typesetting theses, books and articles}
+% \large\itshape A document class for typesetting theses,
+% books and articles}
% \author{Ivan Valbusa \\
% \texttt{ivan dot valbusa at univr dot it}}
% \date{\fileversion{} -- \filedate}
@@ -218,7 +229,8 @@
% The standard document classes allow you to typeset beautiful
% documents but their layout is quite far from the stylistic requests
% of some humanists (mainly Italian). The \sty{suftesi} class
-% provides a set of ``humanistic'' page layouts, title styles and heading styles to typeset theses, books and articles.
+% provides a set of ``humanistic'' page layouts, title styles
+% and heading styles to typeset theses, books and articles.
% The styles are very simple and sober and also have the aim of
% finding an aesthetic harmony in its formal simplicity. They are
% largely inspired by some interesting readings, particularly
@@ -419,6 +431,8 @@
% showing the crop marks (see table \ref{tab:gabbia} for details).
% This style is expecially meant for theses.
% The \opt{crop=false} option disables the crop marks.
+%\item[periodicalaureo] Similar to \opt{periodical} but with a
+% \emph{golden ratio} text area of $120 \si{cm} \times 194 \si{mm}$.
%\item[compact]
% The same as \opt{periodical} but with a typeblock of $16 \si{cm} \times 24 \si{cm}$ (see table \ref{tab:gabbia} for details).
%\item[supercompact]
@@ -846,13 +860,16 @@
% \changes{v0.9b}{2012/09/23}{New command \cmd{xfootnote}}
%
% A command to print a footnote with a discretionary
-% symbols instead of numbers to mark footnotes. It does not
-% increment the footnote counter.
+% symbols given in the optional argument (default=*).
+% It does not increment the footnote counter.
% \begin{ttquote}
-% \cmd{xfootnote}\{\cmd{dagger}\}\{Footnote text.\}
+% \cmd{xfootnote}[*]\{Footnote text.\}\\
+% \cmd{xfootnote}[\textdollar\cmd{dagger}\textdollar]\{Footnote text.\}\\
+% \cmd{xfootnote}[\cmd{textdagger}]\{Footnote text.\}
% \end{ttquote}
% \end{ltxsyntax}
%
+%
% \clearpage
%
% \section*{Obsolete options}
@@ -1043,6 +1060,7 @@
\newif\ifsuftesi@fewfootnotes
\newif\ifsuftesi@partpage
\newif\ifsuftesi@FSPL
+\newif\ifsuftesi@periodicalaureo
\DeclareOption{a5paper}{%
\ClassError{suftesi}{Option 'a5paper' not available}}
\DeclareOption{b5paper}{%
@@ -1076,7 +1094,7 @@
\RequirePackage{geometry}
\geometry{heightrounded}
\define@choicekey{}{pagelayout}[\val\nr]
- {standard,periodical,compact,supercompact,elements}[standard]{%
+ {standard,periodical,compact,supercompact,elements,periodicalaureo}[standard]{%
\ifcase\nr\relax
\DeclareRobustCommand{\SUF@chaptersize}{\Large}
\geometry{%
@@ -1135,6 +1153,18 @@
marginparwidth= 60pt,
marginparsep= 18pt,
outer= 90pt}
+\or
+\suftesi@periodicalaureotrue
+ \DeclareRobustCommand{\SUF@chaptersize}{\large}
+ \geometry{%
+ includeheadfoot=true,
+ textwidth= 120mm,
+ textheight= 194mm,
+ paperwidth= 17cm,
+ paperheight= 24cm,
+ marginratio= 1:2,
+ marginparwidth= 62pt,
+ marginparsep= 10pt}
\fi}
% \end{macrocode}
% \subsection{Sections style}
@@ -1685,116 +1715,63 @@ dotarabic,dotroman,dotRoman}[arabic]{%
% \end{macrocode}
% The \opt{FSPLa} style:
% \begin{macrocode}
- \suftesi@FSPLtrue
+\suftesi@periodicalaureotrue
+\suftesi@FSPLtrue
\setkeys{}{%
- pagelayout=periodical,
- style=roman1,
- footnotestyle=superscript,
+ pagelayout=periodicalaureo,
+ style=roman5,
+ chapnumstyle=roman,
+ headerstyle=inner,
+ footnotestyle=hung,
liststyle=indented,
- tocstyle=ragged}
-%\disable@keys{}{%
-% documentstructure,
-% pagelayout,
-% partfont,
-% chapfont,
-% secfont,
-% subsecfont,
-% subsubsecfont,
-% partstyle,
-% chapstyle,
-% secstyle,
-% subsecstyle,
-% subsubsecstyle,
-% partnumstyle,
-% chapnumstyle,
-% secnumstyle,
-% tocstyle,
-% headerstyle,
-% headerfont,
-% quotestyle,
-% quotesize,
-% footnotestyle,
-% liststyle,
-% captionstyle,
-% parindent}
+ tocstyle=leftpage}
+\disable@keys{}
+{documentstructure,pagelayout,partfont,chapfont,secfont,%
+subsecfont,subsubsecfont,partstyle,chapstyle,secstyle,%
+subsecstyle,subsubsecstyle,partnumstyle,chapnumstyle,%
+secnumstyle,tocstyle,headerstyle,headerfont,quotestyle,%
+quotesize,footnotestyle,liststyle,captionstyle,parindent}
\or
% \end{macrocode}
% The \opt{FSPLb} style:
% \begin{macrocode}
- \suftesi@FSPLtrue
+\suftesi@periodicalaureotrue
+\suftesi@FSPLtrue
\setkeys{}{%
- pagelayout=periodical,
+ pagelayout=periodicalaureo,
style=italic5,
- headerstyle=center,
chapnumstyle=roman,
- secstyle=center,
- quotestyle=right,
+ headerstyle=inner,
footnotestyle=hung,
liststyle=indented,
- tocstyle=dotted}
-%\disable@keys{}{%
-% documentstructure,
-% pagelayout,
-% partfont,
-% chapfont,
-% secfont,
-% subsecfont,
-% subsubsecfont,
-% partstyle,
-% chapstyle,
-% secstyle,
-% subsecstyle,
-% subsubsecstyle,
-% partnumstyle,
-% chapnumstyle,
-% secnumstyle,
-% tocstyle,
-% headerstyle,
-% headerfont,
-% quotestyle,
-% quotesize,
-% footnotestyle,
-% liststyle,
-% captionstyle,
-% parindent}
+ tocstyle=leftpage}
+\disable@keys{}
+{documentstructure,pagelayout,partfont,chapfont,secfont,%
+subsecfont,subsubsecfont,partstyle,chapstyle,secstyle,%
+subsecstyle,subsubsecstyle,partnumstyle,chapnumstyle,%
+secnumstyle,tocstyle,headerstyle,headerfont,quotestyle,%
+quotesize,footnotestyle,liststyle,captionstyle,parindent}
\or
% \end{macrocode}
% The \opt{FSPLc} style:
% \begin{macrocode}
- \suftesi@FSPLtrue
+\suftesi@periodicalaureotrue
+\suftesi@FSPLtrue
\setkeys{}{%
- pagelayout=periodical,
+ pagelayout=periodicalaureo,
style=smallcaps5,
+ chapnumstyle=roman,
+ headerstyle=inner,
secfont=smallcaps,
- headerstyle=center,
- footnotestyle=dotted,
+ footnotestyle=hung,
liststyle=indented,
tocstyle=leftpage}
-%\disable@keys{}{%
-% documentstructure,
-% pagelayout,
-% partfont,
-% chapfont,
-% secfont,
-% subsecfont,
-% subsubsecfont,
-% partstyle,
-% chapstyle,
-% secstyle,
-% subsecstyle,
-% subsubsecstyle,
-% partnumstyle,
-% chapnumstyle,
-% secnumstyle,
-% tocstyle,
-% headerstyle,
-% headerfont,
-% quotestyle,
-% quotesize,
-% footnotestyle,
-% liststyle,
-% captionstyle,
-% parindent}
+\disable@keys{}
+{documentstructure,pagelayout,partfont,chapfont,secfont,%
+subsecfont,subsubsecfont,partstyle,chapstyle,secstyle,%
+subsecstyle,subsubsecstyle,partnumstyle,chapnumstyle,%
+secnumstyle,tocstyle,headerstyle,headerfont,quotestyle,%
+quotesize,footnotestyle,liststyle,captionstyle,parindent}
\fi}
% \end{macrocode}
% Execute and process options:
@@ -1844,6 +1821,17 @@ dotarabic,dotroman,dotRoman}[arabic]{%
\XKV@useoption{legalpaper}\XKV@useoption{executivepaper}
\XKV@useoption{landscape}
% \end{macrocode}
+% A LaTeX3 trick to delete the class options from \@classoptionslist,
+% in order to avoid incompatibility with packages defining options
+% defined by suftesi. Thanks to Enrico Gregorio!
+% \begin{macrocode}
+\RequirePackage{expl3,l3regex}
+\ExplSyntaxOn
+\AtEndOfClass{
+\regex_replace_all:nnN { style \s* = [^,]*? , } { , } \XKV@classoptionslist
+}
+\ExplSyntaxOff
+% \end{macrocode}
% \subsection{Basic packages}
% \begin{macrocode}
\RequirePackage{color}
@@ -1853,6 +1841,7 @@ dotarabic,dotroman,dotRoman}[arabic]{%
\RequirePackage{emptypage}
\RequirePackage{textcase}
\RequirePackage{ifxetex}
+\RequirePackage{microtype}
% \end{macrocode}
% The FSPL style requires a verbose colophon which uses specific icons:
% \begin{macrocode}
@@ -1867,7 +1856,6 @@ dotarabic,dotroman,dotRoman}[arabic]{%
\ifxetex
\relax
\else
-\RequirePackage{microtype}
\RequirePackage[LGR,T1]{fontenc}
\AtBeginDocument{\fontencoding{T1}\selectfont}
\ifsuftesi@standardfont
@@ -2004,6 +1992,7 @@ dotarabic,dotroman,dotRoman}[arabic]{%
% \DescribeMacro{\chapter}
% Default styles:
% \begin{macrocode}
+\newlength\SUF@ADJnumparchap
\def\SUF@default@CHAPTER{
\ifsuftesi@numparchap
\titleformat{\chapter}[display]
@@ -2019,9 +2008,9 @@ dotarabic,dotroman,dotRoman}[arabic]{%
{\SUF@CHAP@StyleSwitch}
\fi
\ifsuftesi@numparchap
- \def\SUF@ADJnumparchap{-2.5\baselineskip}
+ \setlength{\SUF@ADJnumparchap}{-2.5\baselineskip}
\else
- \def\SUF@ADJnumparchap{0pt}
+ \setlength{\SUF@ADJnumparchap}{0pt}
\fi}
% \end{macrocode}
% \DescribeMacro{\section}
@@ -2085,6 +2074,10 @@ dotarabic,dotroman,dotRoman}[arabic]{%
\RequirePackage{extramarks}
\SUF@elements@CHAPTER
\SUF@elements@SECTIONS
+\ifsuftesi@periodicalaureo
+ \titlespacing*{\chapter}{0em}{-\baselineskip}{10pt}[0pt]
+ \setkeys[SUF]{elements}{chapsize=80,chapposition=-83}
+\else
\ifsuftesi@periodical
\titlespacing*{\chapter}{0em}{-\baselineskip}{10pt}[0pt]
\setkeys[SUF]{elements}{chapsize=80,chapposition=-83}
@@ -2103,6 +2096,7 @@ dotarabic,dotroman,dotRoman}[arabic]{%
\else
\titlespacing*{\chapter}{0em}{-\baselineskip}{10pt}[0pt]
\setkeys[SUF]{elements}{chapsize=90,chapposition=-83}
+ \fi
\fi
\fi
\fi
@@ -2110,6 +2104,10 @@ dotarabic,dotroman,dotRoman}[arabic]{%
\else
\SUF@default@CHAPTER
\SUF@default@SECTIONS
+\ifsuftesi@periodicalaureo
+ \titlespacing*{\chapter}{0em}{0\SUF@ADJnumparchap}{18ex}
+ \titlespacing*{name=\chapter,numberless}{0em}{0pt}{18ex}
+\else
\ifsuftesi@periodical
\titlespacing*{\chapter}{0em}{\SUF@ADJnumparchap}{18ex}
\titlespacing*{name=\chapter,numberless}{0em}{0pt}{18ex}
@@ -2125,10 +2123,11 @@ dotarabic,dotroman,dotRoman}[arabic]{%
\titlespacing*{\chapter}{0em}{%
\dimexpr(6ex+\SUF@ADJnumparchap)}{18ex}
\titlespacing*{name=\chapter,numberless}{0em}{6ex}{18ex}
+ \fi
+ \fi
\fi
\fi
\fi
-\fi
% \end{macrocode}
% \subparagraph{Redefinitions for \opt{`article'} mode}
% \begin{macrocode}
@@ -2757,7 +2756,6 @@ dotarabic,dotroman,dotRoman}[arabic]{%
% \paragraph{The \opt{fewfootnotes} option}
% Enable only with three footnotes per page maximum.
% \begin{macrocode}
-\let\oldfootnote\footnote
\ifsuftesi@fewfootnotes
\AtBeginDocument{
\def\@fnsymbol#1{\ensuremath{\ifcase#1\or*\or{*}{*}\or{*}{*}{*}\or%
@@ -2774,11 +2772,9 @@ dotarabic,dotroman,dotRoman}[arabic]{%
% Prints a footnote with discretionary
% symbol give in the first argument.
% \begin{macrocode}
-\newcommand{\xfootnote}[2]{%
- \begingroup
- \addtocounter{footnote}{-1}%
- \def\thefootnote{#1}\oldfootnote{#2}%
- \endgroup}
+\newcommand*\xfootnote[1][*]{%
+ \xdef\@thefnmark{#1}%
+ \@footnotemark\@footnotetext}
% \end{macrocode}
% \subsubsection{Marginal notes}
% \DescribeMacro{\marginpar}
@@ -2801,10 +2797,32 @@ dotarabic,dotroman,dotRoman}[arabic]{%
\tolerance=2000 \hyphenpenalty=300 \exhyphenpenalty=300%
\doublehyphendemerits=100000%
\finalhyphendemerits=\doublehyphendemerits}
-\let\oldmarginpar\marginpar
-\renewcommand{\marginpar}[1]{\oldmarginpar%
- [\SUF@mpsetup\raggedleft\hspace{0pt}{#1}]%
- {\SUF@mpsetup\raggedright\hspace{0pt}{#1}}}
+ \let\oldmarginpar\marginpar
+ \renewcommand{\marginpar}[1]{\oldmarginpar%
+ [\SUF@mpsetup\raggedleft\hspace{0pt}{#1}]%
+ {\SUF@mpsetup\raggedright\hspace{0pt}{#1}}}
+% \end{macrocode}
+% Redefine an internal command of the \sty{todonotes} package in
+% order to use the class-specific marginal notes when this
+% package is loaded. This redefinition simply substitute
+% \cmd{oldmarginpar} to \cmd{marginpar}:
+% \begin{macrocode}
+\AtBeginDocument{
+\@ifpackageloaded{todonotes}{%
+\renewcommand{\@todonotes@drawMarginNoteWithLine}{%
+\begin{tikzpicture}[remember picture, overlay, baseline=-0.75ex]%
+ \node [coordinate] (inText) {};%
+\end{tikzpicture}%
+\oldmarginpar[{% Draw note in left margin
+ \@todonotes@drawMarginNote%
+ \@todonotes@drawLineToLeftMargin%
+}]{% Draw note in right margin
+ \@todonotes@drawMarginNote%
+ \@todonotes@drawLineToRightMargin%
+}%
+}%
+}
+{\relax}}
% \end{macrocode}
% \subsubsection{Abstract}
% This is the macro that defines the \env{abstract} environment in \sty{article} class. In \sty{suftesi} it simply prints the abstract name in roman font:
@@ -2886,8 +2904,10 @@ dotarabic,dotroman,dotRoman}[arabic]{%
\end{center}
\vspace*{\stretch{6}}}
% \end{macrocode}
-% \DescribeMacro{The FSPL colophon} \experimental
+% \DescribeMacro{\FSPLcolophon} \experimental
+% This command is defined only for the \opt{style=FSPL*} options.
% \begin{macrocode}
+\ifsuftesi@FSPL
\newcommand{\FSPLcolophon}[1][\the\year]{%
\begingroup
\thispagestyle{empty}
@@ -2919,6 +2939,14 @@ Non si pu\`o alterare o trasformare quest'opera, n\'e usarla per crearne un'altr
\end{description}
\endgroup
\clearpage}
+\else
+\def\FSPLcolophon{%
+ \ClassError{suftesi}
+ {\noexpand\FSPLcolophon is defined\MessageBreak
+ only for the FSPL styles}
+ {\noexpand\FSPLcolophon is defined\MessageBreak
+ only for the FSPL styles}}
+\fi
% \end{macrocode}
% \subsection{TOC, LOF, LOT}
% \begin{macrocode}