annotate Paper/jlisting.sty @ 0:a5facba1adbc

first
author ryokka
date Fri, 13 Apr 2018 18:07:04 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ryokka
parents:
diff changeset
1 \NeedsTeXFormat{LaTeX2e}
ryokka
parents:
diff changeset
2 \def\filedate{2006/02/20}
ryokka
parents:
diff changeset
3 \def\fileversion{0.2}
ryokka
parents:
diff changeset
4 \ProvidesPackage{jlisting}[\filedate\space\fileversion\space(Thor)]
ryokka
parents:
diff changeset
5 %
ryokka
parents:
diff changeset
6 \newcount\lst@nextchar
ryokka
parents:
diff changeset
7 \let\lst@@ProcessSpace\lst@ProcessSpace
ryokka
parents:
diff changeset
8 \def\lst@ProcessSpace#1{%
ryokka
parents:
diff changeset
9 \lst@check@chartype{#1}%
ryokka
parents:
diff changeset
10 \lst@@ProcessSpace
ryokka
parents:
diff changeset
11 \lst@whitespacetrue}
ryokka
parents:
diff changeset
12 \let\lst@@ProcessLetter\lst@ProcessLetter
ryokka
parents:
diff changeset
13 \def\lst@ProcessLetter#1#2{%
ryokka
parents:
diff changeset
14 \lst@check@chartype{#2}%
ryokka
parents:
diff changeset
15 {\lst@@ProcessLetter{#1}}%
ryokka
parents:
diff changeset
16 \relax}
ryokka
parents:
diff changeset
17 \let\lst@@ProcessDigit\lst@ProcessDigit
ryokka
parents:
diff changeset
18 \def\lst@ProcessDigit#1#2{%
ryokka
parents:
diff changeset
19 \lst@check@chartype{#2}%
ryokka
parents:
diff changeset
20 {\lst@@ProcessDigit{#1}}%
ryokka
parents:
diff changeset
21 \relax}
ryokka
parents:
diff changeset
22 \let\lst@@ProcessOther\lst@ProcessOther
ryokka
parents:
diff changeset
23 \def\lst@ProcessOther#1#2{%
ryokka
parents:
diff changeset
24 \lst@check@chartype{#2}%
ryokka
parents:
diff changeset
25 {\lst@@ProcessOther{#1}}%
ryokka
parents:
diff changeset
26 \relax}
ryokka
parents:
diff changeset
27 \let\lst@@ProcessTabulator\lst@ProcessTabulator
ryokka
parents:
diff changeset
28 \def\lst@ProcessTabulator#1{%
ryokka
parents:
diff changeset
29 \lst@check@chartype{#1}%
ryokka
parents:
diff changeset
30 \lst@@ProcessTabulator
ryokka
parents:
diff changeset
31 \relax}
ryokka
parents:
diff changeset
32 \def\lst@check@chartype#1#2#3{%
ryokka
parents:
diff changeset
33 \edef\@tempa{\lst@nextchar=`\string#1\relax}%
ryokka
parents:
diff changeset
34 \afterassignment\remove@to@nnil
ryokka
parents:
diff changeset
35 \@tempa\@nnil
ryokka
parents:
diff changeset
36 #2%
ryokka
parents:
diff changeset
37 \ifnum\lst@nextchar<\@cclvi
ryokka
parents:
diff changeset
38 #3%
ryokka
parents:
diff changeset
39 \else
ryokka
parents:
diff changeset
40 \lst@ifletter \else \lst@OutputOther \fi
ryokka
parents:
diff changeset
41 \lst@whitespacefalse
ryokka
parents:
diff changeset
42 \expandafter\lst@AppendJchar
ryokka
parents:
diff changeset
43 \fi
ryokka
parents:
diff changeset
44 #1}
ryokka
parents:
diff changeset
45 \def\lst@AppendJchar#1#2{%
ryokka
parents:
diff changeset
46 \lst@check@chartype{#2}%
ryokka
parents:
diff changeset
47 {\advance\lst@length\@ne\lst@Append{#1}}%
ryokka
parents:
diff changeset
48 \relax}
ryokka
parents:
diff changeset
49 \def\lst@check@chartype@BOL#1{%
ryokka
parents:
diff changeset
50 \edef\@tempa{\lst@nextchar=`\string#1\relax}%
ryokka
parents:
diff changeset
51 \afterassignment\remove@to@nnil
ryokka
parents:
diff changeset
52 \@tempa\@nnil
ryokka
parents:
diff changeset
53 \ifnum\lst@nextchar<\@cclvi\else
ryokka
parents:
diff changeset
54 \lst@whitespacefalse
ryokka
parents:
diff changeset
55 \expandafter\lst@AppendJchar
ryokka
parents:
diff changeset
56 \fi
ryokka
parents:
diff changeset
57 #1}
ryokka
parents:
diff changeset
58 \def\lst@InputListing#1{%
ryokka
parents:
diff changeset
59 \begingroup
ryokka
parents:
diff changeset
60 \lsthk@PreSet \gdef\lst@intname{#1}%
ryokka
parents:
diff changeset
61 \expandafter\lstset\expandafter{\lst@set}%
ryokka
parents:
diff changeset
62 \lsthk@DisplayStyle
ryokka
parents:
diff changeset
63 \catcode\active=\active
ryokka
parents:
diff changeset
64 \lst@Init\relax \let\lst@gobble\z@
ryokka
parents:
diff changeset
65 \lst@SkipToFirst
ryokka
parents:
diff changeset
66 \lst@ifprint \def\lst@next{\lst@get@filecontents{#1}}%
ryokka
parents:
diff changeset
67 \else \let\lst@next\@empty
ryokka
parents:
diff changeset
68 \fi
ryokka
parents:
diff changeset
69 \lst@next
ryokka
parents:
diff changeset
70 \lst@DeInit
ryokka
parents:
diff changeset
71 \endgroup}
ryokka
parents:
diff changeset
72 \newread\lst@inputfile
ryokka
parents:
diff changeset
73 \def\lst@get@filecontents#1{%
ryokka
parents:
diff changeset
74 \let\lst@filecontents\@empty
ryokka
parents:
diff changeset
75 \openin\lst@inputfile=#1\relax
ryokka
parents:
diff changeset
76 \let\@lst@get@filecontents@prevline\relax
ryokka
parents:
diff changeset
77 \lst@get@filecontents@loop
ryokka
parents:
diff changeset
78 \closein\lst@inputfile
ryokka
parents:
diff changeset
79 \lst@filecontents\empty}
ryokka
parents:
diff changeset
80 \def\lst@get@filecontents@loop{%
ryokka
parents:
diff changeset
81 \read\lst@inputfile to\@lst@get@filecontents@currline
ryokka
parents:
diff changeset
82 \ifx\@lst@get@filecontents@prevline\relax\else
ryokka
parents:
diff changeset
83 \expandafter\expandafter\expandafter\def
ryokka
parents:
diff changeset
84 \expandafter\expandafter\expandafter\lst@filecontents
ryokka
parents:
diff changeset
85 \expandafter\expandafter\expandafter{%
ryokka
parents:
diff changeset
86 \expandafter\lst@filecontents\@lst@get@filecontents@prevline}%
ryokka
parents:
diff changeset
87 \fi
ryokka
parents:
diff changeset
88 \let\@lst@get@filecontents@prevline\@lst@get@filecontents@currline
ryokka
parents:
diff changeset
89 \ifeof\lst@inputfile\else
ryokka
parents:
diff changeset
90 \expandafter\lst@get@filecontents@loop
ryokka
parents:
diff changeset
91 \fi}
ryokka
parents:
diff changeset
92 %%% [$B$3$N=hM}$b!$AjEv6/0z$G$9!%(B]
ryokka
parents:
diff changeset
93 \def\lst@BOLGobble{%
ryokka
parents:
diff changeset
94 \ifnum\lst@gobble>\z@
ryokka
parents:
diff changeset
95 \@tempcnta\lst@gobble\relax
ryokka
parents:
diff changeset
96 \expandafter\lst@BOLGobble@
ryokka
parents:
diff changeset
97 \else
ryokka
parents:
diff changeset
98 \expandafter\lst@check@chartype@BOL
ryokka
parents:
diff changeset
99 \fi}
ryokka
parents:
diff changeset
100 \def\lst@BOLGobble@#1{%
ryokka
parents:
diff changeset
101 \let\lst@next#1%
ryokka
parents:
diff changeset
102 \ifx \lst@next\relax\else
ryokka
parents:
diff changeset
103 \ifx \lst@next\lst@MProcessListing\else
ryokka
parents:
diff changeset
104 \ifx \lst@next\lst@ProcessFormFeed\else
ryokka
parents:
diff changeset
105 \ifx \lst@next\lstenv@backslash
ryokka
parents:
diff changeset
106 \let\lst@next\lstenv@BOLGobble@@
ryokka
parents:
diff changeset
107 \else
ryokka
parents:
diff changeset
108 \let\lst@next\lst@BOLGobble@@
ryokka
parents:
diff changeset
109 \ifx #1\lst@ProcessTabulator
ryokka
parents:
diff changeset
110 \advance\@tempcnta-\lst@tabsize\relax
ryokka
parents:
diff changeset
111 \ifnum\@tempcnta<\z@
ryokka
parents:
diff changeset
112 \lst@length-\@tempcnta \lst@PreGotoTabStop
ryokka
parents:
diff changeset
113 \fi
ryokka
parents:
diff changeset
114 \else
ryokka
parents:
diff changeset
115 \edef\@tempa{\lst@nextchar=`\string#1\relax}%
ryokka
parents:
diff changeset
116 \@tempa
ryokka
parents:
diff changeset
117 \ifnum\lst@nextchar<\@cclvi\else
ryokka
parents:
diff changeset
118 \advance\@tempcnta\m@ne
ryokka
parents:
diff changeset
119 \fi
ryokka
parents:
diff changeset
120 \advance\@tempcnta\m@ne
ryokka
parents:
diff changeset
121 \fi
ryokka
parents:
diff changeset
122 \fi \fi \fi \fi
ryokka
parents:
diff changeset
123 \lst@next}
ryokka
parents:
diff changeset
124 \def\lst@BOLGobble@@{%
ryokka
parents:
diff changeset
125 \ifnum\@tempcnta>\z@
ryokka
parents:
diff changeset
126 \expandafter\lst@BOLGobble@
ryokka
parents:
diff changeset
127 \else
ryokka
parents:
diff changeset
128 \expandafter\lst@check@chartype@BOL
ryokka
parents:
diff changeset
129 \fi
ryokka
parents:
diff changeset
130 }
ryokka
parents:
diff changeset
131 %
ryokka
parents:
diff changeset
132 % \begin{$B=$@5;v9`(B}{1.3}
ryokka
parents:
diff changeset
133 % $B$A$g$C$H$7$?=$@5(B
ryokka
parents:
diff changeset
134 \gdef\lst@breakProcessOther#1{\lst@ProcessOther#1}
ryokka
parents:
diff changeset
135 % $B%=!<%9%3!<%IL\<!$K$*$1$kJ8;z$HHV9f$N6u$-(B
ryokka
parents:
diff changeset
136 \let \l@lstlisting = \l@figure
ryokka
parents:
diff changeset
137 % $B%-%c%W%7%g%s$H%=!<%9%3!<%IL\<!$KBP$9$kF|K\8lBP1~(B
ryokka
parents:
diff changeset
138 \def\lstlistingname{$B%=!<%9%3!<%I(B}
ryokka
parents:
diff changeset
139 \def\lstlistlistingname{$B%=!<%9%3!<%IL\<!(B}
ryokka
parents:
diff changeset
140 % \end{$B=$@5;v9`(B}
ryokka
parents:
diff changeset
141 \endinput
ryokka
parents:
diff changeset
142 %
ryokka
parents:
diff changeset
143 %#!platex
ryokka
parents:
diff changeset
144 \documentclass[papersize]{jsarticle}
ryokka
parents:
diff changeset
145 % Macros
ryokka
parents:
diff changeset
146 \IfFileExists{dvipdfmx.def}{%
ryokka
parents:
diff changeset
147 \usepackage[dvipdfmx]{color,graphicx}%
ryokka
parents:
diff changeset
148 }{%
ryokka
parents:
diff changeset
149 \usepackage[dvipdfm]{color,graphicx}%
ryokka
parents:
diff changeset
150 }
ryokka
parents:
diff changeset
151 \usepackage{listings}[2004/09/07]
ryokka
parents:
diff changeset
152 \usepackage{jlisting}[2006/02/20]
ryokka
parents:
diff changeset
153 \usepackage{url}
ryokka
parents:
diff changeset
154 \usepackage{verbatim}
ryokka
parents:
diff changeset
155
ryokka
parents:
diff changeset
156 \makeatletter
ryokka
parents:
diff changeset
157 % Original Macros
ryokka
parents:
diff changeset
158 \def\email#1{\gdef\@email{\texttt{#1}}}
ryokka
parents:
diff changeset
159 \def\homepage#1{\gdef\@homepage{\texttt{#1}}}
ryokka
parents:
diff changeset
160 \def\mac#1{\textsf{#1}}
ryokka
parents:
diff changeset
161 \def\URL#1{\texttt{#1}}
ryokka
parents:
diff changeset
162 \def\src#1{\texttt{#1}}
ryokka
parents:
diff changeset
163
ryokka
parents:
diff changeset
164 % Dvipdfmx.def
ryokka
parents:
diff changeset
165 \def\dvipdfmxDefi{http://tex.dante.jp/ok/dvipdfmx/}
ryokka
parents:
diff changeset
166 \def\dvipdfmxDefii{http://ftp.ktug.or.kr/KTUG/dvipdfmx/contrib/latex/}
ryokka
parents:
diff changeset
167
ryokka
parents:
diff changeset
168 \IfFileExists{dvipdfmx.def}{%
ryokka
parents:
diff changeset
169 \let \IfDvipdfmxDef = \empty \relax}{%
ryokka
parents:
diff changeset
170 \typeout{^^Jget dvipdfmx.def at \dvipdfmxDefi^^J
ryokka
parents:
diff changeset
171 or \dvipdfmxDefii^^J}%
ryokka
parents:
diff changeset
172 \def\IfDvipdfmxDef{Get \src{dvipdfmx.def} at \URL \dvipdfmxDefii \\
ryokka
parents:
diff changeset
173 or \URL \dvipdfmxDefi.}%
ryokka
parents:
diff changeset
174 }
ryokka
parents:
diff changeset
175
ryokka
parents:
diff changeset
176 % Author Info
ryokka
parents:
diff changeset
177 \author {Th\'or Watanabe\thanks \@email \space \thanks \@homepage}
ryokka
parents:
diff changeset
178 \title {\mac{jlisting.sty}\\
ryokka
parents:
diff changeset
179 ---Japanese Localized Patch File of \mac{listings}---}
ryokka
parents:
diff changeset
180 \email {thor@tex.dante.jp}
ryokka
parents:
diff changeset
181 \homepage {http://tex.dante.jp/typo/}
ryokka
parents:
diff changeset
182 \date {2006/02/20}
ryokka
parents:
diff changeset
183
ryokka
parents:
diff changeset
184 \makeatother
ryokka
parents:
diff changeset
185
ryokka
parents:
diff changeset
186 \begin{document}
ryokka
parents:
diff changeset
187 \maketitle
ryokka
parents:
diff changeset
188 %\IfDvipdfmxDef
ryokka
parents:
diff changeset
189
ryokka
parents:
diff changeset
190 \section{$B$A$g$C$H$7$?@bL@(B}% Short Description
ryokka
parents:
diff changeset
191
ryokka
parents:
diff changeset
192 $B1|B<@2I';a$N7G<(HD$N!VHFMQE*$JIbF0BN!W$H$$$&0lO"$N=q$-9~$_$+$i(B
ryokka
parents:
diff changeset
193 $BE>:\$7$^$7$?!#(B
ryokka
parents:
diff changeset
194
ryokka
parents:
diff changeset
195 \begin{quote}
ryokka
parents:
diff changeset
196 \url{http://http://cise.edu.mie-u.ac.jp/~okumura/texfaq/qa/21172.html}\\
ryokka
parents:
diff changeset
197 \url{http://http://cise.edu.mie-u.ac.jp/~okumura/texfaq/qa/21184.html}\\
ryokka
parents:
diff changeset
198 \url{http://http://cise.edu.mie-u.ac.jp/~okumura/texfaq/qa/21189.html}\\
ryokka
parents:
diff changeset
199 \url{http://http://cise.edu.mie-u.ac.jp/~okumura/texfaq/qa/21197.html}
ryokka
parents:
diff changeset
200 \end{quote}
ryokka
parents:
diff changeset
201
ryokka
parents:
diff changeset
202 Copyright $B$O5H1JE/H~;a$K$"$k$N$@$H;W$$$^$9!%(B
ryokka
parents:
diff changeset
203
ryokka
parents:
diff changeset
204 \section{$B99?7MzNr(B}% ChageLogs
ryokka
parents:
diff changeset
205
ryokka
parents:
diff changeset
206 \begin{description}
ryokka
parents:
diff changeset
207 \item[ver.~0.1 (2004/03/24)]
ryokka
parents:
diff changeset
208 $B$H$j$"$($:8x3+!%(B
ryokka
parents:
diff changeset
209 \item[ver.~0.2 (2006/02/20)]
ryokka
parents:
diff changeset
210 \verb|\lst@breakProcessOther| $BL?Na$NDj5A$NDI2C!%(B
ryokka
parents:
diff changeset
211 \end{description}
ryokka
parents:
diff changeset
212
ryokka
parents:
diff changeset
213 \section{$B%=!<%9%3!<%I(B}
ryokka
parents:
diff changeset
214 \par\narrowbaselines
ryokka
parents:
diff changeset
215 \verbatiminput{jlisting.sty}
ryokka
parents:
diff changeset
216 \end{document}