# ConTeXt: How to set up interaction mode to emulate hyperref?

I have prepared a self explanatory MWE to check interaction mode for various objects in ConTeXt ver: 2013.01.10 01:04 MKIV. Evince document viewer is used for testing.

Questions:

1. How to set up different colors to distinguish between different kind of hyperlinks like floats/references/URLs?

2. Make links to open in the same zoom settings instead of switching to FitHeight mode? Links to chapters/sections open in the same zoom settings while placing the referred object on the top portion of the screen. However, links to floats change the zoom settings and default to FitHeight mode.

3. A list of hyperlinked page numbers after each bibliographic entry to come back to the page where it was referenced (option backref in hyperref).

4. In TOC/List of floats, on the number of the chapter/float should be hyperlinked instead of the entire line (as is happening in the MWE).

I expect all the above questions to be answered by setting simple parameters in context. Thats why I have lumped them all together.

MWE

\setupbibtex[database=bib]
\setuppublications[alternative=num, refcommand=authornum]

\setupinteraction
[state=start,
click=yes,
focus=standard,
color=red]

\useURL[garden][http://www.contextgarden.net]

\starttext
\subject{Contents}
\placecontent
\subject{Figures}
\placelistoffigures
\section[chap:one]{Emulating {\tt hyperref}}

\subject{Bibliography}
Please refer \cite[me13b] for no particular reason. Is
there {\tt backref} like facility in \CONTEXT so that
there is a clickable list of page numbers after each
reference to come back to the page on which it was referred.

\subject{URLs}
Anything hyperref can do, \CONTEXT\ can do natively.
May be I ought to search \from[garden].

%
\placefigure[here][fig:dummy]{Dummy figure}{\externalfigure[dummy]}
%

\subject{Various Lists}
I would like {\em only} the chapter/section/subsection/float numbers
to be clickable in the TOC and List of floats. Presently, the entire

\subject{Footnotes}
Lets check a footnote now\footnote{Though typographically not
recommended, footnotes are never the less handy at times.}. When I click
on the footnote number, the page opens in {\tt FitHeight} mode instead of  putting
the footnote on screen in the current zoom settings. Same thing happens
when I click on the footnote to come back.
\subject{Floats}
Now, lets refer to the figure \in[fig:dummy] which is in chapter
\in[chap:one] titled \about[chap:one] on page \at[chap:one].
When I click any of the {\tt chapter} related links in {\tt FitWidth} mode,
it takes me nicely to the chapter name still in {\tt FitWidth} mode. However,
when I click on the figure number, it switches back to {\tt FitHeight} mode.
Ideally, one would like a link to take me to the refered object in the currect
zoom level.

\section{Bibliography}
\placepublications[criterium=text]
\stoptext


bib.bib

@article{me13,
title = {This bibliography in context},
author = {Convert, Recent},
journal = {Tex SX},
volume = {1},
number = {1},
pages = {1-11},
year = {2013},
}

-

1. How to set up different colors to distinguish between different kind of hyperlinks like floats/references/URLs?

\definereferenceformat[infigure][style=bold, color=green]
\infigure[fig:somefig]

2. Make links to open in the same zoom settings instead of switching to FitHeight mode? Links to chapters/sections open in the same zoom settings while placing the referred object on the top portion of the screen. However, links to floats change the zoom settings and default to FitHeight mode.

Seems like a bug. Please report it on the context mailing list.

3. A list of hyperlinked page numbers after each bibliographic entry to come back to the page where it was referenced (option backref in hyperref).

\setuppublicationlist[pagenumber=yes]


used to work in MkII, but it broke when the bib module was converted to MkIV. It would not be difficult to reimplement it, provided an exact spec is given (see this discussion)

4. In TOC/List of floats, on the number of the chapter/float should be hyperlinked instead of the entire line (as is happening in the MWE).

\setuplist[interaction=sectionnumber]

-
The fit page mode for links is the default (Hans likes it that way :)), one has to use \setupinteraction[focus=standard] to avoid it. – Khaled Hosny Jan 19 '13 at 19:51
@KhaledHosny see them minimal example of the OP. focus=standard does not work correctly for all links. – Aditya Jan 19 '13 at 20:17