Tag Info

3

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

5

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

5

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

4

This problem isn't so easy to solve. the problem consist in this: hyperref only defines a name if you use \newtheorem{theorem}{<theorem name>} for using with \autoref. This name is Theorem in English (obviously changes if we use babel), it is stored in the macro \theoremautorefname and can be changed using \renewcommand{\theoremautorefname}{<new ...

0

Even simpler... \documentclass{book} \usepackage{amsthm} \usepackage{hyperref} \newtheorem{thm}{Theorem} \begin{document} \begin{thm}\label{mythm}\strut% ****************** \begin{enumerate} \item \end{enumerate} \end{thm} \ref{mythm} \end{document}

11

You could (a) redefine \thesection as you're already doing and (b) redefine the macro \p@subsection. The macro \p@subsection, which governs the material that's prefixed to a cross-reference to an item of type subsection, is set up automatically by LaTeX when the counter subsection is set up. Its default behavior is to do nothing; here, we change it to insert ...

3

zref allows you to generate specific references based on a set of properties. Below I've defined the property list sections, which store the section, subsection and section.subsection as part of the property list what you mark a \label (actually, a \zref@labelbypropertylist): \documentclass[11pt]{amsart} \usepackage{hyperref} ...

7

You can redefine the \@seccntformat command to use \mythesubsection instead of \thesubsection, provided the former is defined. \documentclass[11pt]{amsart} \usepackage[backend=bibtex,citestyle=alphabetic]{biblatex} \usepackage{hyperref} \makeatletter \renewcommand{\@seccntformat}[1]{% \protect\textup{% ...

5

Package babel supports many languages, therefore you have to put the redefinition into \extrasenglish: \documentclass[12pt, a4paper, openany]{report} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[colorlinks]{hyperref} \addto\extrasenglish{% \renewcommand{\chapterautorefname}{Chapter}% } \begin{document} \chapter{One} In ...

1

I found a solution using the macro \pdfstringdef. \documentclass{article} \usepackage{hyperref} \begin{document} \begin{Form} \TextField[value={&\%\$\#_^}]{} \pdfstringdef{\foo}{\textbackslash\{\}\~{}} \TextField[value={\foo}]{} \end{Form} \end{document}

1

Replacing \ref{} with \ref*{} in the captions (or elsewhere) does the job.

0

use the optional argument and \uline in the title itself: \documentclass{scrartcl} \usepackage[normalem]{ulem} \usepackage{hyperref} \begin{document} \section[A section title so long that it causes a line break. A section title so long that it causes a line break.] {\uline{A section title so long that it causes a line break. A section title so long ...

4

Environment alltt makes the space active and its definition is not appropriate for \hypertarget or \hyperref or \hyperlink. Workaround: The space can be masked: \documentclass{article} \usepackage{lipsum} \usepackage{alltt} \usepackage[verbose]{hyperref} \def\SPACE/{ } \begin{document} \section{Source a} Outside alltt \hyperref{external ...

1

There are some errors in your MWE, but using this works just fine for me: \documentclass{scrreprt} \usepackage{caption} \usepackage{longtable} \usepackage{hyperref} \usepackage{tocloft} \usepackage{kantlipsum} \begin{document} \tableofcontents \listoffigures \listoftables \newpage \kant \newpage \begin{longtable}[l]{lcr} \caption{table ...

Top 50 recent answers are included