ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* formula, bookmarks and misc
@ 2006-10-29  1:09 Sebastian Rooks
  2006-10-29  6:38 ` Aditya Mahajan
  2006-10-31  8:45 ` Wolfgang Schuster
  0 siblings, 2 replies; 10+ messages in thread
From: Sebastian Rooks @ 2006-10-29  1:09 UTC (permalink / raw)


Dear ConTeXters,

1/ I would like to use a named formula with a reference containing
several subformulae each with a reference. The closer I can get to is to
add an empty namedformula followed by subformulae (see test file below).
How can I get rid of the empty line with a number in the pdf ?

2/ I'm using bookmarks but abbreviations in heads do not work properly.
I've used a workaround some 3 years ago but I cannot remember which. Any
suggestion ? (see test file below)

3/ What should I do to get the bookmarks numbered with their
chapter/section/ etc. number ? (see test file below)

4/ How can I redefine the \vec command in my formulae without having a
warning "system          : command \vec is already defined"

5/ I do like a lot the minimum distribution so easy to install. It would
be even better if bibtex can be added. It's only 82.8 KiB

Thanks for ConTeXt (special thanks to Hans and Taco of course), it's
really a pleasure to work with it.

Regards,

  Seb


test.tex
%%%%%    %><    %><    %><    %%%%%

\setupinteraction[state=start]

\placebookmarks[chapter,section,subsection]

\abbreviation [UK]	{UK}	{United Kingdom of Great Britain and Northern
Ireland}

\starttext
  \placelist[formula]
  \chapter{Math formulae}

    \placenamedformula
      [eq:well_known]
      {Well known equalities}
      \startformula
      \stopformula
    \placesubformula[eq:first]{a}
    \startformula
	  1+0=1
    \stopformula

    \placesubformula[eq:second]{b}
    \startformula
      1+1=2
	\stopformula


\chapter{Weather in the \UK}
\dorecurse {2} {\input dawkins \par}

\stoptext

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: formula, bookmarks and misc
  2006-10-29  1:09 formula, bookmarks and misc Sebastian Rooks
@ 2006-10-29  6:38 ` Aditya Mahajan
  2006-10-29 16:47   ` Sebastian Rooks
  2006-10-31  8:45 ` Wolfgang Schuster
  1 sibling, 1 reply; 10+ messages in thread
From: Aditya Mahajan @ 2006-10-29  6:38 UTC (permalink / raw)


On Sun, 29 Oct 2006, Sebastian Rooks wrote:

> Dear ConTeXters,
>
> 1/ I would like to use a named formula with a reference containing
> several subformulae each with a reference. The closer I can get to is to
> add an empty namedformula followed by subformulae (see test file below).
> How can I get rid of the empty line with a number in the pdf ?

I took a different approach to this. I had written some macros that do 
automatic subformula numbering, and I added a macro there to do have a 
named subformulas. See the code at the end.


> 4/ How can I redefine the \vec command in my formulae without having a
> warning "system          : command \vec is already defined"


\def\vec#1{whatever}

will not give you a warning. You get a warning only if you use 
\define.


> 5/ I do like a lot the minimum distribution so easy to install. It would
> be even better if bibtex can be added. It's only 82.8 KiB

bibtex is part of the minimal distribution for windows. It is in 
texmf-mswin/bin/


Now, coming back to the code for subformulas. I defined a 
\startnamedsubformulas[tag]{name} to take care of "named" subformulas. 
This is build on top of an existing \startsubformulas ... 
\stopsubformulas that do automatic numbering of subformulas. See the 
examples in the end.


\unprotect

\definesystemvariable {fn}   % subForMulas
                              % Suggestion by Hans to use fn

%D \macros{setupsubformulas}

\def\setupsubformulas
   {\dodoubleargument\getparameters[\??fn]}

\definenumber
   [parent\v!formula]

\def\subformulaconversion#1%
   {\getnumber[parent\v!formula]%
    \@@fnseparator%
    \convertnumber{\@@fnconversion}{#1}}

\defineconversion[sub\v!formula\c!conversion][\subformulaconversion]

%D \macros{startsubformulas}

\def\startsubformulas%
   {\dosingleempty\dostartsubformulas}

\def\dostartsubformulas[#1]%
   {\incrementnumber[\v!formula]
    \makesectionnumber[\v!formula]
    \iffirstargument
      \rawreference{\s!for}{#1}{\composedsectionnumber}
    \fi
    \expanded{\setupnumber
      [parent\v!formula]
      [start={\rawnumber[\v!formula]},
       \c!way=\@@fmway,
       conversion=\@@fmconversion]}
    \savenumber[\v!formula]
    \bgroup

\setupformulas[\c!conversion=sub\v!formula\c!conversion,\c!way=\v!by\v!text]
    \resetnumber[\v!formula]}

\def\stopsubformulas%
   {\restorenumber[\v!formula]
    \resetlastlinewidth
    \nonoindentation
    \dochecknextindentation{\??fn}%
    \egroup
    \dorechecknextindentation} % here ?

% I have just copied the indentation checking from \stopformulas. I am not
% sure on how this works. I did not change this to take care of side 
% floats

%D Named subformulas

\def\startnamedsubformulas%
   {\dosingleempty\dostartnamedsubformulas}

\def\dostartnamedsubformulas[#1]#2%
   {\iffirstargument
      \def\next{\startsubformulas[#1]}%
     \else
       \let\next\startsubformulas
     \fi
     \setformulalistentry{#2}%
     \next}

\def\stopnamedsubformulas{\stopsubformulas}

\setupsubformulas
   [\c!conversion=\v!character,
    \c!separator=\@@fmseparator,
    \c!indentnext=\@@fmindentnext]

\protect

%D Possible features
%D * One should be able to refer to the subformula number, without the 
formula
%D   number, e.g., see equations 3a--c.
%D * Allow
%D    a = b    1
%D    c = d    2.a
%D    e = f    2.b
%D    g = h    3
%D  Algorithm do do this automatically
%D  flag = previous_subnumbered ;
%D  \let\afterNR\relax
%D  previous_subnumbered = false ;
%D  for (each row)
%D  if (subnumber_present_row == true)
%D    if (previous_subnumbered == true)
%D      \def\afterNR{\decrementnumber[formula]}
%D    end
%D    previous_subnumbered = true ;
%D  else
%D    previous_subnumbered = false ;
%D  end


% Examples

\starttext

\placelist[formula]


\section{Math Formulas}

\startnamedsubformulas[eq:well_known]{Well Known Equalities}
   \placeformula[eq:first]  \startformula
     1 + 0 = 1
   \stopformula
   \placeformula[eq:second] \startformula
     1 + 1 = 2
   \stopformula
\stopnamedsubformulas
\page

Other examples from an email discussion with Mojca.

\startbuffer
\placeformula \startformula
a^2 + b^2 = c^2
\stopformula
\stopbuffer


\setupsubformulas
  [conversion=romannumerals]


\startsubformulas[Maxwell]
   \placeformula \startformulas
     \startformula \startalign
       \NC \nabla\cdot\bf E  \NC = \frac{\rho}{\varepsilon_0} 
\NR[Maxwell 1]
       \NC \nabla\times\bf E \NC = - \frac{\partial\bf B}{\partial t}
       \NR[Maxwell II]
       \stopalign \stopformula
       \startformula \startalign
         \NC \nabla\cdot \bf B \NC = 0 \NR[Maxwell III]
         \NC \nabla\times\bf B \NC = \mu_0{\bf
j}+\varepsilon_0\mu_0\frac{\partial\bf E}{\partial t} \NR[Maxwell IV]
       \stopalign \stopformula
   \stopformulas
\stopsubformulas

Maxwell : \in [Maxwell]

II : \in [Maxwell II]



\section{conversion}

\setupformulas
   [conversion=character]
\setupsubformulas
   [conversion=n]

\getbuffer

\startsubformulas[subformula]
  \dorecurse{2}{\getbuffer}
  \placeformula[my x formula] \startformula x \stopformula
\stopsubformulas

\placeformula[my y formula] \startformula y \stopformula


reference for subformula: \in [subformula]

reference for x: \in [my x formula]

reference for y: \in [my y formula]

\setupformulas[way=bysection]

\section{a}

\getbuffer

\startsubformulas
  \dorecurse{2}{\getbuffer}
  \placeformula[my x2 formula] \startformula x \stopformula
\stopsubformulas

\placeformula[my y2 formula] \startformula y \stopformula

  reference for x: \in [my x2 formula]

  reference for y: \in [my y2 formula]



\stoptext

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: formula, bookmarks and misc
  2006-10-29  6:38 ` Aditya Mahajan
@ 2006-10-29 16:47   ` Sebastian Rooks
  2006-10-29 17:18     ` Aditya Mahajan
  0 siblings, 1 reply; 10+ messages in thread
From: Sebastian Rooks @ 2006-10-29 16:47 UTC (permalink / raw)


Hi Aditya,

Aditya Mahajan wrote:
>> 1/ I would like to use a named formula with a reference containing
>> several subformulae each with a reference. The closer I can get to is to
>> add an empty namedformula followed by subformulae (see test file below).
>> How can I get rid of the empty line with a number in the pdf ?
> 
> I took a different approach to this. I had written some macros that do 
> automatic subformula numbering, and I added a macro there to do have a 
> named subformulas. See the code at the end. 
Works very well thank you.
Can I add this to the wiki ?


>> 5/ I do like a lot the minimum distribution so easy to install. It would
>> be even better if bibtex can be added. It's only 82.8 KiB
> 
> bibtex is part of the minimal distribution for windows. It is in 
> texmf-mswin/bin/
It's not in texmf-linux for the stable release.

Thank you for your help. Regards,

  Sebastian

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: formula, bookmarks and misc
  2006-10-29 16:47   ` Sebastian Rooks
@ 2006-10-29 17:18     ` Aditya Mahajan
  0 siblings, 0 replies; 10+ messages in thread
From: Aditya Mahajan @ 2006-10-29 17:18 UTC (permalink / raw)


On Sun, 29 Oct 2006, Sebastian Rooks wrote:

> Hi Aditya,
>
> Aditya Mahajan wrote:
>>> 1/ I would like to use a named formula with a reference containing
>>> several subformulae each with a reference. The closer I can get to is to
>>> add an empty namedformula followed by subformulae (see test file below).
>>> How can I get rid of the empty line with a number in the pdf ?
>>
>> I took a different approach to this. I had written some macros that do
>> automatic subformula numbering, and I added a macro there to do have a
>> named subformulas. See the code at the end.
> Works very well thank you.
> Can I add this to the wiki ?

Sure, but with a note that this will end up in the core eventually.

Aditya

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: formula, bookmarks and misc
  2006-10-29  1:09 formula, bookmarks and misc Sebastian Rooks
  2006-10-29  6:38 ` Aditya Mahajan
@ 2006-10-31  8:45 ` Wolfgang Schuster
  2006-10-31 20:55   ` Aditya Mahajan
  2006-11-01 23:57   ` Sebastian Rooks
  1 sibling, 2 replies; 10+ messages in thread
From: Wolfgang Schuster @ 2006-10-31  8:45 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 2229 bytes --]

Hi Sebastian,


2006/10/29, Sebastian Rooks <sebastian.rooks@free.fr>:
>
> Dear ConTeXters,
>
> 1/ I would like to use a named formula with a reference containing
> several subformulae each with a reference. The closer I can get to is to
> add an empty namedformula followed by subformulae (see test file below).
> How can I get rid of the empty line with a number in the pdf ?
>
> 2/ I'm using bookmarks but abbreviations in heads do not work properly.
> I've used a workaround some 3 years ago but I cannot remember which. Any
> suggestion ? (see test file below)



\setupinteraction[state=start]

\appendtoks \def\UK{UK} \to \simplifiedcommands

\placebookmarks[chapter,section,subsection]

\abbreviation [UK] {UK} {United Kingdom of Great Britain and Northern
Ireland}

\starttext

\chapter{Weather in the \UK}
\dorecurse {2} {\input dawkins \par}

\stoptext

3/ What should I do to get the bookmarks numbered with their
> chapter/section/ etc. number ? (see test file below)
>
> 4/ How can I redefine the \vec command in my formulae without having a
> warning "system          : command \vec is already defined"
>
> 5/ I do like a lot the minimum distribution so easy to install. It would
> be even better if bibtex can be added. It's only 82.8 KiB
>
> Thanks for ConTeXt (special thanks to Hans and Taco of course), it's
> really a pleasure to work with it.
>
> Regards,
>
> Seb
>
>
> test.tex
> %%%%%    %><    %><    %><    %%%%%
>
> \setupinteraction[state=start]
>
> \placebookmarks[chapter,section,subsection]
>
> \abbreviation [UK]      {UK}    {United Kingdom of Great Britain and
> Northern
> Ireland}
>
> \starttext
> \placelist[formula]
> \chapter{Math formulae}
>
>    \placenamedformula
>      [eq:well_known]
>      {Well known equalities}
>      \startformula
>      \stopformula
>    \placesubformula[eq:first]{a}
>    \startformula
>          1+0=1
>    \stopformula
>
>    \placesubformula[eq:second]{b}
>    \startformula
>      1+1=2
>        \stopformula
>
>
> \chapter{Weather in the \UK}
> \dorecurse {2} {\input dawkins \par}
>
> \stoptext
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 3346 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: formula, bookmarks and misc
  2006-10-31  8:45 ` Wolfgang Schuster
@ 2006-10-31 20:55   ` Aditya Mahajan
  2006-11-02  8:23     ` Wolfgang Schuster
  2006-11-01 23:57   ` Sebastian Rooks
  1 sibling, 1 reply; 10+ messages in thread
From: Aditya Mahajan @ 2006-10-31 20:55 UTC (permalink / raw)


On Tue, 31 Oct 2006, Wolfgang Schuster wrote:

> 2006/10/29, Sebastian Rooks <sebastian.rooks@free.fr>:
>> 
>> 2/ I'm using bookmarks but abbreviations in heads do not work properly.
>> I've used a workaround some 3 years ago but I cannot remember which. Any
>> suggestion ? (see test file below)
>
> \appendtoks \def\UK{UK} \to \simplifiedcommands


Why doesn't

\doglobal\appendtoks\setvalue{#2}{#2}\to\simplifiedcommands

line in the definition of dodocomplexsynonym do this automatically?


Aditya

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: formula, bookmarks and misc
  2006-10-31  8:45 ` Wolfgang Schuster
  2006-10-31 20:55   ` Aditya Mahajan
@ 2006-11-01 23:57   ` Sebastian Rooks
  2006-11-03 10:52     ` Wolfgang Schuster
  1 sibling, 1 reply; 10+ messages in thread
From: Sebastian Rooks @ 2006-11-01 23:57 UTC (permalink / raw)


Thank you !
Any tip for getting numbered bookmarks (question 3) ?
Regards,

  Seb

Wolfgang Schuster wrote:
> 
> Hi Sebastian,
> 
>  
> 2006/10/29, Sebastian Rooks <sebastian.rooks@free.fr
> <mailto:sebastian.rooks@free.fr>>:
> 
>     Dear ConTeXters,
> 
>     1/ I would like to use a named formula with a reference containing
>     several subformulae each with a reference. The closer I can get to
>     is to
>     add an empty namedformula followed by subformulae (see test file below).
>     How can I get rid of the empty line with a number in the pdf ?
> 
>     2/ I'm using bookmarks but abbreviations in heads do not work properly.
>     I've used a workaround some 3 years ago but I cannot remember which. Any
>     suggestion ? (see test file below)
> 
>  
> 
> \setupinteraction[state=start]
> 
> \appendtoks \def\UK{UK} \to \simplifiedcommands
> 
> \placebookmarks[chapter,section,subsection]
> 
> \abbreviation [UK] {UK} {United Kingdom of Great Britain and Northern
> Ireland}
> 
> \starttext
> 
> \chapter{Weather in the \UK}
> \dorecurse {2} {\input dawkins \par}
> 
> \stoptext
> 
> 
>     3/ What should I do to get the bookmarks numbered with their
>     chapter/section/ etc. number ? (see test file below)
> 
>     4/ How can I redefine the \vec command in my formulae without having a
>     warning "system          : command \vec is already defined"
> 
>     5/ I do like a lot the minimum distribution so easy to install. It
>     would
>     be even better if bibtex can be added. It's only 82.8 KiB
> 
>     Thanks for ConTeXt (special thanks to Hans and Taco of course), it's
>     really a pleasure to work with it.
> 
>     Regards,
> 
>     Seb
> 
> 
>     test.tex
>     %%%%%    %><    %><    %><    %%%%%
> 
>     \setupinteraction[state=start]
> 
>     \placebookmarks[chapter,section,subsection]
> 
>     \abbreviation [UK]      {UK}    {United Kingdom of Great Britain and
>     Northern
>     Ireland}
> 
>     \starttext
>     \placelist[formula]
>     \chapter{Math formulae}
> 
>        \placenamedformula
>          [eq:well_known]
>          {Well known equalities}
>          \startformula
>          \stopformula
>        \placesubformula[eq:first]{a}
>        \startformula
>              1+0=1
>        \stopformula
> 
>        \placesubformula[eq:second]{b}
>        \startformula
>          1+1=2
>            \stopformula
> 
> 
>     \chapter{Weather in the \UK}
>     \dorecurse {2} {\input dawkins \par}
> 
>     \stoptext
>     _______________________________________________
>     ntg-context mailing list
>     ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>
>     http://www.ntg.nl/mailman/listinfo/ntg-context
>     <http://www.ntg.nl/mailman/listinfo/ntg-context>
> 
> 
> Wolfgang
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: formula, bookmarks and misc
  2006-10-31 20:55   ` Aditya Mahajan
@ 2006-11-02  8:23     ` Wolfgang Schuster
  2006-11-02 17:22       ` Aditya Mahajan
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2006-11-02  8:23 UTC (permalink / raw)


On Tue, 31 Oct 2006 15:55:08 -0500 (EST)
Aditya Mahajan <adityam@umich.edu> wrote:

> On Tue, 31 Oct 2006, Wolfgang Schuster wrote:
> 
> > 2006/10/29, Sebastian Rooks <sebastian.rooks@free.fr>:
> >> 
> >> 2/ I'm using bookmarks but abbreviations in heads do not work properly.
> >> I've used a workaround some 3 years ago but I cannot remember which. Any
> >> suggestion ? (see test file below)
> >
> > \appendtoks \def\UK{UK} \to \simplifiedcommands
> 
> 
> Why doesn't
> 
> \doglobal\appendtoks\setvalue{#2}{#2}\to\simplifiedcommands
> 
> line in the definition of dodocomplexsynonym do this automatically?
> 

Hi Aditya,

this was new to me.

You are right, this did work as expected  but only when you place the
definition of the abbreviation and the \placebookmarks command in the
right order.

The following order in the souce works.

\abbreviation [UK] {UK} {United Kingdom of Great Britain and Northern
Ireland}

\placebookmarks[chapter,section,subsection]

The problems is, the token register \simplifiedcommands is called by
the \placebookmarks command and every abbreviations, that follows after
the command is ignored.

Wolfgang

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: formula, bookmarks and misc
  2006-11-02  8:23     ` Wolfgang Schuster
@ 2006-11-02 17:22       ` Aditya Mahajan
  0 siblings, 0 replies; 10+ messages in thread
From: Aditya Mahajan @ 2006-11-02 17:22 UTC (permalink / raw)


On Thu, 2 Nov 2006, Wolfgang Schuster wrote:

> On Tue, 31 Oct 2006 15:55:08 -0500 (EST)
> Aditya Mahajan <adityam@umich.edu> wrote:
>
>> On Tue, 31 Oct 2006, Wolfgang Schuster wrote:
>>
>>> 2006/10/29, Sebastian Rooks <sebastian.rooks@free.fr>:
>>>>
>>>> 2/ I'm using bookmarks but abbreviations in heads do not work properly.
>>>> I've used a workaround some 3 years ago but I cannot remember which. Any
>>>> suggestion ? (see test file below)
>>>
>>> \appendtoks \def\UK{UK} \to \simplifiedcommands
>>
>>
>> Why doesn't
>>
>> \doglobal\appendtoks\setvalue{#2}{#2}\to\simplifiedcommands
>>
>> line in the definition of dodocomplexsynonym do this automatically?
>>
>
> Hi Aditya,
>
> this was new to me.
>
> You are right, this did work as expected  but only when you place the
> definition of the abbreviation and the \placebookmarks command in the
> right order.
>
> The following order in the souce works.
>
> \abbreviation [UK] {UK} {United Kingdom of Great Britain and Northern
> Ireland}
>
> \placebookmarks[chapter,section,subsection]
>
> The problems is, the token register \simplifiedcommands is called by
> the \placebookmarks command and every abbreviations, that follows after
> the command is ignored.

I will call this a bug. Typically, in my workflow, \placebookmark will 
go in the environment file (or the module) and \abbreviation will be 
in the main file.

Hans, is there someway to make sure that this works even when 
abbreviations are defined after \placebookmark. Postponing to 
processing to everystarttext comes to mind, but I do not know how 
rugged that will be.

Aditya

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: formula, bookmarks and misc
  2006-11-01 23:57   ` Sebastian Rooks
@ 2006-11-03 10:52     ` Wolfgang Schuster
  0 siblings, 0 replies; 10+ messages in thread
From: Wolfgang Schuster @ 2006-11-03 10:52 UTC (permalink / raw)


On Wed, 01 Nov 2006 23:57:21 +0000
Sebastian Rooks <sebastian.rooks@free.fr> wrote:

> Thank you !
> Any tip for getting numbered bookmarks (question 3) ?
> Regards,
> 
>   Seb
> 
> Wolfgang Schuster wrote:
> > 
> > Hi Sebastian,
> > 
> >  
> > 2006/10/29, Sebastian Rooks <sebastian.rooks@free.fr
> > <mailto:sebastian.rooks@free.fr>>:
> > 
> >     Dear ConTeXters,
> > 
> >     1/ I would like to use a named formula with a reference containing
> >     several subformulae each with a reference. The closer I can get to
> >     is to
> >     add an empty namedformula followed by subformulae (see test file below).
> >     How can I get rid of the empty line with a number in the pdf ?
> > 
> >     2/ I'm using bookmarks but abbreviations in heads do not work properly.
> >     I've used a workaround some 3 years ago but I cannot remember which. Any
> >     suggestion ? (see test file below)
> > 
> >  
> > 
> > \setupinteraction[state=start]
> > 
> > \appendtoks \def\UK{UK} \to \simplifiedcommands
> > 
> > \placebookmarks[chapter,section,subsection]
> > 
> > \abbreviation [UK] {UK} {United Kingdom of Great Britain and Northern
> > Ireland}
> > 
> > \starttext
> > 
> > \chapter{Weather in the \UK}
> > \dorecurse {2} {\input dawkins \par}
> > 
> > \stoptext
> > 
> > 
> >     3/ What should I do to get the bookmarks numbered with their
> >     chapter/section/ etc. number ? (see test file below)
> > 
> >     4/ How can I redefine the \vec command in my formulae without having a
> >     warning "system          : command \vec is already defined"
> > 
> >     5/ I do like a lot the minimum distribution so easy to install. It
> >     would
> >     be even better if bibtex can be added. It's only 82.8 KiB
> > 
> >     Thanks for ConTeXt (special thanks to Hans and Taco of course), it's
> >     really a pleasure to work with it.
> > 
> >     Regards,
> > 
> >     Seb
> > 
> > 
> >     test.tex
> >     %%%%%    %><    %><    %><    %%%%%
> > 
> >     \setupinteraction[state=start]
> > 
> >     \placebookmarks[chapter,section,subsection]
> > 
> >     \abbreviation [UK]      {UK}    {United Kingdom of Great Britain and
> >     Northern
> >     Ireland}
> > 
> >     \starttext
> >     \placelist[formula]
> >     \chapter{Math formulae}
> > 
> >        \placenamedformula
> >          [eq:well_known]
> >          {Well known equalities}
> >          \startformula
> >          \stopformula
> >        \placesubformula[eq:first]{a}
> >        \startformula
> >              1+0=1
> >        \stopformula
> > 
> >        \placesubformula[eq:second]{b}
> >        \startformula
> >          1+1=2
> >            \stopformula
> > 
> > 
> >     \chapter{Weather in the \UK}
> >     \dorecurse {2} {\input dawkins \par}
> > 
> >     \stoptext
> >     _______________________________________________
> >     ntg-context mailing list
> >     ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>
> >     http://www.ntg.nl/mailman/listinfo/ntg-context
> >     <http://www.ntg.nl/mailman/listinfo/ntg-context>
> > 
> > 
> > Wolfgang
> >  

Hi Sebastian,

I found now solution to your problem.

There was the same question on the list 1998 and Hans gave only a not
working solution, dont't know if there was also working one.

The original message:

<message>

Berend de Boer wrote:

> Is it possible (and how) to have the chapter and paragraph numbers in the bookmark (outline) for pdf output?
> 
> Now I only get the text of the chapter but I would like the part.chapter.paragraph number as well.

(did you ever try \tracebookmarkstrue?)

\def\doinsertsomebookmark#1#2#3#4#5#6%
  {\global\utilitydonetrue
   \global\let\localbookmark=\gobbleoneargument
   \global\let\flushbookmark=\relax
   \doifinstringelse{#1}{\openbookmarklist}
     {\chardef\openbookmark=1}
     {\chardef\openbookmark=0}%
   \iftracebookmarks(#6: #4)\quad(\the\openbookmark)\par\fi
   \doinsertbookmark{#2}{#3}{#4}{#5}{\openbookmark}}

Can you try: 

   \doinsertbookmark{#2}{#3}{#6 #4}{#5}{\openbookmark}} 

I can add an option: sectionnumber=yes/no to a yet non existing setup
command, but first I wanna make sure what way to go. 

Hans

</message>

A rather old problem and no solution and no setup.

Wolfgang

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-11-03 10:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-29  1:09 formula, bookmarks and misc Sebastian Rooks
2006-10-29  6:38 ` Aditya Mahajan
2006-10-29 16:47   ` Sebastian Rooks
2006-10-29 17:18     ` Aditya Mahajan
2006-10-31  8:45 ` Wolfgang Schuster
2006-10-31 20:55   ` Aditya Mahajan
2006-11-02  8:23     ` Wolfgang Schuster
2006-11-02 17:22       ` Aditya Mahajan
2006-11-01 23:57   ` Sebastian Rooks
2006-11-03 10:52     ` Wolfgang Schuster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).