# Tag Info

## Hot answers tagged links

107

You have the two parameters backwards. The correct syntax is: \href{<url>}{<text to display>}. The first parameter is the url to link to, the second is the text to display. Also it should be noted that you need to ensure that your PDF viewer is capable of opening a link in a browser. Code: \documentclass[11pt,twoside,a4paper]{book} \usepackage{...

54

Following the advice of Robin Williams, author of The Non-Designer's Design Book, A set of three colors equidistant from each other always creates a triad of pleasing colors. I have found that using colours equally distributed around the colour wheel works well. For the links in my example below, I use three colours that form a triad: yellow-orange, ...

45

There are two main purposes for using colored text in documents: style (make the document look more visually pleasing or adequate to its context) and readability (help the reader to understand its meaning). For hyperlink colors, one also has to distinguish between digital and printed documents: the special meaning only makes sense in digital. Regarding ...

36

The hyperref options can be configured using the \hypersetup command and colors are enabled by colorlinks=true. A MWE is below. citecolor is set to gray. For the table of contents link colors, linkcolor is set to green before the \tableofcontents command. Similarly for the list of figures, linkcolor is set to red before the \listoffigures command. Later ...

22

Since hyperref version 2011/02/05 v6.82a, the option hidelinks has been available, which suppresses the highlighting of links.

19

Just to formally answer and close this question: As Ulrike Fischer answered in the comments, the solution was to use \usepackage{hyperref} (or \usepackage[hidelinks]{hyperref} to avoid the ugly boxes) and \usepackage[T1]{fontenc}. This allows properly clicking and copy-&-pasting URLs with underscores. However, it turned out, using package hyperref wasn't ...

18

You can also use \usepackage[colorlinks=true, urlcolor=blue, pdfborder={0 0 0}]{hyperref}. Can add any options of your choice, in order to only have urls without color or anything, use only pdfborder={0 0 0} option

18

Perhaps I am misunderstanding the question? It seems that all you need is a \footnote with an \url from, for example, the url package: \documentclass{article} \usepackage{url} \begin{document} \vspace*{\fill} text\footnote{\url{www.stackexchange.com}} \end{document} The \vspace*{\fill} line was just to push the text to the bottom of the page for the ...

18

KOMA-Script provides very powerful commands for almost every possible situation. As you noticed, the headers were showing the previous chapter and hyperlinks didn't work properly when using \chapter* along with addcontentsline. The command \addchap takes care of this. It adds the unnumbered chapter to the table of contents, it sets \markboth accordingly. ...

16

hyperref has the option ocgcolorlinks which does exactly what you want. From hyperref's README Experimental option ocgcolorlinks The idea are colored links, when viewed, but printed without colors. This new experimental option ocgcolorlinks uses Optional Content Groups, a feature introduced in PDF 1.5. The option must be given for package loading: \...

15

url changes the font but you can set it to default to serif to match \href: \documentclass{book} \usepackage{xcolor} \usepackage{hyperref} \hypersetup{colorlinks=true,linkcolor=blue,urlcolor=blue} \urlstyle{rm} \begin{document} url: \url{www.yahoo.com} href: \href{http://www.yahoo.com}{www.yahoo.com} \end{document} Note that \urlstyle{} is from url ...

14

Use blue for any link you want your reader to immediately understand it is a link and do not change colors based on type unless it is black. The journal articles I read are mainly in solid state physics and come from an IEEE format or one from the AIP. Even with overlapping content the style for hyperlinks is different. If you look at the IEEEtran ...

14

I think this can be done with pgfmath, assuming that you have exactly one tikzpicture in your LaTeX file, and nothing else. Note that if the document uses the document class standalone, then there are some ways for determining the size of the output bitmap (e.g., GIF or PNG) in advance. See http://www.colatex.net/scrap/imagemap/map.html for a live view of ...

13

Apart from putting hyperref first and not last among the called packages I see nothing too bad in them; but are you sure you need all of them? Anyway, I'd put fontenc, inputenc and babel first: \documentclass[a4paper,12pt]{article} \usepackage[T1]{fontenc} % recommended for German \usepackage[latin1]{inputenc} \usepackage[USenglish,ngerman]{babel} <......

13

Package hyperref supports only a subset of possible options to turn off "hyperfeatures": bookmarks=false: bookmarks/outlines pdfpagelabels=false: PDF page labels hyperfootnotes=false: footnotes hyperindex=false: index pageanchor=false: page anchors ... Also hyperref provides environment NoHyper. URL links only A modified version of NoHyper could be used ...

13

The PDF format knows nested actions. hyperref supports this by option nextacrtionraw for \href in some rudimentary manner: \documentclass{article} \usepackage{hyperref} \begin{document} \href[% nextactionraw={% <<% /Type/Action% /S/URI% /URI(http://meta.tex.stackexchange.com/)% >>% }% ]{http://...

13

In case of IEEE templates, when using the file bib, replacing the underscore with {\_} should solve the problem. In the case of the question: @misc{code, title = {Code}, url = {https://1drv.ms/link{\_}link} }

12

Links go to destinations. Destinations are objects in the pdf created (in pdflatex, for the other engines they are similar commands) with the primitive \pdfdest command. The destination object contains a coordinate and a page object reference number. In a different part of the pdf there is a reference from the name of the destination to this object. << ...

11

The ~ character will work fine if used inside \url{} or \hyperref{} within your text because they automatically disable all the TeX parsing; as described by Martin Scharrer. The same is true for other characters like _ and for the \path{} command provided by the url package. But if you have a URL within your bibliography’s .bib file it won’t work. The ...

11


11

The following document, when converted with pandoc generated underlined links in the resultant PDF. However, as noted in the comments to the linked question here Underlined links with hyperref possible? not all viewers can display the underlined links properly. On my machine (a Mac) only Adobe Reader displays the underlining correctly; both Skim and Preview ...

10

You can use \nolinkurl inside the second argument of \href: \href{http://mirror.ctan.org/foo/bar}{\nolinkurl{CTAN:foo/bar}}

10

This is the normal Table Of Content you get while using \tableofcontents To achieve the links you need to use the hyperref package \usepackage{hyperref} A full example would look like this: \documentclass{article} \usepackage{hyperref} \begin{document} \tableofcontents \section{foo} \subsection{bar} \section{foo 2} \subsection{bar 2} \...

10

Your document's footnote markers currently aren't active hyperlinks to the corresponding footnotes because you're loading footmisc after hyperref. If you load footmisc before hyperref, you should get the expected behavior. Because hyperref has to perform various demanding jobs to convert the cross-referencing call-outs, incl. footnote markers, into ...

10

Officially the PDF format (specification) only supports four named actions: NextPage, PrevPage, FirstPage, LastPage. It depends on the PDF viewer, which other non-standard actions might be supported. The JavaScript API reference lists names in the description of method execMenuItem of object app. There the name ShowHideFileAttachment can be found. It does ...

10

The second argument of \href is arbitrary text. If the text should appear as in \url, then \nolinkurl can be used, that acts as \url without the link part, which is already provided by \href. The font can be changed via \urlstyle, see the documentation of package url Example: \documentclass{book} \usepackage{xcolor} \usepackage{hyperref} \hypersetup{...

10

You just need to customise the formatting hyperref uses. For example: \documentclass{article} \usepackage[colorlinks=true,urlcolor=blue]{hyperref} \begin{document} \href{http://google.ru/}{GOOGLE} \end{document}

10

The following produces a more readable PDF file: \pdfobjcompresslevel=0 \documentclass{article} \usepackage{hyperref} \begin{document} \href{chrome://zotero/content/tab.xul}{Zotero}% \end{document} Page streams are still compressed, but the link is stored in an uncompressed annotation object in the PDF file. The file can be inspected by a text viewer (or ...

Only top voted, non community-wiki answers of a minimum length are eligible