[NTG-context] chinese labels

2006-03-16 Thread Lutz Haseloff
Hi Hans, Hi all,

I would like to typeset chinese labels with metapost.
My code is:

-
\starttext
\startMPpage
verbatimtex
\enableregime[utf]
\usemodule[chi-00]
etex;
label(btex ? etex,(0,0));
\stopMPpage
\stoptext
-

It results in the errormessage:

! Argument of \dodoubletestempty has an extra }.

\par

   }
\doifnextcharelse ...token =#1\def \!!stringa {#2}
  \def \!!stringb
{#3}\futur...
 ...mtex \enableregime [utf] \usemodule
  [chi-00] etex; label(btex
...

\writecheckedMPgraphic ...icfalse \edef \ascii {#1
  }\convertcommand \ascii
\t...

\startMPgraphic ...hic \writecheckedMPgraphic {#1}
  \stopwritingMPgraphic
...
l.8 \stopMPpage

?

Thanks for any help

Lutz


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


[NTG-context] display math overcrowded with $$..$$

2006-03-16 Thread Sanjoy Mahajan
The following file produces a overcrowded displayed formula (the
integral sign almost touches the line of text below it):

\starttext
$$\ln(1+x)=\int_1^{1+x}{dt\over t}$$ is very useful.
The logarithm is the area of regions A and B.
\stoptext

But if I use \startformula..\stopformula instead of $$..$$, then the
spacing is fine.  I make the pdf file with 'texexec --pdf try.tex' and
see the problem on my laptop (Debian testing/unstable i386, teTeX
3.0-14 + cm-super font package):

   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.21a-2.2 (Web2C 7.5.4)
   context : ver: 2005.01.31
   cont-en : ver: 2005.01.31  fmt: 2006.2.18  mes: english

I thought a conTeXt upgrade might fix it, but I haven't (yet!) won the
battle with teTeX and map and encoding files.  However, the live ConTeXt
(2006.02.15) on the Wiki displays, no pun intended, the same spacing
problem.

Should I not use $$..$$ for display math?  I'm learning context as I
convert my plain tex + eplain files.  The Wiki page on Math
 says that context inherits its math
from plain TeX, which implies that $$ should work.  However, no examples
on the page use $$, so maybe I shouldn't be so presumptuous.

Although I'd like $$..$$ and \startformula..\stopformula to be
equivalent, I can write a script to convert plain TeX $$..$$
constructions to \{start,stop}formula

-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] pretty typesetting for matlab files

2006-03-16 Thread Aditya Mahajan

<--- On Mar 16, Taco Hoekwater wrote --->


Aditya Mahajan wrote:

That may sound like a very daunting task, but it is not as hard as you
may think, just something to be done meticulously. The verb-
definitions are rather straightforward state engines that use character
codes as command tokens.


Is this documented somewhere?


I don't know. If anybody else knows, please tell me. If not, I'll jot
down some stuff.


Actually the explaination in verb-ini.tex is pretty good. I had 
somehow missed reading it earlier. I vaguely understand how the whole 
mechanism is working and managed to obtain a partial 
solution (attached). I have a deadline for submission and right now 
this will have to do. The only features missing are identifying line 
and block comments and a meachism to add tex markup in comments. I 
need to understand verb-jv/js more clearly to incorporate these 
changes.


Thanks,
Aditya



--
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008\unprotect

\ifx\undefined\setupprettyPLtype \input verb-pl \relax \fi

\gdef\MATLABsetspecials%
  {\PLsetspecials
  \setpretty`\'=41
  \setpretty`\.=41
  \setpretty`\#=21
  \setpretty`\%=0
  \setpretty`\,=21
  \setpretty`\;=21
  \setpretty`\:=21
  }

\gdef\MATLABsethandlers%
  {\PLsethandlers}

\gdef\MATLABsetcontrols%
  {\PLsetcontrols}

\gdef\MATLABsetvariables
  {\PLsetvariables}


\gdef\setupprettyMATLABtype%
  {\def\prettyidentifier{MATLAB}%
   \let\PLidentifiers=\MATLABidentifiers
   \let\PLvariables=\MATLABvariables
   \MATLABsetvariables
   \MATLABsetcontrols
   \MATLABsethandlers
   \MATLABsetspecials}

\useprettyidentifiers \MATLABidentifiers \MATLABsetspecials
  function return case if else elseif do for while end

\useprettyidentifiers \MATLABvariables \MATLABsetspecials
  gt lt gt lt amp abs acos acosh acot acoth acsc acsch 
  all angle ans any asec asech asin asinh atan atan2 atanh auread 
  auwrite axes axis balance bar bessel besselk bessely beta 
  betainc betaln blanks bone break brighten capture cart2pol 
  cart2sph caxis cd cdf2rdf cedit ceil chol cla clabel clc clear 
  clf clock close colmmd Colon colorbar colormap ColorSpec colperm 
  comet comet3 compan compass computer cond condest conj contour 
  contour3 contourc contrast conv conv2 cool copper corrcoef cos 
  cosh cot coth cov cplxpair cputime cross csc csch csvread 
  csvwrite cumprod cumsum cylinder date dbclear dbcont dbdown 
  dbquit dbstack dbstatus dbstep dbstop dbtype dbup ddeadv ddeexec 
  ddeinit ddepoke ddereq ddeterm ddeunadv deblank dec2hex deconv 
  del2 delete demo det diag diary diff diffuse dir disp dlmread 
  dlmwrite dmperm dot drawnow echo eig ellipj ellipke 
  engClose engEvalString engGetFull engGetMatrix engOpen 
  engOutputBuffer engPutFull engPutMatrix engSetEvalCallback 
  engSetEvalTimeout engWinInit eps erf erfc erfcx erfinv error 
  errorbar etime etree eval exist exp expint expm expo eye fclose 
  feather feof ferror feval fft fft2 fftshift fgetl fgets figure 
  fill fill3 filter filter2 find findstr finite fix flag fliplr 
  flipud floor flops fmin fmins fopen format fplot fprintf 
  fread frewind fscanf fseek ftell full funm fwrite fzero 
  gallery gamma gammainc gammaln gca gcd gcf gco get getenv 
  getframe ginput global gplot gradient gray graymon grid griddata 
  gtext hadamard hankel help hess hex2dec hex2num hidden hilb hist 
  hold home hostid hot hsv hsv2rgb ifft ifft2 imag image 
  imagesc Inf info input int2str interp1 interp2 interpft inv 
  invhilb isempty isglobal ishold isieee isinf isletter isnan 
  isreal isspace issparse isstr jet keyboard kron lasterr lcm 
  legend legendre length lin2mu line linspace load log log10 log2 
  loglog logm logspace lookfor lower ls lscov lu magic matClose 
  matDeleteMatrix matGetDir matGetFp matGetFull matGetMatrix 
  matGetNextMatrix matGetString matlabrc matlabroot matOpen 
  matPutFull matPutMatrix matPutString max mean median menu mesh 
  meshc meshgrid meshz mexAtExit mexCallMATLAB mexdebug 
  mexErrMsgTxt mexEvalString mexFunction mexGetFull mexGetMatrix 
  mexGetMatrixPtr mexPrintf mexPutFull mexPutMatrix mexSetTrapFlag 
  min more movie moviein mu2lin mxCalloc mxCopyCharacterToPtr 
  mxCopyComplex16ToPtr mxCopyInteger4ToPtr mxCopyPtrToCharacter 
  mxCopyPtrToComplex16 mxCopyPtrToInteger4 mxCopyPtrToReal8 
  mxCopyReal8ToPtr mxCreateFull mxCreateSparse mxCreateString 
  mxFree mxFreeMatrix mxGetIr mxGetJc mxGetM mxGetN mxGetName 
  mxGetNzmax mxGetPi mxGetPr mxGetScalar mxGetString mxIsComplex 
  mxIsFull mxIsNumeric mxIsSparse mxIsString mxIsTypeDouble 
  mxSetIr mxSetJc mxSetM mxSetN mxSetName mxSetNzmax mxSetPi mxSetPr NaN 
  nargchk nargin nargout nchoosek newplot nextpow2 nnls nnz nonzeros norm 
  normest null num2str nzmax ode23 ode45 orient orth pack pascal patch path 
  pause pcolor pi pink pinv plot plot3 pol2cart polar poly polyder polyeig 
  polyfit polyval polyvalm pow2 print printopt prism prod pwd qr qrdelete 
  qrinsert quad

Re: [NTG-context] Multi-page tables

2006-03-16 Thread Randall Skelton
Just curious if anyone has any suggestions on the request below.  I've searched the list archives and found similar questions but, unfortunately, no answers.  The tables are going in an appendix of work and generally span 5-10 pages... clever (or ugly) hacks greatly appreciated!
Cheers,RandallOn 3/8/06, Randall Skelton <[EMAIL PROTECTED]> wrote:
Hi all,I'm having a bit of trouble getting multiple page tables to work whenalso using \placetable for captions.  Essentially, I want:  (1) Captions and the ability to reference with \in[].  (2) Alignment within a cell at a decimal point.
  (3) Span multiple pages with header/footer.I think I would prefer to use the standard 'TABLES' method but itlooks like item 2 is only supported in natural tables?Below are two examples.  I don't get page breaks in either case and
the table runs off the bottom of pages 2 and 3.Thanks,Randall\definepapersize  [width=8.5in,   height=11in]\setupcaption[table]  [location=top]\starttext\section{Testing}
This is a table test.\placetable[page][tbl:sample]  {Sample table caption goes here}  {\start   \switchtobodyfont[small]   \starttablehead   \HL   \VL command  \NC meaning  \NC $\lambda$ (deg.) \VL\SR
   \HL   \stoptablehead   \starttabletail   \HL   \stoptabletail   \starttables[|c|l|c|]   \VL \tex{NC}\NC next column \NC1.15 \VL\FR   \VL \tex{HL}\NC horizontal line \NC   
10.20 \VL\MR   \VL \tex{VL}\NC vertical line   \NC  -14.30 \VL\MR   \VL \tex{NR}\NC next row\NC -100.00 \VL\MR   \VL \tex{SR}\NC single row  \NC2.35 \VL\MR   \VL \tex{FR}\NC first row   \NC  
159.00 \VL\MR   \VL \tex{MR}\NC middle row  \NC   -1.00 \VL\MR   \VL \tex{LR}\NC last row\NCnr   \VL\MR   \VL \tex{NC}\NC next column \NC1.15 \VL\MR   \VL \tex{HL}\NC horizontal line \NC   
10.20 \VL\MR   \VL \tex{VL}\NC vertical line   \NC  -14.30 \VL\MR   \VL \tex{NR}\NC next row\NC -100.00 \VL\MR   \VL \tex{SR}\NC single row  \NC2.35 \VL\MR   \VL \tex{FR}\NC first row   \NC  
159.00 \VL\MR   \VL \tex{MR}\NC middle row  \NC   -1.00 \VL\MR   \VL \tex{LR}\NC last row\NCnr   \VL\MR   \VL \tex{NC}\NC next column \NC1.15 \VL\MR   \VL \tex{HL}\NC horizontal line \NC   
10.20 \VL\MR   \VL \tex{VL}\NC vertical line   \NC  -14.30 \VL\MR   \VL \tex{NR}\NC next row\NC -100.00 \VL\MR   \VL \tex{SR}\NC single row  \NC2.35 \VL\MR   \VL \tex{FR}\NC first row   \NC  
159.00 \VL\MR   \VL \tex{MR}\NC middle row  \NC   -1.00 \VL\MR   \VL \tex{LR}\NC last row\NCnr   \VL\MR   \VL \tex{NC}\NC next column \NC1.15 \VL\MR   \VL \tex{HL}\NC horizontal line \NC   
10.20 \VL\MR   \VL \tex{VL}\NC vertical line   \NC  -14.30 \VL\MR   \VL \tex{NR}\NC next row\NC -100.00 \VL\MR   \VL \tex{SR}\NC single row  \NC2.35 \VL\MR   \VL \tex{FR}\NC first row   \NC  
159.00 \VL\MR   \VL \tex{MR}\NC middle row  \NC   -1.00 \VL\MR   \VL \tex{LR}\NC last row\NCnr   \VL\MR   \VL \tex{NC}\NC next column \NC1.15 \VL\MR   \VL \tex{HL}\NC horizontal line \NC   
10.20 \VL\MR   \VL \tex{VL}\NC vertical line   \NC  -14.30 \VL\MR   \VL \tex{NR}\NC next row\NC -100.00 \VL\MR   \VL \tex{SR}\NC single row  \NC2.35 \VL\MR   \VL \tex{FR}\NC first row   \NC  
159.00 \VL\MR   \VL \tex{MR}\NC middle row  \NC   -1.00 \VL\MR   \VL \tex{LR}\NC last row\NCnr   \VL\MR   \VL \tex{NC}\NC next column \NC1.15 \VL\MR   \VL \tex{HL}\NC horizontal line \NC   
10.20 \VL\MR   \VL \tex{VL}\NC vertical line   \NC  -14.30 \VL\MR   \VL \tex{NR}\NC next row\NC -100.00 \VL\MR   \VL \tex{SR}\NC single row  \NC2.35 \VL\MR   \VL \tex{FR}\NC first row   \NC  
159.00 \VL\MR   \VL \tex{MR}\NC middle row  \NC   -1.00 \VL\MR   \VL \tex{LR}\NC last row\NCnr   \VL\LR   \stoptables   \stop}\section{Natural Testing}This is a natural table test.
\placetable[page][tbl:naturalSample]  {Sample table caption goes here}  {\start   \switchtobodyfont[small]   \bTABLE[split=repeat,   splitmethod=a]  % Outside border  \setupTABLE[frame=off]
  \setupTABLE[column][first][leftframe=on]  \setupTABLE[column][last][rightframe=on]  \setupTABLE[row][first][topframe=on]  \setupTABLE[row][last][bottomframe=on]  % Heading line bottom rule
  \setupTABLE[row][first][bottomframe=on]  % Alignment  \setupTABLE[column][1][width=2.5cm,align=middle]  \setupTABLE[column][2][width=2.5cm,align=right]  \setupTABLE[column][3][width=
2.5cm,alignmentcharacter={.},aligncharacter=yes,align=middle]  % Header  \bTABLEhead\bTR\bTD command \eTD\bTD meaning \eTD\bTD $\lambda$ (deg.) \eTD\eTR  \eTABLEhead  % Body
  \bTABLEbody\bTR\bTD \tex{NC}\eTD\bTD next column \eT

Re: [NTG-context] \page inside a block

2006-03-16 Thread frantisek holop
so,

lo and behold, a beginner \TeX{}er's "solution":

---%<-
\defineparagraphs
  [poem][n=2]
\setupparagraphs
  [poem][1][width=.35\textwidth]
\setupparagraphs
  [poem][2][rule=on]

\def\StartPoem#1{%
  \startpoem
  \ifx#1\undefined\else\section{#1}\fi
  \poem\startlines}
\def\StopPoem{%
  \stoplines\stoppoem\page}
\def\PoemPage{%
  \StopPoem
  \StartPoem{}}

\starttext

\StartPoem{poem1}
line 1
line 2
\StopPoem

\StartPoem{poem2}
line 1
line 2
\PoemPage
line 3
line 4
\StopPoem

\stoptext
---%<-

as the poems are quite static, and in this case it is
actually better if i can "cut" the page at a convinient
point, i think this is an easier "hack"
(at the moment for me definitely) :))

and it also takes care of the \startlines \stoplines
i asked about earlier.  not that Taco's solution
did not work, but this is much more primitive,
and so better at the moment.


i have another question.  how can i modify how the "rule"
will look like?  the closest thing i have found in the
manual was \setupmarginrules but \setupmarginrules[thickness=5]
did nothing.


thanks to everyone for pointing out where the manual sources are.

-f
-- 
a fool searches for a greater fool to find admiration.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \page inside a block

2006-03-16 Thread Thomas A. Schmitz

On Mar 16, 2006, at 10:50 PM, frantisek holop wrote:

> i think it would certainly help heaps if the manual source was
> released, just like the \TeXbook's...  at least the old manual's
> sources...
>

It is, in fact: have a look at http://context.aanhet.net/svn/ and  
enjoy...

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


Re: [NTG-context] typing and linenumbering

2006-03-16 Thread Hans Hagen
nico wrote:
> On Thu, 16 Mar 2006 10:02:46 +0100, Taco Hoekwater <[EMAIL PROTECTED]>  
> wrote:
>
>   
>>> The output is pretty as I wish, but unfortunately the line numbers are
>>> *not* the numbers of the listing lines, but the numbers of the lines  
>>> once
>>> wrapped in the frame. [...]
>>>   
>> I've tried this with a "method" trick, but that does not work too well
>> with 'location=intext'. Anyway, here is what I did:
>>
>> \setuptyping[prog]
>>   [bodyfont=small,
>>before={\begingroup\setuplinenumbering[style=small,%
>>step=2,start=3,location=inmargin,method=type]
>>\startframelisting \obeylines
>>
>>\startlinenumbering},
>>after={\stoplinenumbering\stopframelisting\endgroup}]
>> 
>
> Ah, yes, the method=type option helps much. The behaviour is quite strange  
> with intext. Is it an official option?
>
>   
>>> The other side effect of the method used is that it changes
>>> the linenumbering behaviour outside the typing environment. I tried the
>>> "reset" option, but it doesn't change the intext location. Is there a
>>> possibility to come back to default settings?
>>>   
>> The setup obeys normal grouping rules (hence the \begingroup ...
>> \endgroup in the code above)
>> 
>
> Yes, right. Thanks much for your help.
>   
actually, this verbatim specific numbering is not hooked into the typing 
environments (only in the typefile stuff); so what you observe are side 
effects

i'll send you a test patch off list (and to taco because we need to 
trace a spurious space)

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] \page inside a block

2006-03-16 Thread Aditya Mahajan
On Thu, 16 Mar 2006, frantisek holop wrote:
> my biggest problem with starting context is the lack of examples.
> it is not hard to find .tex files for latex, but context is different...
>
> i think it would certainly help heaps if the manual source was
> released, just like the \TeXbook's...  at least the old manual's
> sources...
>
> i think i have read something about this issue, but i don't remember
> where or when :)

You can check out the manual sources from the svn respository 
svn://ctx.pragma-ade.nl/manuals

If you prefer to browse them online they are available at
http://context.aanhet.net/svn/

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


Re: [NTG-context] \page inside a block

2006-03-16 Thread frantisek holop

black magic, all of it!  i tell you! :)))

well, Hans, i guess your middle name is \T for \TeX :)


> > when the poem gets long, i need to start a new page obviously.
> > but page is not working.  what am i missing here?
> >   
> that it's unbreakable stuff (vbox)

> > also, using \page is one thing, good for me, so i could tell,
> > flush the page right here, but i thought i'll get an automatic
> > pagebreak when the text gets to the bottom
> >   
> actually, this is a rather complex situation; one could use a tabulate

i myself had this feeling that the columns will not behave
if longer than a page.  but i had my fingers crossed, because
they are set up as "paragraphs" (\setupparagraphs), and paragraphs
don't have problems with page break, do they?

but after sending the mail, it just occured to me, that in this
special case, poems, static text, don't need much flexibility or
automagic, so doing a

\startpoem
\section{poem}
\poem\startlines
line 1
line 2
\stoplines\stoppoem

\page\startpoem
\poem\startlines
line 3
line 4
\stoplines\stoppoem
\stoptext

does exactly what i want :)))




nevertheless what you just did there was very impressive
i will study it in details, but i am not a great tex master.
i'd like to do context/books for a living, but until it's
only a hobby, it just needs too much effort learning all
the stuff, and to "keep in shape".


my biggest problem with starting context is the lack of examples.
it is not hard to find .tex files for latex, but context is different...

i think it would certainly help heaps if the manual source was
released, just like the \TeXbook's...  at least the old manual's
sources...

i think i have read something about this issue, but i don't remember
where or when :)

i know it must be an awful lot of work to make impressive manuals like
that, but they are not sold commercionally, are they?  is it not the
aim to make context more widespread?  so when we post a question here
about a silly layout problem, hundreds and hundreds of people would
answer :)))

i will certainly try to put more examples into the wiki, after i
understand them :)

-f
-- 
one family builds a wall, two families enjoy it.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] typing and linenumbering

2006-03-16 Thread nico
On Thu, 16 Mar 2006 10:02:46 +0100, Taco Hoekwater <[EMAIL PROTECTED]>  
wrote:

>> The output is pretty as I wish, but unfortunately the line numbers are
>> *not* the numbers of the listing lines, but the numbers of the lines  
>> once
>> wrapped in the frame. [...]
>
> I've tried this with a "method" trick, but that does not work too well
> with 'location=intext'. Anyway, here is what I did:
>
> \setuptyping[prog]
>   [bodyfont=small,
>before={\begingroup\setuplinenumbering[style=small,%
>step=2,start=3,location=inmargin,method=type]
>\startframelisting \obeylines
>
>\startlinenumbering},
>after={\stoplinenumbering\stopframelisting\endgroup}]

Ah, yes, the method=type option helps much. The behaviour is quite strange  
with intext. Is it an official option?

>> The other side effect of the method used is that it changes
>> the linenumbering behaviour outside the typing environment. I tried the
>> "reset" option, but it doesn't change the intext location. Is there a
>> possibility to come back to default settings?
>
> The setup obeys normal grouping rules (hence the \begingroup ...
> \endgroup in the code above)

Yes, right. Thanks much for your help.

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


Re: [NTG-context] Problem with typescripts - oldstyle numbers

2006-03-16 Thread Hans Hagen
Thomas A. Schmitz wrote:
> I just realized the pattern in a somewhat unexpected behavior in a  
> typescript. It defines several instances of Adobe Caslon (with or  
> without certain ligatures, oldstyle, proportional numbers etc.). I  
> want typewriter and math from Latin Modern. In the end, the typefaces  
> are defined:
>
>
> \starttypescript [Caslonpnum]
>\definetypeface [MyCaslonpnum] [rm] [serif] [caslonpnum] [default]  
> [encoding=\typescripttwo]
>\definetypeface [MyCaslonpnum] [tt] [mono] [modern] [default]  
> [encoding=\typescripttwo]
> \stoptypescript
>
> Here's the catch: as soon as I add a definition for a math font:
>
>\definetypeface [MyCaslonpnum] [mm] [math] [modern] [default] 
> [encoding=\typescripttwo]
>
> oldstyle figures will always be taken from the math font. If I delete  
> this line from the typescript, I get the oldstyle figures from the  
> font defined as [OldStyle]. Looks like a bug to me. Or am I  
> misunderstanding something?
>   
there are several definitions:

\def\os  {\mathortext{\fam\purefamily{oldstyle}}{\symbolicfont
{OldStyle}}}

\definefontsynonym [OldStyle] [Serif]

and in the cmr synonyms OldStyle comes from a math font 

when i need oldstyles, i just define an oldstyle typeface, eg with optima nova 
(type-ghz.tex): 

\starttypescript [sans] [optima-nova-os] [name]

  \definefontsynonym [Sans][OptimaNovaLT-RegularOsF]
  \definefontsynonym [SansItalic]  [OptimaNovaLT-ItalicOsF]
  \definefontsynonym [SansBold][OptimaNovaLT-BoldOsF]
  \definefontsynonym [SansBoldItalic]  [OptimaNovaLT-BoldItalicOsF]
  \definefontsynonym [SansSlanted] [OptimaNovaLT-ItalicOsF]
  \definefontsynonym [SansBoldSlanted] [OptimaNovaLT-BoldItalicOsF]
  \definefontsynonym [SansCaps][OptimaNovaLT-RegularSC]

\stoptypescript

\definetypeface[optima][ss][sans][optima-nova][default][encoding=texnansi]
\definetypeface[osoptima][ss][sans][optima-nova-os][default][encoding=texnansi]

so i do a complete switch from \optima to \osoptima when needed 

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] how to produce text with facing translation?

2006-03-16 Thread Hans Hagen
Thomas A. Schmitz wrote:
> Hans,
>
> can I remind you of our discussion about balancing even-odd pages for  
> bilingual editions etc.? I'd be extremely grateful to have that  
> functionality.
>   
hm, you're persistent ... 

it all depends on to what extend you want to pose some restrictions to your 
input but i assume it's just text; such things normally need different 
soluitions for different situations, so we can best implement a couple of 
methods; i'll send you one to play with 

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] Problem with typescripts - oldstyle numbers

2006-03-16 Thread Thomas A. Schmitz
I just realized the pattern in a somewhat unexpected behavior in a  
typescript. It defines several instances of Adobe Caslon (with or  
without certain ligatures, oldstyle, proportional numbers etc.). I  
want typewriter and math from Latin Modern. In the end, the typefaces  
are defined:


\starttypescript [Caslonpnum]
   \definetypeface [MyCaslonpnum] [rm] [serif] [caslonpnum] [default]  
[encoding=\typescripttwo]
   \definetypeface [MyCaslonpnum] [tt] [mono] [modern] [default]  
[encoding=\typescripttwo]
\stoptypescript

Here's the catch: as soon as I add a definition for a math font:

   \definetypeface [MyCaslonpnum] [mm] [math] [modern] [default] 
[encoding=\typescripttwo]

oldstyle figures will always be taken from the math font. If I delete  
this line from the typescript, I get the oldstyle figures from the  
font defined as [OldStyle]. Looks like a bug to me. Or am I  
misunderstanding something?

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


Re: [NTG-context] Colors and images Context

2006-03-16 Thread luigi scarso
> normally an unscaled  cmyk jpeg of medium compression quality is ok (a
> 24 meg tiff graphic is not per definition better than a 4 meg jpeg image)
>
> Hans

Thanks
 Also in pdftex mailing list, thread "Best bitmap image format?"
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] TL2005 perl problems [was: Re: Struggling with Old Style numerals!]

2006-03-16 Thread Hans Hagen
Adam Lindsay wrote:
> G.C.H.M. Verhaag wrote:
>   
>> I've removed that one and installed TeXLive 2005! I was afraid of other 
>> problems, and indeed that's exactly what happened.
>> ...
>> The Perl script texexec doesn't launch!! I get the following Perl error 
>> message:
>>
>> Can't locate Digest/MD5.pm in @INC (@INC contains: 
>> /usr/local/lib/perl/5.6.1 /usr/local/share/perl/5.6.1 /usr/lib/perl5 
>> /usr/share/perl5 /usr/lib/perl/5.6.1 /usr/share/perl/5.6.1 
>> /usr/local/lib/site_perl .) at 
>> /usr/local/texlive/2005/texmf-dist/scripts/context/perl/texexec.pl line 54.
>> BEGIN failed--compilation aborted at 
>> /usr/local/texlive/2005/texmf-dist/scripts/context/perl/texexec.pl line 54.
>>
>> This missing MD5.pm is present in the directory: 
>> /usr/local/texlive/2005/xemtex/perl/lib
>>
>> So what should be my next move?
>> 
>
> I don't use TeXLive anymore, so I don't know. Sounds like a problem 
> someone on the list has encountered, though!
>   
normally this points to a conflict between an installed perl and one in 
tex live (the windows version ships with a perl dll);

- if you have installed perl, remove the instance in tex live
- updating your installed perl may also help

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] TL2005 perl problems [was: Re: Struggling with Old Style numerals!]

2006-03-16 Thread Adam Lindsay
G.C.H.M. Verhaag wrote:
> I've removed that one and installed TeXLive 2005! I was afraid of other 
> problems, and indeed that's exactly what happened.
>...
> The Perl script texexec doesn't launch!! I get the following Perl error 
> message:
> 
> Can't locate Digest/MD5.pm in @INC (@INC contains: 
> /usr/local/lib/perl/5.6.1 /usr/local/share/perl/5.6.1 /usr/lib/perl5 
> /usr/share/perl5 /usr/lib/perl/5.6.1 /usr/share/perl/5.6.1 
> /usr/local/lib/site_perl .) at 
> /usr/local/texlive/2005/texmf-dist/scripts/context/perl/texexec.pl line 54.
> BEGIN failed--compilation aborted at 
> /usr/local/texlive/2005/texmf-dist/scripts/context/perl/texexec.pl line 54.
> 
> This missing MD5.pm is present in the directory: 
> /usr/local/texlive/2005/xemtex/perl/lib
> 
> So what should be my next move?

I don't use TeXLive anymore, so I don't know. Sounds like a problem 
someone on the list has encountered, though!
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  Adam T. Lindsay, Computing Dept. [EMAIL PROTECTED]
  Lancaster University, InfoLab21+44(0)1524/510.514
  Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

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


Re: [NTG-context] how to produce text with facing translation?

2006-03-16 Thread Thomas A. Schmitz
Hans,

can I remind you of our discussion about balancing even-odd pages for  
bilingual editions etc.? I'd be extremely grateful to have that  
functionality.

All best

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


Re: [NTG-context] Colors and images Context

2006-03-16 Thread Hans Hagen
luigi scarso wrote:
> 2 questions for colors
> 1) Does ConTeXt offer complete color gestion as pdf spec 1.6  or there
> are some features not implemented ?
>   
what do you need ... process- and spotcolors are implemented, as are 
duotones; transparency has been around for years now.

> 2)  Preparing a pdf with bitmap colored images for offset press (ie
> covers for manuals): are png or jpeg an optimal solution or tiff is
> better ? RGB or CMYK ?
>   
normally an unscaled  cmyk jpeg of medium compression quality is ok (a 
24 meg tiff graphic is not per definition better than a 4 meg jpeg image)

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] Colors and images Context

2006-03-16 Thread luigi scarso
2 questions for colors
1) Does ConTeXt offer complete color gestion as pdf spec 1.6  or there
are some features not implemented ?
2)  Preparing a pdf with bitmap colored images for offset press (ie
covers for manuals): are png or jpeg an optimal solution or tiff is
better ? RGB or CMYK ?

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


[NTG-context] new version of the bib module released

2006-03-16 Thread Taco Hoekwater
Hi,

Some of you may be interested to know that I have
released a new version of the bib module. See

   http://wiki.contextgarden.net/User:Taco/Bib

for details.

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


Re: [NTG-context] \page inside a block

2006-03-16 Thread Hans Hagen
frantisek holop wrote:
> hi there,
>
> the following is a minimal example of the layout i am working on.
>
>
> ---%<-
> % output=pdftex
>
> \enableregime[latin2]
>
> \setuppapersize
>   [A5][A5]
>
> \defineparagraphs
>   [poem][n=2]
> \setupparagraphs
>   [poem][1][width=.35\textwidth]
> \setupparagraphs
>   [poem][2][rule=on]
>
> \starttext
>
> \startpoem
> \section{poem}
> \poem\startlines
> line 1
> line 2
> \page
> line 3
> line 4
> \stoplines\stoppoem
> \stoptext
> ---%<-
>
>
> when the poem gets long, i need to start a new page obviously.
> but page is not working.  what am i missing here?
>   
that it's unbreakable stuff (vbox)
> also, using \page is one thing, good for me, so i could tell,
> flush the page right here, but i thought i'll get an automatic
> pagebreak when the text gets to the bottom
>
> sorry if this is a very silly question, just getting my feet wet
> with context  thanks
>   
actually, this is a rather complex situation; one could use a tabulate

the complication is in the line and in the fact that you want to use a 
section command

\setuppapersize[A5][A5]

\starttext

\setupcolors[state=start]

\definetextbackground
  [poem]
  [state=start,
   location=paragraph,
   background=color,
   backgroundcolor=red]

\definehead[Poem][section]
\setuphead[Poem][alternative=poemtitle,before={\blank[2*big]},after={\vskip-\lineheight},page=,style=\bfa]

% works, but may not be that robust)
%
% \defineheadplacement[poemtitle][horizontal]#1#2%
%   {\margintitle{\hskip\measure{SavedLeftSkip}#1\enspace#2}}

\defineheadplacement[poemtitle][vertical]#1#2%
  {\setupparagraphintro[first][{\llap{\hbox to 
\leftskip{#1\enspace#2\hss}}}]}

\setuplines[before=,after=]

\def\StartPoem#1%
  {\startnarrower[5*left]
   % \expanded{\definemeasure[SavedLeftSkip][\the\leftskip]}
   \Poem{#1}
   \starttextbackground[poem]
   \startlines}

\def\StopPoem
  {\stoplines
   \stoptextbackground
   \stopnarrower}

\showframe

\StartPoem{xxx}
line 1
line 2
\StopPoem

\setuptextbackground
  [poem]
  [mp=mpos:par:poem]

\startuseMPgraphic{mpos:par:poem}
  for i = 1 upto nofmultipars :
draw leftboundary multipars[i]
shifted (-.5EmWidth,0)
dashed evenly
withpen pencircle scaled 1pt
withcolor .8red ;
  endfor ;
\stopuseMPgraphic

\StartPoem{zzz}
line 1
line 2
\StopPoem

\startuseMPgraphic{mpos:par:poem}
  for i = 1 upto nofmultipars :
draw multipars[i]
enlarged .5ExHeight
rightenlarged -.5ExHeight
dashed evenly
withpen pencircle scaled 1pt
withcolor .8red ;
  endfor ;
\stopuseMPgraphic

\StartPoem{qqq}
line 1
line 2
line 3
\dorecurse{100}{line 4:\recurselevel\par}
\StopPoem

\stoptext

I leave it up to you (or others) to wikify this example. It looks more 
complex than it is. By using a mp graphic you have more options

watch what happens if you add

\page

\startuseMPgraphic{mpos:par:poem}
  for i = 1 upto nofmultipars :
multipars[i] := multipars[i]
enlarged .5ExHeight
rightenlarged -.5ExHeight;
drawoptions (
dashed evenly
withpen pencircle scaled 1pt
withcolor .8red
) ;
if multilocs[i] = 1 :
draw
llcorner multipars[i] --
ulcorner multipars[i] --
urcorner multipars[i] --
lrcorner multipars[i] ;
elseif multilocs[i] = 3 :
draw
ulcorner multipars[i] --
llcorner multipars[i] --
lrcorner multipars[i] --
urcorner multipars[i] ;
else :
draw leftboundary multipars[i] ;
draw rightboundary multipars[i] ;
fi ;
  endfor ;
\stopuseMPgraphic

\StartPoem{hhh}
\dorecurse{200}{line \recurselevel\par}
\StopPoem


-
  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] question about figures and labels

2006-03-16 Thread Hans Hagen
Taco Hoekwater wrote:
> Hi Wim,
>
>
> WN wrote:
>   
>> In \in{figure}[figuur7a] and \in{figure}[figuur7b] one can see .
>> ..
>> 
>
> I've browsed some of my own documents, and they contain the equiv. of
>
>In \in{figure}[figuur7]a and \in{figure}[figuur7]b one can see
>
> So if it is possible to set up independant references for the bits
> of a combination, I have not found it. I never bothered to look
> deeper into this, because, for my appications (paper printing), it
> does not matter that the subparts are 'glued on'.
>   
Just assume the obvious -) 

\placefigure[][figuur]{}{}

\in{figure}{a}[figuur] and \in{figure}{b}[figuur]


-
  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] pretty typesetting for matlab files

2006-03-16 Thread Taco Hoekwater


Aditya Mahajan wrote:
>>That may sound like a very daunting task, but it is not as hard as you
>>may think, just something to be done meticulously. The verb-
>>definitions are rather straightforward state engines that use character
>>codes as command tokens.
> 
> Is this documented somewhere? 

I don't know. If anybody else knows, please tell me. If not, I'll jot
down some stuff.

Cheers,
Taco


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


Re: [NTG-context] question about figures and labels

2006-03-16 Thread Albrecht Kauffmann
Hi Wim,

> I am trying to reference the 2 subfigures in my text , something like
>
> Some text 
>
> \placefigure[][figuur7]{Centrifugale kracht $\vec{F}_{F}$ en centripetale 
> kracht $\vec{F}_{c}$}
> {
> \startcombination[2*1]
> {\externalfigure[Drawings/figuur7a]}  {}
> {\externalfigure[Drawings/figuur7b]}  {}
> \stopcombination
> }
>
> In \in{figure}[figuur7a] and \in{figure}[figuur7b] one can see .

Why don't you simply type
In \in{figure}[figuur7]a and \in{figure}[figuur7]b ?

Greetings
Albrecht


> ..
>
> But I don't know how to setup the labels figuur7a, figuur7b ?
> I cannot find anything related on Wiki or in this newsgroup, I think it
> should
> be possible with Context ?
>
> Kind regards
>
> Wim Neimeijer
> ___
> 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] question about figures and labels

2006-03-16 Thread Taco Hoekwater

Hi Wim,


WN wrote:
> 
> In \in{figure}[figuur7a] and \in{figure}[figuur7b] one can see .
> ..

I've browsed some of my own documents, and they contain the equiv. of

   In \in{figure}[figuur7]a and \in{figure}[figuur7]b one can see

So if it is possible to set up independant references for the bits
of a combination, I have not found it. I never bothered to look
deeper into this, because, for my appications (paper printing), it
does not matter that the subparts are 'glued on'.

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


Re: [NTG-context] typing and linenumbering

2006-03-16 Thread Taco Hoekwater


nico wrote:
> Hello,

> The output is pretty as I wish, but unfortunately the line numbers are  
> *not* the numbers of the listing lines, but the numbers of the lines once  
> wrapped in the frame. In the example below the first line is very long  
> (the "blah blah" line), but in the output it is shown as 4 lines (with 4  
> line numbers).

I've tried this with a "method" trick, but that does not work too well
with 'location=intext'. Anyway, here is what I did:

\setuptyping[prog]
  [bodyfont=small,
   before={\begingroup\setuplinenumbering[style=small,%
   step=2,start=3,location=inmargin,method=type]
   \startframelisting \obeylines 

   \startlinenumbering},
   after={\stoplinenumbering\stopframelisting\endgroup}]

> Is there a way to achieve this in a more integrated way with the typing  
> environment? 

Probably, but I do not know.

> The other side effect of the method used is that it changes  
> the linenumbering behaviour outside the typing environment. I tried the  
> "reset" option, but it doesn't change the intext location. Is there a  
> possibility to come back to default settings?

The setup obeys normal grouping rules (hence the \begingroup ...
\endgroup in the code above)

> Last but not least, is it possible to customize the wrapping behaviour so  
> that an arbitrary command can be called before the cut, and another  
> command after the cut? What I would like to have is {\space\wrapsign}  
> before the cut and an indentation after the cut to show that the line is  
> wrapped.

That should be possible in typing environments. I even think there was
a wiki page on that. But in non-verbatim environments, the breaking is
simply TeX's paragraph builder, and I do not think context allows
tinkering with that (I could be proven wrong, of course)

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