# Tag Info

2

The size of links is dependent on the size of other things in the same line (roughly) as the link, and so since your inline math causes the line height to be larger (which it does) then the box will be larger. For a more detailed discussion of the problem, see the following question: Constant height and depth of hyperref link boxes As a workaround, you ...

1

It seems \hypertarget aims for the baseline, so I had to move the areas below the baseline. \documentclass[11pt, a4paper, oneside]{article} \usepackage{graphicx} \usepackage{hyperref} \usepackage{mwe} \newsavebox{\tempbox} \newlength{\tempheight} \newlength{\tempwidth} \newcommand{\area}{\rule[-0.49\tempheight]{0.49\tempwidth}{0.49\tempheight}} % ...

4

I've found some small problems with your document, it is compilable both with pdflatex and tex4ht after small fixes: %use one or the other of these \usepackage{hyperref} \newcommand{\Xref}[1]{\autoref{#1}} %\usepackage{cleveref} \autoref seem to work better with tex4ht \DeclareGraphicsExtensions{.png,.jpg,} add this to the preamble, this enables direct ...

4

\href should be used only after \begin{document}. Surround the lrbox with \AtBeginDocument{...}: \AtBeginDocument{% \begin{lrbox}{\myheader}% \begin{minipage}[b]{\headerwidth} \renewcommand{\arraystretch}{1}% \begin{tabularx}{\textwidth}{@{}Xl@{}} \textbf{FirstName LastName} & \\ Address1 & Phone +1 (123) 456 7890 \\ ...

5

The KOMA bundle 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 ...

0

3

With the help of \only<4>{target content} seems to achieve your goal. Note: visible and onslide won't work, but onslide* would work since it maps to \only while onslide+ also maps to visible, therefore, won't work either. Code: \documentclass{beamer} \beamerdefaultoverlayspecification{<+->} %stepwise uncovering \usepackage{hyperref} ...

3

Let's see how \label works. The purpose of \label is to write a note in the .aux file for later retrieval with \ref or \pageref. The command uses immediately the current value of \@currentlabel and, at shipout time, the current page number. The value of \@currentlabel is set (locally) by a \refstepcounter command to the current representation of the ...

2

hyperref points its hyperlink to the last anchor, and this anchor is set via the macro \refstepcounter. Indeed, hyperref redefines the traditional \refstepcounter to insert the appropriate anchor (see \hyper@refstepcounter in hyperref.dtx). This is important from the point of view of the hyperlink. Here is a showcase that highlights the motivation: ...

6

Once you know that such information is irrelevant (and it is), you can use gentle manners (also known as “the sledgehammer”) to silence it: \documentclass{article} \usepackage[ngerman]{babel} \usepackage{lipsum} \usepackage{etoolbox} \usepackage{hyperref} \makeatletter \patchcmd{\@decl@short}{\bbl@info}{\@gobble}{}{} ...

7

The info comes from \pdfstringdef, which is used to convert a TeX string to a PDF bookmark string. \pdfstringdef redefines many, many commands to disable them, to provide replacements. Thus hyperref also redefines some shorthands. For example, TeX's hyphenation is irrelevant for bookmarks, thus hyperref redefines the shorthands for ngerman regarding ...

1

MWE: \documentclass[12pt]{article} \usepackage{amsthm} \usepackage[colorlinks]{hyperref} \newtheorem{thm}{Theorem} \begin{document} \begin{thm} \label{thm:test} \begin{enumerate} \item First thing. \item Second thing. \item Third thing. \end{enumerate} \end{thm} Reference to Theorem~\ref{thm:test}. \end{document} The theorem environment of ...

3

here an example \documentclass[a4paper]{article} \usepackage{hyperref} \parindent=0pt \begin{document} \section{Example with \textit{hyperref}} and the associated clinical information were downloaded \\ (GEO,\href{http://www.ncbi.nlm.nih.gov/geo/}{http://www.ncbi.nlm.nih.gov/geo/})\\ selected data are shown in Table \ref{tab1} . Information \\ and ...

0

A workaround is already given in the question. If the color selection is the only thing to achieve, one could use a command that does not lead to a change in the appearance. E. g., \color{blue}\null works in that case or, maybe better \color{blue}{} (an empty group).

5

\eqref uses \ref for the equation number, therefore \ref is the link, the surrounding parentheses are not part of the link. The following example redefines \eqref to include the parentheses into the link: \documentclass{scrartcl} \usepackage[english]{babel} \usepackage{amsthm} \usepackage{amsmath} \usepackage{amssymb} ...

7

hyperref is sanitizing the arguments of \href and \url. Then the category code of # in the string is 12 (other). Two tokens are then replaced by package url by one hash. I am reluctant to change the normalization in hyperref, because the normalized string is also used in other contexts, e.g. the URL of \href or \url is also used in the link annotation. ...

7

4

You can work around this warning by using \documentclass{beamer} \title{The Title} \author{The Author} \renewcommand\appendixname{Appendix} \begin{document} \begin{frame} \titlepage \end{frame} \section{First Section} \begin{frame}\frametitle{First Section} This is a slide. \end{frame} \appendix \section{Appendix} ...

2

There is an ambiguity in \href between a file link and an incomplete relative URL without protocol. Package hyperref chooses the former. The following example provides macro \hrefurl that directly chooses the URL link type: \documentclass{article} \usepackage{hyperref} \makeatletter \providecommand*{\hrefurl}{\hyper@normalise\hrefurl@} ...

4

Put \PassOptionsToPackage{hidelinks}{hyperref} before \documentclass. When hyperref is loaded later by whomever it will see the option. Also hidelinks can be given later by \hypersetup: \hypersetup{hidelinks}

1

What's your question here? You say that "that doesn't happen," but don't tell us which: the italic and plain upright typeface, or the opening of the link in your browser? If the latter, then Heiko's answer (from the package developer, no less!) covers your issue. If the former, then you've got bigger problems. :-) The two links appear in italic and ...

3

The protocol is missing. \href tries to detect different protocols (URL links, file links, links to PDF files, ...). As egreg has written in his comment, specifying the correct, complete URL helps: \documentclass[a4paper]{report} \usepackage{hyperref} \begin{document} \href{http://en.wikipedia.org/}{\emph{gungumapu}} ...

3

I guess I've found, not a real answer to the main question, but a solution to the underlying problem (namely how not override end user hyperref's options with an \AtBeginDocument{\hypersetup{...}} declaration in a .sty or .cls file): instead of \AtBeginDocument{% \@ifpackageloaded{hyperref}{% \hypersetup{% ⟨my advised hyperref's options⟩% }% ...

4

As stated in the hyperref manual, for example here, ftp://ftp.rrzn.uni-hannover.de/pub/mirror/tex-archive/macros/latex/contrib/hyperref/doc/manual.html#x1-190005, a \phantomsection command is needed right before \addcontentsline to guarantee correct linking. \phantomsection \item{\textbf{item two}\addcontentsline{toc}{subsection}{item two}\\ Lots of ...

3

The key is to use \getrefnumber from refcount instead of your \lineref, because \ref doesn't expand to a number, but is much more complicated when hyperref is involved, as it wants to create links. \documentclass{article} \usepackage{xcolor} \definecolor{dkgreen}{rgb}{0,0.6,0} \definecolor{mauve}{rgb}{0.58,0,0.82} \usepackage{listings} \usepackage{refcount} ...

0

It appears that a blank line is needed after each \bibitem. This is also suggested in the manual of hyperref, in the section "Extension options" (backref). The thebibliography environment in your example has those blank lines, but BibTeX with plainnat.bst does not add the corresponding blank lines to the .bbl file it produces. I don't know if a more elegant ...

6

To de-activate the URL capability in the bibliography, set \url to be equivalent to \nolinkurl (also provided by hyperref; see section 4 Additional user macros of the hyperref HTML documentation): \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @article{ChaudhuriMS:11pperm, Author = {Kamalika Chaudhuri and Claire ...

1

Assuming that you are using hyperref in the standard way then the links in the bibliography are being created using \href. You can disable these links by redefining the \href command just before your bibliography starts. As the syntax for \href is \href[optional arguments]{url}{text} you want to pick up the third argument to \href and discard the rest (#1 ...

2

When your extra information is not too long, you could try to use layers. If somebody asks, you switch between layers in your document. After this, you can switch back to your presentation layer and continue. This will not help if your additional material contains many slides (you could define multiple layers, but I think it will become complicated). And ...

0

An immediate work-around is to leave out the amsmath command \text. Instead one can use \mbox. The following works in xelatex: $$a \stackrel{\mbox{\normalfont\tiny\eqref{eq:eq1}}}{=} c$$

4

The following example defines \myeqref, which prepends the equation reference by Eq.~ and includes the prefix and the parentheses into the link. The prefix can be overwritten by the first optional argument. The \autoref name macros do not have access to the counter, thus the following definition of \equationautorefname is just a dirty hack. ...

2

I could produce similar errors with a comma inside the pdfkeywords list in the hyperref specification, like \usepackage[pdfauthor="me",pdftitle="Some title",pdfkeywords="first,second"]{hyperref} Once the comma inside the quoted pdfkeywords list was removed, the error disappeared.

4

If you're not willing -- or allowed! -- to modify some lower-level TeX macros, you could still achieve your objective of getting parentheses placed automatically around cross-referenced equation numbers by (a) executing the following instruction in the preamble: \usepackage[nameinlink,capitalize]{cleveref} and (b) using \cref instead of \autoref to ...

1

I would like to sum up the two solution provided by Mass and Christian Hupfer. The mathematics (and also the \boldsymbol macro) can be in headings, like \section, protected by command \texorpdfstring{} which should enclose the math. Christian contributed with a command \phantomsection which should be before \printglossary command and helps to make the ...

0

This is in addition to the previous answers. When LuaLaTeX is used it's easy to extract the first URL or ISBN number by calling a lua function. I put a lua script in the_first_word.lua file that returns the first word of a string if the string is a list of ISBNs separated by comma-space -- find the first comma or space -- return the string before first ...

0

After a little tinkering, plus a little inspiration from here and there, I've com up with a solution. The bookmarksetupnext{level=part} simply sets the next bookmark to have the part level. There is no bookmark named "Appendices", and because the next bookmark is Appendix A, this appendix chapter will be changed to have the level of a part. Appendix B is ...

4

This happens with the pdfmark drivers (dvips, dvipsone, ...). There are two main ways to generate a link: \hyper@link: The link is put into a box and the rectangle is measured. \hyper@linkstart...\hyper@linkend: At the begin of the link a PostScript special is written and at the end, when the link is created, the width can be measured. But the height of ...

5

The package setspace modifies the standard definition of \footnote so that single spacing is used in the footnote texts. Also hyperref modifies \footnote so as to make the hyperlinks. However, hyperref is generally agnostic about the definition of the commands it has to redefine for doing its job (there are many): it just takes the current definition and ...

7

The following example defines \citeme and changes the citecolor inside a group. Care is taken to support the optional argument of \cite: \documentclass{article} \usepackage[colorlinks]{hyperref} \makeatletter \newcommand*{\citeme}{% \begingroup \hypersetup{citecolor=red}% \@ifnextchar[\citeme@opt\citeme@ } \def\citeme@opt[#1]#2{% \cite[{#1}]{#2}% ...

3

It is a bug in package appendix: Package hyperref uses \Hy@chapapp inside destination names at the place of the counter name. Then sections (class article) or chapters (class report or book) use the string "appendix" rather than "section"/"chapter" as counter name part of destinations in the appendix. Package appendix redefines \Hy@chapapp as \appendixname ...

1

This is a possible solution where absolute position via tikzpicture environment \node[<option>] (<label>) at (current page.south east){<content>} is used. Code %\PassOptionsToPackage{demo}{graphicx} \documentclass{beamer} %\usepackage{textpos} \usepackage{tikz} \setbeamertemplate{navigation symbols}{} \begin{document} ...

1

This is not meant as answer itself, but rather to show that it works \documentclass{article} \usepackage{hyperref} \begin{document} \begin{Form}[action={http://your-web-server.com/path/receiveform.cgi}] \begin{tabular}{l} \TextField{Name} \\\\ \CheckBox[name=first,checked=true,width=1em]{Check} \\\\ ...

0

In case you should not know, but algorithm2e package has the same mechanism as figure and provides a \listofalgorithms command, so in this case, there is no need of using captionof at all. However, the BAR algorithm appears there, contrary to the request. In this case, one has to use the \TitleOfAlgo{Title} command to set the caption, but prevent the entry ...

Top 50 recent answers are included