Mikael P. Sundqvist mickep at gmail.com
Wed Nov 2 16:16:04 CET 2016

Dear Otared (and list),

The links from the answers to the questions work as wanted with my
solution, it is the links from the questions to the answers that do
not.

I guess I need something like

where ### is the reference tag I set. But I don't know what to change
the ### into (or if that would work).

Best regards, Mikael

On Wed, Nov 2, 2016 at 1:52 PM, Otared Kavian <otared at gmail.com> wrote:
> Hi Mikael,
>
> I had a similar question some time ago, but I wanted to add a sort of automatic referencing of questions and answers (and interaction going from questions to answers and back).
>
> If you accept the hurdle of adding manual references, in your case you can add (for instance…)
>
>         \goto{:-)}[Q:test]
>
> to the end of your answer to go back to the respective question. But when you have several dozens of such references to add manually, it is not a good idea.
>
> However I could not find a way to code the items (that is the questions) in such a way that each adds automatically a unique reference, and so I am interested too in the solution of the problem you mention.
>
> Best regards: OK
>
>
>> On 2 Nov 2016, at 12:43, Mikael P. Sundqvist <mickep at gmail.com> wrote:
>>
>> Dear list,
>>
>> I have a pretty large text with a lot of questions and answers, and
>> want the user(students) to be able to click in the pdf to go from a
>> certain exercise to its answer, and back. I have a solution (see
>> below) to go from answers to questions, but not the other way around.
>> I simply have no idea on how to make the red text (in the head) in the
>> example question clickable with the answer on the next page as target.
>> As you can see, the answer has a tag A:Q:test (I want to set these
>> automatically in that manner), and clicking the green text I get to
>> the correct place. I just don't see how to make the "Question 1.1"
>> clickable with that target.
>>
>> I hope I make myself clear. If it matters, in the solution one could
>> assume that the optional tag of the \startquestion \stopquestion is
>> given for all questions.
>>
>> Best regards, Mikael
>>
>> %% qa.tex
>> \setupinteraction[state=start,color=,contrastcolor=,style=]
>>
>>
>>
>> \defineenumeration[question][
>> text=Question,
>> width=fit,
>> number=yes,
>> prefix=yes,
>> prefixsegments=section,
>> ]
>>
>> \starttext
>>
>> \section{A section with questions}
>>
>> \startquestion[Q:test]
>> Solve this question!
>> \stopquestion
>>
>> We could, however, click \color[darkyellow]{\in{Answer}[A:Q:test]}.
>>
>> What question? The answer is \quotation{do it yourself}!
>>
>> \page[yes]
>>
>>
>>
>> \stoptext
>> <qa.pdf>___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to the Wiki!
>>
>> maillist : ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki     : http://contextgarden.net
>> ___________________________________________________________________________________
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________