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