ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Use url to hyperlink bibliography title
@ 2014-09-16 16:30 Thangalin
  2014-09-25 18:48 ` Thangalin
  2014-09-30 18:52 ` Alan BRASLAU
  0 siblings, 2 replies; 4+ messages in thread
From: Thangalin @ 2014-09-16 16:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi List,

How do you make a hyperlink for a bibtex entry's title using the entry's URL?

The bibtex entries include articles, techreports, inproceedings,
books, and so forth. I can work around the issue by duplicating the
URL as follows. For example, save this as "sources.bib":

@inproceedings{schryen@security,
  author={Schryen, Guido and Rich, Eliot},
  title={\bibhref{Increasing software security through open source or
closed source development? Empirics suggest that we have asked the
wrong question}{http://epub.uni-regensburg.de/21293/}},
  booktitle={Proceedings of the 2010 43rd Hawaii International
Conference on System Sciences},
  series={HICSS '10},
  year={2010},
  isbn={978-0-7695-3869-3},
  pages={1--10},
  numpages={10},
  doi={10.1109/HICSS.2010.228},
  acmid={1748219},
  publisher={IEEE Computer Society},
  address={Washington, DC, USA},
  url={http://epub.uni-regensburg.de/21293/},
}

Here is a short example that uses the sources.bib file:

\setupbibtex[database=sources]
\setuppublications[
  alternative=num,
  sorttype=cite,
]

% Superscript citation cross-references.
\setupcite[num][
  left=\raisebox{1ex}\hbox\bgroup\tfxx,
  right=\egroup,
]

\definecolor[WPexternal][h=B93507]

\setupinteraction[
  state=start,
]

\def\WPHyperlink{%
  \setupinteraction[
    style=normal,
    color=WPexternal,
  ]%
}

\define[2]\bibhref{%
  \WPHyperlink
  {\goto{#1}[url(#2)]}%
}

\starttext
  \startbodymatter
    \startchapter[title={Title},]
      \startsection[title={Transparency}]
        The complete source code is open for analysis and
        development.\cite[schryen@security]
      \stopsection
    \stopchapter
  \stopbodymatter
  \startbackmatter
    \completepublications[criterium=text]
  \stopbackmatter
\stoptext

The title is hyperlinked, but mixes presentation with content and
duplicates the URL. Note that the colour is also changed to match the
other external links in the document.

Thank you.
___________________________________________________________________________________
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
___________________________________________________________________________________


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

end of thread, other threads:[~2014-10-04  0:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-16 16:30 Use url to hyperlink bibliography title Thangalin
2014-09-25 18:48 ` Thangalin
2014-09-30 18:52 ` Alan BRASLAU
2014-10-04  0:48   ` Thangalin

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).