doc-isac/msteger/bakk-arbeit/thesis-macros.tex
changeset 52107 f8845fc8f38d
parent 52056 f5d9bceb4dc0
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/doc-isac/msteger/bakk-arbeit/thesis-macros.tex	Tue Sep 17 09:50:52 2013 +0200
     1.3 @@ -0,0 +1,67 @@
     1.4 +% macros and definitions
     1.5 +
     1.6 +\newcommand\fname{\begingroup \smaller\urlstyle{tt}\Url}
     1.7 +
     1.8 +\newcommand\vname{\begingroup \smaller\urlstyle{tt}\Url}
     1.9 +
    1.10 +
    1.11 +% for class names, define our own url style
    1.12 +
    1.13 +\makeatletter  % protect @ names
    1.14 +
    1.15 +% \url@letstyle: New URL sty to premit break at any letters.
    1.16 +% Based on \url@ttstyle
    1.17 +
    1.18 +\def\Url@letdo{% style assignments for tt fonts or T1 encoding
    1.19 +\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%
    1.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%
    1.21 +               \do\y\do\z%
    1.22 +               \do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L%
    1.23 +               \do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X%
    1.24 +               \do\Y\do\Z%
    1.25 +}%
    1.26 +\def\UrlBigBreaks{\do\.\do\@\do\\\do\/\do\!\do\_\do\|\do\%\do\;\do\>\do\]%
    1.27 + \do\)\do\,\do\?\do\'\do\+\do\=\do\#\do\:\do@url@hyp}%
    1.28 +\def\UrlNoBreaks{\do\(\do\[\do\{\do\<}% (unnecessary)
    1.29 +\def\UrlSpecials{\do\ {\ }}%
    1.30 +\def\UrlOrds{\do\*\do\-\do\~}% any ordinary characters that aren't usually
    1.31 +\Urlmuskip = 0mu plus 1mu%
    1.32 +}
    1.33 +
    1.34 +\def\url@letstyle{%
    1.35 +\@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\sffamily}}\Url@letdo
    1.36 +}
    1.37 +
    1.38 +\makeatother  % unprotect @ names
    1.39 +
    1.40 +
    1.41 +\newcommand\cname{\begingroup \smaller\urlstyle{let}\Url}
    1.42 +
    1.43 +
    1.44 +\newcommand{\imgcredit}[1]
    1.45 +{%
    1.46 +\small
    1.47 +[#1]
    1.48 +}
    1.49 +
    1.50 +
    1.51 +\newcommand{\chapquote}[2]
    1.52 +{%
    1.53 +\begin{quote}
    1.54 +\emph{%
    1.55 +``#1''%
    1.56 +}%
    1.57 +\begin{flushright}
    1.58 +{\scriptsize \sffamily [#2]}%
    1.59 +\end{flushright}
    1.60 +\end{quote}
    1.61 +}
    1.62 +
    1.63 +
    1.64 +% \urlfootnote{url}{day}{month}{year}
    1.65 +\newcommand{\murlfootnote}[4]{\footnote{\url{{#1}} (last visit {#4}-{#3}-{#2})}}
    1.66 +\newcommand{\murlfootnotebreak}[4]{\footnote{\url{{#1}}\\ \hspace*{6mm}(last visit {#4}-{#3}-{#2})}}
    1.67 +
    1.68 +% change margin command
    1.69 +\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
    1.70 +\let\endchangemargin=\endlist
    1.71 \ No newline at end of file