Re: [NTG-context] Russian letters transliterated

2006-07-31 Thread Arkady Shraer
Hans Hagen:
 can you try ...
 \usetypescriptfile[type-pre]
 \enableregime[utf]
 \mainlanguage[ru]
 \usetypescript[lh-t2a]
 \setupbodyfont[modern,10pt]
 this assumes cm-super to be present
 it would be nice if we had cyrillic on the latin modern fonts ...
 Hans

I got cyrillic letters ok. But there's no hyphenation and fonts in pdf
are raster fonts.

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


[NTG-context] Bug in ctxtools --documentation

2006-07-31 Thread Aditya Mahajan
Hi Hans,

ctxtools.rb says that %D is the documetation marker. However, while 
matching it uses

   when /^[%\#]D/io then

Doesn't /i stand for ignorecase, which means that %d is also matched? 
Is this a bug or a feature?

Try generating documentation of core-fnt.tex for an interesting 
manifestation of this. You have

%def\uppercased#1{{\forceunexpanded\xdef\@@globalcrap{\uppercase{#1}}}\@@globalcrap}
%def\lowercased#1{{\forceunexpanded\xdef\@@globalcrap{\lowercase{#1}}}\@@globalcrap}

%d gets matched, %de gets deleted and the following is written in 
core-fnt.ted

\startdocumentation
f\uppercased#1{{\forceunexpanded\xdef\@@globalcrap{\uppercase{#1}}}\@@globalcrap}
f\lowercased#1{{\forceunexpanded\xdef\@@globalcrap{\lowercase{#1}}}\@@globalcrap}
\stopdocumentation

when context processes this it complains

! Illegal parameter number in definition of \@@expanded.
to be read again
}
\uppercased ... \xdef \@@expanded {\uppercase {#1}
   }}\@@expanded
l.251 f\uppercased#

1{{\forceunexpanded\xdef\@@globalcrap{\uppercase{#1}}}\@@...

?
! You can't use `macro parameter character #' in horizontal mode.
recently read ##

\@@expanded -\uppercase {##}

l.251 f\uppercased#

1{{\forceunexpanded\xdef\@@globalcrap{\uppercase{#1}}}\@@...



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


[NTG-context] No page break

2006-07-31 Thread David Arnold
All,

Anyone know why my Answers and Exercises don't break to a new page?

\setupwhitespace[medium]

\setupindenting[medium,yes]

\usemodule[colors]
\setupcolors[state=start]

\definecolor[gridlines][s=0.7]

\definecolor[exercolor][r=0.0,g=0.3,b=0.7]

\definecolor[oceanfoam][b=1,g=0.75,t=0.12,a=1]
\definecolor[tingedblue][g=0.25,b=0.9,t=0.125,a=1]
\definecolor[icicle][c=0.4,y=0.1,t=0.125,a=1]
\definecolor[middlegreen][c=0.5,y=0.5,t=0.5,a=1]
\definecolor[heavygreen][g=0.35,b=0.15]
\definecolor[heavyblue][g=0.15,b=0.35]
\definecolor[lightred][r=0.7,t=0.15,a=1]
\definecolor[lavender][r=0.25,b=0.75,t=0.095,a=1]
\definecolor[darklavender][r=0.25,b=0.75]
\definecolor[lightgreen][r=0.86,g=0.99,b=0.77,t=0.75,a=1]

\definehead
[exercises,answers]
[subsection]

\setupheads
[alternative=inmargin,
prefix=+]

\setuphead
[chapter,section]
[style=bold,
color=heavygreen,
before=\blank,
after=\blank]

\setuphead
[chapter]
[align={right,nothyphenated,broad},
style=\tfd]

\setuphead
[section]
[prefix=+,
style=\tfc]

\setuphead
[subsection]
[style={\tfb\sl},
before=\blank,
after=\blank,
color=heavyblue,
number=no,
incrementnumber=yes]

\def\ExerciseHead{\headnumber[section]}

\setuphead
[exercises]
[incrementnumber=no,
page=right,
command=\ExerciseHead,
after=\hairline\blank]

\def\AnswerHead{\headnumber[section]}

\setuphead
[answers]
[incrementnumber=no,
page=right,
command=\AnswerHead,
after=\hairline\blank]

\starttext

\chapter{Hello}

\dorecurse{5}{\input tufte\par}

\section{One}

\dorecurse{5}{\input tufte\par}

\section{two}

\dorecurse{5}{\input tufte\par}

\exercises{Exercises}

\dorecurse{5}{\input tufte\par}

\exercises{Asnwers}

\dorecurse{5}{\input tufte\par}

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


Re: [NTG-context] Russian letters transliterated

2006-07-31 Thread Hans Hagen
Arkady Shraer wrote:
 Hans Hagen:
   
 can you try ...
 \usetypescriptfile[type-pre]
 \enableregime[utf]
 \mainlanguage[ru]
 \usetypescript[lh-t2a]
 \setupbodyfont[modern,10pt]
 this assumes cm-super to be present
 it would be nice if we had cyrillic on the latin modern fonts ...
 Hans
 

 I got cyrillic letters ok. But there's no hyphenation and fonts in pdf
 are raster fonts.
   
hyphenation: see previous mail
fonts: check your map 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] Bug in ctxtools --documentation

2006-07-31 Thread Hans Hagen
Aditya Mahajan wrote:
 Hi Hans,

 ctxtools.rb says that %D is the documetation marker. However, while 
 matching it uses

when /^[%\#]D/io then

 Doesn't /i stand for ignorecase, which means that %d is also matched? 
 Is this a bug or a feature?
   
an undocumented feature (which will remain undocumented because i 
dislike a mix of Dd's)
 Try generating documentation of core-fnt.tex for an interesting 
 manifestation of this. You have

 %def\uppercased#1{{\forceunexpanded\xdef\@@globalcrap{\uppercase{#1}}}\@@globalcrap}
 %def\lowercased#1{{\forceunexpanded\xdef\@@globalcrap{\lowercase{#1}}}\@@globalcrap}

 %d gets matched, %de gets deleted and the following is written in 
 core-fnt.ted

 \startdocumentation
 f\uppercased#1{{\forceunexpanded\xdef\@@globalcrap{\uppercase{#1}}}\@@globalcrap}
 f\lowercased#1{{\forceunexpanded\xdef\@@globalcrap{\lowercase{#1}}}\@@globalcrap}
 \stopdocumentation
   

actually it's lazyness

when /^[%\#]D($| )/io then
when /^[%\#]M($| )/io then

so there need to be a space after the %D *or a newline)

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


Re: [NTG-context] several questions

2006-07-31 Thread Taco Hoekwater


Jorge Manuel de Almeida Magalhães wrote:
 
 2. Did you know how to force the section number to start in the number  
 0, not in 1 (default)?

That took some experimenting:

   \setuphead[section][chapternumber=yes]
   \setuphead[chapter][after={\setupheadnumber[section][-1]}]

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


Re: [NTG-context] TOC and Contents entry

2006-07-31 Thread Taco Hoekwater


The Wizard wrote:
 Can I get this with either \completecontent or \placecontent, or will I 
 have to use some other method?

Does this help?

   \chapter{Contents}
   \placecontent[alternative=c,pagestyle=slanted,
 interaction=pagenumber,criterium=all]

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


Re: [NTG-context] Another q, about setups

2006-07-31 Thread Taco Hoekwater


The Wizard wrote:
 All -
 I have a small block which creates a DRAFT watermark as the page 
 background:
 
 % Create Draft watermark for later use
 \doifmode{draft}{
 % Put a DRAFT watermark in Sun Blue
 \defineoverlay[Draft][{\sunbluet
   \scale[factor=max]{\rotate[rotation=60]{~DRAFT~}}}]
 \setupbackgrounds[page][background=Draft]
 } % End watermark
 
 Is there a way I can put it into a setup or command so I can turn it 
 on/off by page/section?

My guess is the easiest way is to do

\setupbackgrounds[page][background=]

on the page(s) where you do not want a background. You can put that
statement in a setup, of course.

Cheers, taco



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


Re: [NTG-context] No page break

2006-07-31 Thread Taco Hoekwater


David Arnold wrote:
 All,
 
 Anyone know why my Answers and Exercises don't break to a new page?

I don't know what is wrong, but this works:

\setuphead
   [exercises]
   [before={\page[right]}]

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


Re: [NTG-context] Lucida Bright Font Problem

2006-07-31 Thread Taco Hoekwater


Helin Gai wrote:
 Hi all,
 
 I'm trying to set up ConTeXt to use the Lucida Bright Font. I've  
 already installed the font in the LaTeX way and it works pretty  
 well in LaTeX. But when I use the following:

As far as I know, using only this command should have worked:

   \setupbodyfont[lbr]
   \starttext
   lucida text
   \stoptext

But for some reason it doesn't work for me either.

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


Re: [NTG-context] Lucida Bright Font Problem

2006-07-31 Thread Helin Gai
I wrote a typescriptfile according to the manual of TeXfont (attached  
below) and with the following code

\usetypescriptfile[lucida]
\definetypeface[lucida][rm][serif][lucida][default][encoding=texnansi]
\definetypeface[lucida][ss][sans] [lucida][default][encoding=texnansi]
\setupbodyfont[lucida,10pt,rm]

Things do work... but i'm wondering whether there is an easier way...

Thanks.

Colin


\loadmapfile [texnansi-bh-lucida.map]

\starttypescript [serif] [lucida] [name]
\definefontsynonym[Serif] [LucidaBright]
\definefontsynonym[SerifItalic] [LucidaBright-Italic]
\definefontsynonym[SerifSlanted] [LucidaBright-Oblique]
\definefontsynonym[SerifBold] [LucidaBlackletter]
%\definefontsynonym[SerifBoldItalic] [OfficinaSerif-BoldItalic]
%\definefontsynonym[SerifBoldSlanted][OfficinaSerif-BoldSlanted]
\definefontsynonym[SerifCaps] [LucidaBrightSmallcaps-Demi]
\stoptypescript
\starttypescript [sans] [lucida] [name]
\definefontsynonym[Sans] [LucidaSans]
\definefontsynonym[SansItalic] [LucidaSans-Italic]
\definefontsynonym[SansSlanted] [LucidaSans-Italic]
\definefontsynonym[SansBold] [LucidaSans-Bold]
\definefontsynonym[SansBoldItalic] [LucidaSans-BoldItalic]
\definefontsynonym[SansBoldSlanted][LucidaSans-BoldItalic]
%\definefontsynonym[SansCaps] [OfficinaSans-Caps]
\stoptypescript
\starttypescript [serif] [lucida] [texnansi]
\definefontsynonym[LucidaCalligraphy-Italic][texnansi-lbc] 
[encoding=texnansi]
\definefontsynonym[LucidaBright-Demi][texnansi-lbd][encoding=texnansi]
\definefontsynonym[LucidaBright-DemiItalic][texnansi-lbdi] 
[encoding=texnansi]
\definefontsynonym[LucidaBrightSmallcaps-Demi][texnansi-lbdsc] 
[encoding=texnansi]
\definefontsynonym[LucidaHandwriting-Italic][texnansi-lbh] 
[encoding=texnansi]
\definefontsynonym[LucidaBright-Italic][texnansi-lbi][encoding=texnansi]
\definefontsynonym[LucidaCasual-Italic][texnansi-lbki] 
[encoding=texnansi]
\definefontsynonym[LucidaCasual][texnansi-lbkr][encoding=texnansi]
\definefontsynonym[LucidaBlackletter][texnansi-lbl][encoding=texnansi]
\definefontsynonym[LucidaBright][texnansi-lbr][encoding=texnansi]
\definefontsynonym[LucidaBrightSmallcaps][texnansi-lbrsc] 
[encoding=texnansi]
\definefontsynonym[LucidaBright-Oblique][texnansi-lbsl] 
[encoding=texnansi]
\definefontsynonym[LucidaTypewriterBold][texnansi-lbtb] 
[encoding=texnansi]
\definefontsynonym[LucidaTypewriterBoldOblique][texnansi-lbtbo] 
[encoding=texnansi]
\definefontsynonym[LucidaTypewriterOblique][texnansi-lbto] 
[encoding=texnansi]
\definefontsynonym[LucidaTypewriter][texnansi-lbtr][encoding=texnansi]
\definefontsynonym[LucidaFax-Demi][texnansi-lfd][encoding=texnansi]
\definefontsynonym[LucidaFax-DemiItalic][texnansi-lfdi] 
[encoding=texnansi]
\definefontsynonym[LucidaFax-Italic][texnansi-lfi][encoding=texnansi]
\definefontsynonym[LucidaFax][texnansi-lfr][encoding=texnansi]
\stoptypescript
\starttypescript [sans] [lucida] [texnansi]
\definefontsynonym[LucidaSans-Bold][texnansi-lsb][encoding=texnansi]
\definefontsynonym[LucidaSans-BoldItalic][texnansi-lsbi] 
[encoding=texnansi]
\definefontsynonym[LucidaSans-Demi][texnansi-lsd][encoding=texnansi]
\definefontsynonym[LucidaSans-DemiItalic][texnansi-lsdi] 
[encoding=texnansi]
\definefontsynonym[LucidaSans-Italic][texnansi-lsi][encoding=texnansi]
\definefontsynonym[LucidaSans][texnansi-lsr][encoding=texnansi]
\definefontsynonym[LucidaSans-TypewriterBold][texnansi-lstb] 
[encoding=texnansi]
\definefontsynonym[LucidaSans-TypewriterBoldOblique][texnansi-lstbo] 
[encoding=texnansi]
\definefontsynonym[LucidaSans-TypewriterOblique][texnansi-lsto] 
[encoding=texnansi]
\definefontsynonym[LucidaSans-Typewriter][texnansi-lstr] 
[encoding=texnansi]

\stoptypescript





On Jul 31, 2006, at 5:21 PM, Taco Hoekwater wrote:



 Helin Gai wrote:
 Hi all,

 I'm trying to set up ConTeXt to use the Lucida Bright Font. I've
 already installed the font in the LaTeX way and it works pretty
 well in LaTeX. But when I use the following:

 As far as I know, using only this command should have worked:

\setupbodyfont[lbr]
\starttext
lucida text
\stoptext

 But for some reason it doesn't work for me either.

 Taco
 ___
 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] Lucida Bright Font Problem

2006-07-31 Thread Helin Gai
Problem Solved.

\usetypescriptfile[type-buy] % loads commercial font definitions
\usetypescript[lucida][texnansi] % defines a lucida typeface
\setupbodyfont[lucida,12pt]

This worked.

Colin


On Jul 31, 2006, at 5:28 PM, Helin Gai wrote:

 I wrote a typescriptfile according to the manual of TeXfont (attached
 below) and with the following code

 \usetypescriptfile[lucida]
 \definetypeface[lucida][rm][serif][lucida][default][encoding=texnansi]
 \definetypeface[lucida][ss][sans] [lucida][default][encoding=texnansi]
 \setupbodyfont[lucida,10pt,rm]

 Things do work... but i'm wondering whether there is an easier way...

 Thanks.

 Colin


 \loadmapfile [texnansi-bh-lucida.map]

 \starttypescript [serif] [lucida] [name]
 \definefontsynonym[Serif] [LucidaBright]
 \definefontsynonym[SerifItalic] [LucidaBright-Italic]
 \definefontsynonym[SerifSlanted] [LucidaBright-Oblique]
 \definefontsynonym[SerifBold] [LucidaBlackletter]
 %\definefontsynonym[SerifBoldItalic] [OfficinaSerif-BoldItalic]
 %\definefontsynonym[SerifBoldSlanted][OfficinaSerif-BoldSlanted]
 \definefontsynonym[SerifCaps] [LucidaBrightSmallcaps-Demi]
 \stoptypescript
 \starttypescript [sans] [lucida] [name]
 \definefontsynonym[Sans] [LucidaSans]
 \definefontsynonym[SansItalic] [LucidaSans-Italic]
 \definefontsynonym[SansSlanted] [LucidaSans-Italic]
 \definefontsynonym[SansBold] [LucidaSans-Bold]
 \definefontsynonym[SansBoldItalic] [LucidaSans-BoldItalic]
 \definefontsynonym[SansBoldSlanted][LucidaSans-BoldItalic]
 %\definefontsynonym[SansCaps] [OfficinaSans-Caps]
 \stoptypescript
 \starttypescript [serif] [lucida] [texnansi]
 \definefontsynonym[LucidaCalligraphy-Italic][texnansi-lbc]
 [encoding=texnansi]
 \definefontsynonym[LucidaBright-Demi][texnansi-lbd][encoding=texnansi]
 \definefontsynonym[LucidaBright-DemiItalic][texnansi-lbdi]
 [encoding=texnansi]
 \definefontsynonym[LucidaBrightSmallcaps-Demi][texnansi-lbdsc]
 [encoding=texnansi]
 \definefontsynonym[LucidaHandwriting-Italic][texnansi-lbh]
 [encoding=texnansi]
 \definefontsynonym[LucidaBright-Italic][texnansi-lbi] 
 [encoding=texnansi]
 \definefontsynonym[LucidaCasual-Italic][texnansi-lbki]
 [encoding=texnansi]
 \definefontsynonym[LucidaCasual][texnansi-lbkr][encoding=texnansi]
 \definefontsynonym[LucidaBlackletter][texnansi-lbl][encoding=texnansi]
 \definefontsynonym[LucidaBright][texnansi-lbr][encoding=texnansi]
 \definefontsynonym[LucidaBrightSmallcaps][texnansi-lbrsc]
 [encoding=texnansi]
 \definefontsynonym[LucidaBright-Oblique][texnansi-lbsl]
 [encoding=texnansi]
 \definefontsynonym[LucidaTypewriterBold][texnansi-lbtb]
 [encoding=texnansi]
 \definefontsynonym[LucidaTypewriterBoldOblique][texnansi-lbtbo]
 [encoding=texnansi]
 \definefontsynonym[LucidaTypewriterOblique][texnansi-lbto]
 [encoding=texnansi]
 \definefontsynonym[LucidaTypewriter][texnansi-lbtr][encoding=texnansi]
 \definefontsynonym[LucidaFax-Demi][texnansi-lfd][encoding=texnansi]
 \definefontsynonym[LucidaFax-DemiItalic][texnansi-lfdi]
 [encoding=texnansi]
 \definefontsynonym[LucidaFax-Italic][texnansi-lfi][encoding=texnansi]
 \definefontsynonym[LucidaFax][texnansi-lfr][encoding=texnansi]
 \stoptypescript
 \starttypescript [sans] [lucida] [texnansi]
 \definefontsynonym[LucidaSans-Bold][texnansi-lsb][encoding=texnansi]
 \definefontsynonym[LucidaSans-BoldItalic][texnansi-lsbi]
 [encoding=texnansi]
 \definefontsynonym[LucidaSans-Demi][texnansi-lsd][encoding=texnansi]
 \definefontsynonym[LucidaSans-DemiItalic][texnansi-lsdi]
 [encoding=texnansi]
 \definefontsynonym[LucidaSans-Italic][texnansi-lsi][encoding=texnansi]
 \definefontsynonym[LucidaSans][texnansi-lsr][encoding=texnansi]
 \definefontsynonym[LucidaSans-TypewriterBold][texnansi-lstb]
 [encoding=texnansi]
 \definefontsynonym[LucidaSans-TypewriterBoldOblique][texnansi-lstbo]
 [encoding=texnansi]
 \definefontsynonym[LucidaSans-TypewriterOblique][texnansi-lsto]
 [encoding=texnansi]
 \definefontsynonym[LucidaSans-Typewriter][texnansi-lstr]
 [encoding=texnansi]

 \stoptypescript





 On Jul 31, 2006, at 5:21 PM, Taco Hoekwater wrote:



 Helin Gai wrote:
 Hi all,

 I'm trying to set up ConTeXt to use the Lucida Bright Font. I've
 already installed the font in the LaTeX way and it works pretty
 well in LaTeX. But when I use the following:

 As far as I know, using only this command should have worked:

\setupbodyfont[lbr]
\starttext
lucida text
\stoptext

 But for some reason it doesn't work for me either.

 Taco
 ___
 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] setuphead, setuplist

2006-07-31 Thread Steffen Wolfrum
I have tried ...

\setuplist[chapter]  
[label=no,prefix=no,sectionnumber=no,alternative=a,textcommand= 
\midaligned,distance=0cm,margin=0cm,width=0cm]

... but still there is the sectionnumber shown in the content.
Is this because of our special setuphead[chapter] command?

Is there no way to avoid the sectionnumber for my chapter in the TOC?

Steffen


Am 31.07.2006 um 07:31 schrieb Steffen Wolfrum:

 That's it.

 Now the corresponding entry in the TOC should be without  
 sectionnumber,
 but

 setuplist[...][sectionnumber=no]

 doesn't work.
 And looking in the manual I saw that this command is listed for
 setuplist, but listed italic?!



...


 \setuphead[chapter]
[command=\Sectioncommand,
 style=,
 textstyle=\bfb,
 numberstyle=\it]

 \def\Sectioncommand#1#2%
  {\vbox \bgroup
 \framed[align=middle,frame=off,offset=0pt]{Chapter #1}%
 \framed[align=middle,frame=off,offset=0pt]{#2}%
   \egroup}

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


Re: [NTG-context] Lucida Bright Font Problem

2006-07-31 Thread Hans Hagen
Taco Hoekwater wrote:
 Helin Gai wrote:
   
 Hi all,

 I'm trying to set up ConTeXt to use the Lucida Bright Font. I've  
 already installed the font in the LaTeX way and it works pretty  
 well in LaTeX. But when I use the following:
 

 As far as I know, using only this command should have worked:

\setupbodyfont[lbr]
\starttext
lucida text
\stoptext

 But for some reason it doesn't work for me either.

   
type-pre should be loaded; 

the modern way is: 

\usetypescript[lucida][\defaultencoding]

\setupbodyfont[lucida] 

-
  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] setuphead, setuplist

2006-07-31 Thread Hans Hagen
Steffen Wolfrum wrote:
 That's it.

 Now the corresponding entry in the TOC should be without sectionnumber,
 but

 setuplist[...][sectionnumber=no]

 doesn't work.
 And looking in the manual I saw that this command is listed for  
 setuplist, but listed italic?!
   
has to do with prefixes, like \chapternumber=no and so 

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] column overflow at times

2006-07-31 Thread David Arnold
Hans,

We are using:

\setupcolumns
[tolerance=stretch,
balance=yes,
blank=flexible,
rule=off,
distance=2.5em]

However, once in a while we get column overflow. See page 55 on:

http://msenux.redwoods.edu/IntAlgText/chapter0/chapter0.pdf

Are we doing this correctly? Any suggestions?
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Lucida Bright Font Problem

2006-07-31 Thread Hans Hagen
Helin Gai wrote:
 Weird, the method you proposed actually doesn't work...

 Sincerely,
 Colin

 On Jul 31, 2006, at 11:10 PM, Hans Hagen wrote:

   
 Taco Hoekwater wrote:
 
 Helin Gai wrote:

   
 Hi all,

 I'm trying to set up ConTeXt to use the Lucida Bright Font. I've
 already installed the font in the LaTeX way and it works pretty
 well in LaTeX. But when I use the following:

 
 As far as I know, using only this command should have worked:

\setupbodyfont[lbr]
\starttext
lucida text
\stoptext

 But for some reason it doesn't work for me either.


   
 type-pre should be loaded;

 the modern way is:

 
then add:

\usetypescriptfile[type-buy]

(is done in my cont-sys.tex)

 \usetypescript[lucida][\defaultencoding]

 \setupbodyfont[lucida]

 -
   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
   


-- 

-
  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] Rule under length of last line

2006-07-31 Thread Duncan Hothersall
I've had a last-minute impossible request for a typesetting style, and
having already told the person it can't be done in the time available,
wondered whether it can actually be done at all.

The request is for a subsection heading to have a continuous horizontal
rule under both its number and title, at a distance of about 6pt from
the baseline (i.e. not underlining), extending just the length of the
heading. I can do that by setting both number and title in a TABLE,
setting the offsets and specifying the bottom frame to be on - no problem.

However, the tricky part is that where a longer title runs beyond one
line, the line should only appear under the last line, and only to the
length of the last line of text.

In other words, for viewers with fixed width fonts:

1.1.1 Short title
-

1.1.2 Longer title which wraps onto a
  second line like this
---

We generate the ConTeXt code from XML, so ideally a solution wouldn't
require the last line to be set separately, but would just work whether
the heading was single or multiple line. What I'm really looking for is
a subsection setup that will automatically do this whatever length of title.

I have to say I think it's quite ugly, but can anyone give me a pointer
as to how it could be done? Is there a box left at the end of a par
which shows the width of the last line?

As I say, I've already said no, so this is just out of interest, no
urgency.

Thanks,

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


Re: [NTG-context] Rule under length of last line

2006-07-31 Thread Taco Hoekwater
Duncan Hothersall wrote:
 We generate the ConTeXt code from XML, so ideally a solution wouldn't
 require the last line to be set separately, but would just work whether
 the heading was single or multiple line. What I'm really looking for is
 a subsection setup that will automatically do this whatever length of title.

It is easier than you think:

   \def\Myway#1%
 {#1\vrule height 0pt depth 6pt width 0pt}% title + force 6pt
  \optimizedisplayspacingtrue\setlastlinewidth % core-mat macro
  \global\advance\lastlinewidth-\hangindent\par % adjust
  \hrule width \the\lastlinewidth}

   \setuphead[section][textcommand=\Myway]

The key element is \setlastlinewidth, which measures the width
of the final line of the current paragraph.

Cheers, Taco

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


Re: [NTG-context] Rule under length of last line

2006-07-31 Thread Hans Hagen
Duncan Hothersall wrote:
 I've had a last-minute impossible request for a typesetting style, and
 having already told the person it can't be done in the time available,
 wondered whether it can actually be done at all.
   
depends on the amount of time, and it the case of customers what they 
are willing to pay -)

many things can be done, esp because designers are not that accustomed 
to thinking on programmable designs
 The request is for a subsection heading to have a continuous horizontal
 rule under both its number and title, at a distance of about 6pt from
 the baseline (i.e. not underlining), extending just the length of the
 heading. I can do that by setting both number and title in a TABLE,
 setting the offsets and specifying the bottom frame to be on - no problem.

 However, the tricky part is that where a longer title runs beyond one
 line, the line should only appear under the last line, and only to the
 length of the last line of text.

 In other words, for viewers with fixed width fonts:

 1.1.1 Short title
 -

 1.1.2 Longer title which wraps onto a
   second line like this
 ---

 We generate the ConTeXt code from XML, so ideally a solution wouldn't
 require the last line to be set separately, but would just work whether
 the heading was single or multiple line. What I'm really looking for is
 a subsection setup that will automatically do this whatever length of title.

 I have to say I think it's quite ugly, but can anyone give me a pointer
   
you don't wanna know hwo much time i've spent in programming ugly stuff -)
 as to how it could be done? Is there a box left at the end of a par
 which shows the width of the last line?

 As I say, I've already said no, so this is just out of interest, no
 urgency.
   
anyhow, it's doable; the first solution took me 30 minutes, the second one 15 
minutes

\def\FirstSolution#1#2%
  {\vbox\bgroup
   \setbox0\hbox{#1}
   \hsize.4\textwidth
   \beginshapebox#2\endshapebox
   \gdef\SetLastLineWidth{\xdef\LastLineWidth{\the\wd\scratchbox}}%
   \reshapebox
 {\setbox\scratchbox\hbox{\unhbox\shapebox}%
  \SetLastLineWidth
  \globallet\SetLastLineWidth\relax
  \box\scratchbox}%
   \scratchdimen\dimexpr\wd0+.25em+\LastLineWidth\relax
% \setbox2\ruledvbox   {\innerflushshapebox} 
% why is correction needed
   \setbox2\vbox{\vskip-\lineskip\innerflushshapebox}
   \setbox0\vbox to \ht2{\box0}
   \hbox{\box0\hskip.25em\box2}
   \offinterlineskip
   \vskip.25ex
   \blackrule[width=\scratchdimen,height=2pt]
   \egroup}

\doglobal\newcounter\NextLinePos

\def\SecondSolution#1#2%
  {\vbox\bgroup
   \hsize.4\textwidth
   \doglobal\increment\NextLinePos
   \setbox\scratchbox\hbox{#1}
   \hbox{\vtop{\copy\scratchbox}\hskip.25em\vtop{#2}}%
   \offinterlineskip
   \scratchdimen\dimexpr\wd\scratchbox+.25em+
 \MPx{e:npl:\NextLinePos}-\MPx{b:npl:\NextLinePos}\relax
   \vskip.25ex
   \blackrule[width=\scratchdimen,height=2pt]
   \egroup}

\def\DoSecondSolution#1%
  {\bpos{npl:\NextLinePos}#1\epos{npl:\NextLinePos}}

% \showstruts

\setuphead[section][command=\FirstSolution]

\starttext

\section{is this nice or not}

\section{is this nice or not nice, that's the question}

\setuphead[section][command=\SecondSolution,deeptextcommand=\DoSecondSolution]

\section{is this nice or not}

\section{is this nice or not nice, that's the question}

\stoptext

Now it's your turn to wikify this ... 

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] Rule under length of last line

2006-07-31 Thread Hans Hagen
Taco Hoekwater wrote:
 Duncan Hothersall wrote:
   
 We generate the ConTeXt code from XML, so ideally a solution wouldn't
 require the last line to be set separately, but would just work whether
 the heading was single or multiple line. What I'm really looking for is
 a subsection setup that will automatically do this whatever length of title.
 

 It is easier than you think:

\def\Myway#1%
  {#1\vrule height 0pt depth 6pt width 0pt}% title + force 6pt
   \optimizedisplayspacingtrue\setlastlinewidth % core-mat macro
   \global\advance\lastlinewidth-\hangindent\par % adjust
   \hrule width \the\lastlinewidth}

\setuphead[section][textcommand=\Myway]

 The key element is \setlastlinewidth, which measures the width
 of the final line of the current paragraph.
   
i was thinking of that as a third solution but somehow you trust 
\setlastlinewidth more than i do -) 

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] Rule under length of last line

2006-07-31 Thread Duncan Hothersall
Wow, very cool. Will adapt and wikify. Thanks - it's even better to say
no and then do it anyway. :)

Thanks again.

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


[NTG-context] buffers

2006-07-31 Thread Hans van der Meer
The ConTeXt manual tells me on page 237:	You can define your own buffer with:	\definebuffer[...]	... name	After this command /getbuffer and \typebuffer are available where buffer is the name of the buffer.I do:	\definebuffer[left]	\startbuffer[left]	left\crlf	\stopbuffer	\typeleftand it gives me the error:	! Undefined control sequence.\typeleft -\dodotypebuffer                             [left][def-3]l.92 \typeleftthen I try:	\typebuffer[left]this gives a typeset message [file examdoc-def-2.tmp does not exist](file examdoc.tex being the containing tex file)when I try	\getbuffer[left] or \getleftnothing at all seems to happen?Why doesn't it work according to the manual? Or do I misunderstand the manual completely?Hans van der Meer ___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Lucida Bright Font Problem

2006-07-31 Thread Mojca Miklavec
On 7/31/06, Hans Hagen wrote:
 Taco Hoekwater wrote:
  Helin Gai wrote:
 
  Hi all,
 
  I'm trying to set up ConTeXt to use the Lucida Bright Font. I've
  already installed the font in the LaTeX way and it works pretty
  well in LaTeX. But when I use the following:

On 7/31/06, Helin Gai wrote:
 I wrote a typescriptfile according to the manual of TeXfont (attached
 below) and with the following code

OK, now I understand it. After some time of playing (before this
thread was started) I came out with some definitions like these:

% at least the basic ones which are needed for a document to compile properly
\definefontsynonym [lbmr] [hlcrm]   [encoding=default]
\definefontsynonym [lbmo] [hlcrima] [encoding=default]
\definefontsynonym [lbms] [hlcry]   [encoding=default]
\definefontsynonym [lbme] [hlcrv]   [encoding=default]
\definefontsynonym [lbma] [hlcra]   [encoding=default]

\definefontsynonym [texnansi-lbr]   [hlhr8y]  [encoding=texnansi]
\definefontsynonym [texnansi-lbd]   [hlhb8y]  [encoding=texnansi]
\definefontsynonym [texnansi-lbsl]  [hlhro8y] [encoding=texnansi]
\definefontsynonym [texnansi-lbi]   [hlhri8y] [encoding=texnansi]
\definefontsynonym [texnansi-lbdi]  [hlhbi8y] [encoding=texnansi]
\definefontsynonym [texnansi-lbrsc] [hlhrc8y] [encoding=texnansi]

\loadmapfile[lucida.map]
\usetypescript[lucida][texnansi]
\setupbodyfont[lucida]

But then again I didn't understand how it was possible that so many
people were using lucida without any problems. (And that it was only
me who had problems installing the font - I simply took all the files
from the LaTeX world and forgot about using texfont, which caused me
some headaches until now anyway.)

 \usetypescript[lucida][\defaultencoding]

Hmmm ... Yesterday I figured out that lucida doesn't support EC (ie.
doens't have enough glyphs to cover Slovenian and Croatian). I guess
that only texnansi is a sensible choice. :(

(I hoped that empty slots in Hans's manuals were a consequence of
faulty ec.enc files, but now I figured out that the font has indeed
many glhyps missing.)

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


[NTG-context] colums

2006-07-31 Thread Hans van der Meer
When I do:\setupcolumns[n=2,balance=no,tolerance=verytolerant,rule=on] % and variations\startext\startcolumnsabc\columndef\stopcolumns\stoptext This produces two columns when typeset on the upper half of the page.Suddenly about halfway the page the columns are not put side by side but below each other!Is this something known are am I becoming mad?Hans van der Meer ___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Lucida Bright Font Problem

2006-07-31 Thread Hans Hagen
Mojca Miklavec wrote:
 But then again I didn't understand how it was possible that so many
 people were using lucida without any problems. (And that it was only
 me who had problems installing the font - I simply took all the files
 from the LaTeX world and forgot about using texfont, which caused me
 some headaches until now anyway.)
   
when i started using lucida (many years ago) they came with tfm files 
(texnansi) abut nowadays i just generate the metrics with texfont

because yandy went away tug now sells the fonts, and as a result new 
metrics for latex were made; i'm not sure with what (afm) files the 
fonts ship nowadays but i'm not going to change/adapt my local setup 
(too tricky) to different lucida spacing and metrics; the font metrics 
zip has them

   
 \usetypescript[lucida][\defaultencoding]
 

 Hmmm ... Yesterday I figured out that lucida doesn't support EC (ie.
 doens't have enough glyphs to cover Slovenian and Croatian). I guess
 that only texnansi is a sensible choice. :(

 (I hoped that empty slots in Hans's manuals were a consequence of
 faulty ec.enc files, but now I figured out that the font has indeed
 many glhyps missing.)
   
my impression is that when ec was made nobody cared much about eastern european 
languages; for some reason the hardly (or once per doc) used copyright and 
registere symbols were considered to be of more importance, alas ... 

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] grid and \textrule

2006-07-31 Thread wwl
Hallo!

I use 

\setuplayout[grid=yes]

and a chapterdefinition which looks like:

Author
-

Title

Text text text ...

The hor. Line above is a \textrule
and the vert. spacing between author and line and line and Title 
resp. should not depent on the grid. So I can not use 
\placeongrid{textrule} in my chapterdefinition. I have to do this
afterwards.

\blank[force,3.9pt]

In short:

\setuplayout[grid=yes]
\def\Sync{...}
\showgrid
\starttext
Bla Blub
\textrule
\Sync
Bla Blub
\stoptext

How should \Sync be defined to snap on the next gridline?

My solution is 

\def\Sync{\blank[force,7.4pt]}% try and error

isn't there a better solution?


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


Re: [NTG-context] buffers

2006-07-31 Thread Aditya Mahajan
On Mon, 31 Jul 2006, Hans van der Meer wrote:

 The ConTeXt manual tells me on page 237:

   You can define your own buffer with:
   \definebuffer[...]
   ... name
   After this command /getbuffer and \typebuffer are available where 
 buffer is the name of the buffer.

 I do:
   \definebuffer[left]
   \startbuffer[left]
   left\crlf
   \stopbuffer
   \typeleft
 and it gives me the error:
   ! Undefined control sequence.
 \typeleft -\dodotypebuffer
   [left][def-3]
 l.92 \typeleft

 then I try:
   \typebuffer[left]

 this gives a typeset message [file examdoc-def-2.tmp does not exist]
 (file examdoc.tex being the containing tex file)

 when I try
   \getbuffer[left] or \getleft
 nothing at all seems to happen?

 Why doesn't it work according to the manual?
 Or do I misunderstand the manual completely?

If you just want to tag buffers, you do not need to define new ones. 
You can simply do

\startbuffer[test]
Hello world
\stopbuffer

\typebuffer[test]

\getbuffer[test]


Defining new buffers is useful if you do not want to call buffers by 
some other name. This does not allow you to tag the buffers. There 
is also a bug in core-buf.tex due to which \typebuffer did not work.

\unprotect
\def\dodefinebuffer[#1][#2]%
   {\iffirstargument % else problems
  \doglobal\increment\nofdefinedbuffers
  \letvalue{\??bu#1\c!number}\nofdefinedbuffers
  \letvalue{\??bu#1\c!paragraph}\v!no
  \setevalue{\e!start#1}%

{\noexpand\dostartbuffer[#1][def-\nofdefinedbuffers][\e!start#1][\e!stop#1]}%
  \setevalue{\e!get#1}%
{\noexpand\dodoprocessTEXbuffer[#1][def-\nofdefinedbuffers]}%
  \setevalue{\e!type#1}%
{\noexpand\dotypebuffer[#1][def-\nofdefinedbuffers]}%
% was {\noexpand\dodotypebuffer[#1][def-\nofdefinedbuffers]}%
  \getparameters[\??bu#1][#2]%
\fi}
\protect


\definebuffer[Example]

\startExample
   Hello again
\stopExample

\typeExample %The above fix is needed for this.

\getExample


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


Re: [NTG-context] colums

2006-07-31 Thread Aditya Mahajan
On Mon, 31 Jul 2006, Hans van der Meer wrote:

 When I do:

 \setupcolumns[n=2,balance=no,tolerance=verytolerant,rule=on] % and variations
 \startext
 \startcolumns
 abc
 \column
 def
 \stopcolumns
 \stoptext

 This produces two columns when typeset on the upper half of the page.
 Suddenly about halfway the page the columns are not put side by side but 
 below each other!

Can you give an example that shows the problem?

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


[NTG-context] Figure number off one time

2006-07-31 Thread David Arnold
All,

I would like to use:

\placefigure
[right][fig:pythagoras]
{An early portrait of Pythagoras.}
{\getbuffer[figure]}

And I would like to turn off the figure number in this caption, but  
just for this graphic, not for any other I place. I want the number  
off, but I want to keep the caption An early portrait of Pythagoras.

The following didn't work.

\startbuffer[figure]
\setupcaptions[number=no]
\externalfigure[Pythagoras][width=4cm]
\stopbuffer

\placefigure
[right][fig:pythagoras]
{An early portrait of Pythagoras.}
{\getbuffer[figure]}
Pythagoras was a Greek mathematician and philosopher, born on the  
island of
Samos somewhere near the year 582 BC. He founded a number of schools,  
one in particular in a town in southern Italy called Crotone, whose  
members eventually

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


Re: [NTG-context] Figure number off one time

2006-07-31 Thread Aditya Mahajan
On Mon, 31 Jul 2006, David Arnold wrote:

 All,

 I would like to use:

 \placefigure
 [right][fig:pythagoras]
 {An early portrait of Pythagoras.}
 {\getbuffer[figure]}

 And I would like to turn off the figure number in this caption, but
 just for this graphic, not for any other I place. I want the number
 off, but I want to keep the caption An early portrait of Pythagoras.

 The following didn't work.

Try

\start
  \setupcaptions[number=no]
  \placefigure
[right]
%  [fig:pythagoras]
% If there is no number, you can not refer to it
  {An early portrait of Pythagoras.}
  {\getbuffer[figure]}
\stop

Basically \start \stop limit the effect of \setupcaptions. You can 
also use \bgroup \egroup or { .. } instead. I find \start \stop more 
Contexish.

Aditya

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


Re: [NTG-context] Figure number off one time

2006-07-31 Thread David Arnold
Aditya,

Most excellent. Thanks.

On Jul 31, 2006, at 7:17 PM, Aditya Mahajan wrote:

 On Mon, 31 Jul 2006, David Arnold wrote:

 All,

 I would like to use:

 \placefigure
 [right][fig:pythagoras]
 {An early portrait of Pythagoras.}
 {\getbuffer[figure]}

 And I would like to turn off the figure number in this caption, but
 just for this graphic, not for any other I place. I want the number
 off, but I want to keep the caption An early portrait of  
 Pythagoras.

 The following didn't work.

 Try

 \start
   \setupcaptions[number=no]
   \placefigure
 [right]
 %  [fig:pythagoras]
 % If there is no number, you can not refer to it
   {An early portrait of Pythagoras.}
   {\getbuffer[figure]}
 \stop

 Basically \start \stop limit the effect of \setupcaptions. You can
 also use \bgroup \egroup or { .. } instead. I find \start \stop more
 Contexish.

 Aditya

 ___
 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] Figure 1.

2006-07-31 Thread David Arnold
All,

Anyone know how to put a period after Figure 1 in a figure caption?
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context