Re: [NTG-context] index questions - again

2007-03-14 Thread Hans Hagen
Thomas A. Schmitz wrote:
 On Mar 13, 2007, at 6:41 PM, Hans Hagen wrote:

   
 OK, I tried a hack, and I just wanted to ask if there's anything
 wrong with it: as dirty workaround, I added a fourth key to
 dostartregister:


 \def\startregister
{\doquadrupleempty\dostartregister}

 \def\dostartregister[#1][#2][#3][#4]#5%
{\chardef\registerpagestatus\plustwo
 \def\currentregister{#1}%
 \setgvalue{\??id#1\??id#2}{\dodostopregister[#1][#3]{#5}}%
 \dodoregister[#3]{#4}{#5}}

 and after a quick test, this seems to do what I want. The endash
 between numbers is not bold, but I could live with that. Any comments
 from the developers?


   
 looks harmless to me so we can patch that

 

 Hmm, I'm not quite sure I'm doing the right thing. I thought I could  
 have 4 arguments in []:

 \startregister[name of register][key for range][type of register] 
 [sort key]{register entry}

 but the [sort key] doesn't seem to work. The hack is OK for me now,  
 but it may not be good for the distribution.

   
\def\dostartregister[#1][#2][#3][#4]#5%  % 3 args:  #3 is sortkey
   {\chardef\registerpagestatus\plustwo  % 4 args:  #3 is type, #4 is 
sortkey
\def\currentregister{#1}%
\iffourarguments
  \setgvalue{\??id#1\??id#2}{\dodostopregister[#1][#4]{#5}}%
  \dodoregister[#4]{#3}{#5}%
\else
  \setgvalue{\??id#1\??id#2}{\dodostopregister[#1][#3]{#5}}%
  \dodoregister[#3]{}{#5}%
\fi}

   
 can you also provide the appropriate cont-en.xml entry
 


 Would like to, but comparing register to startregister, I don't  
 see anything that has to be changed?


 cd:command name=register generated=yes file=core-reg.tex
cd:sequence
  cd:variable value=register/
/cd:sequence
cd:arguments
  cd:keywords optional=yes
cd:constant type=cd:text/
  /cd:keywords
  cd:index list=yes/
/cd:arguments
 /cd:command

 cd:command name=startregister generated=yes file=core-reg.tex
cd:sequence
  cd:string value=start/
  cd:variable value=register/
/cd:sequence
cd:arguments
  cd:keywords optional=yes
cd:constant type=cd:text/
  /cd:keywords
  cd:index list=yes/
/cd:arguments
 /cd:command

 Best

 Thomas

 ___
 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] Equivalent to \settowidth

2007-03-14 Thread Robin Kirkham
Hi all,

Is there a ConTeXt equivalent to LaTeX \settowidth{}, or better still  
some macro I can do things like

\setupsomething[
  ...
  width={\widthof{\bf sometext\emspace}},
  ...]

Cheers,

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


Re: [NTG-context] Equivalent to \settowidth

2007-03-14 Thread Zhichu Chen

Hi, Robin

I think you can include the texts in an \hbox and use \wd?? to get its width


On 3/14/07, Robin Kirkham [EMAIL PROTECTED] wrote:


Hi all,

Is there a ConTeXt equivalent to LaTeX \settowidth{}, or better still
some macro I can do things like

\setupsomething[
 ...
 width={\widthof{\bf sometext\emspace}},
 ...]

Cheers,

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





--
Sincerely yours,
Chen


 Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
  | www.sinap.ac.cn

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


Re: [NTG-context] Equivalent to \settowidth

2007-03-14 Thread Wolfgang Schuster

2007/3/14, Robin Kirkham [EMAIL PROTECTED]:


Hi all,

Is there a ConTeXt equivalent to LaTeX \settowidth{}, or better still
some macro I can do things like

\setupsomething[
 ...
 width={\widthof{\bf sometext\emspace}},
 ...]

Cheers,

Robin



Hi Robin,

I don't know if there is something build in but the following definition
should
work for simple cases.

\def\widthof#1%
 {\bgroup
  \setbox\scratchbox\hbox{#1}%
  \the\wd\scratchbox%
  \egroup}

\starttext

\getrawparameters
 [robin]
 [width=\widthof{Robin Kirkham}]

\robinwidth

\stoptext

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


Re: [NTG-context] Equivalent to \settowidth

2007-03-14 Thread Hans Hagen
Wolfgang Schuster wrote:
 2007/3/14, Robin Kirkham [EMAIL PROTECTED]:

 Hi all,

 Is there a ConTeXt equivalent to LaTeX \settowidth{}, or better still
 some macro I can do things like

 \setupsomething[
  ...
  width={\widthof{\bf sometext\emspace}},
  ...]

 Cheers,

 Robin


 Hi Robin,

 I don't know if there is something build in but the following definition
 should
 work for simple cases.

 \def\widthof#1%
  {\bgroup
   \setbox\scratchbox\hbox{#1}%
   \the\wd\scratchbox%
   \egroup}

 \starttext

 \getrawparameters
  [robin]
  [width=\widthof{Robin Kirkham}]

 \robinwidth

 \stoptext


this will typeset ok, but not with \dimen0=\robinwidth

\def\setwidthof#1\to#2%
 {\bgroup
  \setbox\scratchbox\hbox{#1}%
  \expanded{\egroup\def\noexpand#2{\the\wd\scratchbox}}}

\starttext

\setwidthof{Robin Kirkham}\to\whatever

\getrawparameters
 [robin]
 [width=\whatever]

\robinwidth

or so (untested)


-- 

-
  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] folder for formats

2007-03-14 Thread Patrick Gundlach
Hi there,

what is the suggested folder for the format files?
web2c/engine/...fmt? Or  web2c/...fmt?

Patrick
-- 
ConTeXt wiki and more: http://contextgarden.net
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] folder for formats

2007-03-14 Thread Taco Hoekwater


Patrick Gundlach wrote:
 Hi there,
 
 what is the suggested folder for the format files?
 web2c/engine/...fmt? Or  web2c/...fmt?

Using the engine subpath is the preferred way.

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


[NTG-context] marvosym and TexLive2007

2007-03-14 Thread luigi scarso
A problem with marvosym.

In TeXLive2005
[EMAIL PROTECTED]:/opt/texlive/2005# find . -iname *fmvr*
./texmf-dist/fonts/tfm/public/marvosym/fmvr8x.tfm
./texmf-dist/source/fonts/eurofont/marvosym/fmvr8x.afm
./texmf-dist/source/fonts/eurofont/marvosym/tfmfiles/original/fmvr8x.tfm
./texmf-dist/source/fonts/eurofont/marvosym/tfmfiles/original/fmvri8x.tfm
./texmf-dist/source/fonts/eurofont/marvosym/tfmfiles/yandy/fmvr8x.tfm
./texmf-dist/source/fonts/eurofont/marvosym/tfmfiles/yandy/fmvri8x.tfm
it's ok.

In TeXLive2007
[EMAIL PROTECTED]:/opt/texlive/2007# find . -iname *fmvr*
./texmf-dist/doc/latex/marvosym/mac/oztex/tex-font/misc/fmvr8x.tfm
./texmf-dist/source/fonts/eurofont/marvosym/fmvr8x.afm
./texmf-dist/source/fonts/eurofont/marvosym/tfmfiles/original/fmvr8x.tfm
./texmf-dist/source/fonts/eurofont/marvosym/tfmfiles/original/fmvri8x.tfm
./texmf-dist/source/fonts/eurofont/marvosym/tfmfiles/yandy/fmvr8x.tfm
./texmf-dist/source/fonts/eurofont/marvosym/tfmfiles/yandy/fmvri8x.tfm
./texmf-dist/tex4ht/ht-fonts/alias/marvosym/fmvri8x.htf
./texmf-dist/tex4ht/ht-fonts/unicode/marvosym/fmvr8x.htf
It's not ok.

I have done installation with scripts (for 2005 and 2007) with full-schema.

(of course no problem to fix it in my installation)

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


Re: [NTG-context] marvosym and TexLive2007

2007-03-14 Thread luigi scarso
 This is a known error. Please see:

http://www.tug.org/texlive/bugs.html

Glad to see that I don't discover a new bug :)
Glad to see that I'm always coming  a bit later  :(

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


Re: [NTG-context] texmfstart/pdftex parameters

2007-03-14 Thread Patrick Gundlach
Hi all,


 is there a way to pass parameters from texmfstart texexec  to pdftex?
 I'd like to call pdftex with -file-line-error and -halt-on-error.

Just for the record: I've found a simple solution, which works OK here
on MacOS X (should be the same on any unix):

texmfstart  texexec --pass=\'-file-line-error -halt-on-error\' hello

this way (internally) the command looks like --pass='.' which will
be the way it gets passed to texmfstart.

Patrick
-- 
ConTeXt wiki and more: http://contextgarden.net
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] index questions - again

2007-03-14 Thread Thomas A. Schmitz

On Mar 14, 2007, at 10:05 AM, Hans Hagen wrote:

 \def\dostartregister[#1][#2][#3][#4]#5%  % 3 args:  #3 is sortkey
{\chardef\registerpagestatus\plustwo  % 4 args:  #3 is type, #4 is
 sortkey
 \def\currentregister{#1}%
 \iffourarguments
   \setgvalue{\??id#1\??id#2}{\dodostopregister[#1][#4]{#5}}%
   \dodoregister[#4]{#3}{#5}%
 \else
   \setgvalue{\??id#1\??id#2}{\dodostopregister[#1][#3]{#5}}%
   \dodoregister[#3]{}{#5}%
 \fi}

Thanks so much, this seems to be doing exactly what I want! Now my  
index is almost perfect...

Thanks

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


Re: [NTG-context] marvosym and TexLive2007

2007-03-14 Thread Taco Hoekwater

Hi Luigi,

luigi scarso wrote:
 A problem with marvosym.
 ...
 I have done installation with scripts (for 2005 and 2007) with full-schema.

This is a known error. Please see:

   http://www.tug.org/texlive/bugs.html

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


Re: [NTG-context] texmfstart/pdftex parameters

2007-03-14 Thread Sanjoy Mahajan
 texmfstart  texexec --pass=\'-file-line-error -halt-on-error\' hello

Very sly.  And the short form also worked:

  texexec --pass=\'-file-line-error -halt-on-error\' hello

-Sanjoy

`Not all those who wander are lost.' (J.R.R. Tolkien)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context