Newsgroups: fj.comp.texhax
Path: galaxy.trc.rwcp.or.jp!sparky!uunet!ccut!sh.wide!wnoc-kyo!kuis!mokuren!kubota
From: kubota@mokuren.kuis.kyoto-u.ac.jp (Atsushi Kubota)
Subject: Re: displaymath in verbatim
Message-ID: <1992Nov3.145155.24615@kuis.kyoto-u.ac.jp>
Sender: news@kuis.kyoto-u.ac.jp
Nntp-Posting-Host: mokuren.kuis.kyoto-u.ac.jp
Organization: Dept. of Information Science, Kyoto University, JAPAN
References: <1992Oct26.151757.10157@kuis.kyoto-u.ac.jp> <TABUCHI.92Oct27164900@cpgav8.avd.cpg.sony.co.jp>
Distribution: fj
Date: Tue, 3 Nov 1992 14:51:55 GMT
Lines: 78
Xref: galaxy.trc.rwcp.or.jp fj.comp.texhax:1387
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.comp.texhax&nb=1387&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

$B7&ED!w5~Bg(B $B>pJs(B $B$G$9!#(B

> In article <1992Oct26.151757.10157@kuis.kyoto-u.ac.jp> kubota@koubai.kuis.kyoto-u.ac.jp (Atsushi Kubota) writes:
>  |  $BO@J8Cf$K%W%m%0%i%`$NCGJR$rF~$l$k$H$-$K!"IaCJ$O(B verbatim $B$r;H$C$F$$$^(B
>  |$B$9!#$7$+$7!":#=q$3$&$H$7$F$$$k(B pseudo code $BCf$K!"?t3X$N5-9f!J(B\cup,
>  |f^{-1}$B$J$I!K$rF~$l$?$$$H;W$$!"$I$&$7$h$&$+$HG:$s$G$$$^$9!#Nc$($P!"(B

$B$H$$$&;d$N<ALd$KBP$7!"$$$m$$$m$JJ}$+$i$N%K%e!<%9!"%a!<%k$K$h$k%j%W%i%$(B
$B$r$$$?$@$-$^$7$?!#$9$C$+$jCY$/$J$C$F$7$^$C$?$N$G$9$,!"$*Ni$r$+$M$F(B 
summary $B$r=P$5$;$F$$$?$@$-$^$9!#(B

$B!J#1!K(Balltt.sty $B$r;H$&!#(B(MINAMINO $B$5$sB>(B)

\def\SUP#1#2{{#1}^{#2}}
\begin{alltt}
  for j \(\in\) set(p) \{
    if ( \(\SUP{f}{-1}\) (j) == k) \{
              ...
    \}
  \}
\end{alltt}

$B!J#2!K(Bexample.sty $B$r;H$&!#(B($BED^<!w%=%K!<(B $B$5$sB>(B)
      $B>e$N(B \begin{alltt} $B$H(B \end{alltt} $B$r(B 
      \begin{example} $B$H(B \end{example} $B$rJQ$($l$P!"$[$\$=$N$^$^;H$($^$7$?!#(B

$B!J#3!K(Bverbatim$B$K;w$?4D6-$rDj5A$9$k!#(B
      $B%^%/%m$J$I$rAw$C$F$$$?$@$-$^$7$?!#(B
      $B4D6-$rDj5A$7D>$9$H!"(BEscape $BJ8;z$H$7$F!"(B\ $B$N$+$o$j$KB>$NJ8;z$r(B
      $B;H$($k$N$,MxE@$G$9!#(B

\makeatletter
\def\newverbatim{\let\@NVtempa\newcommand\@newverbatim}
\def\renewverbatim{\let\@NVtempa\renewcommand\@newverbatim}
\def\@newverbatim#1{\@ifnextchar[%]
                                 {\@inewverbatim{#1}}{\@inewverbatim{#1}[0]}}
\long\def\@inewverbatim#1[#2]#3#4#5#6{%
        \expandafter\@NVtempa\csname #1\endcsname[#2]%
                {#3\@verbatim\frenchspacing\@vobeyspaces#4\@defxverbatim{#1}%
\@xverbatim}%
        \@namedef{end#1}{#5\endverbatim#6}}

\begingroup \catcode `|=0 \catcode `[= 1
\catcode`]=2 \catcode `\{=12 \catcode `\}=12
\catcode`\\=12
|gdef|@defxverbatim#1[|long|def|@xverbatim##1\end{#1}[##1|end[#1]]]
|endgroup

\newverbatim{VerbatimWithEscape}{}{\catcode`\@=0}{}{}

$B$3$l$G!"(B\begin{VerbatimWithEscape} ... \end{VerbatimWithEscape}$B$H$7$F!"(B
$B>e$N#2$D$HF1MM$K;H$($^$7$?!#$3$NNc$G$O!"(B@ $B$r(B Escape $B$K$7$F$$$^$9!#(B

$B!J#4!K(Btabbing$B4D6-$r;H$&!#(B

\begin{tabbing}
ttt\=ttt\=ttt\=ttt\=\kill     % $B$3$N9T$G%?%V$N4V3V$r@_Dj$7$F$$$k(B
{\bf for} j $\in$ $set(p)$ \{\\
\>{\bf if} ($f^{-1}(j) == k$) \{\\
\>\>...\\
\>\}\\
\}
\end{tabbing}

$B$H$$$&$h$&$J6q9g$K$J$j$^$9!#(B

$B!J#5!K(Bc++2latex $B$r;H$C$F%W%m%0%i%`$r(BLaTeX $B$N%3!<%I$KMn$H$7!"<j$r2C$($k!#(B
      $B$3$l$O(B LaTeX $B$N%U%!%$%k$,Bg$-$/$J$k$N$G!"7G:\$O>JN,$7$^$9!#(B


$B<B$O!"$3$N<ALd$r=P$9$^$G$O!"(B\def $B$J$I$r8+$?=V4V$K;W9M$,Dd;_$9$k$/$i$$(B
$B$NCN<1$7$+$"$j$^$;$s$G$7$?$N$G!"8=:_!";M6lH,6l$7$J$,$i869F$r=q$$$F$$$^(B
$B$9!#BN:[$K$3$@$o$kA0$K!"FbMF$,LdBj$H$$$&OC$7$b$"$j$^$9$,(B...

$B$=$l$G$O!"3'MM!"$"$j$,$H$&$4$6$$$^$7$?!#(B
$B7&ED(B  $B>;;K!w5~Bg(B $B9)(B $B>pJs(B $BIYED8&(B
e-mail: kubota@kuis.kyoto-u.ac.jp
phone: 075(753)5393
