Dear All (and thanks once more for the incredible help!) 

The attached example uses three link mechanisms inside a document: Linking to a 
section, to a reference, and a tagged enumeration.
All of them work in the generated PDF, but the latter two fail in the generated 
HTML file.
I have tried various bibliography implementations, none of which work; the one 
below was the shortest I could find.


Thanks!

Matthias



\setupinteraction
[   color=red,
   menu=on,
   state=start,
   page=yes
]
\tolerant\def\startbibitem[#1]#*[#2]% LMTX!
        {\doifsomethingelse{#2}%
    {\startBibItem[reference={#1},title={#2}]}%
    {\startBibItem[reference={#1},title={#1}]}%
}
\def\stopbibitem{\stopBibItem}

 \setupexternalfigures[location=default]
 \setupbackend[export=yes,xhtml=yes]
 \setupexport
  [svgstyle=mathtest-style,
   hyphen=yes,
   width=60em]
   
   \definedescription[BibItem][
        width=broad,
        margin=4em,
        indenting={no},
        indentnext=no,
        alternative=hanging,
        hang=1,
        headcommand=\gobbleoneargument,
        align=flushleft
]

\def\bibitemrule{\noindentation\vrule height0.5pt width4em depth0pt\thinspace}

\definereferenceformat [cite]  [type=title,left={},right={}]
\definereferenceformat [bibpage]   [type=page]
   \setupenumerations   [alternative=hanging,
                                width=fit,
                                right={~},
                                way=bysection,
                        prefix=chapter,
                        distance=0.5em,
                                prefixsegments={chapter:section}]
                        
                        
\defineenumeration[Theorem]
        [alternative=serried,
        width=fit,
        distance=.5\emwidth,
        text=Theorem,
        style=italic,
        title=yes,
        titlestyle=normal,
        prefix=yes,
        headcommand=\groupedcommand{}{.}
        ]                       

\defineenumeration
        [Proof]
        [alternative=serried,
        width=fit,
        distance=\emwidth,
        text=Proof,
        number=no,
        headstyle=italic,
        headcommand=\groupedcommand{}{.},
        title=yes,
        titlestyle=normal,
        closesymbol=\mathqed]                   
\starttext 

\startsection[title=Introduction]

\startparagraph
The Bibliography is \in{here}[sec:biblio].
\stopparagraph

\startTheorem[thm:euler]
\startformula
e^{\pi i}+1=0 \ .
\stopformula
\stopTheorem

\startProof
See \cite[Euler1777]. 
\stopProof

% make some fluff so that links have to do some work
 \dorecurse{5}
{\startparagraph
\input knuth
\stopparagraph
}

\startparagraph
>From \in{Theorem}[thm:euler] it follows that 
\startformula
e^{\pi i/2}=i \ .
\stopformula
\stopparagraph

\stopsection

\startsection[title=References, reference={sec:biblio}]
    
\startbibitem[Euler1777]
Euler: \emph{Collected Works.} 
\stopbibitem

\stopsection

\stoptext

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to