We’re rewarding the question askers & reputations are being recalculated! Read more.

Hot answers tagged

135

Well, I see there are a lot of answers already, and they work, however I thought I'd give more detail: As above, you can use \usepackage[hidelinks]{hyperref} or \hypersetup{hidelinks} However, if your problem is with the ugly green boarder there are very nice ways to remove that, without making it unclear what is a hyperlink. I like \hypersetup{ ...


98

The \phantomsection command is nessesary for hyperref to jump to the correct page, in other words it puts a hyper marker on the page. For example a starred section or chapter added to the TOC would normally refer to the wrong place without \phantomsection \chapter*{Extended Summary} \phantomsection \addcontentsline{toc}{chapter}{Extended Summary}% \markboth{...


90

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} \...


69

I am providing a different answer to this question because the original answer is out of date. The \phantomsection command is needed to create a link to a place in the document that is not a figure, equation, table, section, subsection, chapter, etc. This is mostly used in conjunction with \addcontentsline or with \label and \hyperref. For example, the ...


42

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


42

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


36

Here's a new TikZ style called hyperlink node=<target> that takes a hypertarget reference. It works by measuring the node it is supplied to, and then placing a new invisible node on top of that. The new node has the content \hyperlink{<target>}{\phantom{\rule{<width of node>}{<height of node>}}, so it has the same size as the original ...


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


33

Just use \href from hyperref: \href{tel:15555555555}{+1 555 555 5555}


25

Quoting the pdfpages manual (page 2): [...] all kinds of links1 will get lost during inclusion. (Using \includepdf, \includegraphics, or other low-level commands.) However, there's a gleam of hope. Some links may be extracted and later reinserted by a package called pax which can be downloaded from CTAN [3]. Have a look at it! The pax package ...


23

You can try this: \documentclass{article} \usepackage[colorlinks=false, allbordercolors={0 0 0}, pdfborderstyle={/S/U/W 1}]{hyperref} \begin{document} \url{blub.blub.blub} \end{document}


22

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


22

Use \href{run:d:/my folder/test.pdf}{<link text>} instead of \url{...}: \documentclass{article} \usepackage{hyperref} \begin{document} \href{run:d:/my folder/test.pdf}{This is my link} \end{document} This works fine with Adobe Reader X (Windows).


20

No. Placed there the command \sloppy has no effect: \documentclass{article} \usepackage{hyperref} \usepackage[width=7cm]{geometry} \begin{document} If you are interested to know the details, please contact me at {\sloppy \href{mailto:asdfkoafdkfaldfkafsdfkdf@kdsoffkdlfasdfjaldf.xxx} {asdfkoafdkfaldfkafsdfkdf@kdsoffkdlfasdfjaldf.xxx}}. If you are ...


19

The two links are created by the command \hyper@natlinkbreak, which is defined by hyperref.sty. To remove the break you can revert back to the provisional definition from natbib.sty by inserting the following lines into your preamble: \makeatletter \renewcommand\hyper@natlinkbreak[2]{#1} \makeatother The results with this simple fix aren't great; links ...


19

\href takes two arguments, \href[options]{URL}{text} where the first is a full URL and the second the link text, and formats the text as normal text (see http://www.tug.org/applications/hyperref/manual.html#x1-130004 for details). So you can fix your problem by adding a full URL in the first argument and adding a second argument, i.e. \href{http://www....


19

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


17

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


17

user14996 wrote: (a) Is is possible to have certain hyperref-hyperlinks [...] point to the very left border of the page, not to the interior? and (b) If, in addition, one could make hyperlinks point not only to the left page border but also to the top left corner of the respective page, that would be a useful option. [...] First I agree with the ...


17

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


15

You can mark the line numbers so that they are not copied, i.e. an empty text is copied instead, using the technique described in Is it possible to provide alternative text to use when copying text from the PDF?. The required code can be added using the numberstyle option if listings, as shown below. If you want to add other formatting macros to the numbers ...


15

If you are using a modern release of LyX, then these options can be set in Document -> Settings -> PDF Properties -> Hyperlinks -> No frames around links.


14

moderncv does its hyperref setup at the beginning of the document (because only there can it use personal information such as \firstname), so the most elegant solution in my opinion is to do the same, e.g. \AtBeginDocument{\hypersetup{pdfborder = 0 0 1,linkcolor=blue}} That way, there is no need to define custom commands.


14

As you load the breakurl package you can safely ignore the warning message issued by the hyperref package. It’s the dedicated purpose of the breakurl package to enable breakable URL links in case of the traditional DVI→PS→PDF document generation path supported by the hdvips output driver. If you want to get rid of the redundant hyperref warning message omit ...


14

If you don't want BibTeX to print out the URL field for a given entry even though a URL field is present, you need to edit the bibliography style file -- in the present case, the file IEEEtran.bst -- to disable this printing. Make a copy of the file IEEEtran.bst and call it, say, myIEEEtran.bst. Open the new file in a text editor and search for the function ...


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


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