doc-isac/msteger/bakk-arbeit/thesis-macros.tex
changeset 52107 f8845fc8f38d
parent 52056 f5d9bceb4dc0
equal deleted inserted replaced
52106:7f3760f39bdc 52107:f8845fc8f38d
       
     1 % macros and definitions
       
     2 
       
     3 \newcommand\fname{\begingroup \smaller\urlstyle{tt}\Url}
       
     4 
       
     5 \newcommand\vname{\begingroup \smaller\urlstyle{tt}\Url}
       
     6 
       
     7 
       
     8 % for class names, define our own url style
       
     9 
       
    10 \makeatletter  % protect @ names
       
    11 
       
    12 % \url@letstyle: New URL sty to premit break at any letters.
       
    13 % Based on \url@ttstyle
       
    14 
       
    15 \def\Url@letdo{% style assignments for tt fonts or T1 encoding
       
    16 \def\UrlBreaks{\do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l%
       
    17                \do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x%
       
    18                \do\y\do\z%
       
    19                \do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L%
       
    20                \do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X%
       
    21                \do\Y\do\Z%
       
    22 }%
       
    23 \def\UrlBigBreaks{\do\.\do\@\do\\\do\/\do\!\do\_\do\|\do\%\do\;\do\>\do\]%
       
    24  \do\)\do\,\do\?\do\'\do\+\do\=\do\#\do\:\do@url@hyp}%
       
    25 \def\UrlNoBreaks{\do\(\do\[\do\{\do\<}% (unnecessary)
       
    26 \def\UrlSpecials{\do\ {\ }}%
       
    27 \def\UrlOrds{\do\*\do\-\do\~}% any ordinary characters that aren't usually
       
    28 \Urlmuskip = 0mu plus 1mu%
       
    29 }
       
    30 
       
    31 \def\url@letstyle{%
       
    32 \@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\sffamily}}\Url@letdo
       
    33 }
       
    34 
       
    35 \makeatother  % unprotect @ names
       
    36 
       
    37 
       
    38 \newcommand\cname{\begingroup \smaller\urlstyle{let}\Url}
       
    39 
       
    40 
       
    41 \newcommand{\imgcredit}[1]
       
    42 {%
       
    43 \small
       
    44 [#1]
       
    45 }
       
    46 
       
    47 
       
    48 \newcommand{\chapquote}[2]
       
    49 {%
       
    50 \begin{quote}
       
    51 \emph{%
       
    52 ``#1''%
       
    53 }%
       
    54 \begin{flushright}
       
    55 {\scriptsize \sffamily [#2]}%
       
    56 \end{flushright}
       
    57 \end{quote}
       
    58 }
       
    59 
       
    60 
       
    61 % \urlfootnote{url}{day}{month}{year}
       
    62 \newcommand{\murlfootnote}[4]{\footnote{\url{{#1}} (last visit {#4}-{#3}-{#2})}}
       
    63 \newcommand{\murlfootnotebreak}[4]{\footnote{\url{{#1}}\\ \hspace*{6mm}(last visit {#4}-{#3}-{#2})}}
       
    64 
       
    65 % change margin command
       
    66 \def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
       
    67 \let\endchangemargin=\endlist