diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/upmethodology/upmethodology-fmt.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/upmethodology/upmethodology-fmt.sty | 144 |
1 files changed, 112 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/latex/upmethodology/upmethodology-fmt.sty b/Master/texmf-dist/tex/latex/upmethodology/upmethodology-fmt.sty index 0e56a9a08d4..43e7b695903 100644 --- a/Master/texmf-dist/tex/latex/upmethodology/upmethodology-fmt.sty +++ b/Master/texmf-dist/tex/latex/upmethodology/upmethodology-fmt.sty @@ -17,7 +17,7 @@ % write to the Free Software Foundation, Inc., 59 Temple Place - Suite % 330, Boston, MA 02111-1307, USA. -\global\edef\upm@package@fmt@ver{2013/09/26} +\global\edef\upm@package@fmt@ver{2013/10/16} \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{upmethodology-fmt}[\upm@package@fmt@ver] @@ -147,7 +147,11 @@ % DEFAULT GRAPHICX CONFIGURATION %---------------------------------------- -\DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.tiff,.gif} +\ifpdf + \DeclareGraphicsExtensions{.pdf,.png,.jpg,.jpeg,.gif} +\else + \DeclareGraphicsExtensions{.eps,.png,.jpg,.jpeg,.gif} +\fi \graphicspath{{./}} %---------------------------------------- @@ -250,7 +254,11 @@ \providecommand{\DeclareGraphicsExtensionsWtex}[1]{% \xdef\@autolatex@wtfig@extensions{\zap@space#1 \@empty}% } -\DeclareGraphicsExtensionsWtex{.pdftex_t,.pstex_t,.pdf_tex,.ps_tex} +\ifpdf + \DeclareGraphicsExtensionsWtex{.pdftex_t,.pdf_tex} +\else + \DeclareGraphicsExtensionsWtex{.pstex_t,.ps_tex} +\fi \providecommand{\@autolatex@wtfig@searchinpath}[1]{% \IfFileExists{#1}{% @@ -675,16 +683,20 @@ \def\chaptertoc{\@ifstar% {\gdef\upm@format@newsection@alignment{\protect\numberline{}}\expandafter\upm@format@newsection@chapter}% {\gdef\upm@format@newsection@alignment{}\expandafter\upm@format@newsection@chapter}} -\def\upm@format@newsection@chapter{\@ifnextchar [% - {\expandafter\upm@format@newsection@chapter@opt}% - {\expandafter\upm@format@newsection@chapter@nopt}} -\def\upm@format@newsection@chapter@opt[#1]#2{% - \@schapter{#2\addcontentsline{toc}{chapter}{\upm@format@newsection@alignment{#1}}}% - \chaptermark{#1}% + +\def\upm@format@newsection@chapter{\@ifnextchar[% + {\upm@format@newsection@chapter@a}% + {\upm@format@newsection@chapter@b}% } -\def\upm@format@newsection@chapter@nopt#1{% - \@schapter{#1\addcontentsline{toc}{chapter}{\upm@format@newsection@alignment{#1}}}% - \chaptermark{#1}% + +\def\upm@format@newsection@chapter@a[#1]#2{% + \expandafter\chapter*[#1]{#2}% + \addcontentsline{toc}{chapter}{\upm@format@newsection@alignment{#1}}% +} + +\def\upm@format@newsection@chapter@b#1{% + \expandafter\chapter*{#1}% + \addcontentsline{toc}{chapter}{\upm@format@newsection@alignment{#1}}% } %----- @@ -738,6 +750,54 @@ \subsubsection*{#1\addcontentsline{toc}{subsubsection}{\upm@format@newsection@alignment{#1}}}% } +%----- +% Chapter with different titles for in the TOC, the headers and on the pages +%\chapterfull[in toc]{on page}{in header} % with number +%\chapterfull*[in toc]{on page}{in header} % without number +\def\chapterfull{\@ifstar% + {\gdef\upm@format@newsection@thesectionmacro{\chapter*}\upm@format@newsection@chapterfull}% + {\gdef\upm@format@newsection@thesectionmacro{\chapter}\upm@format@newsection@chapterfull}% +} + +\def\upm@format@newsection@chapterfull{\@ifnextchar[% + \upm@format@newsection@chapterfull@a% + \upm@format@newsection@chapterfull@b% +} + +\def\upm@format@newsection@chapterfull@a[#1]#2#3{% + \upm@format@newsection@thesectionmacro[#1]{#2}% + \chaptermark{#3}% +} + +\def\upm@format@newsection@chapterfull@b#1#2{% + \upm@format@newsection@thesectionmacro{#1}% + \chaptermark{#2}% +} + +%----- +% Section with different titles for in the TOC, the headers and on the pages +%\sectionfull[in toc]{on page}{in header} % with number +%\sectionfull*[in toc]{on page}{in header} % without number +\def\sectionfull{\@ifstar% + {\gdef\upm@format@newsection@thesectionmacro{\section*}\upm@format@newsection@sectionfull}% + {\gdef\upm@format@newsection@thesectionmacro{\section}\upm@format@newsection@sectionfull}% +} + +\def\upm@format@newsection@sectionfull{\@ifnextchar[% + \upm@format@newsection@sectionfull@a% + \upm@format@newsection@sectionfull@b% +} + +\def\upm@format@newsection@sectionfull@a[#1]#2#3{% + \upm@format@newsection@thesectionmacro[#1]{#2}% + \global\sectionmark{#3}% +} + +\def\upm@format@newsection@sectionfull@b#1#2{% + \upm@format@newsection@thesectionmacro{#1}% + \global\sectionmark{#2}% +} + %---------------------------------------- % BIBLIOGRAPHY %---------------------------------------- @@ -854,21 +914,31 @@ % PEOPLE NAME %---------------------------------------- -\newcommand{\makenamespacing}[1]{% - \expandafter\upm@foreach.\in#1\do{% +\def\makenamespacing#1{% + \upm@format@makenamespacing{#1}\xspace% +} + +\def\upm@format@makenamespacing#1{% + \upm@foreach.\in#1\do{% \ignorespaces\upm@foreach@term.\,% }{% - \ignorespaces\upm@foreach@term\xspace% + \ignorespaces\upm@foreach@term% }% - \ignorespaces } +\gdef\upm@format@people@title#1{\textsc{#1}} +\def\upm@format@firstname@format#1{% + {\smaller\textsc{\upm@format@makenamespacing{#1}}}% +} +\def\upm@format@von@format#1{\mbox{\smaller\ignorespaces#1}} +\def\upm@format@lastname@format#1{\textsc{\ignorespaces#1}} + %\upmmakename[von]{firstname}{lastname}{separator} \newcommand{\upmmakename}[4][\relax]{% \ifx#1\relax% - {\mbox{\smaller \makenamespacing{#2}}#4\textsc{\ignorespaces#3}}% + {\upm@format@firstname@format{#2}#4\upm@format@lastname@format{#3}}% \else% - {\mbox{\smaller \makenamespacing{#2}}#4\mbox{\smaller #1}#4\textsc{\ignorespaces#3}}% + {\upm@format@firstname@format{#2}#4\upm@format@von@format{#1}#4\upm@format@lastname@format{#3}}% \fi% \xspace% } @@ -879,15 +949,25 @@ } %\makelastname[von]{lastname} -\newcommand{\makelastname}[2][\relax]{\mbox{\smaller#1} \textsc{\ignorespaces#2}\xspace} +\newcommand{\makelastname}[2][\relax]{% + \ifx#1\relax% + \upm@format@lastname@format{#2}% + \else% + \upm@format@von@format{#1}\ \upm@format@lastname@format{#2}% + \fi% + \xspace% +} -\gdef\upm@format@people@title#1{\textsc{#1}} +%\makefirstname{firstname} +\newcommand{\makefirstname}[1]{% + \upm@format@firstname@format{#1}\xspace% +} %\prname[von]{firstname}{lastname} %\prname*[von]{firstname}{lastname} \def\prname{\@ifstar\upm@prnamestar\upm@prname} \newcommand{\upm@prname}[3][\relax]{% - \upm@format@people@title{\upm@format@lang@professor}~\upmmakename[#1]{#2}{#3}{\ }% + \upm@format@people@title{\upm@format@lang@professor}\,\upmmakename[#1]{#2}{#3}{\ }% } \newcommand{\upm@prnamestar}[3][\relax]{% \upmmakename[#1]{#2}{#3}{\ }, \upm@format@people@title{\upm@format@lang@professor}% @@ -897,7 +977,7 @@ %\drname*[von]{firstname}{lastname} \def\drname{\@ifstar\upm@drnamestar\upm@drname} \newcommand{\upm@drname}[3][\relax]{% - \upm@format@people@title{\upm@format@lang@doctor}~\upmmakename[#1]{#2}{#3}{\ }% + \upm@format@people@title{\upm@format@lang@doctor}\,\upmmakename[#1]{#2}{#3}{\ }% } \newcommand{\upm@drnamestar}[3][\relax]{% \upmmakename[#1]{#2}{#3}{\ }, \upm@format@people@title{\upm@format@lang@doctor}% @@ -907,7 +987,7 @@ %\phdname*[von]{firstname}{lastname} \def\phdname{\@ifstar\upm@phdnamestar\upm@phdname} \newcommand{\upm@phdname}[3][\relax]{% - \upm@format@people@title{\upm@format@lang@phdoctor}~\upmmakename[#1]{#2}{#3}{\ }% + \upm@format@people@title{\upm@format@lang@phdoctor}\,\upmmakename[#1]{#2}{#3}{\ }% } \newcommand{\upm@phdnamestar}[3][\relax]{% \upmmakename[#1]{#2}{#3}{\ }, \upm@format@people@title{\upm@format@lang@phdoctor}% @@ -917,7 +997,7 @@ %\scdname*[von]{firstname}{lastname} \def\scdname{\@ifstar\upm@scdnamestar\upm@scdname} \newcommand{\upm@scdname}[3][\relax]{% - \upm@format@people@title{\upm@format@lang@scdoctor}~\upmmakename[#1]{#2}{#3}{\ }% + \upm@format@people@title{\upm@format@lang@scdoctor}\,\upmmakename[#1]{#2}{#3}{\ }% } \newcommand{\upm@scdnamestar}[3][\relax]{% \upmmakename[#1]{#2}{#3}{\ }, \upm@format@people@title{\upm@format@lang@scdoctor}% @@ -927,7 +1007,7 @@ %\mdname*[von]{firstname}{lastname} \def\mdname{\@ifstar\upm@mdnamestar\upm@mdname} \newcommand{\upm@mdname}[3][\relax]{% - \upm@format@people@title{\upm@format@lang@mdoctor}~\upmmakename[#1]{#2}{#3}{\ }% + \upm@format@people@title{\upm@format@lang@mdoctor}\,\upmmakename[#1]{#2}{#3}{\ }% } \newcommand{\upm@mdnamestar}[3][\relax]{% \upmmakename[#1]{#2}{#3}{\ }, \upm@format@people@title{\upm@format@lang@mdoctor}% @@ -937,7 +1017,7 @@ %\pengname*[von]{firstname}{lastname} \def\pengname{\@ifstar\upm@pengnamestar\upm@pengname} \newcommand{\upm@pengname}[3][\relax]{% - \upm@format@people@title{\upm@format@lang@professionalengineer}~\upmmakename[#1]{#2}{#3}{\ }% + \upm@format@people@title{\upm@format@lang@professionalengineer}\,\upmmakename[#1]{#2}{#3}{\ }% } \newcommand{\upm@pengnamestar}[3][\relax]{% \upmmakename[#1]{#2}{#3}{\ }, \upm@format@people@title{\upm@format@lang@professionalengineer}% @@ -947,7 +1027,7 @@ %\iengname*[von]{firstname}{lastname} \def\iengname{\@ifstar\upm@iengnamestar\upm@iengname} \newcommand{\upm@iengname}[3][\relax]{% - \upm@format@people@title{\upm@format@lang@incorporatedengineer}~\upmmakename[#1]{#2}{#3}{\ }% + \upm@format@people@title{\upm@format@lang@incorporatedengineer}\,\upmmakename[#1]{#2}{#3}{\ }% } \newcommand{\upm@iengnamestar}[3][\relax]{% \upmmakename[#1]{#2}{#3}{\ }, \upm@format@people@title{\upm@format@lang@incorporatedengineer}% @@ -1006,18 +1086,18 @@ %---------------------------------------- % DESCRIPTION LIST WITH BULLETS %---------------------------------------- -\gdef\upm@fmt@itemizeddescription@separator{\iflanguage{french}{ :}{:}} +\gdef\upm@fmt@itemizeddescription@separator{\iflanguage{french}{ :}{:}\ } \newcommand{\upm@fmt@itemizeddescription@formatdescription}[1]{\textbf{#1}} -\newcommand{\upm@fmt@itemizeddescription@desc}[1]{% - \upm@fmt@itemizeddescription@formatdescription{#1\upm@fmt@itemizeddescription@separator}\ % +\newcommand{\upm@fmt@itemizeddescription@desc}[2]{% + \upm@fmt@itemizeddescription@formatdescription{#1#2}% } \let\upm@fmt@olditem\item \let\upm@item@param\upm@fmt@olditem \let\upm@item@noparam\upm@fmt@olditem \def\item{\@ifnextchar[\upm@item@param\upm@item@noparam} -\renewenvironment{description}[1][]{% +\renewenvironment{description}[1][\upm@fmt@itemizeddescription@separator]{% \begin{itemize}% - \renewcommand{\upm@item@param}[1][]{\upm@fmt@olditem \upm@fmt@itemizeddescription@desc{##1}}% + \renewcommand{\upm@item@param}[1][]{\upm@fmt@olditem \upm@fmt@itemizeddescription@desc{##1}{#1}}% \renewcommand{\upm@item@noparam}{\upm@fmt@olditem }% }{% \end{itemize}% |