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 | 485 |
1 files changed, 388 insertions, 97 deletions
diff --git a/Master/texmf-dist/tex/latex/upmethodology/upmethodology-fmt.sty b/Master/texmf-dist/tex/latex/upmethodology/upmethodology-fmt.sty index bef85f869ed..823ad0eee69 100644 --- a/Master/texmf-dist/tex/latex/upmethodology/upmethodology-fmt.sty +++ b/Master/texmf-dist/tex/latex/upmethodology/upmethodology-fmt.sty @@ -18,7 +18,19 @@ % 330, Boston, MA 02111-1307, USA. % % Creation date: 2006-04-06 -% Modifications: +% Modifications (lastest first): +% 2009-11-02 Bug fix: footnote macros are fixed. +% Add macros: \prname, \drname, \phdname, \scdname, +% \mdname, \pename, \iename. +% 2009-10-30 Add support for book and report classes. +% 2009-10-28 Add \parskip. +% Rename macros to avoid conflicts: \st->\ust, \nd->\und, +% \rd->\urd, \th->\uth +% 2009-10-27 Add framedminipage environment. +% 2009-06-25 Add \tablenote in mtable environment. +% 2009-06-23 Add upmcaution, upminfo and upmquestion environments. +% 2009-05-08 Remove CR character +% Add \arakhneorg command % 2009-04-29 Include package pifont (texlive distribution) % 2007-07-07 Override the bibliography functions. % 2007-07-06 Bug fix: use varioref for the footnote references. @@ -33,11 +45,13 @@ % Bug fix: centering table's headers. % -\global\edef\upm@package@fmt@ver{2009/04/29} +\global\edef\upm@package@fmt@ver{2009/11/01} \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{upmethodology-fmt}[\upm@package@fmt@ver] +\RequirePackage{upmethodology-p-common} + \gdef\upm@fmt@force@single@spacing#1{{\begin{singlespace}#1\end{singlespace}}} \gdef\upm@date@head#1/#2\@nil{#1} \gdef\upm@date@tail#1/#2\@nil{#2} @@ -53,6 +67,13 @@ \global\renewcommand{\upm@format@lang@makedate}[3]{##3\string/\two@digits{##2}\string/\two@digits{##1}}% \global\let\upm@format@lang@extractyear\upm@date@first% \global\let\upm@format@lang@extractmonth\upm@date@second% + \gdef\upm@format@lang@professor{Pr.}% + \gdef\upm@format@lang@doctor{Dr.}% + \gdef\upm@format@lang@phdoctor{Ph.D.}% + \gdef\upm@format@lang@scdoctor{Sc.D.}% + \gdef\upm@format@lang@mdoctor{M.D.}% + \gdef\upm@format@lang@professionalengineer{CEng.}% + \gdef\upm@format@lang@incorporatedengineer{IEng.}% } \global\let\upm@format@lang@extractyear\upm@date@first% \def\upm@format@lang@french{% @@ -61,6 +82,13 @@ \global\let\upm@format@lang@extractyear\upm@date@third% \global\let\upm@format@lang@extractmonth\upm@date@second% \global\let\upm@format@lang@extractday\upm@date@first% + \gdef\upm@format@lang@professor{Pr.}% + \gdef\upm@format@lang@doctor{Dr.}% + \gdef\upm@format@lang@phdoctor{Ph.D.}% + \gdef\upm@format@lang@scdoctor{Sc.D.}% + \gdef\upm@format@lang@mdoctor{M.D.}% + \gdef\upm@format@lang@professionalengineer{Ing.}% + \gdef\upm@format@lang@incorporatedengineer{Ing.}% } \global\providecommand{\upm@format@lang@makedate}[3]{}% @@ -84,9 +112,7 @@ \upm@lang@@ -\RequirePackage{xspace} -\RequirePackage{ifthen} -\RequirePackage{graphicx} +\RequirePackage[final]{graphicx} \RequirePackage{subfigure} \RequirePackage{tabularx} \RequirePackage{multicol} @@ -96,14 +122,17 @@ \RequirePackage{pifont} \RequirePackage{setspace} \RequirePackage{varioref} +\RequirePackage{txfonts} %---------------------------------------- % Exponent and indice %---------------------------------------- % Exponent -\newcommand{\textsup}[1]{\ensuremath{^{\text{#1}}}\xspace} +%\newcommand{\textsup}[1]{\ensuremath{^{\text{#1}}}\xspace} +\newcommand{\textsup}[1]{\upm@textsuperscript{#1}\xspace} % Indice -\newcommand{\textsub}[1]{\ensuremath{_{\text{#1}}}\xspace} +%\newcommand{\textsub}[1]{\ensuremath{_{\text{#1}}}\xspace} +\newcommand{\textsub}[1]{\upm@textsubscript{#1}\xspace} %---------------------------------------- % SYMBOLS @@ -115,10 +144,10 @@ \newcommand{\smalltrade}{{\tiny\trademark}\xspace} \newcommand{\smallreg}{{\tiny\regmark}\xspace} \newcommand{\smallcopy}{{\tiny\copyright}\xspace} -\gdef\st{\textsup{st}} -\gdef\nd{\textsup{nd}} -\gdef\rd{\textsup{rd}} -\gdef\th{\textsup{th}} +\newcommand{\ust}{\textsup{st}} +\newcommand{\und}{\textsup{nd}} +\newcommand{\urd}{\textsup{rd}} +\newcommand{\uth}{\textsup{th}} %---------------------------------------- @@ -317,15 +346,20 @@ \table[#1]\center% \global\protected@edef\upm@table@caption{#5}% \global\protected@edef\upm@table@label{tab:#6}% + \gdef\upm@table@note{}% \newcommand{\captionastitle}{\tabulartitle{\upm@table@caption}}% + \newcommand{\tablenote}[1]{\gdef\upm@table@note{##1}}% \mtabular[#2]{#3}{#4}% }{% \endmtabular% \caption{\upm@table@caption}% \label{\upm@table@label}% - \endcenter\endtable% + \endcenter% + {\upm@table@note}% + \endtable% \let\upm@table@caption\relax% \let\upm@table@label\relax% + \let\upm@table@note\relax% } %----- @@ -339,83 +373,215 @@ % PARAGRAPHS %---------------------------------------- \setlength{\parindent}{0pt} +\setlength{\parskip}{.2cm} %---------------------------------------- % COLORIZED SECTION'S TITLES %---------------------------------------- -\definecolor{titlecolor}{rgb}{0.93,0.41,0} -\definecolor{maintitlecolor}{rgb}{0.24,0.33,0.48} - -\gdef\upm@format@chapternum#1{\textcolor{maintitlecolor}{\huge \scshape #1}} -\gdef\upm@format@chaptertitle#1{\textcolor{maintitlecolor}{ - \Huge\scshape {#1}}} -\gdef\upm@format@sectionnum#1{\textcolor{titlecolor}{#1}} -\gdef\upm@format@sectiontitle#1{\textcolor{titlecolor}{#1}} - -\gdef\@makechapterhead#1{% - \vspace*{50\p@}% - {\parindent \z@ \raggedright \normalfont - \ifnum \c@secnumdepth >\m@ne - \if@mainmatter - \upm@format@chapternum{\@chapapp\space \thechapter} - \par\nobreak - \vskip 20\p@ - \fi - \fi - \interlinepenalty\@M - \doublespacing - \upm@format@chaptertitle{#1}\par\nobreak - \vskip 40\p@ - } -} -\gdef\@makeschapterhead#1{% - \vspace*{50\p@}% - {\parindent \z@ \raggedright - \normalfont - \interlinepenalty\@M - \doublespacing - \upm@format@chaptertitle{#1}\par\nobreak - \vskip 40\p@ - } -} -\renewcommand{\section}{\@startsection{section}{1}{\z@}{-3.5ex \@plus -1ex \@minus -.2ex}{2.3ex \@plus.2ex}{\normalfont\Large\scshape}} -\renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}{-3.25ex\@plus -1ex \@minus -.2ex}{1.5ex \@plus .2ex}{\normalfont\large\scshape}} -\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}{-3.25ex\@plus -1ex \@minus -.2ex}{1.5ex \@plus .2ex}{\normalfont\normalsize\scshape}} + +% PRIVATE COLORS +\definecolor{sectiontitlecolor}{rgb}{0.93,0.41,0} +\definecolor{chaptertitlecolor}{rgb}{0.24,0.33,0.48} +\definecolor{parttitlecolor}{rgb}{0.24,0.33,0.48} + +% PRIVATE FORMATTING MACROS +\newcounter{upm@format@section@sectionlevel} +\setcounter{upm@format@section@sectionlevel}{0} + +\gdef\upm@format@partnum#1{\textcolor{parttitlecolor}{\expandafter\fontsize{40pt}{60pt}\selectfont#1\normalfont}} +\gdef\upm@format@parttitle#1{\textcolor{parttitlecolor}{\huge\scshape #1}} +\gdef\upm@format@chapternum#1{\textcolor{chaptertitlecolor}{\expandafter\fontsize{40pt}{60pt}\selectfont#1\normalfont}} +\gdef\upm@format@chaptertitle#1{\textcolor{chaptertitlecolor}{\Huge\scshape #1}} +\gdef\upm@format@sectionnum#1#2{\textcolor{sectiontitlecolor}{#2}} +\gdef\upm@format@sectiontitle#1#2{\textcolor{sectiontitlecolor}{#2}} + +% PART +\ifupmbookformat + \gdef\@part[#1]#2{% + \ifnum \c@secnumdepth >-2\relax + \refstepcounter{part}% + \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% + \else + \addcontentsline{toc}{part}{#1}% + \fi + \markboth{}{}% + {\centering + \interlinepenalty \@M + \normalfont + \ifnum \c@secnumdepth >-2\relax + \upm@format@partnum{\thepart} + \par + \vskip 20\p@ + \fi + \upm@format@parttitle{#2}\par}% + \@endpart} + \gdef\@spart#1{% + {\centering + \interlinepenalty \@M + \normalfont + \upm@format@parttitle{#1}\par}% + \@endpart} +\fi + +% CHAPTER +\ifupmarticleformat\else + \newcommand{\upm@format@makechapterhead}[2]{% + %\vspace*{50\p@}% + {\parindent \z@ \raggedleft \normalfont + \ifx\@empty#1\ifnum \c@secnumdepth >\m@ne + \upm@format@chapternum{\thechapter} + \par\nobreak + \vskip 20\p@ + \fi\fi + \interlinepenalty\@M + \ifupmbookformat\doublespacing\fi + \upm@format@chaptertitle{#2}\par\nobreak + \vskip 80\p@ + } + } + %internal implementation of \chapter + \gdef\@makechapterhead#1{\upm@format@makechapterhead{\@empty}{#1}} + %internal implementation of \chapter* + \gdef\@makeschapterhead#1{\upm@format@makechapterhead{\relax}{#1}} +\fi + +% SECTIONS \let\upm@format@sect@old\@sect -\gdef\@sect#1#2#3#4#5#6[#7]#8{\upm@format@sect@old{#1}{#2}{#3}{#4}{#5}{#6}[#7]{\upm@format@sectiontitle{#8}}} \let\upm@format@ssect@old\@ssect -\gdef\@ssect#1#2#3#4#5{\upm@format@ssect@old{#1}{#2}{#3}{#4}{\upm@format@sectiontitle{#5}}} -\gdef\@seccntformat#1{\upm@format@sectionnum{\csname the#1\endcsname/}\quad} + +% public implementation of sections. +\renewcommand{\section}{\setcounter{upm@format@section@sectionlevel}{1}\@startsection{section}{1}{\z@}{-3.5ex \@plus -1ex \@minus -.2ex}{2.3ex \@plus.2ex}{\normalfont\Large\scshape}} +\renewcommand{\subsection}{\setcounter{upm@format@section@sectionlevel}{2}\@startsection{subsection}{2}{\z@}{-3.25ex\@plus -1ex \@minus -.2ex}{1.5ex \@plus .2ex}{\normalfont\large\scshape}} +\renewcommand{\subsubsection}{\setcounter{upm@format@section@sectionlevel}{3}\@startsection{subsubsection}{3}{\z@}{-3.25ex\@plus -1ex \@minus -.2ex}{1.5ex \@plus .2ex}{\normalfont\normalsize\scshape}} + +% internal implementations for sections. +\gdef\@sect#1#2#3#4#5#6[#7]#8{\upm@format@sect@old{#1}{#2}{#3}{#4}{#5}{#6}[#7]{\upm@format@sectiontitle{\theupm@format@section@sectionlevel}{#8}}} +\gdef\@ssect#1#2#3#4#5{\upm@format@ssect@old{#1}{#2}{#3}{#4}{\upm@format@sectiontitle{\theupm@format@section@sectionlevel}{#5}}} +\gdef\@seccntformat#1{\upm@format@sectionnum{\theupm@format@section@sectionlevel}{\csname the#1\endcsname/}\quad} %---------------------------------------- % PAGE LAYOUT %---------------------------------------- -% Update the formatof the saved pages and sections -\AtBeginDocument{ - \renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{}} - \renewcommand{\sectionmark}[1]{\markright{\thesection\ \textsc{#1}}} - \renewcommand{\@mkboth}[2]{% + +% Update the format of the saved pages and sections +\renewcommand{\sectionmark}[1]{\markright{\thesection\ \textsc{#1}}} +\ifupmarticleformat\else +\renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{}} +\renewcommand{\@mkboth}[2]{% \let\upm@doc@MakeUppercase\MakeUppercase% \gdef\MakeUppercase##1{##1}% \chaptermark{#1}% \let\MakeUppercase\upm@doc@MakeUppercase% \let\upm@doc@MakeUppercase\relax% - } } +\fi % Make sure that the page before a part or % a chapter title was empty -\AtBeginDocument{% - \renewcommand{\cleardoublepage}{% - \clearpage% - \if@twoside\ifodd\c@page% - \else% - \thispagestyle{facingtochapter}% - \hbox{}\newpage% - \if@twocolumn\hbox{}\newpage% - \fi\fi\fi% - } - \newcommand{\ps@facingtochapter}{\ps@empty} - } +\renewcommand{\cleardoublepage}{% + \clearpage% + \if@twoside\ifodd\c@page% + \else% + \thispagestyle{facingtochapter}% + \hbox{}\newpage% + \if@twocolumn\hbox{}\newpage% + \fi\fi\fi% +} +\newcommand{\ps@facingtochapter}{\ps@empty} + +%---------------------------------------- +% ADDITIONAL SECTIONS +%---------------------------------------- + +\gdef\upm@format@newsection@alignment{} + +%----- +% Part without number but inside the TOC +%\parttoc [toctitle]{title} % left-alignment inside TOC +%\parttoc*[toctitle]{title} % right-alignment inside TOC +\def\parttoc{\@ifstar% + {\gdef\upm@format@newsection@alignment{\protect\numberline{}}\expandafter\upm@format@newsection@part}% + {\gdef\upm@format@newsection@alignment{}\expandafter\upm@format@newsection@part}} +\def\upm@format@newsection@part{\@ifnextchar [% + {\expandafter\upm@format@newsection@part@opt}% + {\expandafter\upm@format@newsection@part@nopt}} +\def\upm@format@newsection@part@opt[#1]#2{% + \part*{#2\addcontentsline{toc}{part}{\upm@format@newsection@alignment{#1}}}% + \chaptermark{}% +} +\def\upm@format@newsection@part@nopt#1{% + \part*{#1\addcontentsline{toc}{part}{\upm@format@newsection@alignment{#1}}}% + \chaptermark{}% +} + +%----- +% Chapter without number but inside the TOC +%\chaptertoc [toctitle]{title} % left-alignment inside TOC +%\chaptertoc*[toctitle]{title} % right-alignment inside TOC +\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@nopt#1{% + \@schapter{#1\addcontentsline{toc}{chapter}{\upm@format@newsection@alignment{#1}}}% + \chaptermark{#1}% +} + +%----- +% Section without number but inside the TOC +%\sectiontoc [toctitle]{title} % left-alignment inside TOC +%\sectiontoc*[toctitle]{title} % right-alignment inside TOC +\def\sectiontoc{\@ifstar% + {\gdef\upm@format@newsection@alignment{\protect\numberline{}}\expandafter\upm@format@newsection@section}% + {\gdef\upm@format@newsection@alignment{}\expandafter\upm@format@newsection@section}} +\def\upm@format@newsection@section{\@ifnextchar [% + {\expandafter\upm@format@newsection@section@opt}% + {\expandafter\upm@format@newsection@section@nopt}} +\def\upm@format@newsection@section@opt[#1]#2{% + \section*{#2\addcontentsline{toc}{section}{\upm@format@newsection@alignment{#1}}}% +} +\def\upm@format@newsection@section@nopt#1{% + \section*{#1\addcontentsline{toc}{section}{\upm@format@newsection@alignment{#1}}}% +} + +%----- +% Subsection without number but inside the TOC +%\subsectiontoc [toctitle]{title} % left-alignment inside TOC +%\subsectiontoc*[toctitle]{title} % right-alignment inside TOC +\def\subsectiontoc{\@ifstar% + {\gdef\upm@format@newsection@alignment{\protect\numberline{}}\expandafter\upm@format@newsection@subsection}% + {\gdef\upm@format@newsection@alignment{}\expandafter\upm@format@newsection@subsection}} +\def\upm@format@newsection@subsection{\@ifnextchar [% + {\expandafter\upm@format@newsection@subsection@opt}% + {\expandafter\upm@format@newsection@subsection@nopt}} +\def\upm@format@newsection@subsection@opt[#1]#2{% + \subsection*{#2\addcontentsline{toc}{subsection}{\upm@format@newsection@alignment{#1}}}% +} +\def\upm@format@newsection@subsection@nopt#1{% + \subsection*{#1\addcontentsline{toc}{subsection}{\upm@format@newsection@alignment{#1}}}% +} + +%----- +% Subsubsection without number but inside the TOC +%\subsubsectiontoc [toctitle]{title} % left-alignment inside TOC +%\subsubsectiontoc*[toctitle]{title} % right-alignment inside TOC +\def\subsubsectiontoc{\@ifstar% + {\gdef\upm@format@newsection@alignment{\protect\numberline{}}\expandafter\upm@format@newsection@subsubsection}% + {\gdef\upm@format@newsection@alignment{}\expandafter\upm@format@newsection@subsubsection}} +\def\upm@format@newsection@subsubsection{\@ifnextchar [% + {\expandafter\upm@format@newsection@subsubsection@opt}% + {\expandafter\upm@format@newsection@subsubsection@nopt}} +\def\upm@format@newsection@subsubsection@opt[#1]#2{% + \subsubsection*{#2\addcontentsline{toc}{subsubsection}{\upm@format@newsection@alignment{#1}}}% +} +\def\upm@format@newsection@subsubsection@nopt#1{% + \subsubsection*{#1\addcontentsline{toc}{subsubsection}{\upm@format@newsection@alignment{#1}}}% +} %---------------------------------------- % BIBLIOGRAPHY @@ -471,38 +637,37 @@ % FOOTNOTE %---------------------------------------- -\newcommand{\upm@footnoteref}[1]{\mbox{\ensuremath{^{\text{\ref{footnote:#1}}}}}} -\newcommand{\upm@footnotepageref}[1]{\mbox{\ensuremath{^{\text{\ref{footnote:#1}}}_{\text{\tiny \vpageref[]{footnote:#1}}}}}} -\newcommand{\@namelet}[1]{\expandafter\let\csname #1\endcsname} +\gdef\upm@footnoteref#1{\upm@textsuperscript{#1}} +\gdef\upm@footnotepageref#1#2{\upm@textsuperscript{{#1\tiny(#2)}}} -\newcommand{\upm@savefootnote}[2]{% - \footnote{#1\label{footnote:#2}}% - \global\@namelet{footnote:#2:cmd}\relax% +\def\upm@savefootnote#1#2{% + \footnote{#1\label{\upm@protect{footnote:#2}}}% + \upm@nameundef{footnote:#2:cmd}% } -\newcommand{\upm@savefootnotestar}[2]{% - \global\@namedef{footnote:#2:cmd}{% - \upm@savefootnote{#1}{#2}% - }% +\def\upm@savefootnotestar#1#2{% + \upm@namedef{footnote:#2:cmd}{\upm@savefootnote{#1}{#2}}% } -\gdef\savefootnote{\@ifstar\upm@savefootnotestar\upm@savefootnote} +\DeclareRobustCommand\savefootnote{\@ifstar\upm@savefootnotestar\upm@savefootnote} -\newcommand{\upm@reffootnote}[1]{% - \expandafter\ifx\csname footnote:#1:cmd\endcsname\relax% - \upm@footnoteref{#1}% - \else% - \@nameuse{footnote:#1:cmd}% - \fi\xspace% +\def\upm@reffootnote#1{% + \upm@ifdefinedname{footnote:#1:cmd}{% + \upm@nameuse{footnote:#1:cmd}}{% + \upm@footnoteref{\upm@getref{\upm@protect{footnote:#1}}}% + }% + \xspace% } -\newcommand{\upm@reffootnotestar}[1]{% - \expandafter\ifx\csname footnote:#1:cmd\endcsname\relax% - \upm@footnotepageref{#1}% - \else% - \@nameuse{footnote:#1:cmd}% - \fi\xspace% +\def\upm@reffootnotestar#1{% + \upm@ifdefinedname{footnote:#1:cmd}{% + \upm@nameuse{footnote:#1:cmd}}{% + \xdef\upm@tmp@tmp{\upm@protect{footnote:#1}}% + \upm@footnotepageref{\expandafter\upm@getref{\upm@tmp@tmp}}{\expandafter\upm@getpageref{\upm@tmp@tmp}}% + \global\let\upm@tmp@tmp\relax% + }% + \xspace% } -\gdef\reffootnote{\@ifstar\upm@reffootnotestar\upm@reffootnote} +\DeclareRobustCommand\reffootnote{\@ifstar\upm@reffootnotestar\upm@reffootnote} %---------------------------------------- % IMAGES IN PARAGRAPHS @@ -550,12 +715,83 @@ \else% {\mbox{\small #2}#4\mbox{\small #1}#4\textsc{#3}}% \fi% - \xspace% } %\makename[von]{firstname}{lastname} \newcommand{\makename}[3][\relax]{% - \upmmakename[#1]{#2}{#3}{\ } + \upmmakename[#1]{#2}{#3}{\ }% +} + +\gdef\upm@format@people@title#1{\textsc{#1}} + +%\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}{\ }% +} +\newcommand{\upm@prnamestar}[3][\relax]{% + \upmmakename[#1]{#2}{#3}{\ }, \upm@format@people@title{\upm@format@lang@professor}% +} + +%\drname[von]{firstname}{lastname} +%\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}{\ }% +} +\newcommand{\upm@drnamestar}[3][\relax]{% + \upmmakename[#1]{#2}{#3}{\ }, \upm@format@people@title{\upm@format@lang@doctor}% +} + +%\phdname[von]{firstname}{lastname} +%\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}{\ }% +} +\newcommand{\upm@phdnamestar}[3][\relax]{% + \upmmakename[#1]{#2}{#3}{\ }, \upm@format@people@title{\upm@format@lang@phdoctor}% +} + +%\scdname[von]{firstname}{lastname} +%\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}{\ }% +} +\newcommand{\upm@scdnamestar}[3][\relax]{% + \upmmakename[#1]{#2}{#3}{\ }, \upm@format@people@title{\upm@format@lang@scdoctor}% +} + +%\mdname[von]{firstname}{lastname} +%\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}{\ }% +} +\newcommand{\upm@mdnamestar}[3][\relax]{% + \upmmakename[#1]{#2}{#3}{\ }, \upm@format@people@title{\upm@format@lang@mdoctor}% +} + +%\pengname[von]{firstname}{lastname} +%\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}{\ }% +} +\newcommand{\upm@pengnamestar}[3][\relax]{% + \upmmakename[#1]{#2}{#3}{\ }, \upm@format@people@title{\upm@format@lang@professionalengineer}% +} + +%\iengname[von]{firstname}{lastname} +%\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}{\ }% +} +\newcommand{\upm@iengnamestar}[3][\relax]{% + \upmmakename[#1]{#2}{#3}{\ }, \upm@format@people@title{\upm@format@lang@incorporatedengineer}% } %---------------------------------------- @@ -633,4 +869,59 @@ #1% }{\endgroup} +%---------------------------------------- +% FRAMED MINIPAGE +%---------------------------------------- + +\newsavebox{\upm@framed@minipage} +%\begin{framedminipage}{width}...\end{frameedminipage} +\newenvironment{framedminipage}[1]{% + \begin{lrbox}{\upm@framed@minipage}\begin{minipage}{#1}% + }{% + \end{minipage}\end{lrbox}\fbox{\usebox{\upm@framed@minipage}}} + +%---------------------------------------- +% HIGHLIGH BOXES +%---------------------------------------- + +\newsavebox{\upm@highlight@box@save} + +\newenvironment{upm@highligh@box}[2]{% + \par + \vspace{.5cm} + \begin{tabular}{|p{#1}|} + \hline + \begin{window}[0,l,{\mbox{\includegraphics[width=1cm]{#2}}},{}] +}{% + \end{window}\\ \hline \end{tabular} + \vspace{.5cm} + \par +} + +\newenvironment{upmcaution}[1][\linewidth]{% + \upm@highligh@box{#1}{caution.png}% +}{% + \endupm@highligh@box% +} + +\newenvironment{upminfo}[1][\linewidth]{% + \upm@highligh@box{#1}{info.png}% +}{% + \endupm@highligh@box% +} + +\newenvironment{upmquestion}[1][\linewidth]{% + \upm@highligh@box{#1}{question.png}% +}{% + \endupm@highligh@box% +} + +%---------------------------------------- +% PROVIDE URL MACROS, WHICH WILL BE +% OVERRIDDEN BY THE DOCUMENT CLASS +%---------------------------------------- + +\newcommand{\url}[2][]{\texttt{#2}} +\newcommand{\href}[3][]{\texttt{#3}} + \endinput |