Use own decls.tex for HowTo. Might merge with doc/decls.tex in the future.
This commit is contained in:
parent
8baad2666f
commit
05a17e07d7
|
@ -0,0 +1,66 @@
|
|||
|
||||
\makeatletter
|
||||
|
||||
\def\surflet{SUrflet\xspace}
|
||||
\def\surflets{SUrflets\xspace}
|
||||
|
||||
%From sunet/decls.tex
|
||||
\def\ie{\mbox{\emph{i.e.}} } % \mbox keeps the last period from
|
||||
\def\Ie{\mbox{\emph{I.e.}} } % looking like an end-of-sentence.
|
||||
\def\eg{\mbox{\emph{e.g.}} }
|
||||
\def\Eg{\mbox{\emph{E.g.}} }
|
||||
|
||||
%From surflet/decls.tex
|
||||
{\theoremstyle{break}
|
||||
\theoremheaderfont{\normalfont\bfseries\em}
|
||||
\newtheorem{proglist}{Listing}[section]}
|
||||
\setlength{\theorempreskipamount}{1.5ex plus0.2ex minus0.2ex}
|
||||
\setlength{\theorempostskipamount}{2ex plus0.5ex minus0.2ex}
|
||||
|
||||
\newenvironment{listing}
|
||||
{\ULforem\begin{proglist}\begin{alltt}\small}
|
||||
{\end{alltt}\end{proglist}\normalem}
|
||||
|
||||
\newenvironment{reflisting}[1]
|
||||
{\ULforem\begin{proglist}[\refinlisting{#1}]\begin{alltt}\small}
|
||||
{\end{alltt}\end{proglist}\normalem}
|
||||
|
||||
\newcommand{\contatlisting}[1]{%
|
||||
{\normalfont\textit{$<$wird fortgesetzt in Listing~\ref{#1}\/$>$}}}
|
||||
\newcommand{\contfromlisting}[1]{%
|
||||
{\normalfont\textit{$<$fortgesetzt von Listing~\ref{#1}\/$>$}}}
|
||||
\newcommand{\refinlisting}[1]{%
|
||||
{\normalfont\textit{referenziert in Listing~\ref{#1}}}}
|
||||
\newcommand{\seelisting}[1]{%
|
||||
{\normalfont{\textit{$<$siehe Listing~\ref{#1}\/$>$}}}}
|
||||
|
||||
\newfloat{program}{t}{lop}
|
||||
\floatname{program}{Programm}
|
||||
\newenvironment{floatprog}[2]
|
||||
{\begin{program}[ht] \caption{#1} \label{#2} \begin{alltt}}
|
||||
{\end{alltt} \end{program}%
|
||||
% Force output of even long floating figs
|
||||
\afterpage{\clearpage}}
|
||||
|
||||
% stolen from sunet/doc/latex/decls.tex (Olin)
|
||||
\newenvironment{leftinset}
|
||||
{\bgroup\parskip=1ex plus 1ex\begin{list}{}%
|
||||
{\topsep=0pt}%
|
||||
\item[]}%
|
||||
{\end{list}\leavevmode\egroup\global\@ignoretrue}
|
||||
%\newcommand{\code}[1]{{\normalfont\texttt{\ttchars #1}}}
|
||||
\newcommand{\code}[1]{\frenchspacing\texttt{#1}}
|
||||
\newcommand{\codex}[1]{\begin{leftinset}\code{#1}\end{leftinset}\ignorespaces}
|
||||
|
||||
% Use url-package to get function names line-breaked at - / +
|
||||
% by infos in /usr/share/texmf/tex/latex/misc/url.sty
|
||||
\newcommand\breakfuntt{\begingroup \urlstyle{tt}%
|
||||
\@ifundefined{selectfont}{\def\UrlFont{\tt}}{\def\UrlFont{\ttfamily}}%
|
||||
\def\UrlBreaks{\do\-\do\/\do\+}\def\UrlNoBreaks{\do\!}\Url
|
||||
}
|
||||
|
||||
\newcommand{\name}[1]{\breakfuntt{#1}}
|
||||
\newcommand{\object}[1]{\breakfuntt{#1}}
|
||||
\newcommand{\file}[1]{\breakfuntt{#1}}
|
||||
|
||||
\makeatother
|
Loading…
Reference in New Issue