From: Hans Hagen <pragma@wxs.nl>
Cc: ntg-context@ntg.nl, roegel@lorraine.loria.fr
Subject: Re: alltt equivalent?
Date: Fri, 24 May 2002 11:01:30 +0200 [thread overview]
Message-ID: <5.1.0.14.1.20020524110017.03527768@server-1> (raw)
In-Reply-To: <200205230505.HAA20158@bar.loria.fr>
At 07:05 AM 5/23/2002 +0200, Denis B. Roegel wrote:
>I have a LaTeX `alltt' environment to simulate in ConTeXt. Here is the piece
>of code in LaTeX:
>
>\def\xxxoe/{\oe}
>\begin{alltt}
>struct stat \{
> dev_t st_dev; /* identificateur du périphérique */
> /* où se trouve le fichier */
> ino_t st_ino; /* numéro du n\xxxoe/ud
> d'index */
> mode_t st_mode; /* droits d'accès du fichier */
> nlink_t st_nlink; /* nombre de liens effectués sur le fichier */
> uid_t st_uid; /* identificateur du propriétaire */
> gid_t st_gid; /* identificateur du groupe du propriétaire */
> dev_t st_rdev; /* type de périphérique */
> off_t st_size; /* taille en octets du fichier */
> time_t st_atime; /* date du dernier accès au fichier */
> time_t st_mtime; /* date de la dernière modification du fichier */
> time_t st_ctime; /* date du dernier changement du n\xxxoe/ud
> d'index */
>\} ;
>\end{alltt}
>
>In this environment, everything is like in \starttyping/\stoptyping,
>except that commands (\{, \}, \xxxoe/) are interpreted. I need such an
>environment, because of the `oe' ligature. If I write n\oe ud in a
>\starttyping/\stoptyping environment, I will get what I write here.
>Also, if I write this in an `alltt' environment, I will keep the
>space, hence the kludge I used. What would be the best ConTeXt way
>to do this?
The most simple solution i can come up with is the rather kludgeless:
\setuptyping[option=commands,escape=\string\ ]
\starttyping
struct stat {
dev_t st_dev; /* identificateur du priphrique */
/* o se trouve le fichier */
ino_t st_ino; /* numro du n\oe ud d'index */
mode_t st_mode; /* droits d'accs du fichier */
nlink_t st_nlink; /* nombre de liens effectus sur le fichier */
uid_t st_uid; /* identificateur du propritaire */
gid_t st_gid; /* identificateur du groupe du propritaire */
dev_t st_rdev; /* type de priphrique */
off_t st_size; /* taille en octets du fichier */
time_t st_atime; /* date du dernier accs au fichier */
time_t st_mtime; /* date de la dernire modification du fichier */
time_t st_ctime; /* date du dernier changement du n\oe ud d'index */
} ;
\stoptyping
watch the normal { and }
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
information: http://www.pragma-ade.com/roadmap.pdf
documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------
prev parent reply other threads:[~2002-05-24 9:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-23 5:05 Denis B. Roegel
2002-05-24 9:01 ` Hans Hagen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5.1.0.14.1.20020524110017.03527768@server-1 \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
--cc=roegel@lorraine.loria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).