* cont-de help for context with MK IV
@ 2008-09-02 13:21 Martin Scholz
2008-09-02 17:22 ` Hans Hagen
0 siblings, 1 reply; 2+ messages in thread
From: Martin Scholz @ 2008-09-02 13:21 UTC (permalink / raw)
To: ntg-context
Hi for all of you who want to compile documents with context under MK IV
you can use
luatools --make --compile cont-xx
to compile your language, hereby you must replace xx by the country-code of
your desired language
and with
luatools --run cont-xx myfile
you can compile your document.
If you are using the chemic-modul you should add the following to your
preamble to let it compile correctly:
\unprotect
\def\MPdivten[#1]%
{\@EA\@EA\@EA\doMPdivten\@EA\@EA\@EA[\@EA#1]}
\def\doMPdivten[#1]%
{\ifnum#1> 9999 \dodoMPdivtenB#1\else
\ifnum#1> 999 \dodoMPdivtenC#1\else
\ifnum#1> 99 \dodoMPdivtenD#1\else
\ifnum#1> 9 \dodoMPdivtenE#1\else
\ifnum#1> 0 \dodoMPdivtenF#1\else
\ifnum#1<-9999 \dodoMPdivtenA#1\else
\ifnum#1< -999 \dodoMPdivtenB#1\else
\ifnum#1< -99 \dodoMPdivtenC#1\else
\ifnum#1< -9 \dodoMPdivtenD#1\else
\ifnum#1< 0 \dodoMPdivtenE#1\else
0 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
\def\dodoMPdivtenA#1#2#3#4#5#6{#1#2#3#4#5.#6}
\def\dodoMPdivtenB #1#2#3#4#5{#1#2#3#4.#5}
\def\dodoMPdivtenC #1#2#3#4{#1#2#3.#4}
\def\dodoMPdivtenD #1#2#3{#1#2.#3}
\def\dodoMPdivtenE #1#2{#1.#2}
\def\dodoMPdivtenF #1{.#1}
\protect
Thanks here to Wolfgang Schuster you just helped to figure out this howto.
The question is now how could one give the language-option over to context by
the context command or by edit the sourcefile with a command so that the
command has the following input:
context myfile
with the language-option in a context-command in the source-file or like
context --lang=de myfile
where the --lang option refers to the above luatools option so that default
luatools --run cont-en myfile is invoken and if --lang=xx is set the command
is invoken in the following way luatools --run cont-xx myfile.
Would be nice if one of the programmers could just implement the following
option in MK IV.
Greetings
Martin
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: cont-de help for context with MK IV
2008-09-02 13:21 cont-de help for context with MK IV Martin Scholz
@ 2008-09-02 17:22 ` Hans Hagen
0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2008-09-02 17:22 UTC (permalink / raw)
To: martin, mailing list for ConTeXt users
Martin Scholz wrote:
...
> \unprotect
> \def\MPdivten[#1]%
> {\@EA\@EA\@EA\doMPdivten\@EA\@EA\@EA[\@EA#1]}
>
> \def\doMPdivten[#1]%
> {\ifnum#1> 9999 \dodoMPdivtenB#1\else
> \ifnum#1> 999 \dodoMPdivtenC#1\else
> \ifnum#1> 99 \dodoMPdivtenD#1\else
> \ifnum#1> 9 \dodoMPdivtenE#1\else
> \ifnum#1> 0 \dodoMPdivtenF#1\else
> \ifnum#1<-9999 \dodoMPdivtenA#1\else
> \ifnum#1< -999 \dodoMPdivtenB#1\else
> \ifnum#1< -99 \dodoMPdivtenC#1\else
> \ifnum#1< -9 \dodoMPdivtenD#1\else
> \ifnum#1< 0 \dodoMPdivtenE#1\else
> 0 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
>
> \def\dodoMPdivtenA#1#2#3#4#5#6{#1#2#3#4#5.#6}
> \def\dodoMPdivtenB #1#2#3#4#5{#1#2#3#4.#5}
> \def\dodoMPdivtenC #1#2#3#4{#1#2#3.#4}
> \def\dodoMPdivtenD #1#2#3{#1#2.#3}
> \def\dodoMPdivtenE #1#2{#1.#2}
> \def\dodoMPdivtenF #1{.#1}
> \protect
>
> Thanks here to Wolfgang Schuster you just helped to figure out this howto.
some real old (expandable) macro, this one, from before the etex time ...
this is a cleaner variant
\def\MPdivten[#1]{\withoutpt\the\dimexpr#1pt/10\relax}
i added it to the core (mkii and mkiv)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-02 17:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-02 13:21 cont-de help for context with MK IV Martin Scholz
2008-09-02 17:22 ` Hans Hagen
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).