🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

4 total messages Started by Thomas Madeya Wed, 02 Sep 1992 07:48
verbatim input
#809
Author: Thomas Madeya
Date: Wed, 02 Sep 1992 07:48
11 lines
706 bytes
Hi,
fuer einige sicher ein alter Hut, aber ich koennte ein paar Tips gut brauchen.

Wie sag ich's meinem TeX, dass bei einem input die Datei verbatim gesetzt wird?

\begin{verbatim} \input{datei} \end{verbatim} muss natuerlich scheitern.

Bisher helfe ich mir damit, dass ich das "begin-end" in datei anbringen. Gibt's
da noch eine bessere Loesung?

Thomas
Re: verbatim input
#629
Author: Christoph Berger
Date: Thu, 03 Sep 1992 12:14
66 lines
2897 bytes
Thomas Madeya @ KA schrieb am Mi, 02.09.92 um 08:48:

>Wie sag ich's meinem TeX, dass bei einem input die Datei verbatim gesetzt
>wird?

Du brauchst nur den verbatim-Style, den ich in dieser Message mitliefere.
Dann kannst Du folgendes machen:

\documentstyle[dina4,verbatim]{article}
\begin{document}
blabla...
\verbatimfile{<Dateiname>}  % macht genau das, was Du suchst!
% oder \verbatimlisting{<Dateiname>}, fuegt Zeilennummern an
blabla...
\end{document}

So, jetzt kommt der Style. Ausschneiden und in dem Ordner einkleben, in dem
die ganzen LaTeX-Style-Files (*.STY) stehen, i. a. der LATEX-Ordner.

Viel Spass damit!
                Christoph

---8<------------------------------------------------------------------

% Here is a version of Adrian's VERBATIM.STY, for inputting whole files
% verbatim, which is "more LaTeX-like" in that it uses the actual LaTeX
% macros which set up the `verbatim' environment.
%
% As a matter  of interest, it is much nicer for TeX if you input large
% quantities of "verbatim material" from an "external file" rather than by use
% of the `verbatim' environment (i.e. putting the material in the main input
% file. This is because this environment, in common with most (but not all)
% other "verbatim macros", makes the whole of the "vebatim material" a macro
% argument and therefore eats up TeTeX's internal memory.
%
% Chris Rowley
%

% ---              V E R B A T I M F I L E S . S T Y
%
% --- This LaTeX style-file defines two user-callable macros:
% ---     \verbatimfile{<filename>}    for verbatim inclusion of a file
% ---     \verbatimlisting{<filename>} for verbatim inclusion with line numbers
%
% --- The macros are based on those distributed with Sunil Podar's
% --- `EPIC.STY' macro package, attributed to Tim Morgan,
% --- modified to keep internal macros internal by Adrian F. Clark,
% --- alien@uk.ac.essex.ese
% --- ---and further latexification by Chris Rowley,
% --- ca_rowley@uk.ac.open.acs.vax.
%
% --- Note that the precise layout of line breaks in this file is important!
%

\def\verbatimfile#1{\begingroup
                    \@verbatim \frenchspacing \@vobeyspaces
                    \input#1 \endgroup
}

\newcounter{lineno}

\def\verbatimlisting#1{\setcounter{lineno}{0}%
    \begingroup \@verbatim \frenchspacing \@vobeyspaces \parindent=20pt
    \everypar{\stepcounter{lineno}\llap{\thelineno\ \ }}\input#1
    \endgroup
}
Re: verbatim input
#691
Author: Christian Koenig
Date: Sat, 05 Sep 1992 14:31
59 lines
2702 bytes
Hi Thomas, am 02 Sep 92 hast Du folgende Zeilen geschrieben:

 TM> Wie sag ich's meinem TeX, dass bei einem input die Datei verbatim gesetzt
 TM>  wird?
 TM>
 TM> \begin{verbatim} \input{datei} \end{verbatim} muss natuerlich scheitern.
 TM>
 TM> Bisher helfe ich mir damit, dass ich das "begin-end" in datei anbringen.
 TM>  Gibt's
 TM> da noch eine bessere Loesung?
 TM>
 TM> Thomas

Klar: Einen Verbatim - Inputfilestyle:  (verbatimfiles.sty)


-------------CUT HERE-----------------------------------------
% Here is a version of Adrian's VERBATIM.STY, for inputting whole files
% verbatim, which is "more LaTeX-like" in that it uses the actual LaTeX
% macros which set up the `verbatim' environment.
%
% As a matter  of interest, it is much nicer for TeX if you input large
% quantities of "verbatim material" from an "external file" rather than by use
% of the `verbatim' environment (i.e. putting the material in the main input
% file. This is because this environment, in common with most (but not all)
% other "verbatim macros", makes the whole of the "vebatim material" a macro
% argument and therefore eats up TeTeX's internal memory.
%
% Chris Rowley
%

% ---              V E R B A T I M F I L E S . S T Y
%
% --- This LaTeX style-file defines two user-callable macros:
% ---     \verbatimfile{<filename>}    for verbatim inclusion of a file
% ---     \verbatimlisting{<filename>} for verbatim inclusion with line numbers
%
% --- The macros are based on those distributed with Sunil Podar's
% --- `EPIC.STY' macro package, attributed to Tim Morgan,
% --- modified to keep internal macros internal by Adrian F. Clark,
% --- alien@uk.ac.essex.ese
% --- ---and further latexification by Chris Rowley,
% --- ca_rowley@uk.ac.open.acs.vax.
%
% --- Note that the precise layout of line breaks in this file is important!
%

\def\verbatimfile#1{\begingroup
                    \@verbatim \frenchspacing \@vobeyspaces
                    \input#1 \endgroup
}

\newcounter{lineno}

\def\verbatimlisting#1{\setcounter{lineno}{0}%
    \begingroup \@verbatim \frenchspacing \@vobeyspaces \parindent=20pt
    \everypar{\stepcounter{lineno}\llap{\thelineno\ \ }}\input#1
    \endgroup
}
Re: verbatim input
#727
Author: Olaf Maennig
Date: Thu, 10 Sep 1992 06:10
29 lines
1781 bytes
In article <93EECC61@p4000.f4.n246.z2.fidonet.org>,
Christian_Koenig@p4000.f4.n246.z2.fidonet.org (Christian Koenig) writes:
|> \newcounter{lineno}
|> 
|> \def\verbatimlisting#1{\setcounter{lineno}{0}%
|>     \begingroup \@verbatim \frenchspacing \@vobeyspaces \parindent=20pt
|>     \everypar{\stepcounter{lineno}\llap{\thelineno\ \ }}\input#1
|>     \endgroup
|> }

Hallo.

Da ich mich mit TeX nicht so auskenne, die Frage: wie programmiert man einen
solchen Aufruf:
	\verbatimlisting{startno}{file}

Ich m"ochte ab und an auch mal die Zeilennummer vorgeben. Meine intuitive
Idee, die Null durch startno zu ersetzen und die '#<zahl>' entsprechend zu
"andern, hat nichts gebracht ausser einem Fehler. Wahrscheinlich habe ich es
mir da wohl zu einfach gemacht!?

Tschau.
-- 

 ---------------------------------------------------------------------------
     _                   Department of Computer Science IV
    / \     |\/|         University of Dortmund, Germany
    \_/laf  |  |aennig   e-mail: maennig@siggi.informatik.uni-dortmund.de
 ---------------------------------------------------------------------------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads