Re: [NTG-context] [OT] Is Indesign CS 2 better than ConTeXt ?

2006-06-29 Thread luigi scarso
On 5/26/06, Hans Hagen <[EMAIL PROTECTED]> wrote:
> luigi scarso wrote:
> >
> >
> > But none say a word about Elements of Typographic Style
> >
> i don't have that one -)
>
> but 'digital typography' was done in word and looks ok as well
>
Ok, I have it: Digital Typography -- Donald E. Knuth ---
At page 671 (Index), I see
Hagen, Johannes, 628-629
At page 628 I see
Hans Hagen:  But 
So Johannes => Hans  :) wow !

But It seems to me that this book was made with TeX, not word .
maybe I have the wrong book ?

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


Re: [NTG-context] Metapost label alignment etc.

2006-06-29 Thread Aditya Mahajan
On Thu, 29 Jun 2006, Idris Samawi Hamid wrote:

> Dear knights,
>
> I spent a few hours today with MetaPost and MetaFun, my first serious stab at 
> Meta in many years, so I'm a virtual newbie (used PSTricks back in the LaTeX 
> days). I am trying to basically duplicate the attached pdf graphic and need 
> help with the following:
>
> 1. This code is pretty naive; how can I make it more efficient? Eg, can I 
> make a global "scaled 1cm" declaration instead of repeating it so many times?

drawoptions(scaled 1cm) ; , see below.

> 2. ConTeXt's alignment mechanism apparently does not work in MetaPost 
> (alignment is commented); is there a workaround? ragged left needed for some 
> labels.

Use \framed for multiline labels. Infact, what I ususally do is

\forceMPTEXcheck{LABEL}

\startMPinclusions
vardef [EMAIL PROTECTED](expr s, p)= [EMAIL 
PROTECTED](textext("\framed[width=3cm,align=middle,frame=off,autowidth=force, 
strut=on]{" & s & "}"),p)
enddef ;
\stopMPinclusions

and then I can simply use

LABEL.bot("A big huge label that spans multiple lines", origin)

or

LABEL.bot("short",center)

It can be made more efficient using the new sometxt feature. But I do 
not understand the sometxt interaction completely.

> 3. What is the most efficient way to get labels to follow the diagonals as in 
> the attached pdf?

remember, anything inside btex...etex or textext() is just a picture. 
So, you can do

picture p; p := textext("some label");
p := p rotatedaround (center, angle) ;

label.llft(p,center) ;

etc..


> Any tips/trick will be appreciated!
>
> Best
> Idris
> 
> % output=pdf interface=en
>
> \setupcolors[state=start]
>
> \starttext
>
> \noheaderandfooterlines
>
> \startuseMPgraphic{square}
>
> picture p ; p := dashpattern(on 1mm off 1mm) ;
>
> label bot(btex %\hbox to 1.5cm
>   {%\startalignment[left]
>   \vbox{\hsize=1.2cm
>   \ssxx\setupinterlinespace
>   (0,0,0,0) \crlf
>   Light \crlf
>   Condensed
>   Small \crlf
>   Sans~Serif}
>   %\stopalignment
>   }
>   etex, (-1.2cm,0)) ;

Firstly use \textext("string") instead of btex ... etex (assuming you 
have a uptodate context).

For alignment, I find it easiest to use \framed. So in your case
\framed[align=normal,width=1,5cm,font(forgot the switch)=\ssxx]{etc}


> draw (origin -- (0,5) -- (5,5) -- (5,0) -- cycle)
> scaled 1cm withcolor .625red ;
>
> %draw ((2,1) -- (2,6) -- (7,6) -- (7,1) -- cycle)
> %scaled 1cm withcolor .625red ;
>
> draw ((2,6) -- (7,6))
> scaled 1cm withcolor .625red ;
>
> draw ((7,6) -- (7,1))
> scaled 1cm withcolor .625red ;
>
> draw ((2,6) -- (2,5))
> scaled 1cm withcolor .625red ;

you can use

drawoptions(scaled 1cm withcolor .625red) ;

draw(...) ;
draw(...) ;
draw(...) ;


> draw ((2,5) -- (2,1))
> scaled 1cm withcolor .625red dashed p withpen pencircle scaled 0.4pt;
>
> draw ((2,1) -- (5,1))
> scaled 1cm withcolor .625red dashed p withpen pencircle scaled 0.4pt;

same here. Use drawoptions.

> draw ((5,1) -- (7,1))
> scaled 1cm withcolor .625red ;
>
> draw ((0,5) -- (2,6))
> scaled 1cm withcolor .625red ;
>
> draw ((5,5) -- (7,6))
> scaled 1cm withcolor .625red ;
>
> draw ((5,0) -- (7,1))
> scaled 1cm withcolor .625red ;
>
> draw (origin -- (2,1 ))
> scaled 1cm withcolor .625red dashed p withpen pencircle scaled 0.4pt;
>
> \stopuseMPgraphic
>
> \startuseMPgraphic{2squares}
>
> draw (origin -- (0,5) -- (5,5) -- (5,0) -- cycle)
> scaled 1cm withcolor .625red ;
>
> draw ((2,1) -- (2,6) -- (7,6) -- (7,1) -- cycle)
> scaled 1cm withcolor .625red ;
>
> draw ((0,5) -- (2,6))
> scaled 1cm withcolor .625red ;
>
> draw ((5,5) -- (7,6))
> scaled 1cm withcolor .625red ;
>
> draw ((5,0) -- (7,1))
> scaled 1cm withcolor .625red ;
>
> draw (origin -- (2,1 ))
> scaled 1cm withcolor .625red ;
>
> draw ((10,0) -- (10,-5) -- (15,-5) -- (15,0) -- cycle)
> scaled 1cm withcolor .625red ;
>
> draw ((12,1) -- (12,-4) -- (17,-4) -- (17,1) -- cycle)
> scaled 1cm withcolor .625red ;
>
> draw ((10,0) -- (12,1))
> scaled 1cm withcolor .625red ;
>
> draw ((10,-5) -- (12,-4))
> scaled 1cm withcolor .625red ;
>
> draw ((15,-5) -- (17,-4))
> scaled 1cm withcolor .625red ;
>
> draw ((15,0) -- (17,1 ))
> scaled 1cm withcolor .625red ;
>
> % map square to square
>
> picture p ; p := dashpattern(on 1mm off 1mm) ;
>
> draw ((0,5) -- (10,0))
> scaled 1cm dashed p withpen pencircle scaled 0.4pt withcolor .625red ;
>
> draw ((2,6) -- (12,1))
> scaled 1cm dashed p withpen pencircle scaled 0.4pt withcolor .625red ;
>
> draw ((0,0) -- (10,-5))
> scaled 1cm dashed p withpen pencircle scaled 0.4pt withcolor .625red ;
>
> draw ((2,1) -- (12,-4))
> scaled 1cm dashed p withpen pencircle scaled 0.4pt withcolor .625red ;
>
> draw ((5,5) -- (15,0))
> scaled 1cm dashed p withpen pencircle scaled 0.4pt withcolor .625red ;
>
> draw ((7,6) -- (17,1))
> scaled 1cm dashed p withpen pencircle scaled 0.4pt withcolor .62

[NTG-context] Metapost label alignment etc.

2006-06-29 Thread Idris Samawi Hamid

Dear knights,

I spent a few hours today with MetaPost and MetaFun, my first serious stab  
at Meta in many years, so I'm a virtual newbie (used PSTricks back in the  
LaTeX days). I am trying to basically duplicate the attached pdf graphic  
and need help with the following:


1. This code is pretty naive; how can I make it more efficient? Eg, can I  
make a global "scaled 1cm" declaration instead of repeating it so many  
times?


2. ConTeXt's alignment mechanism apparently does not work in MetaPost  
(alignment is commented); is there a workaround? ragged left needed for  
some labels.


3. What is the most efficient way to get labels to follow the diagonals as  
in the attached pdf?


Any tips/trick will be appreciated!

Best
Idris

% output=pdf interface=en

\setupcolors[state=start]

\starttext

\noheaderandfooterlines

\startuseMPgraphic{square}

picture p ; p := dashpattern(on 1mm off 1mm) ;

label bot(btex %\hbox to 1.5cm
{%\startalignment[left]
\vbox{\hsize=1.2cm
\ssxx\setupinterlinespace
(0,0,0,0) \crlf
Light \crlf
Condensed
Small \crlf
Sans~Serif}
%\stopalignment
}
etex, (-1.2cm,0)) ;

draw (origin -- (0,5) -- (5,5) -- (5,0) -- cycle)
scaled 1cm withcolor .625red ;

%draw ((2,1) -- (2,6) -- (7,6) -- (7,1) -- cycle)
%scaled 1cm withcolor .625red ;

draw ((2,6) -- (7,6))
scaled 1cm withcolor .625red ;

draw ((7,6) -- (7,1))
scaled 1cm withcolor .625red ;

draw ((2,6) -- (2,5))
scaled 1cm withcolor .625red ;

draw ((2,5) -- (2,1))
scaled 1cm withcolor .625red dashed p withpen pencircle scaled 0.4pt;

draw ((2,1) -- (5,1))
scaled 1cm withcolor .625red dashed p withpen pencircle scaled 0.4pt;

draw ((5,1) -- (7,1))
scaled 1cm withcolor .625red ;

draw ((0,5) -- (2,6))
scaled 1cm withcolor .625red ;

draw ((5,5) -- (7,6))
scaled 1cm withcolor .625red ;

draw ((5,0) -- (7,1))
scaled 1cm withcolor .625red ;

draw (origin -- (2,1 ))
scaled 1cm withcolor .625red dashed p withpen pencircle scaled 0.4pt;

\stopuseMPgraphic

\startuseMPgraphic{2squares}

draw (origin -- (0,5) -- (5,5) -- (5,0) -- cycle)
scaled 1cm withcolor .625red ;

draw ((2,1) -- (2,6) -- (7,6) -- (7,1) -- cycle)
scaled 1cm withcolor .625red ;

draw ((0,5) -- (2,6))
scaled 1cm withcolor .625red ;

draw ((5,5) -- (7,6))
scaled 1cm withcolor .625red ;

draw ((5,0) -- (7,1))
scaled 1cm withcolor .625red ;

draw (origin -- (2,1 ))
scaled 1cm withcolor .625red ;

draw ((10,0) -- (10,-5) -- (15,-5) -- (15,0) -- cycle)
scaled 1cm withcolor .625red ;

draw ((12,1) -- (12,-4) -- (17,-4) -- (17,1) -- cycle)
scaled 1cm withcolor .625red ;

draw ((10,0) -- (12,1))
scaled 1cm withcolor .625red ;

draw ((10,-5) -- (12,-4))
scaled 1cm withcolor .625red ;

draw ((15,-5) -- (17,-4))
scaled 1cm withcolor .625red ;

draw ((15,0) -- (17,1 ))
scaled 1cm withcolor .625red ;

% map square to square

picture p ; p := dashpattern(on 1mm off 1mm) ;

draw ((0,5) -- (10,0))
scaled 1cm dashed p withpen pencircle scaled 0.4pt withcolor .625red ;

draw ((2,6) -- (12,1))
scaled 1cm dashed p withpen pencircle scaled 0.4pt withcolor .625red ;

draw ((0,0) -- (10,-5))
scaled 1cm dashed p withpen pencircle scaled 0.4pt withcolor .625red ;

draw ((2,1) -- (12,-4))
scaled 1cm dashed p withpen pencircle scaled 0.4pt withcolor .625red ;

draw ((5,5) -- (15,0))
scaled 1cm dashed p withpen pencircle scaled 0.4pt withcolor .625red ;

draw ((7,6) -- (17,1))
scaled 1cm dashed p withpen pencircle scaled 0.4pt withcolor .625red ;

draw ((5,0) -- (15,-5))
scaled 1cm dashed p withpen pencircle scaled 0.4pt withcolor .625red ;

draw ((7,1) -- (17,-4))
scaled 1cm dashed p withpen pencircle scaled 0.4pt withcolor .625red ;

\stopuseMPgraphic

\midaligned{\useMPgraphic{square}}

\hbox{}\blank[5*big]

\useMPgraphic{2squares}

\stoptext

--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

mm_design.pdf
Description: Adobe PDF document
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] ConTeXt + asymptote

2006-06-29 Thread Sanjoy Mahajan
> In regard to the remark I saw posted about "monster eps" files

That was from me.  The size was one issue and probably, as you say,
disappears in the size of the final pdf file (I didn't test it
extensively but I think that happened).

However, a related issue to the size is that ConTeXt parses the
metapost output inline, doable since metapost puts out such a
restricted subset of postscript.  So it is easy (at least for tex
wizards!) to integrate metapost with ConTeXt (i.e. for inline metapost
code, like the asymptote environment in latex).  The asymptote eps
files, because of including fonts and using pstricks, are full
postscript and would be harder to parse.

> We will need to replace pstricks (which is used only for rotating text)
> There is a rotate.tex package in dvips but it would have to be
> modified to typeset at arbitrary angles...

Won't pstricks eventually have to go when asymptote produces pdf
directly?

Hmm, I wonder how metapost does the rotating.  Actually, here's a
test:

beginfig(1)
draw thelabel(btex hello etex, origin) rotated 70;
endfig;
end

produces this metapost eps file:

%!PS
%%BoundingBox: -7 -11 7 11 
%%HiResBoundingBox: -6.75279 -10.8051 6.75278 10.80508 
%%Creator: MetaPost 0.901
%%CreationDate: 2006.06.29:2102
%%Pages: 1
%*Font: cmr10 9.96265 9.96265 65:912
%%BeginProlog
%%EndProlog
%%Page: 1 1
gsave [0.34203 0.9397 -0.9397 0.34203 -0.2515 -10.8051 ] concat 0 0
moveto
(hello) cmr10 9.96265 fshow grestore
showpage
%%EOF

So it uses raw postscript to make an affine coordinate transform and
avoids using an external tex/latex package.  The resulting postscript
is nice for parsing.

> We could use epsf to include PostScript figures or else the miniltx
> package. I see from some posts that some ConTeXt users are thinking
> of using \epsfbox instead of \includegraphics. Any preferences here?

That also was me.  I have almost no experience of LaTeX and have
always used \epsfbox from plain TeX days.  But that may just be a bad
habit or a preference for the simplicity of \epsfbox.

> Another issue I would be happy to discuss sometime is the need for
> implicit equation solving.

I don't know if I can make a good case for it.  But the
declarative/implicit style matches how I think about drawing technical
figures (perhaps because the feature exists!): specify a bunch of
constraints and let the computer figure it out.  But it's probably a
lot of work to implement, not least because it would require a new
operator.  Maybe ?= for implicit equals and = for regular equals?

-Sanjoy

`Never underestimate the evil of which men of power are capable.'
 --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] unequal framed's

2006-06-29 Thread Hans Hagen
Hans van der Meer wrote:
> This is a problem I am anxious to solve.
> Run this program:
>
> \starttext
> \newbox\testbox
> \hbox{%
> % centered
> \setbox\testbox=\vbox{\vskip5mm\framed[frame=on,align=disable,width=1cm,height=2cm,offset=0pt,location=depth,top=\vss,bottom=\vss]{lp}\vskip5mm}
> \the\ht\testbox \box\testbox
> % bottom
> \setbox\testbox=\vbox{\vskip5mm\framed[frame=on,align=disable,width=1cm,height=2cm,offset=0pt,location=depth,top=\vss,bottom=\empty]{lp}\vskip5mm}
>  
> % note leaveout bottom=, not good
> \the\ht\testbox \box\testbox
> % top
> \setbox\testbox=\vbox{\vskip5mm\framed[frame=on,align=disable,width=1cm,height=2cm,offset=0pt,location=depth,top=\empty,bottom=\vss]{lp}\vskip5mm}
>  
> % note leaveout top=, not good
> \the\ht\testbox \box\testbox
> }
> \stoptext
>
> Now the middle box comes out higher than the other two, like this:
> � �� �� �� �� �
> � �| � �� �� �|� �
> | � �� �� �|� �| � �� �� �|� �|lp� � �� �|
> | � �� �� �|� �| � �� �� �|� �| � �� �� �|
> | � �� �� �|� �| � �� �� �|� �| � �� �� �|
> |lp� � �� �|� �| � �� �� �|� �| � �� �� �|
> | � �� �� �|� �| � �� �� �|� �| � �� �� �|
> | � �� �� �|� �| � �� �� �|� �| � �� �� �|
> | � �� �� �|� �|lp� � �� �|� �| � �� �� �|
> � �� �
> The \ht's will tell the difference, the \dp's are 0 here.
> Using \vtop gives analogous results, then the depth of middle box is 
> greater.
>
> Probing with [depth=0pt] makes no difference.
> Setting [strut=yes/no] makes some difference but is not the cause of 
> the difference.
> Setting [align=no/line] makes no difference.
> Omitting [align=..] or using [align=normal] makes all boxes the same 
> height but puts every contents in the middle, which is not what I 
> want: one at the top, one in the middle and one at the bottom.
>
> How can I get the required result with all three the same height?
\starttext

\hbox{%
\vbox{\vskip5mm\framed[frame=on,align=disable,width=1cm,height=2cm,offset=0pt,top=\vss,bottom=\obeydepth\vss]{lp}\vskip5mm}%
\vbox{\vskip5mm\framed[frame=on,align=disable,width=1cm,height=2cm,offset=0pt,top=\vss,bottom=\obeydepth]{lp}\vskip5mm}%
 
\vbox{\vskip5mm\framed[frame=on,align=disable,width=1cm,height=2cm,offset=0pt,top=\empty,bottom=\obeydepth]{lp}\vskip5mm}%
}

\hbox{%
\vbox{\vskip5mm\framed[frame=on,align={disable,high},width=1cm,height=2cm,offset=0pt]{lp}\vskip5mm}%
\vbox{\vskip5mm\framed[frame=on,align={disable,low},width=1cm,height=2cm,offset=0pt]{lp}\vskip5mm}%
 
\vbox{\vskip5mm\framed[frame=on,align={disable,lohi},width=1cm,height=2cm,offset=0pt]{lp}\vskip5mm}%
 }

\stoptext


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] Greek hyphenation patterns

2006-06-29 Thread Hans Hagen
Hi Peter
> I recently posted a Perl script to the xetex mailing list that should
> perform the conversion to utf-8 correctly.  I would be happy to modify
> the script to make the output more useful to Context users, but I don't
> use Context myself.  Feedback is welcome.
>   
i leave that to the ones using greek ... we only need the conversion 
rules; adding them to the relevant section of ctxtools is then no bug deal
> The essential problem with the patterns shipped with Context is that it
> is the result of a simple conversion, but the hyphenation rules in Greek
> are based on the definition of vowels and consonants, which changes in
> utf-8.  The original 8-bit patterns of Dimitrios Filippou depend on the
> fact that in the Babel encoding accents come before the vowel (except
> for iota subscript), whereas in Unicode they are either combined with
> the vowel or come after it, depending on whether you use precomposed
> characters or not.
>
>   
hm, so those original patterns were latex dependent ... even more reason 
to ship patterns with context; of course bugs need to be fixed, (or if i 
uderstand, extended with the additional combinations)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


[NTG-context] Greek hyphenation patterns

2006-06-29 Thread Peter Heslin

A few weeks ago, I looked at Context, because I wanted utf-8 hyphenation
patterns for ancient Greek, but then I saw that the patterns shipped
with Context have serious bugs.  I had hoped to patch ctxtools, but the
required changes went beyond my knowledge of Ruby.

I recently posted a Perl script to the xetex mailing list that should
perform the conversion to utf-8 correctly.  I would be happy to modify
the script to make the output more useful to Context users, but I don't
use Context myself.  Feedback is welcome.

The essential problem with the patterns shipped with Context is that it
is the result of a simple conversion, but the hyphenation rules in Greek
are based on the definition of vowels and consonants, which changes in
utf-8.  The original 8-bit patterns of Dimitrios Filippou depend on the
fact that in the Babel encoding accents come before the vowel (except
for iota subscript), whereas in Unicode they are either combined with
the vowel or come after it, depending on whether you use precomposed
characters or not.

-- 
Peter Heslin (http://www.dur.ac.uk/p.j.heslin)

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


[NTG-context] unequal framed's

2006-06-29 Thread Hans van der Meer
This is a problem I am anxious to solve.Run this program:\starttext\newbox\testbox\hbox{%% centered\setbox\testbox=\vbox{\vskip5mm\framed[frame=on,align=disable,width=1cm,height=2cm,offset=0pt,location=depth,top=\vss,bottom=\vss]{lp}\vskip5mm}\the\ht\testbox \box\testbox% bottom\setbox\testbox=\vbox{\vskip5mm\framed[frame=on,align=disable,width=1cm,height=2cm,offset=0pt,location=depth,top=\vss,bottom=\empty]{lp}\vskip5mm} % note leaveout bottom=, not good\the\ht\testbox \box\testbox% top\setbox\testbox=\vbox{\vskip5mm\framed[frame=on,align=disable,width=1cm,height=2cm,offset=0pt,location=depth,top=\empty,bottom=\vss]{lp}\vskip5mm} % note leaveout top=, not good\the\ht\testbox \box\testbox}\stoptext Now the middle box comes out higher than the other two, like this:                  |          |   |          |   |          |   |lp        ||          |   |          |   |          ||          |   |          |   |          ||lp        |   |          |   |          ||          |   |          |   |          ||          |   |          |   |          ||          |   |lp        |   |          |      The \ht's will tell the difference, the \dp's are 0 here.Using \vtop gives analogous results, then the depth of middle box is greater.Probing with [depth=0pt] makes no difference.Setting [strut=yes/no] makes some difference but is not the cause of the difference.Setting [align=no/line] makes no difference.Omitting [align=..] or using [align=normal] makes all boxes the same height but puts every contents in the middle, which is not what I want: one at the top, one in the middle and one at the bottom.How can I get the required result with all three the same height?Hans van der Meer ___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \bTABLE[distance=...]

2006-06-29 Thread Peter Münster
On Thu, 29 Jun 2006, Hans Hagen wrote:

> well, i let you consider and test the following -)
> 
> \def\dochecktblwidths#1%
>   {\iftraceTABLE\showtblwids{B#1}\fi
>\!!dimena\hsize
>\!!counta\zerocount
> % test, dunno yet
> \advance\!!dimena-\tbltblleftmargindistance
> \advance\!!dimena-\tbltblrightmargindistance
> \advance\!!dimena-\tbltblcolumndistance
>\dorecurse\maximumcol
>  {\scratchdimen\gettblaut\recurselevel\relax
> % test, seems to work ok
> \advance\!!dimena-\gettbldis\recurselevel\relax

Thanks! All combinations of leftmargindistance, rightmargindistance and
distance seems to give the expected results.

What is the difference between distance and columndistance?
I thought the one was just a synonym for the other, but now I see, that you
treat them differently. And indeed, the result is different:

\starttext
\input tufte

\bTABLE[leftmargindistance=1em,rightmargindistance=1em,columndistance=2em]
\bTR\bTD bla bla bla bla\eTD\bTD bla bla bla bla\eTD\bTD
bla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla
blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla
\eTD\eTR
\eTABLE

\bTABLE[leftmargindistance=1em,rightmargindistance=1em,distance=2em]
\bTR\bTD bla bla bla bla\eTD\bTD bla bla bla bla\eTD\bTD
bla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla
blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla
\eTD\eTR
\eTABLE

\input tufte
\stoptext

If I change the line
\advance\!!dimena-\tbltblcolumndistance
to
\dorecurse{\numexpr\maximumcol-1\relax}{%
  \advance\!!dimena-\tbltblcolumndistance}%
it seems to work better...

Cheers, Peter

-- 
http://pmrb.free.fr/contact/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \bTABLE[distance=...]

2006-06-29 Thread Hans Hagen
� wrote:
> On Thu, 29 Jun 2006, Taco Hoekwater wrote:
>
>   
>>> % test: \advance\!!dimena-\gettbldis\recurselevel\relax
>>>
>>> you can enable that line in core-ntb and see what happens
>>>   
>> works for me ... Peter?
>> 
>
> Yes, thanks! But the next issues follow immediately:
> just consider leftmargindistance= and rightmargindistance= at the place of
> distance=.
>   
well, i let you consider and test the following -)

\def\dochecktblwidths#1%
  {\iftraceTABLE\showtblwids{B#1}\fi
   \!!dimena\hsize
   \!!counta\zerocount
% test, dunno yet
\advance\!!dimena-\tbltblleftmargindistance
\advance\!!dimena-\tbltblrightmargindistance
\advance\!!dimena-\tbltblcolumndistance
   \dorecurse\maximumcol
 {\scratchdimen\gettblaut\recurselevel\relax
% test, seems to work ok
\advance\!!dimena-\gettbldis\recurselevel\relax

etc etc 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] ConTeXt + asymptote

2006-06-29 Thread Hans Hagen
John Bowman wrote:
> In regard to adding support for ConTeXt or plain TeX to Asymptote, it
> should be no problem to do this, but perhaps someone on this list can help
> provide some preliminary information, particularly regarding item 1 below
> on how best to rotate text at an arbitrary angle. Also, since I am not sure
> what the precise planned use of a plain tex/ConTeXt engine here is, it isn't
> clear to me whether the miniltx solution below would be an acceptable 
> solution.
>   
i cannot answer for other users but i guess that they want a more 
integrated approach, i.e. include a code in the doc source, write style 
info at runtime, etc

latex and context differ too much

from what users wrote to this list, i understood that much tex related 
stuff in asymptote is hard coded, so it's probably enough when all the 
strings (in the c source) that now contain latex code can be configured;

there is no need for you to look into context, when things can be 
configured, the users will do that for you
> Perhaps someone can also explain why so many context users are interested in
> this feature? Why exactly can't they let Asymptote do its typesetting with
> latex behind the scenes and then import the resulting ps or pdf files in
> context? Is the issue just that latex might not be installed? If so, the
>   
indeed, esp when they use the so called minimal distributions;
> miniltx style file (which appears to be part of plain tex) seems like a
> viable and simple solution.
>
> In regard to the remark I saw posted about "monster eps" files, use the 
> -aZ option and you will see that Asymptote output files are as compact as
> those of MetaPost. If you want tex labels, you have to process MetaPost output
> through dvips, etc. Asymptote simply does this automatically, perhaps giving
> some users the illusion that Asymptote files are bigger. In other words, you
> should compare the final postscript files that MetaPost produces, not the
> intermediate ones (I recall that there is a MetaPost command for running
> MetaPost output through dvips too).
>   
in context dvips is not used for mp graphics; context comes with an 
integrated mp output parser; this means that integration is also 
efficient (handy when you have a couple of hundred mp graphics) esp with 
regards to resources

i suppose that others can comment on the rest of your mail

Hans

-- 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] \bTABLE[distance=...]

2006-06-29 Thread Peter Münster
On Thu, 29 Jun 2006, Taco Hoekwater wrote:

> > % test: \advance\!!dimena-\gettbldis\recurselevel\relax
> > 
> > you can enable that line in core-ntb and see what happens
> 
> works for me ... Peter?

Yes, thanks! But the next issues follow immediately:
just consider leftmargindistance= and rightmargindistance= at the place of
distance=.

Cheers, Peter

-- 
http://pmrb.free.fr/contact/
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] iwona cum suis

2006-06-29 Thread Hans Hagen
Hi,

this is how i update such fonts:

- mkdir new
- fetch iwona.zip. antt.zip kurier.zip
- unzip them in new

then run:

  textools  --update new e:\tex\texmf

and see what gets reported; if you feel comfortable, run 

  textools  --update new e:\tex\texmf --merge --force --delete

and then

  mktexlsr 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] extentable arrows

2006-06-29 Thread Aditya Mahajan
On Thu, 29 Jun 2006, Hans Hagen wrote:

> Aditya Mahajan wrote:
>>
>> I am simply trying to copy from amsmath definition.
>>
>
> better think context -)
>
> \unprotect
>
> \def\mtharrfactor{1}
> \def\mtharrextra {0}
>
> \def\domthxarr#1#2#3#4#5#6#7#8%
>  {\begingroup
>   \def\mtharrfactor{1}%
>   \def\mtharrextra {0}%
>   \processaction[#1] % will be sped up
> [  \v!none=>\def\mtharrfactor{0},
>   \v!small=>\def\mtharrextra{10},
>  \v!medium=>\def\mtharrextra{15},
> \v!big=>\def\mtharrextra{20},
>  \v!normal=>,
> \v!default=>,
> \v!unknown=>\doifnumberelse{#1}{\def\mtharrextra{#1}}\donothing]%
>   \mathsurround\zeropoint
>   \muskip0=#4mu \muskip0=\mtharrfactor\muskip0 \advance\muskip0 \mtharrextra 
> mu
>   \muskip2=#5mu \muskip2=\mtharrfactor\muskip2 \advance\muskip2 \mtharrextra 
> mu
>   \setbox0\hbox{$\scriptstyle
>  \if#20\else\mkern#2mu\fi
>  \mkern\muskip0\relax
>  #8\relax
>  \mkern\muskip2\relax
>  \if#30\else\mkern#3mu\fi
> $}%
>   \setbox4\hbox{#6}%
>   \dimen0\wd0
>   \ifdim\wd4>\dimen0 \dimen0\wd4 \fi
>   \setbox2\hbox{$\scriptstyle
>  \if#20\else\mkern#2mu\fi
>  \mkern\muskip0\relax
>  #7\relax
>  \mkern\muskip2\relax
>  \if#30\else\mkern#3mu\fi
> $}%
>   \ifdim\wd2>\dimen0 \dimen0\wd2 \fi
>   \setbox4\hbox to \dimen0{#6}%
>   \mathrel{\mathop{%
> \hbox to \dimen0{\hss\copy4\hss}}%
> \limits^{\box0}_{\box2}}
>   \endgroup}
>
> % ams:
>
> \def\xrightarrow{\doifnextcharelse[\noxrightarrow\doxrightarrow}
> \def\xleftarrow {\doifnextcharelse[\noxleftarrow\doxleftarrow}
>
> \def\doxrightarrow{\dodoublegroupempty\dodoxrightarrow}
> \def\doxleftarrow {\dodoublegroupempty\dodoxleftarrow }
>
> \def\noxrightarrow[#1]{\dodoublegroupempty\dodoxrightarrow{#1}}
> \def\noxleftarrow [#1]{\dodoublegroupempty\dodoxleftarrow {#1}}
>
> \def\dodoxrightarrow#2#3{\mathrel{{\domthxarr{}0359\rightarrowfill{#1}{#2
> \def\dodoxleftarrow #2#3{\mathrel{{\domthxarr{}3095\leftarrowfill {#1}{#2
>
> % context:
>
> \def\xrightarrow  {\dosingleempty\doxrightarrow}
> \def\xleftarrow   {\dosingleempty\doxleftarrow}
>
> \def\doxrightarrow[#1]{\dotriplegroupempty\dodoxrightarrow{#1}}
> \def\doxleftarrow [#1]{\dotriplegroupempty\dodoxleftarrow {#1}}
>
> \def\dodoxrightarrow#1#2#3{\mathrel{{\domthxarr{#1}0359\rightarrowfill{#2}{#3
> \def\dodoxleftarrow #1#2#3{\mathrel{{\domthxarr{#1}3095\leftarrowfill 
> {#2}{#3
>
> \starttext
>
> \startformula \xrightarrow{}{stuff on top}\stopformula
> \startformula \xrightarrow{stuff below}{}\stopformula
> \startformula \xrightarrow{stuff below}{stuff on top}\stopformula
>
> \startformula \xleftarrow [none]{stuff below}{stuff on top}\stopformula
> \startformula \xleftarrow [small]{stuff below}{stuff on top}\stopformula
> \startformula \xleftarrow [medium]{stuff below}{stuff on top}\stopformula
> \startformula \xleftarrow [big]{stuff below}{stuff on top}\stopformula
>
> \stoptext


This definitely looks better. Can there be a setting for 
\setuparrowextension (or something) so that the default can be 
changed.


On Thu, 29 Jun 2006, Taco Hoekwater wrote:

> Perhaps it syntax should be identical to amsmath: no brackets
> and two required arguments.

But that is not the amsmath syntax. It has

\xrightarrow[below]{top} where the first argument is optional.

> It is what is expected anyway.
>
>  \def\xrightarrow#1#2{\mathrel
>  {{\domthxarr0359\rightarrowfill{#1}{#2
>

I agree that this makes more sense.


> I assume amsmath has a few others as well, for double arrows and such.
> Can you post those defs as well? Then we can move the whole definition
> into math-ext.tex for the new release
>

On Thu, 29 Jun 2006, Hans Hagen wrote:

> hm, this is not the context way, two equal kind of contents and then one
> of them in [], maybe

I agree. To me,

\xrightarrow[setting]{below}{top}

makes most sense. It is not same as ams syntax, but that does not 
matter too much. Maybe there can be a switch to enable ams type of 
syntax, but that will make things too messy, I guess.


>
> \def\xrightarrow{\doifnextcharelse[\noxrightarrow\doxrightarrow}
> \def\xleftarrow {\doifnextcharelse[\noxleftarrow\doxleftarrow}
>
> \def\doxrightarrow{\dodoublegroupempty\dodoxrightarrow}
> \def\doxleftarrow {\dodoublegroupempty\dodoxleftarrow }
>
> \def\noxrightarrow[#1]{\dodoublegroupempty\dodoxrightarrow{#1}}
> \def\noxleftarrow [#1]{\dodoublegroupempty\dodoxleftarrow {#1}}
>
> which accepts
>
> \xrightarrow{x}{y}
> \xrightarrow{x}
> \xrightarrow{}{y}
> \xrightarrow[x]{y}
>
> etc, actyally, we should then also accept
>
> \xrightarrow[x][y]
>
> but more interesting is to use the optional arg for tuning purposes
>
>
> \if0#1\else\mkern#1mu\fi
>
> test, does a \mkern0mu hurt?

I did not see any difference when I tested it. I do not know why that 
is there.


On Thu, 29 Jun 2006, Tac

Re: [NTG-context] [Fwd: CTAN update: antt, iwona, kurier fonts]

2006-06-29 Thread Hans Hagen
Taco Hoekwater wrote:
> On Thu, 29 Jun 2006, Staszek Wawrykiewicz submitted updates for the font
> packages
>
>antt   (v2.06)
>iwona  (v0.97)
>kurier (v0.97)
>
>   
a pitty that those files contain tex files as well, which basically makes them 
latex zips, now i need to filter them, sigh

Hans 


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] texmfstart with figure library

2006-06-29 Thread Hans Hagen
David Arnold wrote:
> All,
>
> I have a file figlibSection3.xml which starts like this:
>
> 
>
> 
> 
>
> 
>
> 
> College of the Redwoods Mathematics Department organization>
> Intermediate Algebra Text
> Chapter 1
> Figures for Section 3
> 
>
> 
> section3figs-mpgraph.1
> xeqy2a
> College of the Redwoods Mathematics Department
> 
> 
>
> ...
>
> When I used to run texexec figlibSection3.xml, I would get my  
> figures, then the gui screens with figure embedded. Now, with  
> texmfstart texexec figlibSection3.xml, I get my figures, the gui  
> screens, then duplicates of all the figures after that. Thus, two  
> copies of every figure is embedded in the figure library.
>
> Is this new behavior correct?
>   
no, an dit only fails with the processing instruction; i'll fix it

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


[NTG-context] ConTeXt + asymptote

2006-06-29 Thread John Bowman
In regard to adding support for ConTeXt or plain TeX to Asymptote, it
should be no problem to do this, but perhaps someone on this list can help
provide some preliminary information, particularly regarding item 1 below
on how best to rotate text at an arbitrary angle. Also, since I am not sure
what the precise planned use of a plain tex/ConTeXt engine here is, it isn't
clear to me whether the miniltx solution below would be an acceptable solution.

Perhaps someone can also explain why so many context users are interested in
this feature? Why exactly can't they let Asymptote do its typesetting with
latex behind the scenes and then import the resulting ps or pdf files in
context? Is the issue just that latex might not be installed? If so, the
miniltx style file (which appears to be part of plain tex) seems like a
viable and simple solution.

In regard to the remark I saw posted about "monster eps" files, use the 
-aZ option and you will see that Asymptote output files are as compact as
those of MetaPost. If you want tex labels, you have to process MetaPost output
through dvips, etc. Asymptote simply does this automatically, perhaps giving
some users the illusion that Asymptote files are bigger. In other words, you
should compare the final postscript files that MetaPost produces, not the
intermediate ones (I recall that there is a MetaPost command for running
MetaPost output through dvips too).

Another issue I would be happy to discuss sometime is the need for implicit
equation solving. We could add it, given an appropriate syntax, but the
majority of uses I have seen for it are covered by the extension function
in math.asy. I find the latter more explicit and less confusing to new
users. But we could be persuaded to add something similar if someone can
justify the need. Asymptote already includes an explicit linear solver that
uses LU decomposition.

Anyway here are the two features we would need from a plain tex/ConTeXt engine:

1. We will need to replace pstricks (which is used only for rotating text)
with PostScript or PDF \special commands. There is a rotate.tex package in
dvips but it would have to be modified to typeset at arbitrary angles...

2. We could use epsf to include PostScript figures or else the miniltx
package. I see from some posts that some ConTeXt users are thinking
of using \epsfbox instead of \includegraphics. Any preferences here?
Alternatively, here is the miniltx solution, which would be trivial to
provide support for in an upcoming release of Asymptote:

Here's an example:

asy -k venn

Edit venn_.tex to look like this (then tex+dvips):

\input miniltx
\input graphicx
\input pstricks
\newbox\ASYbox
\newdimen\ASYdimen
\def\ASYbase#1#2{\setbox\ASYbox=\hbox{#1}\ASYdimen=\ht\ASYbox%
\setbox\ASYbox=\hbox{#2}\lower\ASYdimen\box\ASYbox}
\def\ASYalign(#1,#2)(#3,#4)#5#6{%
\setbox\ASYbox=\hbox{#6}%
\rput[lB]{#5}(#1,#2){\ASYdimen=\ht\ASYbox%
\advance\ASYdimen by\dp\ASYbox\kern#3\wd\ASYbox\raise#4\ASYdimen\box\ASYbox}}
\def\ASYscale(#1,#2)(#3,#4)(#5,#6)#7#8{%
\ASYalign(#1,#2)(#3,#4){#7}{\scalebox{#5}[#6]{#8}}}%
\psset{unit=1pt}
\includegraphics[bb=228.608356 320.125000 382.391644 470.875000]{venn_0.eps}%
\ASYalign(-104.955775,75.657656)(-0.50,-0.50){0.00}{$A$}
\ASYalign(-49.404200,75.657656)(-0.50,-0.50){0.00}{$B$}
\ASYalign(-77.179988,134.822731)(-0.50,0.00){0.00}{$A\cap B$}
\ASYalign(-77.179988,16.492581)(-0.50,-1.00){0.00}{$A\cup B$}
\bye


-- John Bowman
Department of Mathematical and Statistical Sciences
University of Alberta
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] beta bib module issues

2006-06-29 Thread Johannes Graumann
Taco Hoekwater wrote:
> * add \type{symbol=none} to \type{\setuplist} in unnumbered
>mode to prevent typesetting of bare numbers
 Works now - thanks!

Joh

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


[NTG-context] [Fwd: CTAN update: antt, iwona, kurier fonts]

2006-06-29 Thread Taco Hoekwater


 Original Message 
Subject: CTAN update: antt, iwona, kurier fonts
Date: Thu, 29 Jun 2006 16:10:49 +0200 (CEST)
From: CTAN Announcements 
Organization: University of Hamburg -- Germany
To: ctan-ann@dante.de
Newsgroups: comp.text.tex
References: 
<[EMAIL PROTECTED]>

On Thu, 29 Jun 2006, Staszek Wawrykiewicz submitted updates for the font
packages

   antt   (v2.06)
   iwona  (v0.97)
   kurier (v0.97)

All are located in CTAN'S fonts directory tree.

See below for more information.

Thanks for the upload.

--
Package: antt
Version: 2.06
Author: Janusz Marian Nowacki
License: GFNL (GUST-FONT-NOSOURCE-LICENSE based on LPPL)
Location on CTAN: fonts/antt/

In the current version (2.06) some new glyphs were added:
Breveinverted, Hbar.small, Ubreveinvertedlow, Ubreveinvertedlow.small,
breveinverted, breveinvertedlow, dotlessi.small, dotlessj.small,
ubreveinvertedlow. Also encoding files were corrected.

--
Package: iwona
Version: 0.97
Author: Janusz Marian Nowacki
License: GFNL (GUST-FONT-NOSOURCE-LICENSE based on LPPL)
Location on CTAN: fonts/iwona/

Iwona is a two-element sans-serif typeface. It was created as an alternative
version of the Kurier typeface, which was designed in 1975 for a diploma
in typeface design at the Warsaw Academy of Fine Arts under the supervision
of Roman Tomaszewski.

Kurier was designed for linotype typesetting of newspapers and similar
periodicals. The Iwona fonts are an alternative version of the Kurier fonts.
The difference lies in the absence of ink traps which typify the Kurier 
font.

This distribution contains a significantly extended set of characters 
covering
the following modern alphabets: latin (including Vietnamese), cyrillic and
greek as well as a number of additional symbols (including mathematical
symbols). The fonts are prepared in Type 1 and OpenType formats. For use
with TeX the following encoding files have been prepared: T1 (ec), T2 (abc),
and OT2 -- cirilic, T5 (Vietnamese), OT4, QX, texansi and nonstandard (IL2
for the Czech fonts), as well as supporting macros and files defining fonts
for LaTeX. The doc/fonts/iwona folder contains examples for plain TeX as 
well
as for LaTeX and an example of typesetting mathematics.

In the current version (0.97) some new glyphs were added:
Breveinverted, Hbar.small, Ubreveinvertedlow, Ubreveinvertedlow.small,
breveinverted, breveinvertedlow, dotlessi.small, dotlessj.small,
ubreveinvertedlow. Also encoding files were corrected.

--
Package: kurier
Version: 0.97
Author: Janusz Marian Nowacki
License: GFNL (GUST-FONT-NOSOURCE-LICENSE based on LPPL)
Location on CTAN: fonts/kurier/

Kurier is a two-element sans-serif typeface. It was designed for a diploma
in typeface design at the Warsaw Academy of Fine Arts under the supervision
of Roman Tomaszewski. The result was presented with other Polish typefaces
at the ATypI conference in Warsaw in 1975.

Kurier was intended for linotype typesetting of newspapers and similar
periodicals. The design goals included resistance to technological processes
destructive to the letter shapes. As a result, amongst others, the typeface
distinguishes itself through intra- and extra-letter white spaces as well
as ink traps at cross-sections of some elements constituting the characters.

This distribution contains a significantly extended set of characters 
covering
the following modern alphabets: latin (including Vietnamese), cyrillic and
greek as well as a number of additional symbols (including mathematical
symbols). The fonts are prepared in Type 1 and OpenType formats. For use 
with
TeX the following encoding files have been prepared: T1 (ec), T2 (abc), and
OT2 -- cirilic, T5 (Vietnamese), OT4, QX, texansi and nonstandard (IL2 for
the Czech fonts), as well as supporting macros and files defining fonts for
LaTeX. The doc/fonts/kurier folder contains examples for plain TeX as well
as for LaTeX and an example of typesetting mathematics.

In the current version (0.97) some new glyphs were added:
Breveinverted, Hbar.small, Ubreveinvertedlow, Ubreveinvertedlow.small,
breveinverted, breveinvertedlow, dotlessi.small, dotlessj.small,
ubreveinvertedlow. Also encoding files were corrected.

--

For the CTAN Team
   Rainer Schöpf

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


Re: [NTG-context] textbackground trouble

2006-06-29 Thread Aditya Mahajan
On Thu, 29 Jun 2006, Hans Hagen wrote:

> Aditya Mahajan wrote:
>> I get
>>
>> Runaway argument?
>> {boxgridtype := 0 ;
>> ! Paragraph ended before \flushTeXtexts was complete.
>> 
>> \par
>>  boxgridtype := 0 ;\par
>>
> hm, did you use the latest version?
>
> (looks like a endofline problem, i.e. some empty line not converted to an 
> endline char)

Just downloaded the latest beta and the problem is not present. Sorry 
for the noise.

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


Re: [NTG-context] collector's items

2006-06-29 Thread Hans Hagen
Steffen Wolfrum wrote:
> Hi Hans, Taco et al.
>
> I don't want to sound persistent ... but is there a chance that  
> collector's item (see bellow) no. 76 and even more important no. 75  
> will ever be answered?
>   
did you test that with the latest version an dif so, what are your test files? 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] formula legend

2006-06-29 Thread Hans Hagen
Aditya Mahajan wrote:
>
>u:vdc=direct current
>   
ok, fixed

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] textbackground trouble

2006-06-29 Thread Hans Hagen
Aditya Mahajan wrote:
> I get
>
> Runaway argument?
> {boxgridtype := 0 ;
> ! Paragraph ended before \flushTeXtexts was complete.
> 
> \par
>  boxgridtype := 0 ;\par
>   
hm, did you use the latest version? 

(looks like a endofline problem, i.e. some empty line not converted to an 
endline char) 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] \setuppagenumber? bug in nomarking

2006-06-29 Thread Hans Hagen
Taco Hoekwater wrote:
> Alan Bowen wrote:
>   
>> Taco�
>>
>> Here is the minimal file you requested. All I can say is that this  
>> used to work:
>> 
>
> The problem goes away if you use
>\setuppagenumber[location=]
> instead of
>\setuppagenumbering[state=nomarking]
>
> So it seems there is a bug in the handling of 'nomarking'.
>   
nomarking has never been a pagenumber option, but one of the texts: 

\setuppagenumbering[location=]

\setupheadertexts[chapter]

% \setupheader[state=nomarking]

\starttext

\chapter{xxx}

\dorecurse{10}{\input knuth}

\stoptext


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


[NTG-context] I think that I need professional help... :-)

2006-06-29 Thread Thomas Moore
I have been looking at what I have left to accomplish before my  
classes begin in the fall, and I am realizing that I am running out  
of time that I can afford to spend learning more about ConTeXt.  
However, I would really like to give ConTeXt a fair shake, because I  
believe that it might be what I need for the future. I would also  
like to take Hans's good advice about setting up some basic page  
layouts and then working on the structure of my book in the process  
of converting it.

But before I commit to the conversion, however, I need to know for  
certain that ConTeXt can handle the page layouts that I need. I need  
to duplicate (at least roughly) the three major page layouts that  
appear in my published text "Six Ideas That Shaped Physics":  a two- 
page spread that opens each chapter, the chapter body style, and a  
two-column layout for homework problems at the end of the chapter. In  
the thread entitled "Newbie questions" on this list, I have been  
attempting to address the second of these three layouts. That layout  
is almost done, except for finding a workaround for a possible bug,  
and the others should be somewhat easier, though still will involve  
some work.

I think that I can spring loose up to a few hundred dollars from my  
departmental budget to pay a consultant to help me finish setting up  
these page layouts so that I can focus on the writing issues.

Would anyone on the list be interested in being hired to work on  
these layouts? If so, please contact me off-list, and I will describe  
the layouts I need in more detail and ask for a bid.

Thanks for any interest,

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


Re: [NTG-context] Newbie questions

2006-06-29 Thread Thomas Moore

On Jun 28, 2006, at 6:12 PM, Aditya Mahajan wrote:

>> Dear ConTeXt gurus:
>
> I am not a context guru, but will still give it a shot ;)

Thanks for your help!
>
>> OK, I have gotten some off-list help from Mojca, who has answered
>> most of my questions and helped me polish the two page version of my
>> code (thanks, Mojca!). I have included what he helped me work out
>> below. There is one remaining problem. The first page is correct, but
>> very subsequent page has a correct-looking header and another
>> superimposed. The second superimposed header is not wide enough and
>> has the wrong page number (the number of the previous page), though
>> the page number is on the correct side. It is as if the page output
>> command from TeX is issuing the \setups command *twice*, once before
>> fully updating variables like \rightmarginwidth and the page number,
>> and once after setups have been done correctly. Is this a bug, or am
>> I doing something stupid?
>>
>> Thanks for any insight, Tom
>
> I am not sure what about the exact layout you are trying to achieve.
> Does this give you what you want.
>
>
> \setuppapersize[letter]
> \setuppagenumbering
>[alternative=doublesided,location=]
> \setuplayout
> [backspace=1.0in,
> topspace=0.5in,
> width=4.5in,
> height=9.5in,
> rightmargin=2.35in,
> rightmargindistance=0.15in,
> leftmargin=0in,
> leftmargindistance=0in,
> header=\normallineheight,
> headerdistance=\dimexpr0.5in-\normallineheight,
> footer=0in]
>
> \setupheadertexts[chapter][pagenumber][pagenumber][chapter]
> \setupbackgrounds[header][text][bottomframe=on,rulethickness=1pt]
>
>
>   \starttext
>   \chapter{Test}
>   This is a test of some math stuff. $0 = g_{\mu\nu}dx^\nu dx^\nu$.
>   \dorecurse{10}{\input knuth}
>
>   \showlayout
>   \stoptext

Sorry, no. The additional feature that I need is to be able to extend  
the horizontal line over the margin region as well as the text  
region, and put the page number (outer-justified) at the outer edge  
of the margin region. The code that I attached to the previous  
message does that, but suffers from the superimposed headers problem.  
But I appreciate your effort!

Best wishes,  Tom


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


Re: [NTG-context] framed and align=no

2006-06-29 Thread Hans van der Meer

On Jun 29, 2006, at 13:53, Hans Hagen wrote:

>> Thanks. I installed it and it works. Witness the examples below.
>> Will this be installed in next ConTeXt versions? I would be grateful.
>> One question of naming:
>>  I think "none" is a better descriptive name then "disable"
>>
> other keywords are already taken

A pity, but I think one could live with that.
 From your reply I infer that the next ConTeXt release will contain  
this option.
If not expressis verbis denied, I will count on it.

Hans van der Meer



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


Re: [NTG-context] Newbie questions

2006-06-29 Thread Thomas Moore
Dear Sanjoy:You want\setuppapersize[letter][letter]otherwise you get letter sized pages imposed on A4 paper (not widelyavailable in Pomona probably!) because the default value for thesecond argument is A4. Wow, you are right. I really appreciate your catching this!Tom___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Newbie questions

2006-06-29 Thread Thomas Moore
Dear Hans:

> it's a stepwise process
>
> - first set up a basic page style (next time in a big bookshop i'll  
> take a look at the series) and set up a font; that way you get an  
> idea how well things will fit
>
> - then develop the structure + associated style mapping while  
> writing (or converting)
>
> ask yourself:
>
> - do i need to render this differently
> - do i get the feeling that i enter too much code
>
> if so, then add structure
>
> This is how context itself evolved (after all, it was written in an  
> educational context where structure, reuse etc is important). Just  
> don't try to make up the style at the beginning, polishing it every  
> now and then is a nice distraction.
>
> Also, using metapost for the graphics is fun in itself (and may  
> save you lots of time).

Thanks for the very thoughtful advice!

Best wishes,

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


Re: [NTG-context] textbackground trouble

2006-06-29 Thread Aditya Mahajan
On Thu, 29 Jun 2006, Hans Hagen wrote:

> Aditya Mahajan wrote:
>> Hi Hans and Taco,
>>
>> Something goes wrong when a textbackground occurs right at the page
>> boundary. Please have a look at the attached file (a snippet from an
>> updated copy of Myway on using new math features).
> so, what goes wrong here?

I get

Runaway argument?
{boxgridtype := 0 ;
! Paragraph ended before \flushTeXtexts was complete.

\par
 boxgridtype := 0 ;\par
   boxlinetype := 0 ;\par boxfilltype 
:= 1 ;\...

\writecheckedMPgraphic ...aphic \flushTeXtexts {#1
   }\writeMPgraphic 
{#1}
\startMPgraphic ...hic \writecheckedMPgraphic {#1}

\stopwritingMPgraphic
\getMPdrawing ...ic \MPdrawingdata \stopMPgraphic

\loadcurrentMPgraphic {}\d...

\dopositionaction ...fMPdrawingdone \getMPdrawing
   \fi \resetMPdrawing 
\popMP...
...
l.96 \ShowExample

?

The backgrounds on the first page do not have any color. The string
boxlinetype := 0 ;boxfilltype := 1 ;boxgridcolor := 
(scaledrgb(0,0,1,1)) ;boxlinecolor := (scaledrgb(0,0,1,1))

ends up at the bottom of page 1.


I do not know what is going wrong.

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


Re: [NTG-context] Still font issues with I-Installer Mac OSX

2006-06-29 Thread Frank
Finally resolved by:

sudo rm -rf /usr/local/tetex
sudo rm -rf ~/Library/texmf

complete reinstall including ghostscript and cm-super

Regards,

FS
On 29-jun-06, at 10:28, Frank wrote:

> I did some more digging around in my system.
>
> Previously I used Darwinports TeTeX 3.0 which installs in
> /opt/local/
>
> I deinstalled and deleted the old tetex distro, but found a texmf in
> ~/Library. I am not sure if this directory was created by the old tetex
> installation or from I-installer.
>
> Would this cause issues with the updater?
>
> Regards,
>
> Frank
>
> On 28-jun-06, at 23:43, Gerben Wierda wrote:
>
>> On Jun 28, 2006, at 18:34, Taco Hoekwater wrote:
>>
>>> [1.1{/usr/local/teTeX/share/texmf.tetex/fonts/map/dvips/context/
>>> original-empty.
>>> map}{/usr/local/teTeX/share/texmf.tetex/fonts/map/dvips/context/
>>> original-base.m
>>> ap}{/usr/local/teTeX/share/texmf.tetex/fonts/map/dvips/context/ec-
>>> public-lm.map
>>> }{/usr/local/teTeX/share/texmf.tetex/fonts/map/dvips/context/ec-
>>> base.map}{/usr/
>>> local/teTeX/share/texmf.tetex/fonts/map/dvips/context/8r-base.map}{/
>>> usr/local/t
>>> eTeX/share/texmf.tetex/fonts/map/dvips/context/qx-base.map}{/usr/
>>> local/teTeX/sh
>>> are/texmf.tetex/fonts/map/dvips/context/t5-base.map}{/usr/local/ 
>>> teTeX/
>>> share/tex
>>> mf.tetex/fonts/map/dvips/context/texnansi-base.map}{/usr/local/teTeX/
>>> share/texm
>>> f.tetex/fonts/map/dvips/context/original-ams-cmr.map}{/usr/local/
>>> teTeX/share/te
>>> xmf.tetex/fonts/map/dvips/context/original-ams-euler.map}{/usr/local/
>>> teTeX/shar
>>> e/texmf.tetex/fonts/map/dvips/context/original-public-lm.map}{/usr/
>>> local/teTeX/
>>> share/texmf.tetex/fonts/map/dvips/context/original-public-plr.map}{/
>>> usr/local/t
>>> eTeX/share/texmf.tetex/fonts/map/dvips/context/original-public-
>>> csr.map}{/usr/lo
>>> cal/teTeX/share/texmf.tetex/fonts/map/dvips/context/original-public-
>>> vnr.map}{/u
>>> sr/local/teTeX/share/texmf.tetex/fonts/map/dvips/context/texnansi-
>>> public-lm.map
>>>
>>>
>>> You are using pdftex, so I assume it should load the font map files
>>> in "map/pdftex", not in "map/dvips". But I do not know what package
>>> supplied those map/dvips font files in the first place, so I cannot
>>> help you any further. (that whole folder does not exist on my system)
>>
>> The ConTeXt updater writes to texmf.local which takes precedence over
>> texmf.tetex which contains a very old ConTeXt. It seems you installed
>> the TeX i-Package but you did not install the ConTeXt updater.
>>
>> G
>>
>> ___
>> ntg-context mailing list
>> ntg-context@ntg.nl
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>
> ___
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

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


Re: [NTG-context] synonyms in combination with table(s)

2006-06-29 Thread Hans Hagen
Bernd Militzer wrote:
> Am 29.06.2006 um 12:31 schrieb Hans Hagen:
>
>   
>> Bernd Militzer wrote:
>> 
>>> \PID{67}{Rudolph, Joha\={n}e Christiane Friedericke}
>>>
>>>   
>> \= has a special meaning inside tables, so use \theverboseglyphname  
>> instead
>> 
>
> thanks Hans,
>
> but sorry I have no idea where to finde \ theverboseglyphname
> please giv me a hint where I can finde a description for that problem
>   
enco-*.tex

like \eacute and so 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] Index sorting again

2006-06-29 Thread Richard Gabriel




For example, the DocBook XSLT stylesheets (http://docbook.sourceforge.net/) solve it this way:Symbols (anything unsortable, including numbers)AB...Z---I'd suggest a bit better way:Symbols12...9AB...Z-Richard From: Hans Hagen [mailto:[EMAIL PROTECTED]To: mailing list for ConTeXt users [mailto:[EMAIL PROTECTED]Sent: Thu, 29 Jun 2006 14:33:41 +0200Subject: Re: [NTG-context] Index sorting againRichard Gabriel wrote:
> Hello Hans,
>
> I'd like to remind the 2 persisting problems with the index sorting.
>
> 1. Numbers are sorted under A
> 2. Symbols are sorted under the first letter which follows.
>
> See the attached test file.
> Both these issues are independent on language and on the expansion type.
>
> Proposed solution:
>
> 1. Sort numbers into separate divisions
> 2. Sort symbols to a special division called "Symbols"
>
> Could you please look into it?
> May I help you any further (except the attached test file)?
the question is ... where do they need to end up 

Hans 



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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

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


Re: [NTG-context] synonyms in combination with table(s)

2006-06-29 Thread Bernd Militzer

Am 29.06.2006 um 12:31 schrieb Hans Hagen:

> Bernd Militzer wrote:
>> \PID{67}{Rudolph, Joha\={n}e Christiane Friedericke}
>>
> \= has a special meaning inside tables, so use \theverboseglyphname  
> instead

thanks Hans,

but sorry I have no idea where to finde \ theverboseglyphname
please giv me a hint where I can finde a description for that problem

thanks

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


Re: [NTG-context] \bTABLE[distance=...]

2006-06-29 Thread Taco Hoekwater


Hans Hagen wrote:
>>>Could this be done automatically?
>>
>>I expect it can (and should) be. Stuff sticking out in the margin
>>is always bad ;-)
>>  
> % test: \advance\!!dimena-\gettbldis\recurselevel\relax
> 
> you can enable that line in core-ntb and see what happens

works for me ... Peter?

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


Re: [NTG-context] Index sorting again

2006-06-29 Thread Hans Hagen
Richard Gabriel wrote:
> Hello Hans,
>
> I'd like to remind the 2 persisting problems with the index sorting.
>
> 1. Numbers are sorted under A
> 2. Symbols are sorted under the first letter which follows.
>
> See the attached test file.
> Both these issues are independent on language and on the expansion type.
>
> Proposed solution:
>
> 1. Sort numbers into separate divisions
> 2. Sort symbols to a special division called "Symbols"
>
> Could you please look into it?
> May I help you any further (except the attached test file)?
the question is ... where do they need to end up 

Hans 



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] \bTABLE[distance=...]

2006-06-29 Thread Hans Hagen
Taco Hoekwater wrote:
> Peter M�nster wrote:
>   
>> Hello,
>>
>> when using \bTABLE[distance=...], the table gets wider than the textwidth.
>> 
>
>   
>> A workaround seems to be textwidth=\dimexpr\textwidth-3em\relax
>> Could this be done automatically?
>> 
>
> I expect it can (and should) be. Stuff sticking out in the margin
> is always bad ;-)
>   
% test: \advance\!!dimena-\gettbldis\recurselevel\relax

you can enable that line in core-ntb and see what happens

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] framed and align=no

2006-06-29 Thread Hans Hagen
Hans van der Meer wrote:
> On Jun 28, 2006, at 17:45, Taco Hoekwater wrote:
>   
>> Hans van der Meer wrote:
>> 
>>> I get the impression that although "align=no",  there still is a  
>>> \hfil
>>> put in at the right.
>>>   
>> Yes, but it is an implied fil, from \parfillskip. Because you limited
>> the width of the \framed, it is processed in vertical mode, so
>> \parfillskip is added to the end of the paragraph.
>>
>> This should help:
>>
>>\unprotect
>>% for core-spa.tex
>>\setvalue{\@@ragged@@command\v!disable}%
>>  {\appendtoks \raggedright \parfillskip\zeropoint
>>  \to\everyraggedcommand}
>>\protect
>>
>>\starttext
>>\framed[width=4cm,align=disable] {\hfil  xyz}
>>\stoptext
>> 
>
> Thanks. I installed it and it works. Witness the examples below.
> Will this be installed in next ConTeXt versions? I would be grateful.
> One question of naming:
>   I think "none" is a better descriptive name then "disable"
>   
other keywords are already taken

Hans

-- 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] small caps italic and font switching inside math

2006-06-29 Thread Hans Hagen
Taco Hoekwater wrote:
> Sorry, messed up something. New version followws:
>
> \newbox\chemlowbox
> \def\chemlow#1%
>{\setbox\chemlowbox\hbox{{\switchtobodyfont[small]#1}}}
>
> \def\chemhigh#1%
>{\ifvoid\chemlowbox \high{{\switchtobodyfont[small]#1}}%
> \else \lohi[left]{\box\chemlowbox}{{\switchtobodyfont[small]#1}}\fi }
>
> \def\finishchem{\ifvoid\chemlowbox \else \low{\box\chemlowbox}\fi}
>
> \unexpanded\def\molecule%
>{\bgroup
> \catcode`\_=\active \uccode`\~=`\_ \uppercase{\let~\chemlow}%
> \catcode`\^=\active \uccode`\~=`\^ \uppercase{\let~\chemhigh}%
> \dostepwiserecurse {65}{90}{1}
>{\catcode \recurselevel = \active
> \uccode`\~=\recurselevel
> \uppercase{\edef~{\noexpand\finishchem 
> \rawcharacter{\recurselevel%
> \catcode`\-=\active \uccode`\~=`\- \uppercase{\def~{--}}%
> \domolecule }%
>
> \def\domolecule#1{#1\finishchem\egroup}
>
> \starttext
> {\bf A test \variant[Caps] in small caps}
>
> \molecule{HSO_4^{-}}
> \molecule{H_2SO_4}
>
> {\bfa A story about \molecule{SF_6}}
> {\scx A story about \molecule{sf_6}}
> {\bsb A story about \molecule{SF_6}}
>
>   
i didt follow this thread, so i may be wrong, but doesn't the ppchtex 
(see manuals) module does that kind of stuff?

Hans


-- 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] framed and align=no

2006-06-29 Thread Hans van der Meer

On Jun 28, 2006, at 17:45, Taco Hoekwater wrote:
>
> Hans van der Meer wrote:
>>
>> I get the impression that although "align=no",  there still is a  
>> \hfil
>> put in at the right.
>
> Yes, but it is an implied fil, from \parfillskip. Because you limited
> the width of the \framed, it is processed in vertical mode, so
> \parfillskip is added to the end of the paragraph.
>
> This should help:
>
>\unprotect
>% for core-spa.tex
>\setvalue{\@@ragged@@command\v!disable}%
>  {\appendtoks \raggedright \parfillskip\zeropoint
>  \to\everyraggedcommand}
>\protect
>
>\starttext
>\framed[width=4cm,align=disable] {\hfil  xyz}
>\stoptext

Thanks. I installed it and it works. Witness the examples below.
Will this be installed in next ConTeXt versions? I would be grateful.
One question of naming:
I think "none" is a better descriptive name then "disable"

\leftaligned{\framed[width=4cm,align=no]{xyz} "no" comes out to the  
left}
\leftaligned{\framed[width=4cm,align=no]{\hfil xyz} "no+hfil" comes  
out in the middle}
\leftaligned{\framed[width=4cm,align=no]{\hfil xyz\hfil} "no+hfil 
+hfil" comes out left of the middle}
\leftaligned{\framed[width=4cm,align=none]{xyz} "none" comes out to  
the left}
\leftaligned{\framed[width=4cm,align=none]{\hfil xyz} "none+hfil"  
comes out to the right}
\leftaligned{\framed[width=4cm,align=none]{\hfil xyz\hfil} "none+hfil 
+hfil" comes out in the middle}

Hans van der Meer



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


Re: [NTG-context] synonyms in combination with table(s)

2006-06-29 Thread Hans Hagen
Bernd Militzer wrote:
> \PID{67}{Rudolph, Joha\={n}e Christiane Friedericke}
>   
\= has a special meaning inside tables, so use \theverboseglyphname instead 

Hans 

 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


[NTG-context] synonyms in combination with table(s)

2006-06-29 Thread Bernd Militzer
Hi all,

using synonyms in combination with table(s) I get an error:


systems : begin file FehlerTableSynonyms at line 40
! Misplaced \omit.
\!ttLongHrule ->\omit
   \span \omit \span \!ttShortHrule
 Rudolph, Joha\=
   {n}e Christiane Friedericke
\doattributes ...sname [EMAIL PROTECTED] \endcsname \fi {#4
   }\dostopattributes
\processsynonym ...nonymstyle \c!synonymcolor {#3}
   \else  
\explicithmode \doat...

\getsynonymmeaning ...meaningtrue \getvalue {#2#3}
   \egroup
l.56 \NC 67\NC \doGetPID{67}
  \NC  Geburt: \getGEB{67}\NC\AR
? ^D
! Emergency stop.
\!ttLongHrule ->\omit
   \span \omit \span \!ttShortHrule
 Rudolph, Joha\=
   {n}e Christiane Friedericke
\doattributes ...sname [EMAIL PROTECTED] \endcsname \fi {#4
   }\dostopattributes
\processsynonym ...nonymstyle \c!synonymcolor {#3}
   \else  
\explicithmode \doat...

\getsynonymmeaning ...meaningtrue \getvalue {#2#3}
   \egroup
l.56 \NC 67\NC \doGetPID{67}
  \NC  Geburt: \getGEB{67}\NC\AR

% testfile:
%
\enableregime[windows]
\mainlanguage[de]
\setupencoding[default=texnansi]

\setuppapersize[a4][a4]
%
%
\definesynonyms[PID][PIDs][\doGetPID]
%
\def\getPID#1{\doGetPID{#1}~(#1)}
\def\getPIDGeb#1{\doGetPID{#1}~(#1) -- Geburt}
\def\getPIDHei#1{\doGetPID{#1}~(#1) -- Heirat}
\def\getPIDTod#1{\doGetPID{#1}~(#1) -- Tod}
%
\def\getGEB#1{\doGetPID{Geb#1}}
\def\getTAU#1{\doGetPID{Tau#1}}
\def\getHEI#1{\doGetPID{Hei#1}}
\def\getTOD#1{\doGetPID{Tod#1}}
\def\getALT#1{\doGetPID{Alt#1}}
%
\PID{8}{Militzer, Hermann Paul}
\PID{Geb8}{14. Juni 1884}
\PID{Tau8}{17. Juni 1884}
\PID{Hei8}{16. August 1910}
\PID{Tod8}{5. Oktober 1962}
\PID{Alt8}{78 Jahre, 3 Monate, 21 Tage}
%
\PID{67}{Rudolph, Joha\={n}e Christiane Friedericke}
\PID{Geb67}{21. Juli 1804}
\PID{Tau67}{22. Juli 1804}
\PID{Hei67}{}
\PID{Tod67}{1. Februar 1880}
\PID{Alt67}{75 Jahre, 6 Monate, 20 Tage}
%
%
%
\starttext
%

Die \getPID{67} ist am \getGEB{67} geboren und am  \getTOD{67}  
gestorben; sie wurde \getALT{67} alt.
\blank[big]
\doGetPID{8} heiratete am \getHEI{8} in Gera.\crlf
\getPID{8} starb im Alter von \getALT{8} am  \getTOD{8} um 23.20\,Uhr  
in M¸nchenbernsdorf.
%
\blank[2*big]
%
\starttable[|r|lp(0.4\textwidth)|lp(0.4\textwidth)|]
\NC PID \NC Person\NC Bemerkung\NC\AR
\HL
\NC 8\NC \doGetPID{8} \NC  Geburt: \getGEB{8}\NC\AR
\HL
\NC\use{3}{~}\NC\AR % Leerzeile
\NC 67\NC \doGetPID{67} \NC  Geburt: \getGEB{67}\NC\AR
\HL
\stoptable

%
\stoptext
%


Thanks for help

Bernd

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


Re: [NTG-context] beta bib module issues

2006-06-29 Thread Taco Hoekwater

Hi,

Taco Hoekwater wrote:
> Johannes Graumann wrote:
> 
>>Hello,
>>
>>The current t-bib beta (t-bib-2006.06.23) available at
>>http://dl.contextgarden.net/modules/t-bib-2006.06.23.zip has a problem:
> 
> I'll fix this an Mojca's problem tomorrow (need a different machine).
> Mojca, can you send me a minimal example with extra spaces please?

I've uploaded a new version to contextgarden. It fixes three bugs:

* fix \type{\normalauthor} and \type{\normalshortauthor} spacing
* do not typeset empty arguments to \type{\typesetapublication}
* add \type{symbol=none} to \type{\setuplist} in unnumbered
   mode to prevent typesetting of bare numbers

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


Re: [NTG-context] textbackground trouble

2006-06-29 Thread Hans Hagen
Aditya Mahajan wrote:
> Hi Hans and Taco,
>
> Something goes wrong when a textbackground occurs right at the page 
> boundary. Please have a look at the attached file (a snippet from an 
> updated copy of Myway on using new math features).
so, what goes wrong here? 


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] small caps italic and font switching inside math

2006-06-29 Thread Taco Hoekwater


Hans Hagen wrote:
> 
> i didt follow this thread, so i may be wrong, but doesn't the ppchtex 
> (see manuals) module does that kind of stuff?

It doesn't retain font styles (at least, I could not make it do that)

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


Re: [NTG-context] extentable arrows

2006-06-29 Thread Hans Hagen
Aditya Mahajan wrote:
>
> I am simply trying to copy from amsmath definition.
>   

better think context -)

\unprotect

\def\mtharrfactor{1}
\def\mtharrextra {0}

\def\domthxarr#1#2#3#4#5#6#7#8%
  {\begingroup
   \def\mtharrfactor{1}%
   \def\mtharrextra {0}%
   \processaction[#1] % will be sped up
 [  \v!none=>\def\mtharrfactor{0},
   \v!small=>\def\mtharrextra{10},
  \v!medium=>\def\mtharrextra{15},
 \v!big=>\def\mtharrextra{20},
  \v!normal=>,
 \v!default=>,
 \v!unknown=>\doifnumberelse{#1}{\def\mtharrextra{#1}}\donothing]%
   \mathsurround\zeropoint
   \muskip0=#4mu \muskip0=\mtharrfactor\muskip0 \advance\muskip0 \mtharrextra mu
   \muskip2=#5mu \muskip2=\mtharrfactor\muskip2 \advance\muskip2 \mtharrextra mu
   \setbox0\hbox{$\scriptstyle
  \if#20\else\mkern#2mu\fi
  \mkern\muskip0\relax
  #8\relax
  \mkern\muskip2\relax
  \if#30\else\mkern#3mu\fi
 $}%
   \setbox4\hbox{#6}%
   \dimen0\wd0
   \ifdim\wd4>\dimen0 \dimen0\wd4 \fi
   \setbox2\hbox{$\scriptstyle
  \if#20\else\mkern#2mu\fi
  \mkern\muskip0\relax
  #7\relax
  \mkern\muskip2\relax
  \if#30\else\mkern#3mu\fi
 $}%
   \ifdim\wd2>\dimen0 \dimen0\wd2 \fi
   \setbox4\hbox to \dimen0{#6}%
   \mathrel{\mathop{%
 \hbox to \dimen0{\hss\copy4\hss}}%
 \limits^{\box0}_{\box2}}
   \endgroup}

% ams:

\def\xrightarrow{\doifnextcharelse[\noxrightarrow\doxrightarrow}
\def\xleftarrow {\doifnextcharelse[\noxleftarrow\doxleftarrow}

\def\doxrightarrow{\dodoublegroupempty\dodoxrightarrow}
\def\doxleftarrow {\dodoublegroupempty\dodoxleftarrow }

\def\noxrightarrow[#1]{\dodoublegroupempty\dodoxrightarrow{#1}}
\def\noxleftarrow [#1]{\dodoublegroupempty\dodoxleftarrow {#1}}

\def\dodoxrightarrow#2#3{\mathrel{{\domthxarr{}0359\rightarrowfill{#1}{#2
\def\dodoxleftarrow #2#3{\mathrel{{\domthxarr{}3095\leftarrowfill {#1}{#2

% context:

\def\xrightarrow  {\dosingleempty\doxrightarrow}
\def\xleftarrow   {\dosingleempty\doxleftarrow}

\def\doxrightarrow[#1]{\dotriplegroupempty\dodoxrightarrow{#1}}
\def\doxleftarrow [#1]{\dotriplegroupempty\dodoxleftarrow {#1}}

\def\dodoxrightarrow#1#2#3{\mathrel{{\domthxarr{#1}0359\rightarrowfill{#2}{#3
\def\dodoxleftarrow #1#2#3{\mathrel{{\domthxarr{#1}3095\leftarrowfill 
{#2}{#3

\starttext

\startformula \xrightarrow{}{stuff on top}\stopformula
\startformula \xrightarrow{stuff below}{}\stopformula
\startformula \xrightarrow{stuff below}{stuff on top}\stopformula

\startformula \xleftarrow [none]{stuff below}{stuff on top}\stopformula
\startformula \xleftarrow [small]{stuff below}{stuff on top}\stopformula
\startformula \xleftarrow [medium]{stuff below}{stuff on top}\stopformula
\startformula \xleftarrow [big]{stuff below}{stuff on top}\stopformula

\stoptext
 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] Still font issues with I-Installer Mac OSX

2006-06-29 Thread Frank
I did some more digging around in my system.

Previously I used Darwinports TeTeX 3.0 which installs in 
/opt/local/

I deinstalled and deleted the old tetex distro, but found a texmf in 
~/Library. I am not sure if this directory was created by the old tetex 
installation or from I-installer.

Would this cause issues with the updater?

Regards,

Frank

On 28-jun-06, at 23:43, Gerben Wierda wrote:

> On Jun 28, 2006, at 18:34, Taco Hoekwater wrote:
>
>> [1.1{/usr/local/teTeX/share/texmf.tetex/fonts/map/dvips/context/
>> original-empty.
>> map}{/usr/local/teTeX/share/texmf.tetex/fonts/map/dvips/context/
>> original-base.m
>> ap}{/usr/local/teTeX/share/texmf.tetex/fonts/map/dvips/context/ec-
>> public-lm.map
>> }{/usr/local/teTeX/share/texmf.tetex/fonts/map/dvips/context/ec-
>> base.map}{/usr/
>> local/teTeX/share/texmf.tetex/fonts/map/dvips/context/8r-base.map}{/
>> usr/local/t
>> eTeX/share/texmf.tetex/fonts/map/dvips/context/qx-base.map}{/usr/
>> local/teTeX/sh
>> are/texmf.tetex/fonts/map/dvips/context/t5-base.map}{/usr/local/teTeX/
>> share/tex
>> mf.tetex/fonts/map/dvips/context/texnansi-base.map}{/usr/local/teTeX/
>> share/texm
>> f.tetex/fonts/map/dvips/context/original-ams-cmr.map}{/usr/local/
>> teTeX/share/te
>> xmf.tetex/fonts/map/dvips/context/original-ams-euler.map}{/usr/local/
>> teTeX/shar
>> e/texmf.tetex/fonts/map/dvips/context/original-public-lm.map}{/usr/
>> local/teTeX/
>> share/texmf.tetex/fonts/map/dvips/context/original-public-plr.map}{/
>> usr/local/t
>> eTeX/share/texmf.tetex/fonts/map/dvips/context/original-public-
>> csr.map}{/usr/lo
>> cal/teTeX/share/texmf.tetex/fonts/map/dvips/context/original-public-
>> vnr.map}{/u
>> sr/local/teTeX/share/texmf.tetex/fonts/map/dvips/context/texnansi-
>> public-lm.map
>>
>>
>> You are using pdftex, so I assume it should load the font map files
>> in "map/pdftex", not in "map/dvips". But I do not know what package
>> supplied those map/dvips font files in the first place, so I cannot
>> help you any further. (that whole folder does not exist on my system)
>
> The ConTeXt updater writes to texmf.local which takes precedence over
> texmf.tetex which contains a very old ConTeXt. It seems you installed
> the TeX i-Package but you did not install the ConTeXt updater.
>
> G
>
> ___
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

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


Re: [NTG-context] extentable arrows

2006-06-29 Thread Hans Hagen
Aditya Mahajan wrote:
>
> The syntax can be made identical (even better) than that of amsmath.
>
> \def\xrightarrow{\dosingleempty\doxrightarrow}
>
> \def\xleftarrow {\dosingleempty\doxleftarrow}
>
> \def\doxrightarrow[#1]{\dodoublegroupempty\dodoxrightarrow{#1}}
>
> \def\doxleftarrow[#1]{\dodoublegroupempty\dodoxleftarrow{#1}}
>
> \def\dodoxrightarrow#1#2{\mathrel
> {{\domthxarr0359\rightarrowfill{#1}{#2
>
> \def\dodoxleftarrow#1#2{\mathrel
> {{\domthxarr3095\leftarrowfill{#1}{#2
>
> \starttext
>   $$
>   A \xrightarrow[]{stuff on top} B
>   $$
>
> $$
> A \xrightarrow[stuff below]{} B
> $$
>
> \startformula
>   A \xleftarrow[stuff below]{stuff on top} B
> \stopformula
>
>   $$
>   A \xleftarrow B
>   $$
> $$
>   \rightarrow A \xrightarrow{stuff on top} B \leftarrow
> $$
>
>
> $$
>   \rightarrow A \xleftarrow[stuff below] B \leftarrow
> $$
>
>   \stoptext
>   
hm, this is not the context way, two equal kind of contents and then one 
of them in [], maybe

\def\xrightarrow{\doifnextcharelse[\noxrightarrow\doxrightarrow}
\def\xleftarrow {\doifnextcharelse[\noxleftarrow\doxleftarrow}

\def\doxrightarrow{\dodoublegroupempty\dodoxrightarrow}
\def\doxleftarrow {\dodoublegroupempty\dodoxleftarrow }

\def\noxrightarrow[#1]{\dodoublegroupempty\dodoxrightarrow{#1}}
\def\noxleftarrow [#1]{\dodoublegroupempty\dodoxleftarrow {#1}}

which accepts

\xrightarrow{x}{y}
\xrightarrow{x}
\xrightarrow{}{y}
\xrightarrow[x]{y}

etc, actyally, we should then also accept

\xrightarrow[x][y]

but more interesting is to use the optional arg for tuning purposes


\if0#1\else\mkern#1mu\fi

test, does a \mkern0mu hurt?

>
> Will make copy paste a bit easier! Though these days I find myself 
> writing more in context and soon will face the reverse problem. I will 
> need to copy context math into latex (needed for final journal 
> submission) and some of the math features are simply missing from 
> latex :)
>   

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] Still font issues with I-Installer Mac OSX

2006-06-29 Thread Frank
I did install the updater. Output from texexec is as follows:

texexec --version

  TeXExec 5.2.4 - ConTeXt / PRAGMA ADE 1997-2005

texexec : TeXExec 5.2.4 - ConTeXt / PRAGMA ADE 1997-2005
texutil : TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004
tex : pdfeTeX, 3.141592-1.30.4-2.2 (Web2C 7.5.5)
context : ver: 2005.01.31
cont-en : ver: 2006.06.09 13:05  fmt: 2006.6.26  mes: 
english
cont-nl : ver: 2006.06.09 13:05  fmt: 2006.6.26  mes: 
dutch

 total run time : 15 seconds


I'm not sure what the meaning is of the context:ver:2005.01.31

Maybe not all of ConTeXt is updated by the updater on my system?

Regards,

Frank
On 28-jun-06, at 23:43, Gerben Wierda wrote:

> On Jun 28, 2006, at 18:34, Taco Hoekwater wrote:
>
>> [1.1{/usr/local/teTeX/share/texmf.tetex/fonts/map/dvips/context/
>> original-empty.
>> map}{/usr/local/teTeX/share/texmf.tetex/fonts/map/dvips/context/
>> original-base.m
>> ap}{/usr/local/teTeX/share/texmf.tetex/fonts/map/dvips/context/ec-
>> public-lm.map
>> }{/usr/local/teTeX/share/texmf.tetex/fonts/map/dvips/context/ec-
>> base.map}{/usr/
>> local/teTeX/share/texmf.tetex/fonts/map/dvips/context/8r-base.map}{/
>> usr/local/t
>> eTeX/share/texmf.tetex/fonts/map/dvips/context/qx-base.map}{/usr/
>> local/teTeX/sh
>> are/texmf.tetex/fonts/map/dvips/context/t5-base.map}{/usr/local/teTeX/
>> share/tex
>> mf.tetex/fonts/map/dvips/context/texnansi-base.map}{/usr/local/teTeX/
>> share/texm
>> f.tetex/fonts/map/dvips/context/original-ams-cmr.map}{/usr/local/
>> teTeX/share/te
>> xmf.tetex/fonts/map/dvips/context/original-ams-euler.map}{/usr/local/
>> teTeX/shar
>> e/texmf.tetex/fonts/map/dvips/context/original-public-lm.map}{/usr/
>> local/teTeX/
>> share/texmf.tetex/fonts/map/dvips/context/original-public-plr.map}{/
>> usr/local/t
>> eTeX/share/texmf.tetex/fonts/map/dvips/context/original-public-
>> csr.map}{/usr/lo
>> cal/teTeX/share/texmf.tetex/fonts/map/dvips/context/original-public-
>> vnr.map}{/u
>> sr/local/teTeX/share/texmf.tetex/fonts/map/dvips/context/texnansi-
>> public-lm.map
>>
>>
>> You are using pdftex, so I assume it should load the font map files
>> in "map/pdftex", not in "map/dvips". But I do not know what package
>> supplied those map/dvips font files in the first place, so I cannot
>> help you any further. (that whole folder does not exist on my system)
>
> The ConTeXt updater writes to texmf.local which takes precedence over
> texmf.tetex which contains a very old ConTeXt. It seems you installed
> the TeX i-Package but you did not install the ConTeXt updater.
>
> G
>
> ___
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

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


Re: [NTG-context] \bTABLE[distance=...]

2006-06-29 Thread Taco Hoekwater


Peter Münster wrote:
> Hello,
> 
> when using \bTABLE[distance=...], the table gets wider than the textwidth.

> 
> A workaround seems to be textwidth=\dimexpr\textwidth-3em\relax
> Could this be done automatically?

I expect it can (and should) be. Stuff sticking out in the margin
is always bad ;-)

Taco

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


Re: [NTG-context] active unicode characters

2006-06-29 Thread Hans Hagen
Mojca Miklavec wrote:
> On 6/28/06, Peter M�nster wrote:
>   
>> On Tue, 27 Jun 2006, Mojca Miklavec wrote:
>>
>> 
 With iso-latin I could do "\defineactivecharacter X {special meaning}" but
 with utf-encoding, this does not work. And I would like to switch to utf...
 
>>> You can do that with XeTeX (see some comments on
>>> http://wiki.contextgarden.net/Encodings_and_Regimes_in_XeTeX; it might
>>> be that some macros should be extended to support the same command in
>>> ConTeXt to work properly - I didn't test it yet).
>>>   
>> Yes, perhaps XeTeX is an alternative for pdfTeX. Does it support all the
>> pdf-interaction features
>> 
>
> Partly
>   
since dvipdfmx supports them, most features are supported (not the position 
related ones since dvipos is not yet adapted to the extended dvi format) 

Hans 


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

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


Re: [NTG-context] extentable arrows

2006-06-29 Thread Taco Hoekwater


Aditya Mahajan wrote:
> On Wed, 28 Jun 2006, Taco Hoekwater wrote:
> 
> 
>>Aditya Mahajan wrote:
>>
>>>\xrightarrow{big superscipt}
>>>
>>>Any suggestions?
>>
>>
>>Not completely identical, but similar.
> 
> 
> The syntax can be made identical (even better) than that of amsmath.

Perhaps it syntax should be identical to amsmath: no brackets
and two required arguments. It is what is expected anyway.

  \def\xrightarrow#1#2{\mathrel
  {{\domthxarr0359\rightarrowfill{#1}{#2

I assume amsmath has a few others as well, for double arrows and such.
Can you post those defs as well? Then we can move the whole definition
into math-ext.tex for the new release

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


Re: [NTG-context] small caps italic and font switching inside math

2006-06-29 Thread Taco Hoekwater

Sorry, messed up something. New version followws:

\newbox\chemlowbox
\def\chemlow#1%
   {\setbox\chemlowbox\hbox{{\switchtobodyfont[small]#1}}}

\def\chemhigh#1%
   {\ifvoid\chemlowbox \high{{\switchtobodyfont[small]#1}}%
\else \lohi[left]{\box\chemlowbox}{{\switchtobodyfont[small]#1}}\fi }

\def\finishchem{\ifvoid\chemlowbox \else \low{\box\chemlowbox}\fi}

\unexpanded\def\molecule%
   {\bgroup
\catcode`\_=\active \uccode`\~=`\_ \uppercase{\let~\chemlow}%
\catcode`\^=\active \uccode`\~=`\^ \uppercase{\let~\chemhigh}%
\dostepwiserecurse {65}{90}{1}
   {\catcode \recurselevel = \active
\uccode`\~=\recurselevel
\uppercase{\edef~{\noexpand\finishchem 
\rawcharacter{\recurselevel%
\catcode`\-=\active \uccode`\~=`\- \uppercase{\def~{--}}%
\domolecule }%

\def\domolecule#1{#1\finishchem\egroup}

\starttext
{\bf A test \variant[Caps] in small caps}

\molecule{HSO_4^{-}}
\molecule{H_2SO_4}

{\bfa A story about \molecule{SF_6}}
{\scx A story about \molecule{sf_6}}
{\bsb A story about \molecule{SF_6}}


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


Re: [NTG-context] small caps italic and font switching inside math

2006-06-29 Thread Taco Hoekwater
Mojca Miklavec wrote:
>>
>>It only gets the size right, not the boldnes. But it can be argued
>>that that is the correct behaviour anyways.
> 
> Not so long ago you argued that \alpha-sheet, \beta-helix,
> \gamma-rays, ... should  be part of text flow (a reason why the el
> companion encoding should have it), not a "mathematical thing". I have
> a lot of simple formulas such as \molecule{SF_6} and they look
> a-kind-of-ugly with a tiny script.

So you noticed I was trying to weasly out of something, did you? ;-)

Taco

% The next macro only works as long as you code the subscripts
% before the superscripts!

\newbox\chemlowbox

\def\chemlow#1%
   {\setbox\chemlowbox\hbox{{\switchtobodyfont[small]#1}}}

\def\chemhigh#1%
   {\ifvoid\chemlowbox \high{{\switchtobodyfont[small]#1}}%
\else \lohi[left]{\box\chemlowbox}{{\switchtobodyfont[small]#1}}\fi }

\def\finishchem{\ifvoid\chemlowbox \else \low{\box\chemlowbox}\fi}

\unexpanded\def\molecule%
   {\bgroup
\catcode`\_=\active \uccode`\~=`\_ \uppercase{\let~\chemlow}%
\catcode`\^=\active \uccode`\~=`\^ \uppercase{\let~\chemhigh}%
\dostepwiserecurse {65}{90}{1}
   {\catcode \recurselevel = \active
\uccode`\~=\recurselevel
\uppercase{\edef~{\finishchem \rawcharacter{\recurselevel%
\catcode`\-=\active \uccode`\~=`\- \uppercase{\def~{--}}%
\loggingall
\domolecule }%

\def\domolecule#1{#1\finishchem\egroup}

\starttext

\molecule{HSO_4^{-}}

{\bfa A story about \molecule{SF_6}}
{\scx A story about \molecule{SF_6}}
{\bsb A story about \molecule{SF_6}}


\stoptext


> You could compare it to {\bf How to loose a guy in $10$ days}.
> 
> I have a strange feeling that handling fonts in math is rather
> limited, but no knowledge how to fix anything (just remembering that I
> still don't know how to properly switch to bold math with some other
> fancy font except with dirty tricks).
> 
> I guess that it should be possible to remember the font before
> switching to math and then switch to that font again, but that's all
> black magic for me. A site on ConTeXt garden solves that for titles in
> such a way that there's an additional command provided which also
> appends bold to all the mathematics in titles, but that's useful for
> titles only.
> 
> Mojca
> ___
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

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


Re: [NTG-context] small caps italic and font switching inside math

2006-06-29 Thread Taco Hoekwater
Aditya Mahajan wrote:
> Maybe what is needed is a \beforemathswitch token set. Then one could 
> do
> 
> \appendtoks \boldmath to \beforemathswitch

Already present: \everymathematics



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