# Re: [NTG-context] setuphead for in-paragraph head ?

On 12 janv. 2014, at 21:30, Wolfgang Schuster <schuster.wolfg...@gmail.com>
wrote:

>
> Am 11.01.2014 um 20:01 schrieb Otared Kavian <ota...@gmail.com>:
>
>> I will put this example on the wiki, but before doing so I have another
>> question:
>> can one add two automatic links at the end of each question so that one can
>> navigate easily to the respective hint or answer corresponding to that
>> question? Indeed if this were possible, one would add also two automatic
>> links to each hint going to its question and the corresponding answer, and
>> two other links to each answer going to its hint and question. One can do
>> this manually by adding a reference to each question, each hint and each
>> answer, but it would be nice to have this done automatically.
>
> Not without writing your own environment where you generate a unique
> reference for each question, hint and answer.

If I understand well, one way might be something like (where \theQuestionNumber
stands for the number given by \startquestion)

\define\StartQuestion{\startquestion[Q:\theQuestionNumber]}
\define\StartHint{\startquestion[H:\theQuestionNumber]}
\define\StopQuestion{\par\in{Hint}[H:\theQuestionNumber]\par
\define\StopHint{\par\in{Question}[Q:\theQuestionNumber]\par
\in{Hint}[H:\theQuestionNumber]\stopquestion}

and then using \StartQuestion \StopQuestion, etc, instead of \startquestion
\stopquestion.
But how can I refer to the \theQuestionNumber set by \startquestion?

Thanks for your time and your attention.

Best regards: OK

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________