to
be fed into pdf specific data structures, in different encodings, with
different kind of escapes etc) and that in for instance buffers,
verbatim, multi-pass data and other situations one may need the original
input; it all depends on how a macro package is build and deals with
data and also
Taco,
Just tried this and it is really cool!
But how can I make spaces without the special space character?
ThanksOn 7/29/05, Taco Hoekwater [EMAIL PROTECTED] wrote:
Hi,I saw this on the wiki: http://contextgarden.net/Verbatim_with_line_breaksand it seemed like a fun idea to play with for a
Eugene Toporov wrote:
Taco,
Just tried this and it is really cool!
But how can I make spaces without the special space character?
Like so:
\def\BREAKtypeone#1%
{\advance\BREAKcharcounter 1
\ifnum\BREAKcharcounter \BREAKmaxcharcount
\hfil\break
\BREAKcharcounter=1
Hi,
I saw this on the wiki:
http://contextgarden.net/Verbatim_with_line_breaks
and it seemed like a fun idea to play with for a bit.
How's this?
Cheers, Taco
%
% BREAK is a special pretty handler that auto-wraps lines
% to fit the current hsize.
\gdef\BREAKsetspecials%
of the TeXBOOK, typesetting verbatim. If I
manage to fix that too, I'll post it here.
%%
% new counter for counting lines
% it is set to 0 at the beginning,
% but you can redefine it any time by saying \lineno=7 or similar
\newcount\lineno
% if 0, nothing happens, if 1, no line number
in Appendix D of the TeXBOOK, typesetting verbatim. If I
manage to fix that too, I'll post it here.
%%
% new counter for counting lines
% it is set to 0 at the beginning,
% but you can redefine it any time by saying \lineno=7 or similar
\newcount\lineno
% if 0, nothing happens, if 1
discussed last ntg meeting); for instance,
- say that you want verbatim
- and use ec encoding
- and use kb names
- and don't want --- ligatures and such
impossible (with the current tex, less impossible with the next release of
pdftex) .. so, you switch to texnansi
- for which there are kb
into cell as it is spread
over all text width.
The attached example contains corresponding TeX code -- a cell contains two
pars and one verbatim with background. And the background flows out of the
cell.
Thank you and have a nice day,
Martin
tblverbatim.tex
Description: Binary data
, how I could write some verbatim text between
2 commands (\startXXX...\stopXXX) into a file, but with my own macros.
Here an example in detail:
\newcount\LSTnum
\newwrite\LSTfile
\def\LSTfileprefix{\jobname-LST\LSTnum}
\def\startLST[#1]#2\stopLST{%
\immediate\openout\LSTfile=\LSTfileprefix.tmp
:
\definebuffer[crap]
\setupbuffer[crap][before=\blank\bgroup here we start,after=and here we
end\egroup\blank]
[...]
Hello Hans and Taco,
thank you for your hints, but I think, I did not explain my question well
enough...
I fact, all I need is to know, how I could write some verbatim text
did not explain my question well
enough...
I fact, all I need is to know, how I could write some verbatim text
between
2 commands (\startXXX...\stopXXX) into a file, but with my own macros.
Here an example in detail:
\newcount\LSTnum
\newwrite\LSTfile
\def\LSTfileprefix{\jobname-LST\LSTnum}
\def
correctly, albeit a bit
hackishly. It's not too fun working with the verbatim code, though.
It's a bit restrictive in what can be done.
Anyway, I've attached it here. Perhaps we can make something standard
of it?,
nikolai
--
Nikolai Weibull: now available free of charge at http://bitwi.se
Taco Hoekwater wrote:
Nikolai Weibull wrote:
Idris Samawi Hamid, April 17:
\type{texfont --help}
The bug is apparently in \type: it only generates one dash.
the Latin Modern fonts are in 'ec' encoding, and \type does not
take that into account (yet). If you switch to texnansi encoding,
the
Dear gang,
\type and \start-\stoptyping produce
different results in the following instance:
===
% output=pdf interface=en
\starttext
\type{texfont --help}
\starttyping
texfont --help
\stoptyping
\stoptext
===
The bug is apparently in \type: it only
Idris Samawi Hamid, April 17:
\type{texfont --help}
The bug is apparently in \type: it only generates one dash.
This doesn't happen on my system, but perhaps you're using a newer
ConTeXt version than I am,
nikolai (who's using the 2005.01.31 that ships with teTeX 3.0)
--
Nikolai
Nikolai Weibull wrote:
Idris Samawi Hamid, April 17:
\type{texfont --help}
The bug is apparently in \type: it only generates one dash.
the Latin Modern fonts are in 'ec' encoding, and \type does not
take that into account (yet). If you switch to texnansi encoding,
the problem goes away:
Yeah, that appears to be a bug, I was in touch with Hans a couple of
weeks ago about it.
But a fairly harmless one...
Best
Thomas
On Apr 17, 2005, at 4:26 PM, Idris Samawi Hamid wrote:
The bug is apparently in \type: it only generates one dash.
Best
Idris
Hi Willi
= Original Message From Willi Egger [EMAIL PROTECTED] =
Hi Idris,
Asking for brace-trickery ...
What about: \textbraceleft\type{A}\textbraceright
Wow! that's ingenious;)
Thank you Willi, Taco, and Hans for your help on this.
best
Idris
Professor
Taco Hoekwater wrote:
Idris Samawi Hamid wrote:
Dear cartel,
\head\relax \type{ {A} }
Not a solution, but a workaround:
\head\relax \expandafter\type\scantokens{{ {A} }}
(I don't know how to solve this)
I do, but i have no idea how robust it is ...
% in cont-new.tex
\unprotect
Hi Idris,
Asking for brace-trickery ...
What about: \textbraceleft\type{A}\textbraceright
Kind regards
Willi (member of the gang)
Idris Samawi Hamid wrote:
Dear cartel,
There is an apparent bug in the verbatim mechanism. In the following example,
the `A' is typed but the curly brackets
Idris Samawi Hamid, April 14:
\type{ {A} }
Wait, what? You can have nested braces in \type? I had no idea! That
actually saves me a lot of trouble, thanks,
nikolai
--
Nikolai Weibull: now available free of charge at http://bitwi.se/!
Born in Chicago, IL USA; currently residing in
Dear cartel,
There is an apparent bug in the verbatim mechanism. In the following example,
the `A' is typed but the curly brackets are not typed after \head. \type works
as expected in the other two instances. I tried \relax (and a couple of other
hacks) but that does not help. Please advise
indeed get a verbatim buffer (which is what type
does);
\dorecurse{100}{test \footnote{\input knuth } \endnote{eee}\endgraf}
also works; put a space or \relax after \input, else tex keeps scanning;
alternatively use \ReadFile{knuth} or \readfile{knuth}{}{}
\page
\placenotes[endnote]
\stoptext
= Original Message From Hans Hagen [EMAIL PROTECTED] =
\starttext
\startbuffer[tufte]
\input tufte
\stopbuffer
\startbuffer[knuth]
\input knuth
\stopbuffer
\dorecurse{100}{test \footnote{\typebuffer[knuth]} \endnote{eee}\endgraf}
it's \getbuffer else you indeed get a verbatim
: Context Typographic Macros (ini)
) (c:\ALPHA-~1\tex\texmf-local/tex/context/base/verb-ini.tex
loading : Context Verbatim Macros / Initialization
) (c:\ALPHA-~1\tex\texmf-local/tex/context/base/core-var.tex
loading : Context Core Macros / Variables
) (c:\ALPHA-~1\tex\texmf-local
Hi!
I'm trying to design a universal markup that will be easy to convert both
to PDF and HTML. I've come to code and equations. I don't want to use
MathML and I want to output (and use in my documents!) verbatim TeX code of
equations to HTML. What worries me is the following:
I want to be able
want: it
disables
math and expansion of TeX commands.
Also, perhaps my request is simply an option of \startlines
which keep not only the lines break, but also the first
spaces of each line (in a verbatim font fors these space)
Happy new year !
Thanks to Mojca and John, I use \startlines
an option of \startlines
which keep not only the lines break, but also the first
spaces of each line (in a verbatim font fors these space)
In plain TeX you have a command \obeyspaces (apart from \obeylines).
Nevertheless, whitespaces at the beginning of line are ignored when
using \obeyspaces, so you
of TeX commands.
Also, perhaps my request is simply an option of \startlines
which keep not only the lines break, but also the first
spaces of each line (in a verbatim font fors these space)
In plain TeX you have a command \obeyspaces (apart from \obeylines).
Nevertheless, whitespaces
(in a verbatim font fors these space)
Thank you for any help!
-- Maurice Diamantini
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
keep not only the lines break, but also the first
spaces of each line (in a verbatim font fors these space)
Thank you for any help!
-- Maurice Diamantini
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
of \startlines
which keep not only the lines break, but also the first
spaces of each line (in a verbatim font fors these space)
In plain TeX you have a command \obeyspaces (apart from \obeylines).
Nevertheless, whitespaces at the beginning of line are ignored when
using \obeyspaces, so you
;Some textlt;/pgt;
lt;/bodygt;
lt;/htmlgt;
/programlisting
I have defined the entity conversion:
\defineXMLentity[gt]{\char`\{}}
\defineXMLentity[lt]{\char`\{}}
This works OK if the entities occur somewhere in the normal text but it
doesn't matter in the verbatim text.
Is there any solution
text but
it doesn't matter in the verbatim text.
Is there any solution for this? Maybe changing catcodes of the and
; characters?
maybe it's enough to add
\catcode`\=\active
Hans
-
Hans Hagen
Hi Adam,
I did so right now (thanks for the hint!).
But in that file ther's only solved a case when each line of the
verbatim text is placed in a special tag:
verbatim
lineDit \is nogal verbatim !/line
lineDit is {nogal} verbatim !/line
lineDit is nogal verbatim !/line
/verbatim
=reference.type /
?context-block end references ?
?context-block begin unknown ?
xsd:element name=unknown/
?context-block end unknown ?
?context-block begin verbatim ? !-- string or anyType --
xsd:complexType name=verbatim.verbatim
xsd:sequence maxOccurs=unbounded
xsd:element name=line
Richard Gabriel wrote:
Hi Adam,
I did so right now (thanks for the hint!).
But in that file ther's only solved a case when each line of the
verbatim text is placed in a special tag:
verbatim
lineDit \is nogal verbatim !/line
lineDit is {nogal} verbatim !/line
lineDit is nogal verbatim
Hi all,
I'm back here with the following problem:
I'm processing XML files (DocBook DTD) which also may contain the
programlisting tag with some preformatted text.
In a sample TeX file, I've tested the following:
\starttyping
somecontext
variable name=Var
Value of Var
/variable
/somecontext
Richard Gabriel said this at Tue, 14 Dec 2004 16:48:05 +0100:
So I defined a macro to process the programlisting tag from the XML file:
\defineXMLenvironment[programlisting]{\starttyping}{\stoptyping}
Richard,
Have you taken a look at x-contml to see how it solves this problem with
verbatim
[background=screen,width=\hsize,style=\tttf\small]
Hello World! Hello + txtName.text + !
\stopframedtext
\eTD
Why is this so? Do I miss something important?
indeed, passing verbatim as argument does not work due to catcode
wizzardy; so, try to use buffers instead
\startbuffer
I would like to create a verbatim environment for writing pseudo-code
in. Anyone have any suggestions/hints on how to go about it. I've
looked at verb-*.tex, but they don't enlighten much.
I basically want simple stuff like pseudo-code you'd find in one of
Knuth's books or anything by Aho
* Nikolai Weibull [EMAIL PROTECTED] [Aug 31, 2004 16:00]:
I would like to create a verbatim environment for writing pseudo-code
in. Anyone have any suggestions/hints on how to go about it. I've
looked at verb-*.tex, but they don't enlighten much.
I basically want simple stuff like pseudo
* Nikolai Weibull [EMAIL PROTECTED] [Aug 31, 2004 17:20]:
What I really need to know now (I got a small implementation I want to
try out) is how to install the verbatim environment and then how to try
it out.
OK. Here's a preliminary implementation. Perhaps using a verbatim
environment
verbatim environments,
scans through the following text until it gets to the appropriate end
text. It doesn't expand tokens while doing this; in particular,
\stopTTinput never gets expanded, and so the sequence \stoptyping
never shows up to end the input.
Incidentally, there's also a bit more
and such. (interestingly this is no real problem for context
since the control characters (32) are mostly used for file io,
verbatim, pdf, metapost, javascript, xml etc).
Hans
-
Hans Hagen | PRAGMA ADE
]%
\usetypescript[palatino][texnansi]
\setupbodyfont[palatino,rm,14pt]
\stopMPenvironment
i've fixed this (some merge of verbatim tex into textext problem); i'll
send you a new texexec.pl
btw, this saves keying:
\startMPenvironment[global]
\enableregime[il1
), perhaps the capabilities of ConTeXt are already sufficient. On
the other side, listings.sty is a very great package and mostly written in
Plain TeX. So perhaps it's worth the effort. I don't know...
A verbatim environment is tricky because one has to play with catcodes and the endcondition
the LaTeX built in mechanisms are used (for example
\addcontentsline{lol}{lstlisting}{...}. Here the LaTeX interface must be
replaced by a ConTeXt interface.
If some features are missing in the current verbatim environment (one of
the older parts of context) i can add them if needed. On the other hand
* Peter Münster [EMAIL PROTECTED] [Jun 28, 2004 20:00]:
Personally for me, today I'm just looking for two features:
- line breaking as suggested in my email from 19. June (- \hyphenatedfile)
- support for C and C++
What I think would work best is if someone could document the verbatim
.
\stopBNF
\stoptext
(cross your fingers that this does not interfere with reading files, but
normallyare taken care of)
an alternative is to write a plugin forthe verbatim environment (see
verb-ini to get an idea of what nasty things are involved with catcode
changes).
Hans
On Thursday 22 April 2004 08:59 am, Severin Obertüfer wrote:
hello
i have a little verbatim problem
i used the \startEIFFEL \stopEIFFEL verbatim environment
in a verry simple way like this:
Similarly I needed to have the program obey line breaks as
in \obeylines but interpet the lines
-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Willi Egger
Gesendet: Donnerstag, 22. April 2004 21:51
An: [EMAIL PROTECTED]
Betreff: Re: [NTG-context] verbatim problem
Hi,
Did you think of putting the information into a buffer
On 31 Mar 2004 at 8:44, George N. White III wrote:
On Tue, 30 Mar 2004, Christopher G D Tipper wrote:
I am learning the TaBle package and I get the following from a verbatim
example from the manual.
ConTeXt uses heavily modified macros. There is \ObeyTableBarAndQuote,
but you still
On Tue, 30 Mar 2004, Christopher G D Tipper wrote:
I am learning the TaBle package and I get the following from a verbatim
example from the manual.
ConTeXt uses heavily modified macros. There is \ObeyTableBarAndQuote,
but you still need to use the ConTeXt versions of the macros. See
core
I am learning the TaBle package and I get the following from a verbatim
example from the manual.
\handleTABLEerror ...LE {columnspan too large}\SR
\or \fillTABLEcolumns \ttt...
l.54 \use2
control
package which allows to do clever table
- every package which allows to do verbatim, ...
But ConTeXt is an independant, modern TeX based distribution (even if
it don't (yet) know about simple html :-).
So was do we need to be able to switch from LaTeX to ConTeXt?
- a simple standard tetex distib
which allows to do clever table
- every package which allows to do verbatim, ...
But ConTeXt is an independant, modern TeX based distribution (even if
it don't (yet) know about simple html :-).
So was do we need to be able to switch from LaTeX to ConTeXt?
- a simple standard tetex distib for our
These are my first forays into the unknown territories of Metapost. The
following code is copied verbatim from the matafun-manual:
\startuniqueMPgraphic{copyright}
picture p ; p := btex COPYRIGHT etex rotated 90 ;
setbounds p to boundingbox p enlarged 1pt ;
draw p withcolor .8white
Hello Thomas,
These are my first forays into the unknown territories of Metapost.
You'll enjoy your journey once you get MP working.
The following code is copied verbatim from the matafun-manual:
[...]
But I don't see anything. The log shows that metapost calculated a
background, but I
Hi,
I try to define new command with typing in this way:
Don't mess with verbatim stuff in commands. Don't ask why, just don't
do it ;-)
\definetyping
[nitram]
[before=\startframedtext,
after=\stopframedtext]
\starttext
\startnitram
crazy
\stopnitram
\stoptext
It works
Hi,
It works but if I use
\startnitram
\getbuffer
\stopnitram
I have as result:
\getbuffer
;)
right, that is verbatim mode :)
I would like to define some code in buffer and use it
as example (typing this code) and show how it works (use this code).
I can use \getbuffer
^Nitram^ [EMAIL PROTECTED] writes:
Hi,
I try to define new command with typing in this way:
\def\Command#1%
{
\framed[options]
{
\starttyping
#1
\stoptyping
}
}
Don't mess with verbatim stuff in commands. Don't ask why, just don't
do it ;-)
And: TeX != C. Don't write C-like
with ligature
building and one for verbatim, say:
cmtt10.tfm
cmtv10.tfm
(cmvtt is already taken)
and some more of the font mess
let's see what Jacko says ...
that would be good to hear.
Patrick
___
ntg-context mailing list
[EMAIL PROTECTED
Hi!
On Wed, Sep 03, 2003 at 09:49:40PM +0200, Simon Pepping wrote:
Meybe someone knowns how to 'translate' verbatim environments for XML
code?
I mean how to define environment which I can use in this way [..]
There are no verbatim environments in XML, and you cannot get literal
At 08:49 04/09/2003 +0200, you wrote:
Hello!
There are no verbatim environments in XML, and you cannot get literal
content. Instead, you can have tags, like your verbatim above, that
request line-oriented layout. programlisting is such a tag in Docbook.
This is how docbook in context does
At 21:09 04/09/2003 +0200, you wrote:
Good question! As far as I'm concerned (but I'm not concerned far...)
ConTeXt can handle some 'metadata'
like !ENTITY But I don't know exaclty which levels of XML syntax is
handled with ConTeXt core.
I hope Hans will provide some workshops :)
well,
is that it DOESN'T work for nested XML files. How can I set
someting like this
for the whole XML structure, not only for file processed just 'under'
ConTeXt? It works only for the file processed
directly by the command \processXMLfile{...}
II.
Meybe someone knowns how to 'translate' verbatim environments
On Wed, Sep 03, 2003 at 04:09:32PM +0200, Pawel Jackowski na WP wrote:
II.
Meybe someone knowns how to 'translate' verbatim environments for XML code?
I mean how to define environment which I can use in this way
verbatim
/verbatim
to get literal content of such XML tag
701 - 768 of 768 matches
Mail list logo