-
Notifications
You must be signed in to change notification settings - Fork 0
/
seal.sty
87 lines (73 loc) · 2.08 KB
/
seal.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
% seal main style file
%
%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{seal}[2005/12/22 v1.0 seal styles]
\usepackage{xspace}
\usepackage{pdfsync}
\usepackage{graphicx}
\usepackage{listings}
\newif\iftexshop
\texshopfalse
\newif\ifcomments
\commentsfalse
\DeclareOption{texshop}{%
\input{protcode.tex}
\global\texshoptrue
}
\DeclareOption{showcomments}{%
\commentstrue
}
\ProcessOptions
\newlength\origabovecaptionskip
\setlength\origabovecaptionskip{\abovecaptionskip}
\newlength\origbelowcaptionskip
\setlength\origbelowcaptionskip{\belowcaptionskip}
\newcommand\fig[4][0cm]{%
\begin{figure}[htb]
\ifdim #1=0cm
\includegraphics{#2}
\else
\includegraphics[width=#1]{#2}
\fi
\caption{\label{#4}#3}
\end{figure}%
}
%\def\fnum@lstlisting{{\bf\fontfamily{pfr}\selectfont \lstlistingname\nobreakspace\thelstlisting}}
\lstset{columns=fullflexible}
\lstset{basicstyle=\ttfamily}
%\lstset{identifierstyle=\itshape}
%\lstset{keywordstyle=\fontshape{n}\color{bj-blue}\bfseries}
%\lstset{commentstyle=\normalfont\color{bj-blue}}
%\lstset{stringstyle=\itshape}
\lstset{tabsize=4}
\lstset{showstringspaces=false}
\lstset{lineskip=1.5pt}
\lstset{captionpos=b}
\newcommand\lstfbegin[2]{%
\begin{lstlisting}[abovecaptionskip=\origabovecaptionskip,%
belowcaptionskip=-1.5ex,
float,caption={#1},label={#2}]%
}
\newcommand\lstbegin{\begin{lstlisting}[xleftmargin=\leftmargin]%
}
\newcommand\lstend{\end{lstlisting}}
\newcommand\lst{\lstinline}
% useful commands
\ifcomments
\newcommand{\note}[2]{
\fbox{\bfseries\sffamily\scriptsize#1}
{\sf\small$\triangleright$\textit{#2}$\triangleleft$}
}
\else
\newcommand{\note}[2]{}
\fi
\newcommand{\lstref}[1]{Listing~\ref{#1}\xspace}
\newcommand{\algref}[1]{Algorithm~\ref{#1}\xspace}
\newcommand{\chapref}[1]{Chapter~\ref{#1}\xspace}
\newcommand{\secref}[1]{Section~\ref{#1}\xspace}
\newcommand{\figref}[1]{Figure~\ref{#1}\xspace}
\newcommand{\tabref}[1]{Table~\ref{#1}\xspace}
\newcommand{\ie}{\textit{i.e.,}\xspace}
\newcommand{\eg}{\textit{e.g.,}\xspace}
\newcommand{\etal}{\emph{et al.}\xspace}