Re: [NTG-context] :: in xml?

2007-07-11 Thread Christopher Creutzig
Christopher Creutzig wrote:

 \starttext
 \startXML
 aa::b/a
 \stopXML
 \stoptext

  The problem is the \setpretty`\:=10 in \XMLsetspecials in 
verb-xml.tex. This should only be done inside 

  Suggested patch (I hope it survives being sent by mail):

--- verb-xml.tex.orig   2007-07-11 11:08:45.0 +0200
+++ verb-xml.tex2007-07-11 11:26:59.0 +0200
@@ -108,12 +108,13 @@
 \setpretty`\(=30 \setpretty`\)=30 \setpretty`\,=30
 \setpretty`\*=30 \setpretty`\+=30 \setpretty`\#=30
  %  \setpretty`\:=30
-   \setpretty`\:=10 % better for tags
+   \setpretty`\:=18 % better for tags
 \setpretty`\=41 \setpretty`\;=42 }

  \gdef\XMLsethandlers%
{\installprettyhandler 17 \XMLnormal
 \installprettyhandler 10 \XMLwhattag
+   \installprettyhandler 18 \XMLmaybewhattag
 \installprettyhandler 11 \XMLstoptag
 \installprettyhandler 12 \XMLtypeonetwo
 \installprettyhandler 13 \XMLtypeonethree
@@ -142,7 +143,15 @@
  \gdef\XMLnormal#1{\getpretty{#1}}

  \gdef\XMLwhattag%
-  {\handlenextnextpretty\XMLdowhattag\XMLstarttag}
+  {\handlenextnextpretty\XMLdowhattag\XMLstarttag}%
+
+% For :, use \XMLwhattag inside tag names, \XMLnormal otherwise
+\gdef\XMLmaybewhattag%
+  {\ifinXMLtagname
+ \expandafter\XMLwhattag
+   \else
+ \expandafter\getpretty
+   \fi}

  \gdef\XMLdowhattag#1#2%
{\ifinXMLcomment




___
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
___


[NTG-context] :: in xml?

2007-07-10 Thread Christopher Creutzig
Salvete,

  trying to typeset an unchanged old file with a more recent ConTeXt 
version, I keep running into problems. I have reduced the first of these 
(others may or may not be symptoms of the same, I'll see that later) to 
this input:

\starttext
\startXML
aa::b/a
\stopXML
\stoptext

It seems the xml parser does something special with colons in the 
content of elements. I don't think it should and this is probably just a 
left-over from looking for xml namespaces, but that is just a guess.


Regards,
Christopher
___
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
___


Re: [NTG-context] new release

2006-05-27 Thread Christopher Creutzig
Hans Hagen wrote:

 texmfstart --verbose --unix --stubpath=yourbinpath  --make all

  That is a cool feature.  But it does not set executable bits on the 
stubs yet, could you fix that?


Regards,
Christopher

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] New release and XeTeX - XeConTeXt

2006-05-14 Thread Christopher Creutzig

Otared KAVIAN wrote:


sudo texexec --make --xtx en



(/usr/local/teTeX/share/texmf.local/tex/context/patterns/lang-de.pat
! Bad \patterns.
\unknownchar -{
\hbox {\vrule \!!width .5em\!!height 1ex\!!depth \zeropoint }}
l.114 .ge
 s6
?


 Same for me.  The problem is that in line 113, we have
.ge5rö
in Latin-1 encoding, but XeTeX tries reading the file in UTF-8.


Has anyone encountered this error? Is there a solution?


 I only have a nasty hack:  In the patterns directory, run (in bash)

for file in *.pat *.hyp
  do iconv -f iso-8859-1 -t utf-8 $file $file-u
done

and in mult-sys.tex, change the lines reading

\definefileconstant {patternsextension}  {pat}
\definefileconstant {hyphensextension}   {hyp}

to

\doifundefinedelse{XeTeXversion}
{\definefileconstant {patternsextension}  {pat}
 \definefileconstant {hyphensextension}   {hyp}}
{\definefileconstant {patternsextension}  {pat-u}
 \definefileconstant {hyphensextension}   {hyp-u}}

There probably is a much better place for this change, but cont-new.tex, 
afaik, is not read when generating formats and I don't know where the 
code really should go.  It mayalso be possible to fix the behaviour by 
some regime switchting in the .pat and .hyp files, but I know very 
little about those commands and haven't tested it.


 Still, XeConTeXt does not work as expected in the current version:
The plain TeX file

\font\myface=Hiragino Mincho Pro W3
\myface
こちらはテストです。日本語のテストです。
\bye

works like a charm, but

\definetypeface[myface][rm][Xserif][Hiragino Mincho Pro W3]

\setupbodyfont[myface,14pt]
\starttext
こちらはテストです。日本語のテストです。
\stoptext

produces an output containing only a lot of accented latin characters, 
see attached file.



Best regards,
Christopher


jap.pdf
Description: Adobe PDF document
This is pdfeTeX, Version 3.141592-1.30.4-2.2 (Web2C 7.5.5) (format=cont-en 
2006.5.9)  13 MAY 2006 22:52
entering extended mode
 (/usr/local/teTeX/share/texmf.local/web2c/natural.tcx)
**jap.tex emergencyend
(./jap.tex

ConTeXt  ver: 2006.05.08 12:59  fmt: 2006.5.9  int: english  mes: english

language: language en is active
protectionstate 0
system  : cont-new loaded
(/usr/local/teTeX/share/texmf.local/tex/context/base/cont-new.tex
systems : beware: some patches loaded from cont-new.tex
color   : palette rollover is available
)
system  : cont-old loaded
(/usr/local/teTeX/share/texmf.local/tex/context/base/cont-old.tex
loading : Context Old Macros
)
system  : cont-fil loaded
(/usr/local/teTeX/share/texmf.local/tex/context/base/cont-fil.tex
loading : Context File Synonyms
)
system  : cont-sys.rme loaded
(/usr/local/teTeX/share/texmf.local/tex/context/user/cont-sys.rme
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-exa.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-syn.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-enc.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-siz.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-map.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-spe.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-akb.tex))
bodyfont: 12pt rm is loaded
language: patterns en-ec:ec-1-2:3 uk-ec:ec-2-2:3 de-texnansi:tex
nansi-3-2:3 de-ec:ec-4-2:3 fr-texnansi:texnansi-5-2:3 fr-ec:ec-6-2:3
 es-ec:ec-7-2:3 pt-texnansi:texnansi-8-2:3 pt-ec:ec-9-2:3 it-texnansi
:texnansi-10-2:3 it-ec:ec-11-2:3 nl-texnansi:texnansi-12-2:3 nl-ec:ec-
13-2:3 cz-il2:il2-14-2:3 cz-ec:ec-15-2:3 sk-il2:il2-16-2:3 sk-ec:ec
-17-2:3 pl-pl0:pl0-18-2:3 pl-ec:ec-19-2:3 pl-qx:qx-20-2:3 loaded
specials: tex,postscript,rokicki loaded
\openout2 = `jap.tui'.

system  : jap.top loaded
(./jap.top
specials: loading definition file tpd
(/usr/local/teTeX/share/texmf.local/tex/context/base/spec-tpd.tex
specials: loading definition file fdf
(/usr/local/teTeX/share/texmf.local/tex/context/base/spec-fdf.tex)
specials: fdf loaded
)
specials: fdf,tpd loaded
)
\openout0 = `jap-mpgraph.mp'.

\openout0 = `mpgraph.mp'.


systems : system commands are disabled
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-exa.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-syn.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-enc.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-siz.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-map.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-spe.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-akb.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-exa.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-syn.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-enc.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-siz.tex)
(/usr/local/teTeX/share/texmf.local/tex/context/base/type-map.tex)

Re: [NTG-context] New release and XeTeX - XeConTeXt

2006-05-14 Thread Christopher Creutzig
Hans Hagen wrote:

  Same for me.  The problem is that in line 113, we have
 .ge5rö
 in Latin-1 encoding, but XeTeX tries reading the file in UTF-8.

 how old is your context

  Indeed, that was stone age: 2006.05.08 12:59 - more than five days 
old.  :-)

 the latest version uses utf patterns for both pdftex and xetex so no 
 special tricks are needed

  Thanks for the pointer.  Strangely enough, I still can't typeset 
simple Japanese, but right now I don't have the time to investigate this 
further.


Best regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] m-graph: metapost errors in demo

2006-05-08 Thread Christopher Creutzig
Salvete,

  is it just me or does

texexec --pdf -mode=demo m-graph

really not work?  I get very many metapost errors, starting with a bunch of

! Redundant equation.
to be read again
;
l.140 Gmargin.low=-.07;



(which are rather harmless) and continuing with

  0
  vacuous
! Not implemented: point(known numeric)of(vacuous).
to be read again
,
forever ...c_:=false;r_:=Gpp_(point0of(vacuous),
 
Gxcvlin_,Gycvlin_)if.path(...

Gscan_-...:cycle.fi.fi;exitunless.Gdidsc_;endfor
 
.if.pair(EXPR2):point0of.f...

GMcvi_-..._.fi,if.abs.Y_.ctyp=linear:Gycvlin_.fi)
 
if.X_.ctyp0:xscaled-1fi.i...
to be read again
withpen
Gdraw_-... data file or a path)origin.fi.withpen
 
.currentpen.Gwithlist_._op_
to be read again
;
l.335 gdraw agepopm.d;


and similar fatal errors.


Best regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] continued examples

2006-04-26 Thread Christopher Creutzig
Salvete,

 after a long time I got back to some ConTeXt file I had been working on
and found that the following construct does not work (I assume it never
did):

\defineenumeration[example]
  [sectionnumber=chapter,
text=Example,
location=hanging,
way=bychapter]

\starttext
\startexample
 Let $a=1$, $b=2$
\stopexample

Something more generic

\startexample[continue]
  Then, $a+b=3$.
\stopexample
\stoptext


 I would like the second example to come out as Example 1 (cont.).  I
must confess I did not quite understand which part of
\dododefineenumeration actually defines \startexample ...  Any ideas?


Regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Typo in core-mat.tex

2006-04-26 Thread Christopher Creutzig
Salve Hans,

\def\leqalignno#1%
  {\prepareleqaligno

should be \preparealignno, with two n.


Best regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] An idea

2005-12-11 Thread Christopher Creutzig
Hans Hagen wrote:

 there is no need for verbatim mode when you convert anyway!

 Technically true, but if a simple \processinlineverbatim solves the
same problem as yet-to-write code in almost any language, I's go for the
former, since it does already exist.  Other than that, I'd use ConTeXt's
xml parser, since it requires much less escaping;  and  should suffice.


Regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] The whole (sub)section on a single page

2005-12-01 Thread Christopher Creutzig
Hans Hagen wrote:

How/where can I get \theremainingpageheight? I saw some strange
keywords like \pagegoal, \pagetotal spread through the source, ...
but I have no clue what they are for and if they have anyting to do
with what I'm looking for.
 

 
 that's always tricky, because it's not really possible to determine the 
 rest of the available space without entering the output routing, which 

 The standard trick would be not to explicitly check some numbers but to
do what in low-level looks like

\!!dimena=\ht0\advance\!!dimena\dp0%
\penalty1\vskip\!!dimena\penalty10\vskip-\!!dimena

Is there any nice ConTeXt way of doing the above?


regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Bug / feature request tracking

2005-11-19 Thread Christopher Creutzig
Taco Hoekwater wrote:

http://context.literatesolutions.com/collector

 I especially like the deadline entries. :-)


regards,
Christopher, catching up on older mails
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] strange (?) exporting from pdf

2005-11-03 Thread Christopher Creutzig
andrea valle wrote:

 3.2 translate in ConTeXt via a regular expression based python script

 I've been there and done that and I won't do it again.  Use a real xml
parser; regular expression engines are a wonderful thing, but not really
usable for parsing nested structures.  I'm sure there are many, many xml
parsers for python to choose from.


regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Hans: requested reminder on texutil extension

2005-11-02 Thread Christopher Creutzig
Salve Hans,

 you asked me to remind you of the following proposal:

 I'd like to have a way of making texexec/texutil run a program *after*
the *last* TeX run.  \doifmode{*last}{\installprogram{...}} does not
work, because \installprogram is only honored between two runs.


regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \externalfigure[cow.pdf][scale=0.8]

2005-10-24 Thread Christopher Creutzig
Steve Peter wrote:

 The scaling factor is in units of 1000. To get 80% size, use [scale=800]. 

 Thanks.  Added comment to texshow-web.


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] More MathML problems

2005-10-20 Thread Christopher Creutzig
Salvete,

 I know the MathML spec is inconsistent.  I believe the following should
be changed, though:



mfencedmix/mimiy/mi/mfenced currently renders as $(xy)$,
while the spec says (3.3.8.1) it should be $(x,y)$.  Fix: xtag-mmp.tex,
line 105, change from

\def\MMLpFENCED#1#2%
  {\getXMLarguments{mfenced}{open=( close=) separators= #1}%

to

\def\MMLpFENCED#1#2%
  {\getXMLarguments{mfenced}{open=( close=) separators=, #1}%




mo#8289;/mo and its equivalent forms should not produce output.



mfenced open=mix/mi/mfenced leads to an error, since the
\left. at the beginning is missing.  (Unlikely to appear in everyday
maths, but can happen.)



In my reading of 3.2.3.2, mia/mi should be italic, but miabc/mi
should be upright.  (I would be happy if I had to switch this on at only
one place, to keep backward compatibility.)



regards,
Christopher Creutzig

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] MathML: Spacing bug

2005-10-17 Thread Christopher Creutzig
Salvete,

 afaics, the following three mathml snippets encode exactly the same thing:


---[1]
mrow

 mia/mi

 mo::/mo

 mib/mi

/mrow

---[2]
mrow
 mia/mi
 mo::/mo
 mib/mi
/mrow

---[3]
mrow
 mia/mimo::/momib/mi
/mrow


 However, I only get the expected output from the third version.  Any
workaround or bugfix?

Regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] MathML: Spacing bug

2005-10-17 Thread Christopher Creutzig
Christopher Creutzig wrote:

  However, I only get the expected output from the third version.  Any
 workaround or bugfix?

 My bad.  I forgot the math wrapper element.  The spacing is perfectly
ok (in this example).


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] MathML: Please ignore mo#x02061;/mo

2005-10-12 Thread Christopher Creutzig
Salvete,

 I just started to think about using ConTeXt on XML input files, so I've
got a question which should be easy to answer:  My MathML source
generates presentation code which includes mo#x02061;/mo between a
function symbol and its arguments.  I get a black rectangle for that;
I'd like ConTeXt to ignore this character, where do I define it as
“nothing”?


regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] esoteric macro expansion bug in t-bib?

2005-10-11 Thread Christopher Creutzig
Taco Hoekwater wrote:

 \unexpanded is macro, but it normally expands to \protected, which is an

 Justto add to the confusion: It expands to what eTeX calls \protected,
not to what ConTeXt users get when they type \protected.  But Hans'
version was there first. :-)


regards,
Christopher Creutzig

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] esoteric macro expansion bug in t-bib?

2005-10-10 Thread Christopher Creutzig
Idris Samawi Hamid wrote:
 esoteric macro expansion bug.

 \def\IBAR%
 {\leavevmode\vbox{\offinterlineskip\lineskip0.295ex%
 \ialign{##\cr\USHIFT{120}\hfill\hbox to .21243em{\leaders\hrule
 height .07ex\hfill}\hfill\SHIFT{1}\cr\i\cr}}}

 Could you try
\unexpanded\def\IBAR% ...


regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Re: function plotting

2005-10-06 Thread Christopher Creutzig
Mojca Miklavec wrote:
 about the output quality. You can't express it in percentage. See
 http://pub.mojca.org/tex/gnuplot/trlin.pdf for an example graph with
 latex/pslatex/mp as rendering terminal.

 People often (incorrectly) claim you can't argue preferences, but I'd
say the MP version wins hands down in this particular example. :-)


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Re: function plotting

2005-10-04 Thread Christopher Creutzig
Alexander Lazic wrote:
 On Mon 03.10.2005 19:26, Christopher Creutzig wrote:
 
MetaPost is not really a function plotter.  So, yes, you have to use
some sort of loop, although there may be some predefined macros hiding
them.
 
 
 Is there a better way in ConTeXt/tex for this?!
 
 Should i use some external Programms for this?

 Not really, that causes all sorts of problems when trying to get the
same font all over the place etc.

 But you might be interested (assuming you can read or at least decipher
French) in the pages at
http://melusine.eu.org/syracuse/metapost/galeries/ – complete code
included.  (Those are the predefined macros I was talking about above.)
 I guess something like
http://melusine.eu.org/syracuse/metapost/galeries/courbes02/07riemann-img.html
should wet your appetite. :-)


Regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Re: function plotting

2005-10-04 Thread Christopher Creutzig
Mojca Miklavec wrote:

 and then \input file inside of the main LaTeX file. Gnuplot cannot
 make output in ConTeXt (yet), but perhaps you can include the

 Since afaik ConTeXt does not have an equivalent of LaTeX's picture
environment, I don't see much point in teaching gnuplot some sort of
ConTeXt output.  I'm no gnuplot expert, but my guess is that tweaking
the metapost prologues and some minor code tweaks would probably be the
easiest way to go.

 examples where I still use LaTeX.) You can also output the
 (ConTeXt-friendly) metapost (with set terminal), but you lose on
 quality.

 In what respect do you lose quality?


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \noalign?

2005-10-03 Thread Christopher Creutzig
Hans Hagen wrote:

which tables allow using \noalign and in what places?

\NC one \NC two \NC three \NC\AR
\HL\noalign{\pause}%
\NC one \NC two \NC three \NC\AR
\noalign{\pause}\HL

 it all depends on what you want to achieve

 I want to place a \pdfspecial in front of the \HL.  Peter Rolf pointed
out correctly (and I had seen that myself as well) that the problem
seems to be with \AR only.  I'll try and check if I can make the whole
thing work transparently with \AR or if I have to ask users to use \FR,
\MR, \LR for this usage pattern.  (Usage: You build a table line by line
in a presentation.)


regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Q: about \externalfile from metafun-p.pdf

2005-10-03 Thread Christopher Creutzig
Alexander Lazic wrote:
\stopreusableMPgraphic{sin}

This {sin} at the end is wrong; it's interpreted as text.
 
 
 This  have i understand ;-)
 I called it sin, sorry for confusion.

 The name is unimportant – my point is that the \stop... commands don't
get arguments.

 Thanx.
 Have i right understand, if i want to draw a sinuscurve i must use a
 for-loop?

 MetaPost is not really a function plotter.  So, yes, you have to use
some sort of loop, although there may be some predefined macros hiding them.


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \noalign?

2005-10-02 Thread Christopher Creutzig
Peter Rolf wrote:
 how about
 
 \TABLEnoalign (see core-tab.tex for defintion)

 I did try that.  But I don't see why it should help.  After all, the
place I'm trying to do a \noalign is not inside some other \noalign and
that's the only thing \TABLEnoalign adds – as far as I read the source.


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Modules how?

2005-10-02 Thread Christopher Creutzig
Boris Pedrofiets wrote:

 This works when I put the module file in the same directory as my textfile.
 When the file is in the same dir as s-mag-01.tex, context can't find it. How 

 Please run texhash or mktexlsr, whichever exists on your system.  You
need to do that every time you update your TeX installation.

 Oh, and please don't place your local stuff in that directory.  That's
just asking for trouble, since the directory may be overwritten by
updates and the like.  Better put it into your local texmf tree under
.../tex/context/user/.  On my system, I get the part to write instead of
the ... above by calling
kpsewhich --expand-var='$TEXMFLOCAL'

 can I achieve this? And where do I place the picture file (logo) needed in 
 my module?

 It should go to the same directory, I think.  But I never tried.


regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Q: about \externalfile from metafun-p.pdf

2005-10-02 Thread Christopher Creutzig
Alexander Lazic wrote:
 i'm starting to learn context and therefore i have copied some examples
 from metafun-p.pdf and get the following error:
 
 ---
 ! Undefined control sequence.
 l.42 \externalfile
   [mprun.21][width=5cm]

 Probably a typo in metafun-p.pdf; try \externalfigure instead.


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Q: about \externalfile from metafun-p.pdf

2005-10-02 Thread Christopher Creutzig
Alexander Lazic wrote:
 Oh btw: i have see in the syntax-diagramm sin.
 
 1.) is this the sinus function?

 Sure.  (The sine function as used by mathematicians.  If you want the
sine of an angle expressed in degrees, I believe you want sind.)

 2.) i have try
 
 ---
 \startreusableMPgraphic{sin}
 
   sin (1);
 \stopreusableMPgraphic{sin}

 This {sin} at the end is wrong; it's interpreted as text.

 
 \reuseMPgraphic{sin}
 ---
 
 and get:
 
 Isolated expression.
 
 Do you know what's going wrong?

 It's the same error as trying to “plot” the MP code

 1;

MetaPost is confused since it has no idea what to do with that number
and tells you so.  Since MP can handle more than just numbers, you get a
slightly more general error message that talks about an “expression”
rather than a “number.”


 What you can do is something like

\starttext

\startusableMPgraphic{sin}
  for x := 0 step 0.6282 until 6.282:
drawdot(10*x, 10*sin(x)) withpen pencircle scaled 1pt;
  endfor
\stopusableMPgraphic

\useMPgraphic{sin}

\stoptext


Or, you can use the fact that in MetaPost you can build up an expression
within a for loop as follows:


\starttext

\startusableMPgraphic{sin}
  draw (0,0)
  for x := 0 step 0.2 until 6.282: ..(10*x, 10*sin(x)) endfor;
\stopusableMPgraphic

\useMPgraphic{sin}

\stoptext


 I think it really helps with MP programming to understand this type of
loops.


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Beta bib module release

2005-10-01 Thread Christopher Creutzig
Thomas A. Schmitz wrote:
 
 On Sep 30, 2005, at 4:41 PM, Taco Hoekwater wrote:

 You're welcome. I am actually quite enjoying myself while doing this
 stuff.
 
 
 Glad to hear that. I'll buy you a bear nonetheless...

 Taco is running a zoo?  ;-}


Christopher

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Q: http://wiki.contextgarden.net/Thumb_index

2005-10-01 Thread Christopher Creutzig
Alexander Lazic wrote:
 Warning: pdfetex (file \
 /usr/share/texmf/fonts/type1/public/lm/lmr12.pfb): character 120 is \
 mapped to .notdef

 Please update your latin modern installation.  I have no idea if there
is a debian package for that already.


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] \noalign?

2005-09-30 Thread Christopher Creutzig
Salvete,

 which tables allow using \noalign and in what places?

 E.g., the first of these works, but I'd also like to be allowed the
second one (ignore what \pause does for the moment ...):

\starttable[|c|c|c|]
\HL
\NC one \NC two \NC three \NC\AR
\HL\noalign{\pause}%
\NC one \NC two \NC three \NC\AR
\noalign{\pause}\HL
\stoptable

 I assume this has to do with trial typesetting or something like this,
but what should I type instead?

regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] DOC/RTF to ConTeXt via XML

2005-09-28 Thread Christopher Creutzig
Idris Samawi Hamid wrote:

But you should also explore DocBook-in-ConTeXt, which
uses ConTeXt's native XML processing capabilities.
 
 
 Is it possible to create a Word template that is isomorphic with a DocBook 
 format?

 You can write a Word template isomorphic to a (pretty large) subset of
DocBook, although I believe Word does not allow you to introduce new
types of crossreferences, so you can't reach everything DocBook has.
Whether you can make your authors use it consistently is a different
matter – DocBook uses, for example, different elements for different
types of what ConTeXt calls typing: code for inline code fragments,
command for something you invoke (use option for its options and
symbol for the placeholders to be replaced by actual values),
computeroutput should be obvious but there are also screen and
screenshot – the difference is a bit subtle; programmers might also
use constant, errorcode, errorname, errortext, exceptionname,
funcdef, funcprototype, funcsynopsis, cmdsynopsis,
constructorsynopsis, arg, function, methodname, methodparam,
methodsynopsis, ooclass, ooexception, oointerface,
progamlisting and its annotated cousin programlistingco, sgmltag,
structfield, structname, varargs, varname; envar denotes
environment variables, filename is almost superfluous since it is a
special case of a systemitem (yes, many of these elements carry
further meta-information in their attributes), then there are the
unspecific literal and literallayout elements and also markup,
userinput, and finally there is also uri to format URLs and other URIs.

 Somewhat related elements also abound: keycap is used to denote keys
on the keyboard, keycombo for combinations of those keys.  guibutton
is used for the text on a button in a GUI, guilabel, guimenu,
guimenuitem and guisubmenu and many others.

 Note that I do not question this abundance of possibilities.  After
all, it is logical markup taken to an extreme and probably noone really
uses all of it, yet all the parts are already there if you want them.
I do question the likelihood of the average Word user (who, let's face
it, probably never used formats since the introductory course) making
good use of this.  Sure it is nice to have authors' first and last names
explicitly marked in your text, but someone has to go there and do that,
and if they don't see any difference on their screens after doing it,
they will get lazy and not do it for the fifteenth person they name.
Additionally, most of the DocBook elements may only appear nested in the
correct places in other elements, which makes using an isomorphic Word
template rather challenging even for the advanced user.

 If you would like to browse through the long list of markup items in
DocBook, please see http://docbook.org/tdg/en/html/docbook.html – and do
not be afraid; as I said above, very much of what is there is absolutely
special-purpose stuff.

 Adam (privately) suggested hiring someone to write a structured format for 
 authors. Is that where docbook comes in?

 Actually, I would not orient the thing to fit to DocBook.  DocBook is
an extremely flexible beast, so if, after designing the structured
format best suited for your needs (this does not need to invlove any
xml), you want to map it to DocBook, that should not be any problem.

 Basically, authors in the humanities use Word and it's virtually a lost cause 
 getting them to switch to anything else, even free tools like OO.o (let alone 
 ConTeXt). It would have to be someting where I could do 
 word=docbook=ConTeXt.

 As I said: Offering Word is obviously a must, but if that were the only
option you offered, you'd be actively adding your part to making sure
the situation does not change.  And getting Word to export DocBook will
certainly be much harder than using OOo for that part.


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] DOC/RTF to ConTeXt via XML

2005-09-28 Thread Christopher Creutzig
Idris Samawi Hamid wrote:
 Ok, you guys have lost me now-) Maybe the best thing to do is try something 

 Just ignore the detail of what xslt can and can't do for the moment.
That just influences the choice of tools for one particular step and we
all agree that there are tools for this step.

 it to ConTeXt. From what I gather so far the process goes something like
 
 doc  = rtf 
 rtf  = OO.o
 OO.o = xml

 No need for rtf.  That would loose lots of information anyway, wouldn't it?

 \startHans
 converting open office xml is not always easy; stay away from tab's and use 
 high level constructs as much as possible
 \stopHans

 I'm not really sure what Hand meant by this.  I assume he does have a
valid point, since so far I only had a short and theoretical look at the
format, but I can only guess what it is.  Hans, could you give an
example or two?

From this discussion it seems that I (as an xml ignoramous) would be better 
 off converting to ConTeXt code rather than processing pure xml blocks (but 
 maybe I'm wrong).

 XML is much, much easier to parse than just about anything else.  That
means that whatever your conversion process uses, you can simply reuse
an XML parser in whatever language you want to use.  (Interpreting the
file may be easy or hard, depending on the xml structure at hand.)  The
only exception I can see right now would be a rather large and
error-prone “Visual” Basic program to create a sort of export filter for
Word to write ConTeXt.  I certainly don't think that's easier.

 Once I get a sane xml file (this seems to be the biggest problem) what is the 
 best tool to convert this to ConTeXt?

 It depends on who is going to write the conversion.  From the languages
I've used so far, it's probably easiest to do in xslt, but if you
are/have at hand a programmer who's good at ruby but would have to learn
xslt first, the whole thing may not be big enough to warrant learning
another language first.  Unless that programmer wants to, which would be
a very good sign.  Learning a new language per year is not really a bad
idea.

 We are all extremely busy, of course, but if anyone finds this interesting I 
 can send a sample doc article from my journal. Maybe we can do a MyWay or 
 something to document this process for ourselves and others, as well as find 

 It might be a pretty specific thing, though.  My guess is that you
could make more progress by thinking about what sort of structurals you
would like to have, rather than looking at what you have right now.


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] t-rsteps and starttyping

2005-09-28 Thread Christopher Creutzig
Hans Hagen wrote:
 Christopher Creutzig wrote:
 

 Is there a way of having \installprogram for only for after the *last*
 run?  (I don't think there could be a systemmode for the last run, but

 another option is to use --final in texexec and test for:
 
 \startmode[*last]
 ... \stopmode

 Doesn't work for \installprogram.  TeXutil only runs if another TeX run
is needed.  I'll remind you, as you requested. :)


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] DOC/RTF to ConTeXt via XML

2005-09-28 Thread Christopher Creutzig
Duncan Hothersall wrote:

 RTF can capture everything that .doc can (MS update it every time they
 rev the .doc format), and it has the advantage that it is defined in a
 spec with a grammar, which means that importing routines (like the one

 Oh, yes, the RTF spec.  It really makes you wonder what Microsoft
employees understand by the word “spec.”  Word breaks almost every
single rule in that spec and has done so for ages:  “The LetterSequence
is made up of lowercase alphabetic characters (a-z). RTF is case
sensitive.  The following Word 97-2000 keywords do not currently follow
the requirement that keywords may not contain any uppercase alphabetic
characters.  ...”  But I should be happy that these violations are
actually dcumented.

 in OO.o) tend to be better than for the binary .doc format. So I would

 Okay; I did not know that whatever Microsoft currently calls RTF is
actually able to save all Word files losslessly.  (I am in the lucky
position not to have any Word files to convert.)  Makes me wonder if
there really is any need for an XML step in between.  Can OOo convert
RTF to XML without user intervention, such as clicking somewhere with a
mouse?  Maybe rtf2fo.com, http://www.infinity-loop.de/products/upcast/,
or http://sourceforge.net/projects/majix/ are good alternatives for this
step?  (I never used any one of them.)

 which have certainly improved. But RTF is a fairly safe bet, and
 additionally it is 'human readable' so that helps debugging.

 Asking a human to read RTF is certainly inhuman.  :-)

 But there is another advantage of using RTF: Authors can use almost any
word processor they want. :-)

 Well you might not need to - remember that ConTeXt can process XML
 natively now, which is why I suggested you look at the

 But unless I'm mistaken, this is based on a streaming model, which has
its advantages, but also disadvantages.  So, the question is whether the
xml format is close enough to the order in which ConTeXt would like to
get the bits and pieces.  Since the format has not been defined yet,
this question should be kept in mind.


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] DOC/RTF to ConTeXt via XML

2005-09-27 Thread Christopher Creutzig
Duncan Hothersall wrote:
Question: Is it possible to design a doc or rtf template that Open Office can 
convert to a sane, consistent xml format? 
 
 
 OpenOffice.org does allow you to attach an XSLT stylesheet to an export
 process which therefore allows you to do a (limited) transformation from
 the visual markup which is its native format to a more structured one

 Why „limited“?  Complicated things are just, well, a bit complicated to
achieve.  It is certainly possible to get a structured document from,
say, an average xhtml file.  I would prefer not to write that code,
though.  It would be rather boring and full of hard-to-read special cases.

 which you would need. But the biggest challenge is that all
 wordprocessors are designed for visual editing, meaning that there are,
 for example, 15 or so different ways to get a bulleted list in Word,
 creating 15 or so different RTF constructs, and coping with this can be
 a nightmare.

 Yes, it can.  (Although RTF is completely unrelated to this problem,
since OOo would read the Word file.  And the OOo step greatly simplifies
the problem, since iirc the OOo format has just one or maybe two ways of
saving bulleted lists.  Or were you refering to different bullets?)  The
stricter your rules for the authors are, the easier it is to write the
required xslt program.  If your authors expect to be able to write
chapter headers by manually switching to a font in the range of 20 to 24
pt and adding a number in front, you've got a hell of a coding session
in front of you.  If, otoh, you take the dictatorical approach of
telling them in advance that manual font changes (maybe apart from
pseudo-italics and pseudo-bold which will be mapped to \em in the end)
will simply be ignored, your code will be much easier but you may have a
problem with the authors.

 The FO approach (Paul Tremblay's focus) is one way to process XML to
 paginated output, but there are many others. Personally I don't like the
 FO approach, for a variety of reasons, but I'm sure others have had
 success with it. But you should also explore DocBook-in-ConTeXt, which
 uses ConTeXt's native XML processing capabilities. And don't rule out

 The advantage of using DocBook is that you get a very rich set of
capabilities.  The disadvantage can be described in almost the same
words, plus, as I said before, DocBook is one of the most verbose
formats in common use.  If you only use the format as an intermediate
step, that is irrelevant, but if your authors willsend in files that
way, it is not.

 using a separate scripting language to convert XML into ConTeXt as a
 batch process, since that will give you the ultimate flexibility in
 accessing all of ConTeXt's abilities.

 Personally, I'd use xslt for that.  Navigating the xml tree is
extremely easy and writing out text instead of xml is not really a problem.

Question: Does the entire journal have to be in programmed in xml or can 
ConTeXt process xml locally? For example, I may have my own article done in 
COnTeXt mixed with other articles done in rtf=xml.
 
 
 You can just put XML into \startXMLdata ... \stopXMLdata blocks. I do
 this for MathML processing within a larger ConTeXt document.

 I'd approach Idris' problem the other way round: Transform the xml
files to ConTeXt and leave the ConTeXt files as is.  Then, texexec the
whole thing.

Any other advice (and/or pitfalls to watch for) would be appreciated. This 
sounds very promising!
 
 
 Horses for courses. It's possible to get sucked into things like an FO
 implementation or an XML conversion and find that you have spent months
 perfecting it and it only shaves half an hour off your production time!

 Amen.

 Also, don't limit your authors to Word.  Offering Word is obviously a
requirement, but if you go the way through OOo, there would be no point
in not offering an OOo template file.  If you are using a standard xml
format, such as (a subset of) DocBook or TEI, you probably should accept
articles in that format, too.  And, of course, ConTeXt.


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] DOC/RTF to ConTeXt via XML

2005-09-27 Thread Christopher Creutzig
Duncan Hothersall wrote:
 Well, XSLT seems to have been designed, and certainly tends to be
 implemented, as a tool for simple transformations of small XML chunks.

 No, xslt is a tool for arbitrary xml - xml conversions (and a little
more than that).  With a good implementation (say, saxon), working with
moderately large trees is pretty fast.  The stylesheet is actually
compiled before running.

 Obviously complex transformations can be constructed from a bunch of
 simple transformations, but there comes a point when you should really

 Just about any programming language gives you simple operations to
build whatever you want from.

 just use a better tool - though these tend to cost serious money (e.g.

 „Better“ depends on your task at hand.

 OmniMark). Also, most XSLT implementations use the DOM model, which is

 XSLT uses a DOM model, which is different from the W3C DOM model.

 fine for a 50Kb file but will be incredibly resource-hungry if you're
 processing files of 5Mb. At that point you want a streaming model, and

 That depends on what you want to do with your data.  For many of my
needs, a streaming model simply wouldn't work without keeping lots of
information (to be processed later) in memory, defeating the model.

 I have found splitting my data into files that form conceptional units
to be a good way, both for editing the files and for turnaround times.
(I am using Makefiles, so the granularity of finding unchanged items for
me is the file.)  We are talking about almost 15MB here, which I regard
as pretty much, considering it is almost pure text.

 Again, I don't mind using something else on XML data.  I'm doing it
myself.  It all depends on what you want to do.  In the case of
transforming xml to ConTeXt, I would go for an xslt implementation, but
ymmv.  After all, the choice of tools always depends on many factors,
including familiarity.  (I've continued using perl instead of ruby for
ages, until recently, for that reason.)

 for a streaming model you want a better suited language than XSLT. As I
 say, horses for courses. For article-length pieces and simple
 transforms, XSLT might suffice.

 For number crunching, xslt is certainly inadequate.  Transforming books
of average length (say, 300-500 pages) is certainly doable, although I
would go for a transformation chapter-by-chapter,especially considering
that we are talking about a process where crossreferences etc. are going
to be handled later in the chain.  But I thought we were talking about
article-length pieces anyway?


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] t-rsteps and starttyping

2005-09-23 Thread Christopher Creutzig
Hans Hagen wrote:
 also, when collecting and flushing pieces of content, spacing is a
 tricky business (watch closely to presentations made quick and you'll
 notice those side effects)

 That is why ppower4 is such a nice alternative:  It inserts just some
pdf comments and otherwise leaves the typesetting alone.  Then a
postprocessor takes the pdf file and creates a new one, with everything
left at its original position, but appearing only on the pages (a slide
is built up by jumping to the next page) where it is supposed to appear.

 the content, presentation and audience, which in practice means that i
 don't use general solutions (apart from the fact that i don't like

 Well, a general solution for the isolated requiement of “having
considered content, audience and everything, I want my text/gfx/
whatever appear step-wise“ would be a good thing, imho.  And I did in
the past also use things like removing the full stop when stepping from

   This implies A.

to

   This implies A and therefore, B.


 I have also seen a presentation where the speaker sketched a proof of
some lemma, then generelized it and simply exchanged the relevant words
in the lemma.  The new words were shorter, so there was some space to
the left and right of them and they had some contrast color.  The effect
was not just “cool” and “I don't think Powerpoint could do that” –
what's more important is that this was by far the clearest way of
getting the message across.


 Is there a way of having \installprogram for only for after the *last*
run?  (I don't think there could be a systemmode for the last run, but
texexec knows it has done the last run, so there might be some file.tui
line doing this kind of magic.)


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] ConTeXt to RTF Conversion

2005-09-23 Thread Christopher Creutzig
Idris Samawi Hamid wrote:
 Would it be possible to define an xml format for the journal so that I
 could more easily process both ConTeXt/LaTeX articles as well as the
 docs and rtfs I generally receive? Is this more work than it's worth?
 It's a humanities journal, so little-to-no math.

 Math is, in my experience, the worst part of it, so you an consider
yourself happy that you don't need it.

 The question is, what problems of the current process are you trying to
improve/solve with a possible move to xml?

 If your most pressing problem is the variety of data formats you
receive articles in, then no, xml won't help.  You'd still need some way
of transforming the articles to the format of your choice.  That being
said, XML may be a very good intermediate step from Word or rtf to
ConTeXt, if only because OpenOffice has pretty advanced import filters
and stores its data in a straightforward xml format that should be easy
to transform, assuming you start with a sufficiently rich set of
predefined formats and somehow get people to either use them (fat
chance, I know) or have them be sufficiently different that you can
automatically or at least semi-automatically classify the author's
formatting to your presets.  In really simple cases (e.g., pure prose)
you may get away with accepting HTML and converting that.

 If your most serious problem is a variety of output formats you want to
support (print/pdf, html, some eBook variants, ...), xml is a perfect
technique to develop a solution.

 If getting lots of different encodings is a problem of yours, xml
solves that nicely as well.  But just for that, there are simpler and
less intrusive ways.


 Other things xml may solve well:

- archivability (although your ConTeXt files are probably no worse)

- reusability: Almost everything in a file following a well-designed
  xml format is local and you can simply copy a (complete) block of
  text + markup and insert it into another file.

- consistency, enforcing rules: While it is possible to enforce things
  like “every article must start with an abstract containing one to
  three paragraphs” in TeX, it is way easier in xml.

- all sorts of conversions, including shuffling around or extracting
  data of interest


 Things xml won't do any magic for:

- layout.  You'd need to write a conversion to ConTeXt or whatever.
  Depending on your needs, this can be anything from trivial (say,
  two hours) to almost undoable (although this would mean the xml
  format is particularly badly designed for your journal).


 Both lists are certainly incomplete.  I hope you will get other answers
as well.


regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] t-rsteps and starttyping

2005-09-22 Thread Christopher Creutzig
David Munger wrote:

 Unfortunately, the \StartLong macro is not meant only for producing
 line-wise content. In the general case, it contains something else than
 just \starttyping block.

 Please try this:

\bgroup

\catcode`\^^M=\active

\gdef\StartLong{\begingroup\obeylines\let^^M^^J\doStartLong}

\egroup

\def\doStartLong#1\StopLong{%
  \setbuffer[x]#1\endbuffer
  \endgroup
  \getbuffer[x]
}


\starttext
\StartLong
\starttyping
abcde
\stoptyping

and now
for something
completely different

\StopLong
\stoptext


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] utf-based lang-* files?

2005-09-22 Thread Christopher Creutzig
Salvete,

 while I am aware that my Japanese is ages away from creating anything
releasable, I thought about creating a lang-jap.tex file for my personal
use (and maybe for having it corrected by someone actually speaking the
language).  Now, checking lang-chi.tex, I find it is encoded in a way I
don't really want to copy.  I'd much rather write the whole file in
“proper” utf-8.  Is it possible to simply enclose the file in a
\startregime[utf]...\stopregime pair or do I risk havoc by doing this?

 (Should I start with this project, I'll have more questions, such as:
How do I make a unicode character such as 。active, for good line breaks?)


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] utf-based lang-* files?

2005-09-22 Thread Christopher Creutzig
Adam Lindsay wrote:
Is it possible to simply enclose the file in a
\startregime[utf]...\stopregime pair or do I risk havoc by doing this?
 
 
 Well, if you're using a regime, it still (usually) depends on symbolic
 character names being defined under the hood. Also, such an approach

 Sure.  But editing the file is oh so much easier when I can just type
\def\japChapterNumber#1{第#1章}
than if I have to look up the unicode numbers first and type
\def\japChapterNumber{\uchar{123}{44}#1\uchar{122}{224}}

 (explicitly calling \startregime[utf]) doesn't make XeTeX as happy as it
 could be (XeTeX is happiest if you just pass through Unicode characters.

 That implies that ConTeXt should switch off all conversions when
running in XeTeX and seeing \startregime[utf], right?  (I certainly want
 to use the whole thing in XeTeX, if I ever do start it.  I would prefer
not to make the code depend on that.  I could live with som \if...
switches at the beginning and end, sure.)


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] ConTeXt to RTF Conversion

2005-09-22 Thread Christopher Creutzig
Maurice Diamantini wrote:
 So if I understand wml,  I agree that xml is a format for filtering,
 not a human writable format.
 TeX, LaTeX or conTeXt is in input langage, which should be able to
 be converted to the powerfull master XML format.

 No, sorry.  This only works for extremely simple TeX code.  forget
about any real-world mathematics.  Forget about 80% of what real-world
LaTeX users type into their computers.  TeX has simply never been
written to be easily parsed.  Besides, our actual users are way too much
concerned with what their stuff looks like on their screens with their
settings to bother about structured information and the like.  Believe
me, I have almost finished the translation of our highly structured
program documentation files to some DocBook-based XML format, and I am
very happy that I had decided to make this a one-time conversion with
the automated process only trying to get some 95% or so correct.  My
experience with the new format (which is still limited, I've been
working with it the last four months or so) leads me to believe that it
is no more difficult to use than some TeX dialect.  The only slightly
awkward thing is that you have to explicitly mark all paragraphs.  I
don't mind, but if you do, that sort of thing can be scripted.

 Short summary: Define an xml format that embeds what you need at the
moment.  One mistake I made: I didn't go for short names, but used
DocBook names.  I probably should have started from XHTML, using p,
em, a etc.  Then use that format as your master and edit in this
format.  There are magnitudes more decent editors to help you with
editing all sorts of xml than you will ever find for any TeX variant.
(I know, one is sufficient, but finding one that does exactly what *you*
want is much easier with more editors to choose from.)

 So my question was, is there any exeprience about the use of
 the ConTeXt module m-tex4ht?

 I do have experience with using tex4ht in LaTeX, which is its native
setting.  It is definitely much better than all the alternatives I
tried, but it does have problems with formulas, it is rather difficult
to teach it your new local commands and the generated HTML code is
usable for exactly one thing: Rendering in a graphical browser, for us
lucky ones without visual impairments.  I would not dream of using this
pile of mess for anything else.  HTML generated by Word simply can't be
worse.


regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] t-rsteps and starttyping

2005-09-21 Thread Christopher Creutzig
David Munger wrote:
 \long\def\StartLong#1\StopLong{#1}
 
 \starttext
 \StartLong
 \starttyping
 hallo
 \stoptyping
 \StopLong
 \stoptext
 
 This will produce no error, but no output as well. Maybe we could use
 some alternate mechanism to define the \StartLong...\StopLong pair.

\def\StartLong{}
\def\StopLong{}

 Or, if you insist on having the argument,

\long\def\StartLong#1\StopLong{\scantokens{#1}}

should work.


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] lilypond inclusion + pdf crop

2005-09-17 Thread Christopher Creutzig
Hans Hagen wrote:
 andrea valle wrote:
 

 Here are two of the resulting scores (not totally finished yet)
 www.semiotiche.it/andrea/membrana/nodi-I.pdf
 www.semiotiche.it/andrea/membrana/nodi-II.pdf

 and one of the context file
 www.semiotiche.it/andrea/membrana/nodi-I.tex
 
 
 impressive

 I agree (from the optical point of view), but could you include a short
English explanation about which paths may be followed, what their labels
mean, if the position of the fragments conveys information, how many
instruments are playing at once etc.?  I'm afraid I simply don't
understand the notation as is.


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] lilypond inclusion

2005-09-16 Thread Christopher Creutzig
Henning Hraban Ramm wrote:
 Perhaps document what you did and what's missing at the wiki page:
 http://wiki.contextgarden.net/LilyPond

 Patrick, assuming I will find time to improve a few tidbits every now
and then, what would be the best way to have an up-to-date module in the
garden?  Just send you an URL to mirror?


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] lilypond inclusion

2005-09-16 Thread Christopher Creutzig
andrea valle wrote:
 So, I was asking myself: is lily direct inclusion in context so
 relevant? Why?

 No, in the same way there is really no absolute need to have MetaPost
code directly in you TeX files.  Having them in external files,
compiling from a Makefile and just using \externalfigure[gfx-1.pdf]
works perfectly.  It's just that some people (often including me) prefer
to have their sources in one place, especially when using small snippets.

 Oh, and of course including the sources in the TeX files allows things
such as passing parameters (not yet done for lilypond), such as the
proper-page-break thing I mentioned.


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] lilypond inclusion

2005-09-15 Thread Christopher Creutzig
Dear list,
especially Hraban, who had asked for sth like this,


 I had tried sending this yesterday, but with the pdf output included,
it was too big for the list.

 In any case, please find enclosed a tentative lilypond inclusion file
and a sample
file.  The whole thing basically works (though support for non-pdf
versions is currently absent, but should be relatively easy to
implement), but I'm sure I've taken a non-ConTeXt-way at more than one
place and I have a few problems, most of them lilypond-related.  The
first three are strictly ConTeXt-related, though:

- I can't include blank lines in \startlilypond...\stoplilypond,
  because in the buffer I will get a \par for that.  There is
  probably some easy way around this, but I haven't found the
  idiom yet.

- Currently, the whole generation only works with shell_escape=t.
  Is there a way to use the automp mechanism for other external
  programs, such as lilypond, as well?  It would also save quite
  some time to only typeset each piece of music only once.

- How can I detect whether a pdf file contains multiple pages?


- I have only tested the system on my Tiger installation.
  I'd like to know if it works for others, too.

- When typesetting a longer block, I'd like to tell lilypond
  how much space there is left on the first page, to have music
  break across pages smoothly with the text.

- When typesetting a fragment, I'd like to somehow get a proper
  baseline from lilypond.  I have neither found out how to ask
  if there is more than one line typeset, nor for the baseline
  (let's say the bottom line of the staff), which obviously depends
  on the music actually set.  The sample file uses an explicit
  \lower command with a trial--error value.  I assume that
  the lilypond TeX backend gives me something that could be
  useful here, but I haven't analyzed it in detail.


regards,
Christopher


t-lilypond.tex
Description: TeX document


lily-test.tex
Description: TeX document
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] lilypond inclusion

2005-09-15 Thread Christopher Creutzig
Hans Hagen wrote:
 Christopher Creutzig wrote:
 
 - I can't include blank lines in \startlilypond...\stoplilypond,
  because in the buffer I will get a \par for that.  There is
  probably some easy way around this, but I haven't found the
  idiom yet.
  

 redefine par -)

 Won't help, since the \par in there is never evaluated.  I need to stop
it being generated in the first place.  I guess I probably should change
\catcode`\^^M and \catcode`\^^J before reading the contents.

 - Currently, the whole generation only works with shell_escape=t.
  Is there a way to use the automp mechanism for other external
  programs, such as lilypond, as well?  It would also save quite
  some time to only typeset each piece of music only once.

  

 \startmode[*first] % \v!first
 
 \stopmode
 
 (or: \doifmode ... )

 That would solve the second problem, assuming I insert a counter (which
for the first problem would be needed anyway).  But is there a way to
tell texexec to run this and that between the TeX runs?

 - When typesetting a longer block, I'd like to tell lilypond
  how much space there is left on the first page, to have music
  break across pages smoothly with the text.
  

 hm, rougly \pagegoal-\pagetotal-\whateverdistanceneeded

 I know.  This is a problem on the lilypond side: How do I tell that
program to leave the first 13.42cm of the first page blank?


regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \setupbodyfont[10dd]

2005-09-14 Thread Christopher Creutzig
Mojca Miklavec wrote:

 I'm sorry, I was first confused by this example:
 
 \switchtobodyfont[10pt]\setupinterlinespace\page
 \input tufte
 \switchtobodyfont[10dd]\setupinterlinespace\page
 \input tufte
 % interlinespace remained the same for both pt and dd
 
 which (for whatever reason) lead to different result as in the expected:

 The reason is simple: You are changing the interline space before
finishing the first paragraph.  TeX won't do different interline
spacings inside one paragraph, it always takes those in effect at the end.

 In any case, your logic seems to go contrary to mine (which may of
course be my twisted mind): I would always have placed the \page command
in front of the others.  Whenevr that makes a difference, I want the new
font to only appear on the new page.


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] free keycaps font

2005-09-14 Thread Christopher Creutzig
Hans Hagen wrote:
 Concerning the 'construct a key' approach, how about the following:
 
 - provide shapes for a single, double-wide, tripple-wide, tripple
 height, enter-shape keys.

 Wouldn't it be reasonable to just create these borders via MetaFun?
That way, I can have \key{\triangleleft home}, \key{any}, or even
special keys for play station etc., without them being provided originally.

 - next we can make a series of virtual fonts using the new condensed
 latin modern (sans or monospaced)

 Oh, and I could have keyboard keys matching my current font, whatever
that may be.


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Some Footnote Questions (from the Wiki)

2005-09-09 Thread Christopher Creutzig
Brooks Moses wrote:
 Not quite, as it doesn't generate a number I can reference.  What I'm
 thinking of is something that does what \nomarkfootnote does in the
 following example:
 
   A sentence\footnote{With a note\note[footB].}.\nomarkfootnote[footB]{And
   another.}

\starttext
A sentence\footnote{With a note.\note[footB]}\footnotetext[footB]{And
another.}
\stoptext

works for me, assuming I interpreted your wish correctly.


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Using newly defined sections

2005-09-09 Thread Christopher Creutzig
Elliot Clifton wrote:
 sectioning. I understand that it is possible to create a new type of
 section using \definesection and setup section but how do I insert an
 instance of my new section into my documents? With predefined sections
 I can use commands such as \section, \chapter, etc..

 You do exactly the same thing with your new section types:

\definesection[Abschnitt][section]

\Abschnitt{whatever the title is supposed to be}


http://wiki.contextgarden.net/Titles contains some examples; also see
http://archive.contextgarden.net/message/20030115.202301.b3898ec2.en.html
and note that you can define a command for both the actual title and the
toc entry formatting, so you can get the authors' names to there, too.



Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Basic question on Unicode and ConTeXt

2005-07-22 Thread Christopher Creutzig

Mojca Miklavec wrote:


A1.) prepare the files to be used as a source of transformation from
any character set to utf and prepare a list of synonyms for
encodings


 In my point of view, that should only be a fallback.  We already have 
Iconv in ruby and can, if we know that ISO-8859-2 is a single byte 
coding system, simply say


conv = Iconv.new(UTF-16, ISO-8859-2)
255.times { |i| puts lookup[conv.iconv(%c % i)] }

to get the whole list, assuming we've filled the lookup hash first.


 As you've said, I'd combine steps A2 and A3, to make ConTeXt run 
faster.  If you want, for whatever reason, to use \textellipsis for an 
ellipsis (it just looks horribly wrong to me) instead of \dots, you'd 
need to invoke the ruby script which generates the regi-* files.


 The whole thing should not require any change at all to ConTeXt 
itself, since the regi-* files could look exactly as they do now, just 
being generated automatically.  (For the multibyte encodings, the whole 
thing gets much more tricky.)



Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Basic question on Unicode and ConTeXt

2005-07-20 Thread Christopher Creutzig

Hans Hagen wrote:


So why not mapping the characters to unicode first and defining the
mapping from unicode to \TeXcommand only once? regi-* files (at least
in the meaning they have now) could be prepared automatically by a
script, less error-prone and without the need to say Some more
definitions will be added later.
 


you mean ...

\defineactivetoken 123 {\uchar{...}{...}}

it is an option but it's much slower and take much more memory


 I may be wrong, of course, but I think Mojca proposed something 
different (and something that should be really easy to implement):  Have 
the unicode vectors stored in a format easily parsed by an external ruby 
script and create the regi-* files from that, using the conversion 
tables provided by your operating system or iconv or wherever ruby gets 
them from.



regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Re: try compiling Tex showcase source : program_sample.tex

2005-07-17 Thread Christopher Creutzig

olivier Turlier wrote:


I was trying to compile Program-sample.tex because I find the
transparent white frame over the grey background very nice to see for a
pure electronic pdf. In the same range, the vit Zyka font demo catalog


 Sorry for not answering for such a long time.  Please try the 
following code:



\setupcolors[state=start]

\startuseMPgraphic{bgnd}
  StartPage;
  linear_shade(llcorner Page -- urcorner Page
   -- ulcorner Page -- cycle, 2,
   0.2[red,green], 0.8[red,green]);
  linear_shade(llcorner Page -- lrcorner Page
   -- urcorner Page -- cycle, 2,
   0.2[green,red], 0.8[green, red]);
  BoundPageAreas;
\stopuseMPgraphic

\defineoverlay[bgnd][\useMPgraphic{bgnd}]
\setupbackgrounds[page][background=bgnd]

\startuseMPgraphic{brighten}
  StartPage;
  fill Field[Text][Text] enlarged 2pt
withcolor transparent(1, 0.5, white);
  BoundPageAreas;
\stopuseMPgraphic

\defineoverlay[brighten][\useMPgraphic{brighten}]

\setupbackgrounds[text][background=brighten,backgroundoffset=2pt]

\starttext

\input tufte

\stoptext


 I'm getting a displaced background this way (leaving the 
backgroundoffset out does not help), but I'm sure someone will be able 
to tell us the secret incantation to fix that.


 Strange thing is – I had tried that a while ago and the transparency 
was simply lost.  (Right now, the numbers must be different depending on 
whether you put the thing in front of an MP graphic or in front of a 
plain color background.)  If that happens to you, try putting both 
graphics into the same stack of backgrounds, as in


\setupbackgrounds[page][background={bgnd,brighten}]

As a last resort, you could of course join the code into one MP graphic.


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Escaping tabulate

2005-07-17 Thread Christopher Creutzig

Radhelorn wrote:

Oh, thanks. Can you describe in a few words distinction between {} and 
\bgroup\egroup? I know that \bgroup\egroup are implicit characters and 
useful in macro definitions but what this really means?


 You can have

\def\startfoo{\bgroup}
\def\stopfoo{\egroup}

but you cannot get the same effect with

\def\startfoo{{}
\def\stopfoo{}}

because TeX has no way of knowing that the first definition was supposed 
to have ended.


 I believe in ConTeXt you'd usually(?) use \start and \stop instead of 
\bgroup and \egroup, though.  What do the experts say about this?



Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Escaping tabulate

2005-07-17 Thread Christopher Creutzig


My other mail didn't come back yet, so to answer the question I raised 
in there: In this context, \start and \stop won't help, since \hbox 
expects something that expands to { to follow.



Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] TeX + Metapost syntax highlighting in Vim

2005-07-14 Thread Christopher Creutzig

Thomas A. Schmitz wrote:

like to do with vim - the line numbering alone is wonderful,  there is 
no equivalent in emacs (and I've tried quite a lot of  things!). So 


 Not wishing to discredit vim, I'd still like to ask what is missing 
with the solution presented at www.emacswiki.org/cgi-bin/wiki/LineNumbers



regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Not possible to redefine inbetween in \definedescription

2005-07-14 Thread Christopher Creutzig

Radhelorn wrote:

I mean parameter values. Then why not have ConTeXt add braces to every 
parameter? Or there will be slowdown Taco mentioned?


 Exactly.  ConTeXt would need to find out the parameters' boundaries 
first, and that is the place where things would become slow, since it is 
not possible to use TeX's built-in parser for that; it just can't handle 
two different types of balanced brackets at the same time.  Besides, 
you'd still need to quote commas, since \setupitemize[stopper=,] is just 
as valid as \setupitemize[stopper={,}] is, just with a completely 
different meaning.  And while it may be a bit strange, you could even 
set \setupitemize[stopper={, before=abc },after=\blank] – absolutely no 
way of guessing these quotes.



regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Struggling with lists

2005-06-22 Thread Christopher Creutzig

Christopher Creutzig wrote:

  \placelist[Datei]%[alternative=d,criterium=Topic]


 Sorry for the line noise.  criterium=current solves my problem.

 Does criterium=section only work for numbered sections?


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] s-pre-19: page numbers?

2005-06-20 Thread Christopher Creutzig

h h extern wrote:

your patch will break the list handler; a quick glance learns me that in 


 I did not expect this dirty hack to “really” work.  It was just a 
desparate short-term measure.



\def\dodomenulistelement#1#2#3#4#5#6#7%


 Thanks, that fixes the problem.


regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] s-pre-19: page numbers?

2005-06-17 Thread Christopher Creutzig

Taco Hoekwater wrote:


Is this not the same problem as the one that was mentioned last
week (the one that requires the core-lst.tex that Hans posted
as attachment)?


 It might be the same problem, but that file does not solve it.  I did 
remember to run texexec --make --all and to remove web2c/cont-en.fmt in 
favor of web2c/pdfetex/cont-en.fmt.



Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] s-pre-19: page numbers?

2005-06-17 Thread Christopher Creutzig

Christopher Creutzig wrote:

Taco Hoekwater wrote:


Is this not the same problem as the one that was mentioned last
week (the one that requires the core-lst.tex that Hans posted
as attachment)?


 As a short term measure, I have included

\def\linklisttoelement#1#2#3#4#5% % list location format page data
  {\gotonextinternal\currentlist{#2}{#4}{#5}}

into my document and got the menu I wanted  no spurious numbers any 
more and the hyperlinks do work.  YMMV.



 Technical discussion (probably should go to the dev-list):

 Since I have no clear view of where else the code is used, I'm not 
sure whichplace to fix, but the definition (and comment) of 
\linklisttoelement and \gotonextinternal do not agree on what to print:


Note that the comment here refers to a fifth argument which does not exist:

\def\linklisttoelement#1#2#3#4% % list location format page data
  {\gotonextinternal\currentlist{#1}{#3}{#4}}

Therefore, \gotonextinternal in its fourth argument gets the page 
number.  It expects text in there and dutifully passes it to 
\gotorealpage, where it is printed.



regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] s-pre-19: page numbers?

2005-06-16 Thread Christopher Creutzig

Salvete,

with gwTeX, TeXlive 2005 beta, using

   cont-en : ver: 2005.06.08  fmt: 2005.6.15  mes: english

I've got a problem with s-pre-19 I can't get rid of: The menu on the 
right contains page numbers, set in black \tf, at the lower left corners 
of the buttons.  I have tried getting rid of these by using things like


  \placelist[Topic][alternative=right,pagenumber=no]

or

  \def\gobble#1{}
  \placelist[Topic][alternative=right,pagecommand=\gobble]

but to no avail.  Do others have the same problem or is it just me?


Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] startMPgraphics in texshow?

2005-06-16 Thread Christopher Creutzig

Salvete,

 it seems that the whole family of MPgraphics commands is missing in 
texshow  looking for graphics turns up no matches.  Are they 
generated by some magical macro or missing because of their capital letters?



regards,
Christopher Creutzig
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] try compiling Tex showcase source : program_sample.tex

2005-05-09 Thread Christopher Creutzig
olivier Turlier wrote:
I've tryed to compile program-sample.tex, found after G.Wierda 
announcement, located at : 
http://tug.org/texshowcase/program_sample.tex, whithout success.
 The files are deliberately incomplete.  I hope I left enough in there 
to learn from, but the particular background is intended for our local 
juggling association only.  But even with the complete files, I never 
documented the steps to generate the output, which unfortunately (mostly 
due to memory limitations in Metapost) is more than a simple texexec.  :-)

Regards,
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] hyphenation not working

2005-03-21 Thread Christopher Creutzig
Hans Hagen wrote:
I do have a file called hyphen.tex. On Hans' suggestion, I copied this
to ushyph1.tex and ushyph2.tex. That didn't help. I also  changed my 
cont-usr.tex file, changing all lines that had ushyp* to hyphen. This 
also didn't work.

did you run mktexlsr ?
 And in case that's unexpected: You need to run texexec --make, since 
patterns are loaded at format generation.

Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Why uses Context 8r encoding used instead of the specified ec encoding?

2005-02-10 Thread Christopher Creutzig
Hans Hagen wrote:
\def\loadmapline
  {\dodoubleempty\loadmapline}
\def\loadmapline[#1][#2]%
  {\loadallfontmapfiles % ! ! !
   \doloadmapline{#1}{#2}}
 I'd be surprised if that worked.  The second \def overwrites the first.
Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] m-letter.tex -- backslash interpretation error

2005-01-10 Thread Christopher Creutzig
Hans Hagen wrote:
(beware, don't redefine a module m-letter-re since only the first 8 
chars count; better put your local variant in an environment
 BTW: Is this anachronistic limitation to 8 characters planned to 
disappear?  With the additional t- or u- at the front, we've got a 
limitation to six characters, which is really extremely little.

Christopher
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Bib module produces no output

2005-01-04 Thread Christopher Creutzig
David Antos wrote:
Can you please make including the whole bibliography make the default?
I'm pretty sure that's what everybody expects :-)
 Definitely not.  I don't know about you, but I'd very much prefer to
use the same .bib file for different articles/texts.  Numerous groups
in this and other universities even use a collective .bib file for
all the researchers.  (We are just doing too diverse things in this
group for that.)
rgeards,
Christopher Creutzig
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] bookmarks problems

2004-12-13 Thread Christopher Creutzig
Salvete,
 I have two problems with bookmarks:
- Preview.App does display the list of bookmarks, but they do not work.
  The same file has no such problems in Adobe.  (There are files with
  bookmarks that work ok in Preview.App, such as the Adobe JavaScript
  reference.)
- I fail to provide a bookmark different from a chapter title, if that
  title is not followed by text, but directly by a \section command.
  Whether I place \bookmark in front of or behind the \chapter command,
  it affects the next section command with text behind it.
\setupinteraction[state=start]
\placebookmarks[chapter,section]
\starttext
\chapter{normal chapter}
\section{one}
\chapter{\quotation{special} chapter}
\bookmark{special chapter}
\section{two}
\section{three}
test
\stoptext
regards,
Christopher Creutzig
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Black generation in cmyk output

2004-12-03 Thread Christopher Creutzig
Taco Hoekwater wrote:
Just curious: why do you need a cmyk pdf document? I'm asking because 
the requirement often implies that you are using a less-than-modern 
printing house. If that is the case, you may be better off using 
PostScript instead of PDF.
 Last time I prepared a file for Springer Heidelberg, they explicitly 
wanted a cmyk pdf file, too.  I have no idea what printing house they 
contacted.  I ended up converting those images to appear in color into 
cmyk jpegs in Photoshop (next time I'm going to try convert with 
-colorspace cmyk instead) and the printing house slightly grudingly 
accepted rgb grey scale images for the bulk of the book.

regards,
Christopher Creutzig
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] m-bib, \cite and no year?

2004-11-30 Thread Christopher Creutzig
Taco Hoekwater wrote:
In authoryear styles, year entries are usually required, so I am going to 
keep this as it is now. You can either use \cite[author] for this case, or 
you could build your own \cite command, in a similar way to Tobias' answer:
 Sorry for bothering you that much.  I'm now using \cite[author], yet
there is one place I can't solve that way, which is cross references:
@Article{dominus04,
  author = 	 {Mark Jason Dominus},
  title = 	 {Slide Rule},
  journal = 	 {Wikipedia},
  year = 	 2004,
  crossref = {Wikipedia},
  month = 	 May,
  note = 	 
{\gotoURL{http://en.wikipedia.org/w/wiki.phtml?title=Slide_ruleoldid=3849585}}
}

@Misc{Wikipedia,
  key =  {Wikipedia},
  title ={Wikipedia, the free online encyclopedia},
  howpublished = {\gotoURL{http://wikipedia.com}}
}
 Not that I plan to use really many wikipedia entries, but the problem
as such seems to exist.  (I am not sure about using @Article here, but
that's another topic.)
 As an aside, there is another problem: The
entry cross-referenced to does not appear  this seems to be a general
problem with cross-references.  I'm using \completepublications, but the
same happens with \placepublications.  (I haven't managed to get the
list sorted by author, either.)
 Another thing I stumbled upon:  Using \type{whatever} in a BibTeX entry
does not work: whatever is simply ignored.  (It is intact in the .bbl 
file, as in

\startpublication[k=Kulpa,t=misc,
a={Kulpa},y=2004,
n=40,s=Kul04]
\author[]{Zenon}[Z.]{}{Kulpa}
\pubyear{2004}
\month{6}
\pubname{{message [EMAIL PROTECTED] on the 
mailing
  list [EMAIL PROTECTED]
\stoppublication

where I'm using \type because of the _.)
 Finally, the entry
\startpublication[k=abramowitz,t=book,
a={Abramowitz and Stegun},y=1972,
n=30,s=AS72]
\editor[]{Milton}[M.]{}{Abramowitz}
\editor[]{Irene~A.}[I.~A.]{}{Stegun}
\pubyear{1972}
\title{{Handbook of Mathematical Functions}}
\pubname{Dover Publications}
\edition{ninth}
\stoppublication
is indented by about one interword space relative to the entries not
using \editor.  Which commands do the actual typesetting of the list 
entries?  I only got to \@@pbt and was lost ...

regards,
Christopher Creutzig
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \setupsystem[random]

2004-11-29 Thread Christopher Creutzig
h h extern wrote:
PS. you can say:  setupsystem[random=100]
 I know.  But I tried to use larger numbers, e.g., to copy the values 
of a previous run from the line

systems: randomizer starts with 379377681
yet always get the above error.  What is the reason for this line if not 
to copy the number into \setupsystem?

rgeards,
Christopher Creutzig
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \setupsystem[random]

2004-11-29 Thread Christopher Creutzig
Hans Hagen wrote:
the problem is that the tex/mp randomizers are based on time and 
therefore too fragile (too little resolution) on fast machines; so i let 
texexec set the seed
 So even in the case where the TeX code contains 
\setupsystem[seed=212], texexec does some additional calculations?  (The 
error I got made me think that the number I entered was directly used in 
TeX calculations.)

Christopher
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] \setupsystem[random]

2004-11-26 Thread Christopher Creutzig
Salvete,
 the line
  \setupsystem[random=261113]
causes an error for me:
./CDaufdruck.tex:10: Arithmetic overflow.
\verynormalnextrandom ...al \multiply \randomi 31
  \global \advance 
\randomi ...

\normalnextrandom ...alyear \verynormalnextrandom
  \egroup
\nextrandom -\bgroup \normalnextrandom
\gdef \nextrandom {\ifcase 
\randomse...
argument ...ormaltime =\@@svrandom ]\nextrandom
  \egroup
\firstofoneargument #1-#1

\dosetupsystem ...1]\setuprandomize [\@@svrandom ]
  \beforesplitstring 
\@@svre...
...

ConTeXt  ver: 2004.10.07  fmt: 2004.10.29  int: english  mes: english
regards,
Christopher

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Fonts switching and styles ..

2004-11-23 Thread Christopher Creutzig
Dirar BOUGATEF wrote:
\definebodyfont[MyFont][karat]
\starttext
\switchtobodyfont[MyFont]
\stoptext
 I believe \definebodyfont[MyFont][karat] should be 
\definefontsynonym[MyFont][karat], which should allow 
\switchtobodyfont[MyFont], but you may also be looking for 
\definefont[MyFont][karat], which defines \MyFont.

regards,
Christopher
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] m-bib, \cite and no year?

2004-11-23 Thread Christopher Creutzig
Salve Taco,
 I'm using m-bib, with
\setupbibtex[database=literatur,sort=author]
\setuppublications[sort=bbl,refcommand=authoryear,numbering=yes]
This leads to three problems:
 First, I do have entries such as
@Misc{Wikipedia,
  key =  {Wikipedia},
  title ={Wikipedia, the free online encyclopedia},
  howpublished = {\gotoURL{http://wikipedia.com}}
}
with no year entry, and this comes out as Wikipedia ().  I think the 
parens should only be used if the year is nonempty.

 Second, I getempty entries in my list of references, which do get a 
number.  Also, the first 20 numbers are printed in red, while the 
subsequent entries are in black.  I know this is a vague description, I 
haven't been able to analyze it in more detail yet.  Just wanted to let 
you know.

 Third, I have entries in my bibliography where the authors are listed
with their family names only.  This causes spurious commas in the list
of references.  I'll probably add initials and/or chrisitan names where 
I know them, but I think m-bib should support these entries.

@inproceedings{corless97sequence,
author = Corless and Jeffrey and Knuth,
title = {{A Sequence of Series for the Lambert {W} Function}},
booktitle = {ISSAC}: Proceedings of the {ACM} {SIGSAM} 
International Symposium on Symbolic and Algebraic Computation (formerly 
{SYMSAM}, {SYMSAC}, {EUROSAM}, {EUROCAL}) (also sometimes in cooperation 
with the Symbolic and Algebraic Manipulation Groupe in Europe ({SAME})),
year = 1997,
url = citeseer.ist.psu.edu/corless97sequence.html }

 As an aside: Does m-bib provide a way of including page numbers etc. 
in the citation?  (For authoryear style, this would be overkill, but for 
other styles, I think [233, p. 40] to be pretty readable and helpful.)

regards and keep up the good work,
Christopher
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Updated math modules

2004-11-22 Thread Christopher Creutzig
Giuseppe Bilotta wrote:
attached to the following please find a .tar.bz2-packed file
containing updated t-amsl and t-nath.
\def\startnathequation{%
  \begingroup
[EMAIL PROTECTED]@[EMAIL PROTECTED]@cr
\let\startdysplaymath\relax
\let\stopdysplaymath\relax
\contextstartformula
  \startnatheq
\hbox\bgroup
  \dmathon@
  \wall\mathopen{}%
}
 What is \startdysplaymath?
 As an aside: Hans, are therespecified naming conventions yet for 
internal macros?  I don't expect \contextstartformula and the like to 
clash with anything, but somehow I still felt more at ease with 
\nath!startformula.  (Then again, that may be bad ConTeXt style 
inherited from the LaTeX package mess I've worked with way too much.)

cu,
ccr
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \mathstrut in \underbrace and nath

2004-11-22 Thread Christopher Creutzig
Hans Hagen wrote:
 Ok, then what's \protected?  Is it performing an \unprotect/\protect 
pair around the definition?  But then, why did it work?

in context protext/unprotect is to be used when ! @ ? are used inmacro 
names which was not the case here
 I know.  So, does ConTeXt's \protected\def temporarily switch on one 
level of \unprotect?  But for some strange reason, the whole thing 
worked ...

regards,
Christopher
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \mathstrut in \underbrace and nath

2004-11-19 Thread Christopher Creutzig
Nikolai Weibull wrote:
! Undefined control sequence.
\dodosmash [#1]-\edef \@@smash
{#1}\futurelet \nexttoken \dododosmash
\relbar -\mathrel {\smash
   -}
 Uh-uh.  The problem is clear: \inlinemath tries (in the definition of 
\inlinemath@) to expand the formula (in the sense of TeX macro 
expansion).  \longrightarrow cum suis are, however, not expandable in 
ConTeXt.

 Now, I do believe the xdef is a bug in nath, but the following 
workaround does work:

\protected\def\longrightarrow{\relbar\joinrel\rightarrow}
 Hans, do you have a command that sort of changes an existing 
definition as if \protected had been used in the first place?

regards,
Christopher
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Bugs

2004-11-19 Thread Christopher Creutzig
David Antos wrote:
Sure. Think of it as ragged-right and ragged-left. This is one of the
first questions in all ConTeXt FAQs, it has deep historical reasons, and
 If nothing important has crept past me, being the first question in 
all ConTeXt FAQs is something trivially true, given the number of 
ConTeXt FAQs in existence. :-))

Christopher
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \mathstrut in \underbrace and nath

2004-11-19 Thread Christopher Creutzig
Hans Hagen wrote:
first of all, \protected is not what you think it is; i had a \protected 
before etex was around; the context name is \unexpanded
 Ok, then what's \protected?  Is it performing an \unprotect/\protect 
pair around the definition?  But then, why did it work?

\let\unprotectedlongrightarrow\longrightarrow
\unexpanded\def\longrightarrow{\unprotectedlongrightarrow}
 Yes, I'd though of that, I justwanted to know if there is some higher 
level version already existing.

regards,
ccr
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] verb-ini and nath \(save|restore)catcode clash

2004-11-18 Thread Christopher Creutzig
Nikolai Weibull wrote:
verb-ini and nath both define (incompatible) instances of \save- and
\restorecatcode.  Simply renaming them in nath to
\NATH(save|restore)catcode seems to work fine.  Any suggestions?
 I had sent a patch for that some months ago.  Giuseppe, any chance of
an updated t-nath.tex in the near future?  The incompatibility with
\startequation ... \stopequation should also be fixed in some released
version.
regards,
Christopher
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] nath and \(start|stop)formula

2004-11-15 Thread Christopher Creutzig
Nikolai Weibull wrote:
\usemodule[nath]
\starttext
$A = (B, C, D, E)$
\placeformula
  \startformula
A = (B, C, D, E)
  \stopformula
\stoptext
! Undefined control sequence.
l.6 A = (
 B, C, D, E)
 ? X
 Try \startnathequation ... \stopnathequation instead.  Or patch 
t-nath.tex for the same effect, I have (but this might have side-effects):

\let\nath!startformula\startformula
\let\nath!stopformula\stopformula
\def\startnathequation{%
  \begingroup
[EMAIL PROTECTED]@[EMAIL PROTECTED]@cr
\nath!startformula
  \startnatheq
\hbox\bgroup
  \dmathon@
  \wall\mathopen{}%
}
\def\stopnathequation{%
  \return
  \dmathoff@
\egroup
  \stopnatheq
\nath!stopformula
  \endgroup
}
\let\startformula\startnathequation
\let\stopformula\stopnathequation
regards,
Christopher Creutzig
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] precompiling inline mp to pdf?

2004-11-02 Thread Christopher Creutzig
Salvete,
 for my latest project (almost done, so I don't need the answer for 
this one, but possibly in the future) I have compilation times which 
were dominated by Metapost until I switched to using --nomp most of the 
time and --automp --runs=2 whenever I changed something that results in 
changes to the Metapost stuff.  (I needed the --automp anyway, since to 
work around size limits in MetaPost I had to split the background into 
separate images, yet they had to influence one another via global 
variables -- increasing the memory limit to 80 MB made Metapost 
predictably freeze at unpredictable places in the run.)

 Now, my compile times are dominated by the mp to pdf conversion. 
Since pdf inclusion is fast (as expected), I'd like to use mptopdf once 
on each generated file and have ConTeXt include that.  Should I redefine 
\insertMPfile to first look for the pdf or is there a more clever way? 
(Note that I do want the automatic inclusion, since I'm passing the 
dimensions of external figures etc. to metapost and use the result in a 
background layer and/or as frame backgrounds.)

regards,
Christopher Creutzig
PS: I didn't have time to analyze this when I came across it, but it 
seems that texexec --automp file consistently performs one TeX run too 
little.  In any case, the last thing it does is a metapost run, which 
doesn't seem sensible to me.

___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] texexec 4.0 to 5.0 update.

2004-10-26 Thread Christopher Creutzig
Jan-Mark Batke wrote:
Dear all, 

using  the  example below  with  texexec --pdf  example.tex
metapost comes up with  its prompt - answering \bye results
in a correct  pdf file. Whats going wrong?  How can I debug
that? 
You forgot \starttext ... \stoptext around the content.
regards,
Christopher Creutzig
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Re: no connection to contextgarden

2004-10-26 Thread Christopher Creutzig
Patrick Gundlach wrote:
10  ge-01.hetzner.dhk.nbg.metabone.net (213.239.239.54) 46 bytes to 212.125..76.237  
25.5/25.9/26.6 (0.419) ms  6/6 pkts (0% loss)
11  *  *  *  *  *  0/5 pkts (100% loss)

No idea why this is like that. Network errors like these are beyond my
control. 
 Some routers simply don't honour ttl fields properly and just drop 
packets instead of sending an error back.  That breaks traceroute and is 
a real pain when debugging network problems.

12  eth2.core-1.dhk.nbg.v-bone.net (83.151.24.249) 46 bytes to 212.125.76.237  
25.8/26.3/26.7 (0.293) ms  6/6 pkts (0% loss)
13  m24s02.vlinux.de (83.151.29.228) 46 bytes to 212.125.76.237  25.7/26.0/26.5 
(0.282) ms  6/6 pkts (0% loss)

But then I wonder why you reach the host...
 There seem to be no network problems, as far as I can see.  (Cool -- 
we've got virtual servers on the same machine, mine is at m24s06!)

Christopher
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] XeTeX no longer working

2004-10-26 Thread Christopher Creutzig
Salvete,
 since mail directly to Adam Lindsay does not seem to get through (I 
never got a reply, even when asking if it had got through, so I'm 
assuming it didn't), sorry to everyone not interested in XeTeX.

 After upgrading to tetex beta, XeTeX 0.88, and ConTeXt 2004.10.07, I'm 
suddenly running into problems:

\resetspecials
\defineoutput  [xetex]  [xtx]
\setupoutput[xetex]
\usetypescriptfile [type-xtx]
\definetypeface[Hoe][rm][serif][hoefler]  [default][encoding=unicode]
\setupbodyfont [Hoe,rm]%
\setupcolor[state=start]
\starttext
{\red test}
\stoptext

! Undefined control sequence.
\dostartrgbcolormode ...tring {\colorhexcomponent
{#1}\colorhexcomponent {#2...
\doexeccolorrgb ...ode \@@cl@@r \@@cl@@g \@@cl@@b
  \or \or \or \or \or 
\dosta...

\doexeccolorR ...!r \normalizeRGB \doexeccolorrgb
  \else 
\ifCMYKsupported \re...

\@@crred -0R:1:0:0:
0:0
\dowithcolor ... \??cr \currentpalet #2\endcsname
  \od \else \ifcsname 
\??cr ...

\dodoglobalstartcolor ...m!colors 3\@@askedcolor }
  \fi \fi
...
l.11 {\red
   test}
 Is there a newer version of XeTeX support available?  (spec-xtx.tex 
from context/base, which is used, unfortunately only lists 
version=2004.*.*.)

 I believe the problem is in
\ifx\colorhexcomponent\undefined
% this will be added to colo-hex.tex
\else
% because we intercept the zero condition, the .23pt in 1.23pt will 
disappea
r in the
% ifcase zero part branch

\def\colorhexcomponent#1%
  {\ifdim#1\points.005\points
...
 Why is there an empty first branch in the if?
Regards,
Christopher Creutzig
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] more nath patches

2004-10-26 Thread Christopher Creutzig
Salvete,
 I finally managed to make t-nath work with \eqalign and \eqalignno. (I 
assume I was not the only one having trouble there?)  As it appears, 
nath gets really confused when subformulas are enclosed in {} and 
contain some form of delimiters.  Therefore, the original definitions 
just don't work, but these modifications do, at least in some sense of 
work:

\def\eqalignno#1%
  [EMAIL PROTECTED]
   \tabskip\centering
   \vcenter{%
 [EMAIL PROTECTED]
 \halign to \displaywidth
 [EMAIL PROTECTED] [EMAIL PROTECTED]
  [EMAIL PROTECTED] {}##\stopnathdmath}\hfil\tabskip\centering
  [EMAIL PROTECTED]@skip\crcr
   #1\crcr}}}
\def\eqalign#1%
  {\null
   \,%
   \vcenter
 {\openup
  [EMAIL PROTECTED]
  \ialign
{\strut\hfil{\startnathdmath ##\stopnathdmath}%
  {\startnathdmath {}##\stopnathdmath}\hfil\crcr
 #1\crcr}}%
   \,}
 And I've got another snippet I'd like to share, which helps displaying 
continued fractions in a linear format, using the best way of doing so 
I've met so far:

\def\contfrac#1#2{%
  % To get the lines at the top right and bottom left
  % at the correct lengths, we need to know the final heights
  % of both top and bottom.  Since styles ``C-up'' and ``C-down''
  % are used only in generalized fractions, we need a trial
  % typesetting run for this.
  \begingroup
  [EMAIL PROTECTED]@
  [EMAIL PROTECTED] .7\mex\!!width 0pt
[EMAIL PROTECTED] #1}%
   \!!dimena=\ht\nathbox \advance\!!dimena-\ht\sizebox@
   [EMAIL PROTECTED]
%  \!!dimena=\dp\nathbox \advance\!!dimena .5ex \dp\nathbox=\!!dimena
   \global\!!dimend=\dp\nathbox
   \box\nathbox
  \above\fracrulethickness@
   [EMAIL PROTECTED] 2\mex\!!width 0pt
[EMAIL PROTECTED] #2}%
   \!!dimenb=\dp\nathbox \advance\!!dimenb-\dp\sizebox@
   [EMAIL PROTECTED]
%  \!!dimenb=\ht\nathbox \advance\!!dimenb .5ex \ht\nathbox=\!!dimenb
   \global\!!dimene=\ht\nathbox
   \box\nathbox
   }%
  [EMAIL PROTECTED]
%
%
  %% See the TeXbook, page 444 f., for what is happening here.
  \ifcase\mathcount@
\!!dimenf=\fontdimen8\textfont2
\!!dimeng=\fontdimen11\textfont2
\!!dimenh=3\fracrulethickness@
\!!dimeni=\fontdimen22\textfont2
  \or
\!!dimenf=\fontdimen9\scriptfont2
\!!dimeng=\fontdimen12\scriptfont2
\!!dimenh=\fracrulethickness@
\!!dimeni=\fontdimen22\scriptfont2
  \else
\!!dimenf=\fontdimen9\scriptscriptfont2
\!!dimeng=\fontdimen12\scriptscriptfont2
\!!dimenh=\fracrulethickness@
\!!dimeni=\fontdimen22\scriptscriptfont2
  \fi
%
  \!!dimenj=\dimexpr(\!!dimenf-\!!dimend)-
(\!!dimeni+0.5\fracrulethickness@)\relax
  \ifdim\!!dimenj\!!dimenh
\advance\!!dimenf by \dimexpr(\!!dimenh-\!!dimenj)\relax
  \fi
  \!!dimenj=\dimexpr(\!!dimeni-0.5\fracrulethickness@)-
(\!!dimene-\!!dimeng)\relax
  \ifdim\!!dimenj\!!dimenh
\advance\!!dimeng by \dimexpr(\!!dimenh-\!!dimenj)\relax
  \fi
%
  \advance\!!dimenf by\dimexpr(-\!!dimeni)\relax
  \advance\!!dimeng by\dimexpr(+\!!dimeni)\relax
%
  \setbox\!!boxa\hbox{%
[EMAIL PROTECTED]@
  [EMAIL PROTECTED] .7\mex\!!width 0pt
[EMAIL PROTECTED] #1}%
   \ifdim\ht\nathbox1.6ex
 \ht\nathbox=1.6ex
   \fi
   \!!dimena=\ht\nathbox \advance\!!dimena-\ht\sizebox@
   [EMAIL PROTECTED]
   \setbox\!!boxb\hbox{%
 \vrule
   \!!depth\!!dimenf
   \!!height\ht\nathbox
   \!!width\fracrulethickness@
   }%
   \dp\!!boxb=0pt
   \hfill\,
   \box\nathbox
   \,\hfill
   [EMAIL PROTECTED]
  \above\fracrulethickness@
   [EMAIL PROTECTED] 2\mex\!!width 0pt
[EMAIL PROTECTED] #2}%
   \ifdim\dp\nathbox.4ex
 \dp\nathbox=.4ex
   \fi
   \!!dimenb=\dp\nathbox \advance\!!dimenb-\dp\sizebox@
   [EMAIL PROTECTED]
   \setbox\!!boxb\hbox{%
 \vrule
   \!!depth\dp\nathbox
   \!!height\!!dimeng
   \!!width\fracrulethickness@
   }%
   \ht\!!boxb=0pt
   \box\!!boxb\hskip\fracrulethickness@
   \hfill\,
   \box\nathbox
   \,\hfill
   }%
  [EMAIL PROTECTED]
 \setbox\nathbox\copy\!!boxa
 \iftoprestricted@ \else
   \!!dimenb=\ht\nathbox \advance\!!dimenb .4\mex \ht\nathbox=\!!dimenb
 \fi
 \ifbotrestricted@ \else
   \!!dimenb=\dp\nathbox \advance\!!dimenb .5\mex \dp\nathbox=\!!dimenb
 \fi
 \box\nathbox  % print
 \!!dimena=\ht\!!boxa \advance\!!dimena-\htdecrement@
 \ht\!!boxa=\!!dimena
 \!!dimena=\dp\!!boxa \advance\!!dimena-\dpdecrement@
 \dp\!!boxa=\!!dimena
 [EMAIL PROTECTED]
 \endgroup
 [EMAIL PROTECTED]@}}
 I do assume the whole thing could be done with about half as many 
lines of code, but I was glad to finally understand how TeX typesets 
fractions and just ignored beautifying the code.  Also note that the 
snippet uses \fracrulethickness@ from t-nath.tex, while I honestly 
consider using \fontdimen8\textfont3 or whichever font size is in use 
for the fraction.  Well, work in progress.

regards,
Christopher Creutzig
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] XeTeX no longer working

2004-10-26 Thread Christopher Creutzig
Adam Lindsay wrote:
I ran into more problems with image inclusion, which takes the form of:
\XeTeXpicfile filename xscaled something yscaled something
My hack for that one currently includes a temporary assignment of the
catcode for . Yuck. I imagine that's not going to work for handling
wider-ranged things for fonts in MP.
 I hope this is not a dumb question, but what about
\begingoup
  \catcode`\=whatever
  \def\x{\endgroup\def\xetex!quot{}}%
\x
and then later
\expanded{\XeTeXpicfile \xetex!quot filename\xetex!quot\space
   xscaled ...}
Christopher
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] more nath patches

2004-10-26 Thread Christopher Creutzig
Hans Hagen wrote:
\!!dimenf=\fontdimen8\textfont2

\!!dimenf\fontdimen8\textfont\syfam
 OK, I should look those names up.
is more independent; maybe i should define symbolic names for the font 
 Independent of what?  \textfont2 is exactly the font TeX would use, no?
(\!!dimeni+0.5\fracrulethickness@)\relax

is \fracrulethickness@ a nath specific thing?
 Yes.  As I said, I'm thinking of using the proper fontdimen of the 
correct font instead.

   \hfill\,

maybe you need a % after this line
 Should have one just for code cleanliness, yes.  But it's all in math 
mode, so the spce should not do anything.

Christopher
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] nath: \wall and \return doesn't work?

2004-10-18 Thread Christopher Creutzig
Giuseppe Bilotta wrote:
I thought the \return were to go to the horizontal position of the
\wall, in the next line?  For me, both lines are flush left.

You are returning too soon. Lines should be ended by \\, not
\return, unless they are the last indented line; your snipped
should rather go:
 I see -- \return is not return to the horizontal position, but 
rather, \return is the end of the \wall-indented part, right?

merci,
Christopher
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] pdftex 1.20a and map files

2004-10-14 Thread Christopher Creutzig
Hans Hagen wrote:
textools --fixtexmftrees c:\tex\texmf-local [--force]
and alike will fix the tree (map files are now under /fonts/map) and you 
 Thanks for the info, fixtexmftrees forgot some files (such as pdftex.map).
need to change the texmf.cnf file accordingly
 In your list, one entry is missing:
ENCFONTS = .;$TEXMF/fonts/enc//
 I still think this information should be listed in the NEWS file of 
pdftex -- you are one of the fine guys one should ask for things like 
these, right?

 As an aside, a surprising observation: When using a cont-en.efmt 
generated with pdftex 1.20a, but a 1.10b binary (user error, true), 
ConTeXt still worked, just forgot to actually include metapost 
graphics.  (Metapost was called, though.)

regards,
Christopher Creutzig
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] nath: \wall and \return doesn't work?

2004-10-14 Thread Christopher Creutzig
Salvete,
\usemodule[nath]
\starttext
\startformula
  F(\beta, E_{min}, E_{max}, m) = \wall\{0,\infty,-\infty\}
  \return
  \cup \left\{\left.s\,\beta^e\sum_{i=0}^{m}a_i\beta^{-i}\right\vert
  s\in\{-1,1\}, 0\leq a_i\beta, e\in\integers, E_{min}\leq e\leq
  E_{max}\right\}.
\stopformula
\stoptext
I thought the \return were to go to the horizontal position of the 
\wall, in the next line?  For me, both lines are flush left.

pdftex 1.20a, ConTeXt 2004.10.07, t-nath.tex 2003.12.08, with the 
patches I sent to this list.

regards,
Christopher
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] [OT] compiling pdfTeX 1.20 on MacOS X

2004-10-11 Thread Christopher Creutzig
Henning Hraban Ramm wrote:
The latest beta of ConTeXt needs pdfTeX 1.20, and I'd like to use it but 
the latest pdfTeX doesn't compile completely on my Panther, I always get 
the following last words after some making and compiling:
 No problems here, except the nastiness of using Build and build at the 
same place -- there are file systems around which are a little braindead 
and regard capitalization as optional, i.e., on a Mac build and Build 
refer to the same file.  I just renamed Build to Build.sh and went ahead.

I don't speak C, so I don't understand if it tells that gcc 
-no-cpp-precomp is wrong (can't be, it works anywhere) or that libtool 
is wrong or what?
 The quotes around it shouldn't be there.  In any case, why is it 
trying to use that?  Did you pass that in explicitly or do you have any 
environment variable set for it?  (Try set | grep gcc in a terminal.)

regards,
Christopher Creutzig
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Wiki and source code browser

2004-10-01 Thread Christopher Creutzig
Patrick Gundlach wrote:
BTW: I have installed yet another service at contextgarden.net, the
source browser.
 Nice.  But I think the search should ignore the fmt files, they won't 
be displayed anyway.  I'd also welcome an option not to search in *.tws 
nor *-scite.properties, I have not found a use for them yet.

regards,
Christopher Creutzig
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] \defineenumeration broken in alpha

2004-09-24 Thread Christopher Creutzig
Hans,
 either \defineenumeration is broken in , or I always used it incorrectly:
\defineenumeration[definition]
  [sectionnumber=chapter,
text=Definition,
location=hanging,
way=bychapter]
\starttext
\startdefinition
Test
\stopdefinition
\stoptext
I get
definition[]Definition 0 Test
but used to get
Definition 1 Test
regards,
Christopher Creutzig
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


  1   2   >