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

* Re: Use url to hyperlink bibliography title
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Thangalin @ 2014-09-25 18:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

The question is also posted here:

http://tex.stackexchange.com/questions/201357/context-use-url-parameter-to-hyperlink-bibliography-title-references

My concern is that every bibtex entry type must be modified. Unless
I'm mistaken, every bibtex entry has a title, so (in theory) that
title macro should be defined and reused in a single location. It
should be a matter of finding that macro and changing its definition.

However, I've been unable to find the definition for the title macro
(there seem to be a number of macros named "title" or variants
thereof) and am loathe to duplicate all the bibtex entries.

Any ideas?
___________________________________________________________________________________
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

* Re: Use url to hyperlink bibliography title
  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
  1 sibling, 1 reply; 4+ messages in thread
From: Alan BRASLAU @ 2014-09-30 18:52 UTC (permalink / raw)
  To: Thangalin; +Cc: mailing list for ConTeXt users

(Of course you are using the bibliography/bibtex module here which is
currently being re-implemented but is not quite production ready...)

Most bibliography styles ask that the url (or doi) appear at the end of
the list rendering. This could be made active when list interaction is
enabled.

Normally, clicking on the list entry itself (not the url or doi) will
like back to the (first) citation of this work in the text. You would
like, rather, that the title links to the url. (Why just the title
rather than the entire entry, by the way?) This is an issue that we
need to make configurable somehow. I will take note.

Alan



On Tue, 16 Sep 2014 09:30:45 -0700
Thangalin <thangalin@gmail.com> wrote:

> 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
> ___________________________________________________________________________________

___________________________________________________________________________________
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

* Re: Use url to hyperlink bibliography title
  2014-09-30 18:52 ` Alan BRASLAU
@ 2014-10-04  0:48   ` Thangalin
  0 siblings, 0 replies; 4+ messages in thread
From: Thangalin @ 2014-10-04  0:48 UTC (permalink / raw)
  To: Alan BRASLAU; +Cc: mailing list for ConTeXt users

Hi Alan,

> (Of course you are using the bibliography/bibtex module here which is
> currently being re-implemented but is not quite production ready...)

I didn't know that. Am looking forward to using it, thank you.

> Most bibliography styles ask that the url (or doi) appear at the end of
> the list rendering. This could be made active when list interaction is
> enabled.

I'd've thought that parameter order shouldn't matter. That is, it
should be possible to insert the doi anywhere in the entry.
(Typically, name-value pairs are read into a dictionary prior to
interpreting, which has a number of benefits, including order
independence.)

> Normally, clicking on the list entry itself (not the url or doi) will
> like back to the (first) citation of this work in the text. You would

That is useful. Yet, if the same reference is cited multiple times,
then clicking the entry would return the reader to the first
reference, which is probably undesirable if they were at a different
point in the document. The ability to disable such a feature is
useful.

> like, rather, that the title links to the url. (Why just the title
> rather than the entire entry, by the way?) This is an issue that we
> need to make configurable somehow. I will take note.

For this particular document, internal hyperlinks (cross-references)
are blue and external hyperlinks are orange. Consider the following
image:

http://i.stack.imgur.com/CGtQ9.png

It'd be nice if just the number within the brackets (i.e., 1) could be
set as the hyperlink back to the first reference (e.g., as a blue
hyperlink). (Again, the behaviour for citing the same reference in
multiple locations needs to be addressed. If it was [1, 2, 3], then
each number could cross-reference the correct back-reference in the
document. But this is a digression and probably not a terribly useful
feature.)

Reasons for title links, and not the whole entry, include:

- Aesthetics. Having the entire bibliography in orange would look terrible.
- Identifiable. The user would know that the text is an external
hyperlink, rather than thinking the entire bibliography was mistakenly
coloured orange.
- Multiple links. It should be possible to link to: the publisher,
author home pages (or email addresses), and conference web sites. If
the entire entry was a single link, it'd not be possible to have
separate links for different items.

Stylistically, for example, it should be possible to set "Guido
Schryen" to an orange hyperlink and have a small, hyperlinked envelope
beside his name that links to his email address (for digital copies;
hard copies would not include the envelope, but might write the email
address in parenthesis or, optionally, not display anything at all).

Here are a few scenarios:

@article{schryen@security,
  author = {Schryen, Guido},
  title = {Software security},
  doi = {http://...}, % adds a hyperlink to the title
  author_schryen = {http://...}, % hyperlinks to author's home page
}

@article{schryen@security,
  author = {Schryen, Guido},
  title = {Software security},
  doi = {http://...}, % adds a hyperlink to the title
  author_schryen = {http://...}, % hyperlinks name to author's home page
  author_schryen = {mailto:gschryen@domain.com}, % envelope icon hyperlink
}

@article{schryen@security,
  author = {Schryen, Guido},
  title = {Software security},
  author_schryen = {mailto:gschryen@domain.com}, % hyperlinks name, no envelope
}

If the authors have two (or more) identical last names, they can be
matched in listed order of the author entry:

  author_schryen_1 = {http://...}
  author_schryen_2 = {mailto:gschryen@domain.com},

It can be time-consuming to contact the author of a paper. Providing
the ability to link back to the author (in some form) is a courteous,
expedient convenience.
___________________________________________________________________________________
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).