-
Notifications
You must be signed in to change notification settings - Fork 227
/
verbatim.cls
112 lines (102 loc) · 2.79 KB
/
verbatim.cls
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
\def\FV@SetLineWidth{%
\if@FV@ResetMargins\else
\advance\leftmargin\@totalleftmargin
\fi
\advance\leftmargin\FV@XLeftMargin\relax
\advance\rightmargin\FV@XRightMargin\relax
\linewidth\hsize
%\advance\linewidth-\leftmargin
%\advance\linewidth-\rightmargin
\hfuzz\FancyVerbHFuzz\relax}
\def\FV@SingleFrameLine#1{%
%% DG/SR modification end
\hbox to\z@{%
%\kern\leftmargin
%% DG/SR modification begin - Jun. 22, 1998
\ifnum#1=\z@
\let\FV@Label\FV@LabelBegin
\else
\let\FV@Label\FV@LabelEnd
\fi
\ifx\FV@Label\relax
%% DG/SR modification end
\FancyVerbRuleColor{\vrule \@width\linewidth \@height\FV@FrameRule}%
%% DG/SR modification begin - Jun. 22, 1998
\else
\ifnum#1=\z@
\setbox\z@\hbox{\strut\enspace\urlfont\FV@LabelBegin\strut}%
\else
\setbox\z@\hbox{\strut\enspace\urlfont\FV@LabelEnd\strut}%
\fi
\@tempdimb=\dp\z@
\advance\@tempdimb -.5\ht\z@
\@tempdimc=\linewidth
\advance\@tempdimc -\wd\z@
%\divide\@tempdimc\tw@
\ifnum#1=\z@ % Top line
\ifx\FV@LabelPositionTopLine\relax
\FancyVerbRuleColor{\vrule \@width\linewidth \@height\FV@FrameRule}%
\else
\FV@FrameLineWithLabel
\fi
\else % Bottom line
\ifx\FV@LabelPositionBottomLine\relax
\FancyVerbRuleColor{\vrule \@width\linewidth \@height\FV@FrameRule}%
\else
\FV@FrameLineWithLabel
\fi
\fi
\fi
%% DG/SR modification end
\hss}}
%% DG/SR modification begin - May. 19, 1998
\def\FV@FrameLineWithLabel{%
\ht\z@\@tempdimb\dp\z@\@tempdimb%
\FancyVerbRuleColor{%
\raise 0.5ex\hbox{\vrule \@width\@tempdimc \@height\FV@FrameRule}%
\raise\@tempdimb\box\z@}}
%% DG/SR modification end
\def\FV@EndListFrame@Lines{%
\begingroup
%\vskip 0.5ex
\baselineskip\z@skip
\kern\FV@FrameSep\relax
%% DG/SR modification begin - May. 19, 1998
%% \FV@SingleFrameLine
\FV@SingleFrameLine{\@ne}%
%% DG/SR modification end
\endgroup}
\newskip\mytopsep
\setlength{\mytopsep}{4pt plus 2pt minus 3pt}
\def\FV@ListVSpace{%
\@topsepadd\mytopsep
\if@noparlist\advance\@topsepadd\partopsep\fi
\if@inlabel
\vskip\parskip
\else
\if@nobreak
\vskip\parskip
\clubpenalty\@M
\else
\addpenalty\@beginparpenalty
\@topsep\@topsepadd
\advance\@topsep\parskip
\addvspace\@topsep
\fi
\fi
%\showthe \@topsepadd
%\showthe \topsep
%\showthe \partopsep
%\showthe \parskip
\global\@nobreakfalse
\global\@inlabelfalse
\global\@minipagefalse
\global\@newlistfalse}
\def\FV@EndList{%
\FV@ListProcessLastLine
\FV@EndListFrame
%\showthe \@topsepadd
\@endparenv
\endgroup
\@endpetrue}
\def\theFancyVerbLine{\sffamily\scriptsize\arabic{FancyVerbLine}}