From 78938ec97cf0bc1ee623b34dc38d56861d9a6cd7 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 24 Jul 2011 23:44:18 +0000 Subject: frontespizio 1.4 (18jul11) git-svn-id: svn://tug.org/texlive/trunk@23213 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/frontespizio/frontespizio.sty | 155 +++++++++++++++++++-- 1 file changed, 146 insertions(+), 9 deletions(-) (limited to 'Master/texmf-dist/tex/latex/frontespizio/frontespizio.sty') diff --git a/Master/texmf-dist/tex/latex/frontespizio/frontespizio.sty b/Master/texmf-dist/tex/latex/frontespizio/frontespizio.sty index 14ce8b1a6ea..a492140b0b8 100644 --- a/Master/texmf-dist/tex/latex/frontespizio/frontespizio.sty +++ b/Master/texmf-dist/tex/latex/frontespizio/frontespizio.sty @@ -19,7 +19,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2005/12/01] \ProvidesPackage{frontespizio} - [2011/03/08 1.3 (Enrico Gregorio)] + [2011/07/18 1.4 (Enrico Gregorio)] \def\@not@eTeX{% \PackageError{frontespizio} @@ -47,12 +47,14 @@ \DeclareOption{norules}{\let\front@norules=T} \DeclareOption{nouppercase}{\let\front@nouppercase=T} \DeclareOption{noinputenc}{\let\front@noinputenc=T} +\DeclareOption{standard}{\def\front@shape{standard}} +\DeclareOption{suftesi}{\def\front@shape{suftesi}\def\fronttitlecolor{Maroon}} \newif\iffront@include \DeclareOption{onlyinclude}{\front@includetrue\ExecuteOptions{nowrite}} \let\front@otheroptions\@empty \DeclareOption*{\expandafter\g@addto@macro\expandafter\front@otheroptions \expandafter{\CurrentOption,}} -\ExecuteOptions{write,normal} +\ExecuteOptions{write,normal,standard} \ProcessOptions\relax \RequirePackage{afterpage} \RequirePackage{graphicx} @@ -94,28 +96,41 @@ \long\def\front@write#1{} \let\front@expwrite\front@write \fi +\front@expwrite{\@percentchar\@percentchar\space This file has been + automatically generated by `frontespizio'.} +\front@expwrite{\@percentchar\@percentchar\space Don't use it as a model for a + new frontispiece, use the} +\front@expwrite{\@percentchar\@percentchar\space `frontespizio' + environment in you document instead.} \front@write{\documentclass[titlepage]{article}} \ifdefined\front@noinputenc\else \ifdefined\inputencodingname \front@expwrite{\string\usepackage[\inputencodingname]{inputenc}} \fi \fi -\front@write{\usepackage[a4paper,% - left=1cm,bottom=1.5cm,right=1cm,top=1cm]{geometry}} +\def\front@geometry@standard{% + \front@write{\usepackage[a4paper,left=1cm,bottom=1.5cm,% + right=1cm,top=1cm]{geometry}}} +\def\front@geometry@suftesi{% + \front@write{\usepackage[a4paper,textwidth=312pt,includehead,% + textheight=624pt,right=90pt,vmarginratio=1:2]{geometry}}} +\@nameuse{front@geometry@\front@shape} \ifx\front@otheroptions\@empty \front@write{\usepackage{graphicx}} + \front@write{\usepackage[svgnames]{xcolor}} \else \begingroup \def\KV@errx#1{% \PackageError{frontespizio}{Key #1} {The only allowed key is `driver'; the given key will be ignored.% \MessageBreak Type \space \space to proceed.}} - \define@key{front}{driver}{\front@write{\usepackage[#1]{graphicx}}} + \define@key{front}{driver}{\front@write{\usepackage[#1]{graphicx}}% + \front@write{\usepackage[#1,svgnames]{xcolor}}} \edef\front@processkeys{\noexpand\setkeys{front}{\front@otheroptions}} \front@processkeys \endgroup \fi -\def\front@theoptions{nowrite,infront} +\edef\front@theoptions{nowrite,infront,\front@shape} \ifdefined\front@signatures \g@addto@macro\front@theoptions{,signatures} \fi @@ -293,7 +308,7 @@ \else \let\front@MakeUppercase\MakeUppercase \fi -\def\preparefrontpage{% +\def\preparefrontpagestandard{% \titlepage\front@font \centering \par @@ -403,7 +418,127 @@ \fi \par} \endtitlepage} +\def\preparefrontpagesuftesi{% + \titlepage\front@font + \renewcommand{\frontinstitutionfont}{\normalfont} + \renewcommand{\frontdivisionfont}{\large} + \renewcommand{\frontpretitlefont}{\normalsize\sffamily} + \renewcommand{\fronttitlefont}{\huge\sffamily} + \renewcommand{\frontsubtitlefont}{\normalsize\sffamily} + \renewcommand{\frontnamesfont}{\normalfont} + \renewcommand{\frontfixednamesfont}{\normalsize\sffamily} + \renewcommand{\frontfootfont}{\normalfont} + \parindent\z@ + \makebox[\textwidth][r]{% + \begin{minipage}{6pc} + \if\@front@{logo} + {\includegraphics[height=\textwidth]{\front@logo}} + \else + \hspace*{\textwidth} + \fi + \end{minipage}% + \hspace{2.5pc}% + \begin{minipage}{\dimexpr\textwidth-4pc\relax} + \frontinstitutionfont + \if\@front@{inst} + \front@instit + \else + Universit\`a degli Studi di \front@univ + \fi\par + \frontdivisionfont + \if\@front@{multiple} + \front@multiple + \else + \if\@front@{division} + \front@division + \else + \front@thefacoldip\ di \front@facoldip + \fi + \fi\par + \frontinstitutionfont + \vskip1ex\hrule\vskip1.2ex + \if\@front@{school} + \front@school + \else + Corso di \front@cl + \fi\par + \end{minipage}\hspace*{4pc}}\par + \vspace{\stretch{5}} + \if\@front@{titoletto} + {\frontpretitlefont\front@titoletto\par} + \fi + \vspace{\stretch{2}} + {\fronttitlefont\color{\fronttitlecolor}\front@title\par} + \if\@front@{sottotit} + \vspace{4ex} + {\frontsubtitlefont\front@subtitle\par} + \fi + \vspace{\stretch{3}} + \def\front@makecandidates{% + \begin{tabular}[t]{@{}l} + \relax\ifnum\front@candcount<1 + \PackageWarningNoLine{frontespizio}{Missing candidate name}% + \else + \frontfixednamesfont + \ifnum\front@candcount=1 + \front@thecandidate + \else + \front@thecandidates + \fi + \front@punct\\ + \the\front@candtoks + \fi + \end{tabular} + } + \def\front@makeadvisors{% + \unless\ifdefined\front@noadvisor + \begin{tabular}[t]{@{}l} + \relax + \ifcase\front@relcount + \PackageWarningNoLine{frontespizio}{Missing advisor name}% + \or + \frontfixednamesfont\front@theadvisor\front@punct + \else + \frontfixednamesfont\front@theadvisors\front@punct + \fi + \the\front@reltoks + \if\@front@{correl} + \\[\frontrelcorrelsep] + \ifcase\front@correlcount\or + \frontfixednamesfont\front@thecoadvisor\front@punct + \else + \frontfixednamesfont\front@thecoadvisors\front@punct + \fi + \the\front@correltoks + \fi + \end{tabular} + \fi} + \vspace{\stretch{1}} + \frontnamesfont + \ifdefined\front@swapnames% relatori candidati + \front@makeadvisors\par + \vspace{3ex} + \front@makecandidates\par + \else% candidati relatori + \front@makecandidates\par + \vspace{3ex} + \front@makeadvisors\par + \fi + \vfill + \ifdefined\front@signatures\vskip\frontadjustforsignatures\fi + \unless\ifdefined\front@norules\fi + \vspace{\stretch{5}} + \frontfootfont + \if\@front@{foot} + \front@foot + \else + Anno Accademico \front@anno + \fi + \par +\endtitlepage} +\let\preparefrontpage\preparefrontpagestandard \else +\newenvironment{Preambolo*}{\Collect@Body\@gobble}{} \newcommand{\Preambolo}[1]{} \newcommand{\Rientro}[1]{} \newcommand{\Margini}[4]{} @@ -471,14 +606,16 @@ \IfFileExists{\jobname-frn.\front@ext} {\AtBeginShipoutNext{\AtBeginShipoutUpperLeft{% \vbox to\z@{\hbox{\includegraphics{\jobname-frn}}\vss}}}} - {\@front@messagetrue}% + {\PackageWarningNoLine{frontespizio} + {Missing file \jobname-frn.\front@ext}% + \@front@messagetrue}% \afterpage{\thispagestyle{empty}}% \endtitlepage \if@twoside\front@cp\fi } \def\endfrontespizio{% \front@write{\begin{document}} - \front@write{\preparefrontpage} + \front@expwrite{\string\preparefrontpage\front@shape} \front@write{\end{document}} \iffront@write\immediate\closeout\front@out\fi \ifdefined\front@mdfiveold -- cgit v1.2.3