hns - 日記自動生成システム - Version 2.19.9

先月 2005年01月 来月
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
Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい
検索式:

2005年01月11日(火) 旧暦 [n年日記] [更新:"2005/01/11 16:01:39"]

#1 [LaTeX][TeX] listinginput

\usepackage{moreverb}
...
...
\listinginput[1]{1}{hoge/constant.s}
とすると、その名前の譜から読んで、行番号付のリストを印刷する。 この行番号の付かないものが欲しかった。特にマクロの中で 呼ぶので verbatim は使えない。 /usr/pkg/share/texmf/tex/latex/misc/moreverb.sty を moreverba.sty という名前で写して、さらにその中で、 \def\listinginput の定義部をそっくり写して 一部の名前に a を付け
\listinginputa[1]{1}{hoge/constant.s}
としたら使えるようになった。番号付のものも同時に使う必要がある という条件での話。
--- moreverb.sty	2005-01-11 13:05:17.000000000 +0900
+++ moreverba.sty	2005-01-11 13:25:36.000000000 +0900
@@ -13,7 +13,7 @@
 %% (at your convenience) any later version.
 %% 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{moreverb}
+\ProvidesPackage{moreverba}
         [1997/12/07 v2.2d.2
     `more' verbatim facilities%
                    ]
@@ -128,6 +128,36 @@
     \@doendpe
   }%
 }
+\def\listinginputa{%
+   \@ifnextchar[%]
+     {\@listinginputa}%
+     {\@listinginputa[1]}}
+\begingroup
+  \catcode`\~=\active \lccode`\~=`\^^M \lccode`\N=`\N
+  \lowercase{\endgroup
+    \def\@listinginputa[#1]#2#3{\begingroup
+      \global\listing@line=#2
+      \gdef\listing@step{#1\relax}
+      \tab@size=\verbatimtabsize
+      \def\verbatim@processline{\tab@position\tab@size
+        %\thelisting@line \global\advance\listing@line1
+        \toks@{}%
+        \expandafter\verbatim@tabexpand\the\verbatim@line\@nil}%
+      \@verbatim\frenchspacing\@vobeyspaces\@vobeytabs
+      \def\verbatim@addtoline##1~{%
+        \verbatim@line\expandafter{\the\verbatim@line##1}}%
+      \openin\verbatim@in@stream=#3
+      \ifeof\verbatim@in@stream
+        \PackageWarning{moreverb}{No file #3.}%
+      \else
+        \do@verbatimtabinput
+        \closein\verbatim@in@stream
+      \fi
+      \endtrivlist\endgroup
+    \@doendpe
+  }%
+}
+
 \def\verbatimcmd{%
   \PackageError{moreverb}{The verbatimcmd environment is obsolete}%
                          {Use alltt (from the LaTeX base package

分類は TeX にするべきか LaTeX にするべきか ?



最近の日記
2024年05月08日
comparison on ./buildsh tools
2024年05月06日
py-setuptools (python 3.11.9)
make release took 1 hours and 10 min
qemu invocation for 10.99.10
2024年05月05日
Windows 10 version
serial connection
bc bench
2024年05月04日
Trial on 10.99.10
another version (later trial) to succeed
2024年04月29日
dkim
以上、1 日分です。
タイトル一覧
カテゴリ分類
Powered by hns-2.19.9, HyperNikkiSystem Project

Count.cgi (since 2000/02/05)