ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco <taco@elvenkind.com>
Cc: angerweit@gmx.net, ntg-context@ntg.nl
Subject: Re: "LaTeX compatibility module" (was: Non breaking small space)
Date: Wed, 8 May 2002 10:59:48 +0200	[thread overview]
Message-ID: <20020508105948.10da88eb.taco@elvenkind.com> (raw)
In-Reply-To: <2A6C8LINIHC2YHD31POCAKH09MJTRTQ.3cd87117@c1909372-a>

Informational: here is the \newcommand definition from m-bib.tex

%D \subonderwerp{\LATEX\ support}
%D
%D \macros{newcommand}

%D Just about all databases define something that uses
%D \type{\newcommand}. This fake version does not cover
%D everything \type{\newcommand} does, but it should be
%D enough for simple definitions like the ones found in
%D \BIBTEX\ files.
%D
%D It would be cleaner to move this command
%D to some sort of \type{supp-ltx} file somewhere in
%D the future.

\def\@star@or@long#1%
   {\doifnextcharelse*{\afterassignment#1\let\next=}{#1}}

\def\newcommand{\@star@or@long\new@command}

\def\new@command#1{\@testopt{\@newcommand#1}0}

\def\@newcommand#1[#2]%
   {\doifnextcharelse[{\@xargdef#1[#2]}{\@argdef#1[#2]}}

\long\def\@argdef#1[#2]#3{\@yargdef#1\@ne{#2}{#3}}

\long\def\@xargdef#1[#2][#3]#4%
    {\@EA\def\@EA#1\@EA{%
          \@EA \do@testopt \@EA#1%
          \csname\string#1\endcsname {#3}}%
     \@EA\@yargdef
          \csname\string#1\endcsname
          \tw@ {#2}{#4}}

\def\@testopt#1#2{\doifnextcharelse[{#1}{#1[#2]}}

\def\do@testopt#1{\expandafter\@testopt }

\long\def\@yargdef#1#2#3%
 {\!!counta#3\relax
  \advance \!!counta \@ne
  \let\@hash@\relax
  \edef\!!tempa{\ifx#2\tw@ [\@hash@1]\fi}%
  \!!countb #2%
  \loop\ifnum\!!countb <\!!counta
         \edef\!!tempa{\!!tempa\@hash@\the\!!countb}%
         \advance\!!countb \@ne
  \repeat
  \let\@hash@##%
  \long\@EA\def\@EA#1\!!tempa}

\long\def\@reargdef#1[#2]{\@yargdef#1\@ne{#2}}


  reply	other threads:[~2002-05-08  8:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-30 20:58 Non breaking small space Nigel King
2002-05-02 14:12 ` John Culleton
2002-05-03 23:09   ` Nigel King
2002-05-06  0:09     ` Hans Hagen
2002-05-06 19:31       ` "LaTeX compatibility module" (was: Non breaking small space) Henning Hraban Ramm
2002-05-08  0:28         ` Idris Samawi Hamid
2002-05-08  8:59           ` Taco [this message]
2002-05-06  0:11   ` Non breaking small space Hans Hagen
2002-05-06 12:53     ` Eckhart Guthöhrlein
2002-05-06 12:58     ` John Culleton
2002-05-04 20:49 ` Patrick Gundlach
2002-05-05  0:20   ` Gamma bugs Idris Samawi Hamid
2002-05-05  1:46     ` defining environments Idris Samawi Hamid
2002-05-05 10:11       ` Henning Hraban Ramm
2002-05-05 11:32       ` Patrick Gundlach
2002-05-05 23:34     ` Gamma bugs Hans Hagen
2002-05-09 19:49 ` Non breaking small space Hans Hagen

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=20020508105948.10da88eb.taco@elvenkind.com \
    --to=taco@elvenkind.com \
    --cc=angerweit@gmx.net \
    --cc=ntg-context@ntg.nl \
    /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).