# Tag Info

2

The following approach (borrowed from egreg's answer) allows you to turn the text of the listing (but not the whole frame/box) into a hyperlink. First, save the listing in an lrbox; then, use the latter in the second argument of \href: \documentclass{article} \usepackage{hyperref} \usepackage{listings} \usepackage{xcolor} \newsavebox\lstA ...

1

I avoid the option clash for hyperref by loading: \usepackage[svgnames]{xcolor} The last package in my preamble is: \usepackage[colorlinks=true, linkcolor=Maroon, urlcolor=Maroon]{hyperref} Obviously, you should use your own preferred colours. I struggled with this for quite a while when I was designing the template for a scholarly journal but after ...

3

\ce breaks in the code that tries to convert it to a bookmark string. With \texorpdfstring an alternative can be provided for the bookmarks: \documentclass{article} \usepackage[version=3]{mhchem} \usepackage[pdfencoding=auto]{hyperref} \usepackage{bookmark} \begin{document} \section{\texorpdfstring{\ce{H2O}}{H\texttwoinferior O}} \end{document} In this ...

4

unfortunately svg loads a load of packages not directly related to svg inclusion itself including subfig which is incompatible with subcaption. You can suppress subfig inclusion by: \documentclass{article} \usepackage{subcaption} \expandafter\def\csname ver@subfig.sty\endcsname{} \usepackage{svg} \usepackage{hyperref} \begin{document} ...

1

The incompatibility here is not with hyperref, but instead with loading two sub-float packages: subcaption and subfig. Since you're using caption already, I'd stick with subcaption rather than subfig. Other suggestions include: Use geometry to set your document layout/dimensions, not a4wide; Don't load packages twice (like amsmath and amssymb); Load ...

2

The end of the ToC clears the page (two pages for two-sided). So the \addcontentsline is being executed when TeX is already on page 7. To avoid this, you can add the contents line first, manually clearing the pages to ensure that the ToC does not need to start a new page: \documentclass{book} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} ...

0


1

Instead of \hyperref[sec:main-content]{Content} use \hyperlink{sec:main-content}{Content} A complete example (by the way, no need to load hyperref explicitly using beamer): \documentclass{beamer} \makeatletter \setbeamertemplate{footline} { \leavevmode% \hbox{% \begin{beamercolorbox}[wd=.1\paperwidth,ht=2.25ex,dp=1ex,center]{author ...

2

The easiest way is to write the same bookmark entry to the .lof file such that a bookmark is generated when \listoffigures is issued (by reading in the .lof file). This can be achieved by using \addtocontents{lof}{\protect{\bookmark{}...} (see code below. \documentclass{article} \usepackage{caption} \usepackage{etoolbox} \usepackage{tocloft} ...

5

The purpose of \autoref is to add the counter's name (or whatever one decides in place of the counter's name) to the number. In your case you just need \ref: \documentclass{amsart} \usepackage{hyperref} \newtheorem{Thm}{Theorem} \newtheorem*{innerGenius}{Genius' Special Theorem} \makeatletter \newenvironment{Genius} ...

1

This is nothing to do with the footnote. The \href macro takes two arguments. The first is the link destination, and the second is what's displayed. \documentclass[10pt,a4paper]{article} \usepackage{hyperref} \usepackage{xcolor} \definecolor{medium-blue}{rgb}{0,0,1} \hypersetup{colorlinks, urlcolor={medium-blue}} \begin{document} Text\footnote{Click ...

0


3

Not sure which package is breaking what, but \part ends up not saving the part name in a form that nameref can use. This just redefines it to save it explicitly, it assumes you don't need * or [] argument forms of \part. \documentclass[a4paper,12pt,twoside]{report} \usepackage{titlesec,titleps} %If I remove the \titleclass for \part it works fine! ...

1

Based on the collective input I developed a couple alternatives: Without answers package \documentclass[a4paper,12pt]{book} \usepackage{amsthm} \usepackage{hyperref} \theoremstyle{definition} \newtheorem{innerexercise}{Exercise} \newtheorem*{innersolution}{Solution \exerciseref} \newenvironment{exercise}[1] {\innerexercise\label{#1} ...

2

The PDF specification defines a feature called Sub-Page Navigation. It intercepts PgDown/PgUp and arrow key pressing events to execute a pre-defined sequence of actions before passing to the next page. This feature is implemented in AdobeReader and requires the Full-Screen mode. Example (executing a set of DOS scripts): \documentclass{beamer} ...

2

I encountered the same problem when using biblatex with memoir trying to print separated bibliographies. When using \printbibliography, the headings defined in biblatex.def specifically for memoir (and only those) add a \phantomsection after the chapter/section/subsection. Is this really by design? A simple solution is to define a custom heading that has ...

1

You should try adding http://. That solved it on my computer... \href{http://villemo.com/blog/?p=2858}{\beamergotobutton{Utematte---Emma}}

2

This is not a problem with TeX. Displaying the box is up to the PDF viewer. So, the above code (run on Mac OS 10.9.5) with TeXShop 3.45.1 is shown as follows: TeXShop 3.45.1 Viewer: no box Acrobat 11.0.9 : box Mac Preview (Mac OS 10.9.5): no box Firefox 33.0.2 (Mac OS 10.9.5): box Chrome and Safari (Mac OS 10.9.5): no box

3

You can define the solution environment to have the same number as the last exercise, but with the possibility of having a different number grabbed through the \label-\ref mechanism. The solution number will be a link to the exercise. If the solution doesn't immediately follow the corresponding exercise, because you want to state two exercises next to each ...

4

\documentclass[a4paper,12pt]{book} \usepackage{amsthm} \usepackage{hyperref} \theoremstyle{plain} \newcounter{exercise}[chapter] \renewcommand\theexercise{\thechapter.\arabic{exercise}} \newtheorem{xexercise}[exercise]{Exercise} \newtheorem*{xsolution}{Solution} \newenvironment{exercise}[1] ...

4

As stated in the answer to Hyperref jumps to the wrong equation if the equation has a \tag and cleveref is used by CyberSingularity, the starred environment should be used. If you do it and load hyperref after amsmath all links are correct: \documentclass{article} \usepackage{amsmath} \usepackage{hyperref} \begin{document} Some text 0=0 ...

3

Put \scalebox inside: \documentclass{article} \usepackage{graphicx} \usepackage{hyperref} \begin{document} \href{mailto:someone}{\scalebox{1}{shown mail address}} \href{mailto:someone}{\scalebox{0.5}{shown mail address}} \href{mailto:someone}{\footnotesize shown mail address} \href{mailto:someone}{\scriptsize shown mail address} \end{document} ...

3

Here is a basic usage for URLs: \definecolor[HyperlinkExternal][h=2F66B1] \setupinteraction[ state=start, color=HyperlinkExternal, ] \startasciimode \useURL [search] [https://www.google.com/search?q=context%20tex%20urls] [] [\ConTeXt search] \stopasciimode \starttext Perform a \from[search] for URLs. \stoptext This approach is ...

5

moderncv loads hyperref and these settings at \AtEndPreamble{: \AtEndPreamble{ \pagenumbering{arabic}% has to be issued before loading hyperref, as to set \thepage and hence to avoid hyperref issuing a warning and setting pdfpagelabels=false \RequirePackage[unicode]{hyperref}% unicode is required for unicode pdf metadata \hypersetup{ breaklinks, ...

2

Insert a manual hyperlink mark using \phantomsection: \documentclass{article} \usepackage{amsthm} \usepackage{hyperref} \newtheorem{thm}{Theorem}[section] \begin{document} \title{A title}\author{An author} \maketitle \newpage \section{A section} \begin{thm}\phantomsection\label{Thm} \begin{itemize} \item a \item b \end{itemize} \end{thm} ...

1


0

A not so perfect solution is: \documentclass{article} \usepackage[backref=true, backend=bibtex,% or biber style=alphabetic, citestyle=authoryear, sortlocale=de_DE, natbib=true, doi=false, isbn=false, url=false]{biblatex} \usepackage{hyperref} %\DefineBibliographyStrings{english}{% % backrefpage = {page},% originally ...

9

A macro definition is not executed at the point of definition, you can go \newcommand\foo{\any old \rubbish } and as long as {} match up \foo is defined. You may get an error later if you try to use \foo, but you get no error at this point, and if \any and \rubbish are defined by the time you use \foo there is no error. Conversely a box is typeset as it ...

0

I initially failed to include my real error (sorry it's my first time). It came from trying to do a nested hyperlink\hyperlink{anchor_a}{\hypertarget{anchor_b}{STUFF}}. I've updated the question. It's probably not supported. I solved my problem by going off on the tangent and linking the image to a phantom character next to the big version of the image, and ...

9

\ref can't go in \edef no matter whether you load hyperref or not. The code \documentclass{article} \begin{document} \section{Section}\label{first} \edef\temp{\ref{first}}\noindent Section = \temp \end{document} stops with ! Missing control sequence inserted. <inserted text> \inaccessible l.5 ...\temp{\ref{first}}\noindent ...

3

Just move \@addtoreset or \counterwithin after hyperref is loaded, because hyperref redefines them to adjust the additional counter theHchapter, which is used for the anchor (destination) names. These names need to be unique. Since chapter numbers aren't unique any more, the part number is added to the chapter number in theHchapter.

2

Since you redefine the chapter counter to be subordinate to part, the bookmarks in the second part will refer to the sections numbered alike in the first part. You see this from the warnings of the form pdfTeX warning (ext4): destination with the same identifier (name{chapte r.1}) has been already used, duplicate ignored <to be read again> ...

0


0

To create a cross-reference that's not also a hyperlink, use \ref* instead of \ref. Likewise, add an asterisk to commands such as \eqref, \pageref, and \autoref. To get the command \email (which is provided by the revtex4-1 document class) not to create a hyperlink, you need to modify the macro \@email, say by inserting the following instructions in the ...

Top 50 recent answers are included