Re: [NTG-context] spurious line break in \switchtobodyfont

2006-04-26 Thread Hans Hagen
Mojca Miklavec wrote:
 Hello,

 there is a misterious linebreak in the second example:

 abc\switchtobodyfont[ss]def

 abc\switchtobodyfont[,,ss]def

 Is this ConTeXt's fault or mine?
   
lucky you:

\def\dodosetfont#1#2%  #1 = set/switch state / test added to make it 
mojca proof
  {\doifsomething{#2}{\dododosetfont{#1}{#2}{\showmessage\m!fonts4{#2

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] Cranky booklet layout.

2006-04-26 Thread Willi Egger
Hi John,

Coud it be that you simply forgot the = after width?

Willi

John R. Culleton wrote:

First I built a letter-on-tabloid booklet like this:

\definepapersize[tabloid][width=11in,height=17in]
\setuppapersize[letter][tabloid]
\setuparranging[2UP,rotated,doublesided]
\setuplayout[width=7in,location=doublesided,backspace=0.73in,
topspace=.0in,height=10.3in]

This worked pretty well. For the next iteration I wanted to
reduce the size by one half, in other words a half letter sheet
on a letter sheet. I came up with this:

\definepapersize[halff][width 5.5in,height=8.5in]
\definepapersize[ful][width 8.5in,height=11in]
\setuppapersize[halff][ful]
\setuparranging[2UP,rotated,doublesided]

Now no amount of fiddling with \setuplayout parameters seems to
place the logical pages correctly on the paper. If I use no such parameters
whatever the entire physical page image seem to slide toward the
bottom of the piece of paper. As a result the bottom logical page
slides halfway off the page. 

Can anyone spot an obvious goof? 

John Culleton


  

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


Re: [NTG-context] Quick Metapost question

2006-04-26 Thread Olivier
Wouahhh! Great! I wasn't aware of these ones.

Many thanks,
Olivier


Quoting  Renaud AUBIN :
 -- was [EMAIL PROTECTED] on Apr 26, 2006 at 11:45:34 --

 Did you try \scale ? (Dunno if it works)...
 http://texshow.contextgarden.net/ts.rb?lang=enwhat=descif=encmd=scale
 
 Olivier a écrit :
 
 Hi all,
 
 I'm looking for an equivalent of \externalfigure[width=1mm]
 but for \reuseMPgraphic. Something like 
 \reuseMPgraphic[width=1mm]{my-mp-drawing}
 
 There is always the way of tracking the generated file and including it
 with exernalfigure, but this is not very convenient since the numbering
 is subject to change.
 
 Is there an easy way to achieve rescaling of such Metapost figures?
 
 Thanks,
 Olivier
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Quick Metapost question

2006-04-26 Thread Hans Hagen
Olivier wrote:
 Hi all,

 I'm looking for an equivalent of \externalfigure[width=1mm]
 but for \reuseMPgraphic. Something like 
 \reuseMPgraphic[width=1mm]{my-mp-drawing}
   
\scale[width=1mm]{\reuseMPgraphic{my-mp-drawing}}
 There is always the way of tracking the generated file and including it
 with exernalfigure, but this is not very convenient since the numbering
 is subject to change.

 Is there an easy way to achieve rescaling of such Metapost figures?

 Thanks,
 Olivier
 ___
 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] itemize and vertical spacing

2006-04-26 Thread Olivier
Dear all,

To put vertical space in an itemized construction is easy via

\startitemize[inbetween={\blank[30pt]}]
\item first
% a 30pt vertical space will be inserted here
\item second
% a 30pt vertical space will be inserted here
\item third
% a 30pt vertical space will be inserted here
\item fourth
\stopitemize


But, now assume I want to typeset the list in two columns:
\startitemize[inbetween={\blank[30pt]}]
\item first 
\item second
\item third
\item fourth
\stopitemize

the vertical space is discarded, whereas I would like to get the
following result
\startitemize[inbetween={\blank[30pt]}]
\item first 
\item second
% a 30pt vertical space will be inserted here
\item third
\item fourth
\stopitemize

Is there a way to achieve this?

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


Re: [NTG-context] Quick Metapost question

2006-04-26 Thread Olivier
Quoting  Hans Hagen :
 -- was [EMAIL PROTECTED] on Apr 26, 2006 at 12:34:38 --

 Olivier wrote:
  Hi all,
 
  I'm looking for an equivalent of \externalfigure[width=1mm]
  but for \reuseMPgraphic. Something like 
  \reuseMPgraphic[width=1mm]{my-mp-drawing}

 \scale[width=1mm]{\reuseMPgraphic{my-mp-drawing}}
  There is always the way of tracking the generated file and including it
  with exernalfigure, but this is not very convenient since the numbering
  is subject to change.
 
  Is there an easy way to achieve rescaling of such Metapost figures?


Yes, works very well.
Exactly what I was needing.

Many thanks,
Olivier


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


Re: [NTG-context] itemize and vertical spacing

2006-04-26 Thread Taco Hoekwater
Olivier wrote:
 
 Is there a way to achieve this?

There is probably a nicer solution, but this works:

\startitemize[inbetween={\blank[30pt]\hrule height 0pt}]

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


Re: [NTG-context] Cranky booklet layout.

2006-04-26 Thread John R. Culleton
On Wednesday 26 April 2006 04:42, Willi Egger wrote:
 Hi John,

 Coud it be that you simply forgot the = after width?

 Willi

Of course. It was staring at me and I didn't see it. I missed two
of them in fact. 

Thanks Willi.
-- 
John Culleton


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


Re: [NTG-context] itemize and vertical spacing

2006-04-26 Thread Olivier
Hi Taco,

Quoting  Taco Hoekwater :
 -- was [EMAIL PROTECTED] on Apr 26, 2006 at 01:12:20 --

 Olivier wrote:
  
  Is there a way to achieve this?
 
 There is probably a nicer solution, but this works:
 
 \startitemize[inbetween={\blank[30pt]\hrule height 0pt}]

I forgot to emphasize that the issue is with two columns mode.
Hence,

\startitemize[columns,inbetween={\blank[30pt]\hrule height 0pt}]

indeed put vertical space between items, so that then, there are no
columns anymore :)

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


Re: [NTG-context] itemize and vertical spacing

2006-04-26 Thread Taco Hoekwater


Olivier wrote:
 Hi Taco,
 
 Quoting  Taco Hoekwater :
 
-- was [EMAIL PROTECTED] on Apr 26, 2006 at 01:12:20 --
 
 
Olivier wrote:

Is there a way to achieve this?

There is probably a nicer solution, but this works:

\startitemize[inbetween={\blank[30pt]\hrule height 0pt}]

  
 indeed put vertical space between items, so that then, there are no
 columns anymore :)

Ah. I had:

   \startcolumns
   \startitemize[inbetween={\blank[30pt]\hrule height 0pt}]
   ..
   \stopitemize
   \stopcolumns


This should do the trick:

   \startitemize[columns,unpacked][inbetween={\blank[30pt]}]


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


Re: [NTG-context] itemize and vertical spacing

2006-04-26 Thread Olivier
 Olivier wrote:
  Hi Taco,
  
  Quoting  Taco Hoekwater :
  
 -- was [EMAIL PROTECTED] on Apr 26, 2006 at 01:12:20 --
  
  
 Olivier wrote:
 
 Is there a way to achieve this?
 
 There is probably a nicer solution, but this works:
 
 \startitemize[inbetween={\blank[30pt]\hrule height 0pt}]
 
   
  indeed put vertical space between items, so that then, there are no
  columns anymore :)
 
 Ah. I had:
 
\startcolumns
\startitemize[inbetween={\blank[30pt]\hrule height 0pt}]
..
\stopitemize
\stopcolumns

Well, I must confess it works perfectly this way :)

Thanks a lot,
Olivier
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] continued examples

2006-04-26 Thread Christopher Creutzig
Salvete,

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

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

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

Something more generic

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


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


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


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

2006-04-26 Thread Christopher Creutzig
Salve Hans,

\def\leqalignno#1%
  {\prepareleqaligno

should be \preparealignno, with two n.


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


Re: [NTG-context] Register with numeric values

2006-04-26 Thread luigi scarso
I make an example here:
%% BEGIN 
\setupinteraction[state=start]
\setupcolors[state=start]
\definecolor[BackBrand][black]
\definecolor[Brand][white]

\newcount\ICfdigit
\newif\ifDoZero   \DoZerotrue
\newif\ifDoOne\DoOnetrue
\newif\ifDoTwo\DoTwotrue
\newif\ifDoThree  \DoThreetrue
\newif\ifDoFour   \DoFourtrue
\newif\ifDoFive   \DoFivetrue
\newif\ifDoSix\DoSixtrue
\newif\ifDoSeven  \DoSeventrue
\newif\ifDoEight \DoEighttrue
\newif\ifDoNine   \DoNinetrue
\newif\ifDoOtherDig   \DoOtherDigtrue

\defineregister[IndexCode][IndexCodes]
\def\ICTextCommand#1{%
\getfirstcharacter{#1}\ICfdigit=\firstcharacter%
\ifcase\firstcharacter %%\ICfdigit %% 0
\ifDoZero\global\DoZerofalse\ICHeadLetterCommand{0}\fi
\or%% 1
\ifDoOne\global\DoOnefalse\ICHeadLetterCommand{1}\fi
\or%% 2
\ifDoTwo\global\DoTwofalse\ICHeadLetterCommand{2}\fi
\or%% 3
\ifDoThree\global\DoThreefalse\ICHeadLetterCommand{3}\fi
\or%% 4
\ifDoFour\global\DoFourfalse\ICHeadLetterCommand{4}\fi
\or%% 5
\ifDoFive\global\DoFivefalse\ICHeadLetterCommand{5}\fi
\or%% 6
\ifDoSix\global\DoSixfalse\ICHeadLetterCommand{6}\fi
\or%% 7
\ifDoSeven\global\DoSevenfalse\ICHeadLetterCommand{7}\fi
\or%% 8
\ifDoEight\global\DoEightfalse\ICHeadLetterCommand{8}\fi
\or%% 9
\ifDoNine\global\DoNinefalse\ICHeadLetterCommand{9}\fi
\else
\ifDoOtherDig\global\DoOtherDigfalse\ICHeadLetterCommandSym{$\bigstar$}{*}\fi
\fi%
\hskip1sp#1%
}%%
\def\ICPageCommand#1{\relax}
%
\def\ICHeadLetterCommand#1{%
\blank
\framed[strut=no,width=2em,height=2em,background=color,backgroundcolor=BackBrand,foregroundcolor=Brand]{\bfb
#1\pagereference[IndexCode:NR#1]}\par\nobreak}
%
\def\ICHeadLetterCommandSym#1#2{%
\blank
\framed[strut=no,width=2em,height=2em,background=color,backgroundcolor=BackBrand,foregroundcolor=Brand]{\bfb
#1\pagereference[IndexCode:NR#2]}\par\nobreak}
\def\ICHeadLetterOtherCommand#1{\relax}
%
\setupregister[IndexCode][n=2,
 align=yes,
 balance=no,
 symbol=1,
 %distance=0pt,
 %expand=no,
 %distance=0bp,
 %partnumber=no,
 %indicator=yes,
 %% interaction=text,
 textstyle={\tfa},
 textcommand={\ICTextCommand},
 %% pagecommand={\ICPageCommand},
 command={\ICHeadLetterOtherCommand},%
 ]

\def\ICLetterEntry#1{%
\bTD
\doifreferencepermittedelse{IndexCode:NR#1}{%
\goto{\framed[strut=no,width=2em,height=2em,background=color,backgroundcolor=BackBrand,foregroundcolor=Brand]{\bfb
#1}}[IndexCode:NR#1]}
{\framed[strut=no,width=2em,height=2em,background=color,backgroundcolor=BackBrand,foregroundcolor=Brand]{\bfb}}
\eTD%
}

\def\ICLetterEntrySymbol#1#2{%
\bTD
\doifreferencepermittedelse{IndexCode:NR#2}{%
\goto{\framed[strut=no,width=2em,height=2em,background=color,backgroundcolor=BackBrand,foregroundcolor=Brand]{\bfb
#1}}[IndexCode:NR#2]}
{\framed[strut=no,width=2em,height=2em,background=color,backgroundcolor=BackBrand,foregroundcolor=Brand]{}}
\eTD%
}

\def\PutICLetterEntry{%
\setupTABLE[frame=off]
\bTABLE
\bTR
\ICLetterEntry{0}\ICLetterEntry{1}\ICLetterEntry{2}\ICLetterEntry{3}%
\ICLetterEntry{4}\ICLetterEntry{5}\ICLetterEntry{6}\ICLetterEntry{7}
\eTR
\bTR
\ICLetterEntry{8}\ICLetterEntry{9}\ICLetterEntrySymbol{$\bigstar$}{*}%
\eTR\eTABLE
}


\starttext
\IndexCode{00328273}{00328273}\par
\IndexCode{12328273}{12328273}\par
\IndexCode{2328273} {2328273} \par
\IndexCode{3328273} {3328273} \par
\IndexCode{3334328273}  {3334328273}  \par
\IndexCode{4}   {4}   \par
\IndexCode{5553}{5553}\par
\IndexCode{644328273}   {644328273}   \page
\IndexCode{844328273}   {844328273}   \par
\IndexCode{944328273}   {944328273}   \par
\IndexCode{944328273}   {944328273}   \par
\IndexCode{944328273}   {944328273}   \par

\page
{\tfd TEST }\par
\PutICLetterEntry\par
\page
\placeIndexCode

\stoptext
%% END 

 you can file a feature request to treat numbers 'as characters'

 Hans
Sorry, I don't understand that.
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] verb-c and tabulator width

2006-04-26 Thread Peter Münster
Hello,
thanks to Nikolai for the verb-c module!

One (probably there will come more) question:
How could I adjust the width of the tabulator?

It seems to be always one space inside \startC...\stopC :

\usemodule[verb-c]
\chardef\spacespertab=4
\starttext
\starttyping
int main(){
int i;
}
\stoptyping
\startC
int main(){
int i;
}
\stopC
\stoptext

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] verb-c and tabulator width

2006-04-26 Thread nico
On Wed, 26 Apr 2006 19:43:48 +0200 (CEST), Peter Münster [EMAIL PROTECTED]  
wrote:

 Hello,
 thanks to Nikolai for the verb-c module!

 One (probably there will come more) question:
 How could I adjust the width of the tabulator?

Use the tab option (not specific to C):

\usemodule[verb-c]
\setupcolors[state=start]
\starttext

\startC[tab=2]
if (i == 0) {
a = b;
} else {
a = c;
}
\stopC

\startC[tab=4]
if (i == 0) {
a = b;
} else {
a = c;
}
\stopC

\startTEX[tab=8]
\startC[tab=4]
if (i == 0) {
a = b;
} else {
a = c;
}
\stopC
\stopTEX

\stoptext

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


Re: [NTG-context] Itemize head symbol

2006-04-26 Thread nico
On Wed, 26 Apr 2006 00:13:09 +0200, Hans Hagen [EMAIL PROTECTED] wrote:

 nico wrote:
 Hello,

 Is it possible to change the symbol of \head in an itemize list, like  
 \sym
 does for \item?

 i'm not sure if i understand the question ... heads are like items so  
 the same symbols apply (or do you want different symbols for \item and  
 \head in one itemize?)

Yes, that's it. I wondered if it was possible a to specify a different  
symbol for a head, something like this:

\startitemize[n][headstyle=bold]
\head Default head symbol (here a number)\par Body
\head Default head symbol again\par Body
\symhead{U} The head symbol is U\par Body
\head The default symbol again\par Body
\stopitemize

But according to your answer, I guess it's not available :-)

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


[NTG-context] \to broken in figure captions

2006-04-26 Thread Sanjoy Mahajan
A workaround:

\starttext
\def\myto{\to}
\placefigure[abc]{ABC $n\myto1$.}{} \input tufte
\stoptext
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] \to broken in figure captions

2006-04-26 Thread Sanjoy Mahajan
In inline math, \to works fine (produces a right arrow), but in a figure
caption all hell breaks loose.

The culprit may be this redefinition of \to in enco-ini.tex:

  $ find texmf -name '*.tex' |xargs egrep -n '\\((e|g|)def|let)\\to\b'
  texmf/tex/context/base/core-pos.tex:642:  %\edef\to  {\POSprefix#1}%
  texmf/tex/context/base/enco-ini.tex:1565:  {\appendtoks\let\to\everylowercase
  texmf/tex/context/base/enco-ini.tex:1570:  {\appendtoks\let\to\everyuppercase

[context : ver: 2006.04.17 23:14]

This test file:

\starttext
\placefigure[abc]{ABC $n\to1$.}{} \input tufte
\stoptext

produces lots of errors beginning with

ERROR: Missing control sequence inserted.

--- TeX said ---
inserted text 
\inaccessible 
to be read again 
   1
\convertargument #1\to #2-\dodoglobal \edef #2
   {\detokenize {#1}}
argument ABC $n\to 1
  $.
\docompletefloat ... \doglobal \convertargument #6
  \to \asciititle \ifnofloat...
argument ...abc}{figure}{ABC $n\to 1$.}\nextbox 
  \else \docompletefloat {fi...
...
l.2 \placefigure[abc]{ABC $n\to1$.}{}
  \input tufte
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] verb-c and tabulator width

2006-04-26 Thread Peter Münster
On Wed, 26 Apr 2006, nico wrote:

 On Wed, 26 Apr 2006 19:43:48 +0200 (CEST), Peter Münster [EMAIL PROTECTED]  
 wrote:
 
  One (probably there will come more) question:
  How could I adjust the width of the tabulator?
 
 Use the tab option (not specific to C):

Thanks! In fact I should have looked into texshow instead of relying on the
old \chardef\spacespertab=...

I'm sorry, here comes already my second problem:

\usemodule[verb-c]
\setupcolors[state=start]
\setuptyping[option=C,tab=4]
\starttext
Contents of file \type{test.c}:
\startC
/** Doing this and that.
\param i the index */
void do_this(int i){
int bla;
}
\stopC

Here we get \quotation{\type{! Missing number, treated as zero.}}:
\typefile{test.c}
\stoptext

Could you help again?
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] Table width trouble

2006-04-26 Thread nico
On Wed, 26 Apr 2006 00:11:56 +0200, Hans Hagen [EMAIL PROTECTED] wrote:

 nico wrote:
 On Sun, 23 Apr 2006 18:28:20 +0200, Hans Hagen [EMAIL PROTECTED] wrote:


 nico wrote:

 Hello,

 I come back with that damn table test case. With release 2006.04.22:
 [...]



 \long\def\dohandleTBLcellA#1#2[#3]#4%


 Thanks, it does it. Another torture case: when column widths are  
 partially
 defined, it can give a weird result (here the last column has almost
 disppeared). Since it's a limit case, I don't know if it's worth being
 fixed.

 indeed a strange case

 the best is to collect them so that i can look into them some rainy day

 (btw, if users have interesting example tables that demo something not  
 in ennatab, then we can add them there)

I haven't ready-to-add tables, but maybe the following topics could be  
added (unless you want to let them to wiki):
- use of \bTABLEhead..\eTABLEhead \bTABLEbody..\eTABLEbody and  
split=repeat,
- use of the options distance, leftmargindistance, etc,
- use of negative column/row values (not in the wiki).

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


Re: [NTG-context] \to broken in figure captions

2006-04-26 Thread Aditya Mahajan
On Wed, 26 Apr 2006, Sanjoy Mahajan wrote:

 In inline math, \to works fine (produces a right arrow), but in a figure
 caption all hell breaks loose.

 The culprit may be this redefinition of \to in enco-ini.tex:

  $ find texmf -name '*.tex' |xargs egrep -n '\\((e|g|)def|let)\\to\b'
  texmf/tex/context/base/core-pos.tex:642:  %\edef\to  {\POSprefix#1}%
  texmf/tex/context/base/enco-ini.tex:1565:  {\appendtoks\let\to\everylowercase
  texmf/tex/context/base/enco-ini.tex:1570:  {\appendtoks\let\to\everyuppercase

 [context : ver: 2006.04.17 23:14]

 This test file:

 \starttext
 \placefigure[abc]{ABC $n\to1$.}{} \input tufte
 \stoptext

 produces lots of errors beginning with
 [snip]

Replacing $...$ with \mathematics{...} works without errors.

Aditya

-- 
Aditya Mahajan, EECS Systems, University of Michigan
http://www.eecs.umich.edu/~adityam || Ph: 7342624008
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] verb-c and tabulator width

2006-04-26 Thread nico
On Wed, 26 Apr 2006 21:26:08 +0200 (CEST), Peter Münster [EMAIL PROTECTED]  
wrote:

 On Wed, 26 Apr 2006, nico wrote:

 On Wed, 26 Apr 2006 19:43:48 +0200 (CEST), Peter Münster  
 [EMAIL PROTECTED]
 wrote:

  One (probably there will come more) question:
  How could I adjust the width of the tabulator?

 Use the tab option (not specific to C):

 Thanks! In fact I should have looked into texshow instead of relying on  
 the
 old \chardef\spacespertab=...

 I'm sorry, here comes already my second problem:

 \usemodule[verb-c]
 \setupcolors[state=start]
 \setuptyping[option=C,tab=4]
 \starttext
 Contents of file \type{test.c}:
 \startC
 /** Doing this and that.
   \param i the index */
 void do_this(int i){
   int bla;
 }
 \stopC

 Here we get \quotation{\type{! Missing number, treated as zero.}}:
 \typefile{test.c}
 \stoptext

 Could you help again?

Sorry, this time I cannot help. I think it's a bug in verb-c that makes a  
mess with standard C comments on several lines. C++/ISO C99 comments (//)  
seem correctly handled.

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


[NTG-context] \k in inline math

2006-04-26 Thread Sanjoy Mahajan
\starttext
$\k T$
\stoptext

The above test file, to my surprise, compiled fine.  [In Plain TeX I
usually define \k as \kappa, but I had forgotten to carry over that
definition.]  The pdf output showed a T with little hook as a subscript.

I can redefine \k as \kappa, but that might overwrite an important
definition.  However, I can't figure out where \k is defined.  With
\tracingmacros=1, the log had:

  \k -\dohandleaccent {k}

but lots of grepping in the context sources only produced:

texmf/tex/context/base/mult-ini.tex:71:\def\k!prefix!{k!} \def\l!prefix!{l!} 
\def\m!prefix!{m!}

-Sanjoy

`A society of sheep must in time beget a government of wolves.'
   - Bertrand de Jouvenal
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \k in inline math

2006-04-26 Thread Taco Hoekwater
Sanjoy Mahajan wrote:
 \starttext
 $\k T$
 \stoptext
 
 The above test file, to my surprise, compiled fine.  [In Plain TeX I
 usually define \k as \kappa, but I had forgotten to carry over that
 definition.]  The pdf output showed a T with little hook as a subscript.
 
 I can redefine \k as \kappa, but that might overwrite an important
 definition.  However, I can't figure out where \k is defined. 

enco-ini.tex:
   \definecommand k {\buildtextogonek}
(but i knew what to look for)

It is hard to come up with a clean solution to the problem
(it soon be becmes confusing when commands polymorph on you),
but this is a more or less sane way to get both:

   \unexpanded\def\k{\mathortext\kappa{\dohandleaccent{k}}}

Cheers, Taco

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


Re: [NTG-context] Cranky booklet layout.

2006-04-26 Thread John R. Culleton
On Wednesday 26 April 2006 07:21, John R. Culleton wrote:
 On Wednesday 26 April 2006 04:42, Willi Egger wrote:
  Hi John,
 
  Coud it be that you simply forgot the = after width?
 
  Willi

 Of course. It was staring at me and I didn't see it. I missed two
 of them in fact.

 Thanks Willi.

Ah I spoke too soon. The layout is OK but the TOC disapears when
I use the \setuparranging. It works otherwise. I get a message on
sysout:
  -  
output file : apr06.tuo
remark : no output file generated
 -  
The apr06.tui file has the TOC entries, e.g.,
-
c \listentry{section}{1}{}{2006 Events Calendar}{2::0:0:1:0:0:0:0::25}{25}
c \listentry{section}{2}{}{2007 Events Calendar}{2::0:0:2:0:0:0:0::25}{25}
c \listentry{section}{3}{}{2006 Officers, Directors and Board Members}
{2::0:0:3:0:0:0:0::25}{25}
c \listentry{section}{4}{}{Contact Information}{2::0:0:4:0:0:0:0::25}{25}
c \listentry{section}{5}{}{Board Meeting Minutes February 20, 2006}
{2::0:0:5:0:0:0:0::25}{25}
c \listentry{section}{6}{}{Brags}{2::0:0:6:0:0:0:0::25}{25}
--

The log file says in part:
---
./content.tex
system  : part,chapter,section not found/processed
-

content.tex is a called subfile containing just:
---
\startcolumns[n=2]
\placecontent[level=section, alternative=c]
\stopcolumns
---

I use a mode to create the booklet. When I don't use the mode the
toc is fine. Here is the mode:
--
\startmode[hal]
\definepapersize[halff][width=5.5in,height=8.5in]
\definepapersize[ful][width=8.5in,height=11in]
\setuppapersize[halff][ful]
\setuparranging[2UP,rotated,doublesided]
\setuplayout[margin=0pt,width=fit]
\stopmode
-

The TOC is not absolutely critical to this particular job, but I
would like to know what is happpening (or not happening in this
case.)

John Culleton


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


Re: [NTG-context] \k in inline math

2006-04-26 Thread Sanjoy Mahajan
From:Taco Hoekwater [EMAIL PROTECTED]
   \definecommand k {\buildtextogonek}
 (but i knew what to look for)

Now I do too.  I'll add that alternative to future egrep regexps.

   \unexpanded\def\k{\mathortext\kappa{\dohandleaccent{k}}}

Thanks, that works.

-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] \to broken in figure captions

2006-04-26 Thread Sanjoy Mahajan
From:Aditya Mahajan [EMAIL PROTECTED]
 Replacing $...$ with \mathematics{...} works without errors.

Good suggestion -- also works here.  

Shouldn't $...$ be equivalent to \mathematics{...}?

$$...$$ is deprecated relative to \startformula...\stopformula, so I
wrote a Python script to convert the plain TeX form to the
ConTexT-preferred form.  However, I like $...$: It's compact and
reading the source file is almost as easy as reading the printed file.
With \mathematics scattered throughout the paragraphs it wouldn't be
so easy, plus I'd have to convince Emacs to fontify the argument of
\mathematics, whereas it already does that for $...$.

-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] spurious line break in \switchtobodyfont

2006-04-26 Thread Mojca Miklavec
On 4/26/06, Hans Hagen wrote:
 Mojca Miklavec wrote:
  Hello,
 
  there is a misterious linebreak in the second example:
 
  abc\switchtobodyfont[ss]def
 
  abc\switchtobodyfont[,,ss]def
 
  Is this ConTeXt's fault or mine?
 
 lucky you:

 \def\dodosetfont#1#2%  #1 = set/switch state / test added to make it
 mojca proof
  {\doifsomething{#2}{\dododosetfont{#1}{#2}{\showmessage\m!fonts4{#2

 Hans

Thanks! That was (at least partially) one of gnuplot's faults, not mine ;)

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


Re: [NTG-context] Cranky booklet layout.

2006-04-26 Thread Hans Hagen
John R. Culleton wrote:
 On Wednesday 26 April 2006 07:21, John R. Culleton wrote:
   
 On Wednesday 26 April 2006 04:42, Willi Egger wrote:
 
 Hi John,

 Coud it be that you simply forgot the = after width?

 Willi
   
 Of course. It was staring at me and I didn't see it. I missed two
 of them in fact.

 Thanks Willi.
 

 Ah I spoke too soon. The layout is OK but the TOC disapears when
 I use the \setuparranging. It works otherwise. I get a message on
 sysout:
   -  
 output file : apr06.tuo
 remark : no output file generated
  -  
 The apr06.tui file has the TOC entries, e.g.,
 -
 c \listentry{section}{1}{}{2006 Events Calendar}{2::0:0:1:0:0:0:0::25}{25}
 c \listentry{section}{2}{}{2007 Events Calendar}{2::0:0:2:0:0:0:0::25}{25}
 c \listentry{section}{3}{}{2006 Officers, Directors and Board Members}
 {2::0:0:3:0:0:0:0::25}{25}
 c \listentry{section}{4}{}{Contact Information}{2::0:0:4:0:0:0:0::25}{25}
 c \listentry{section}{5}{}{Board Meeting Minutes February 20, 2006}
 {2::0:0:5:0:0:0:0::25}{25}
 c \listentry{section}{6}{}{Brags}{2::0:0:6:0:0:0:0::25}{25}
 --

 The log file says in part:
 ---
 ./content.tex
 system  : part,chapter,section not found/processed
 -

 content.tex is a called subfile containing just:
 ---
 \startcolumns[n=2]
 \placecontent[level=section, alternative=c]
 \stopcolumns
 ---

 I use a mode to create the booklet. When I don't use the mode the
 toc is fine. Here is the mode:
 --
 \startmode[hal]
 \definepapersize[halff][width=5.5in,height=8.5in]
 \definepapersize[ful][width=8.5in,height=11in]
 \setuppapersize[halff][ful]
 \setuparranging[2UP,rotated,doublesided]
 \setuplayout[margin=0pt,width=fit]
 \stopmode
 -

 The TOC is not absolutely critical to this particular job, but I
 would like to know what is happpening (or not happening in this
 case.)

   
use

texexec --arrange

which will do a normal run followed by an arrange one

(alternatively, use --once when you arrange)

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