# Tag Info

0

Found a solution using the hyperref's \@currentHref variable.This gives the final code: % Redefinition of \addcontentsline \long\def\addefcline#1#2#3{% \addtocontents{#1}{\efcline{#2}{#3}{\thepage}}} % Redefinition of \contentsline \makeatletter \long\def\efcline#1{\csname l@#1\endcsname} % Extended figure caption ...

2

Taken from my PHD thesis as a starting point: \usepackage[% bookmarks, bookmarksopen=true, bookmarksopenlevel=1, bookmarksnumbered=true, hidelinks, pdfstartpage={1}, pdfstartview={FitH}, pdfpagelabels=true, plainpages=false, hyperfootnotes=true, ]{hyperref} I think hidelinks is the most important part (removing color and border).

3

One possible solution is the set of options that were used for the hyperref manual itself: \usepackage[% pdftex,% colorlinks,% hyperindex,% plainpages=false,% bookmarksopen,% bookmarksnumbered, pdfusetitle,% ]{hyperref} This way all the boxed will be gone, and the TOC items text color will become red, and the refs text ...

1

Luatex 0.80 is compatible with pdflatex so uses the same back end files for most driver-specific functions. As your log shows: (/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/hpdftex.def The pdftex hyperef file is used. To avoid the warning simply do not use the package, it is not needed, and does nothing very useful, for pdftex or luatex. For ...

1

Use \usepackage{minitoc} before \usepackage{hyperref}, which should be the last package in almost any case (Exceptions are cleveref and glossaries), but it's no particular minitoc related issue -- it's valid for many packages dealing with ToC and counters. minitoc does some changes to ToC and counters which must be made known to hyperref. ...

4

Some of the high-level user commands provided by datatool aren't as efficient as the lower-level user commands and \DTLgetvalueforkey is one of those cases as it internally uses \DTLforeach* to find the required value in the database. This isn't much of a problem for occasional use with small databases, but for repeated use and for larger databases, it's ...

2

Inserting this in your preamble works fine: \usepackage{bookmark} \bookmarkdefinestyle{TheStyleOfTheBookmark0}{color=blue} % Farbe Bookmark Chapter \bookmarkdefinestyle{TheStyleOfTheBookmark1}{color=green} % Farbe Bookmark Section \bookmarkdefinestyle{TheStyleOfTheBookmark2}{color=red} % Farbe Bookmark Subsection ...

2

One way is to use the \bookmark command and its color= option. However, hyperref adds automatically bookmarks unless the tocdepth is smaller than -1, so using \bookmark would double the entries. Setting tocdepth to -2 temporarilywill disable this, use\bookmarkthen with a destination and use the the relevant sectioning command then (or whatever should be ...

0

If by chance you use babel-french and have colons in your cite commands, all of them will link to page 1. I had trouble with this, this issue helped me. You should include the cite package.

6

The title in \addcontentsline is also used in the bookmarks. There, the text should be expandable. \emph cannot be used for this reason. Also fonts cannot be changed inside bookmarks strings. Package hyperref redefines \emph inside the bookmarks. But it does not see \emph anymore, when \term is defined via \let. The easiest solution is using \newcommand as ...

1

The document from the question has the following page numbers: Physical/absolute page vs. \thepage 1 vs. 1 2 vs. 1 3 vs. 2 Class book uses environment titlepage for \maketitle, which resets the page number to one in the end of the environment. Package hyperref enables option pdfpagelabels by default (not in too old versions). It uses \thepage for the ...

0

I got this working with the following code, which is based on Werners response in this thread \documentclass[11pt]{article} \usepackage{lastpage, xifthen,hyperref} \begin{document} \ifthenelse{\number\numexpr\getpagerefnumber{LastPage}=1}{Not last page}{Last page} \end{document}

1

You need to be cautious when working with page-related references. \pageref* will not return the last page number necessarily. Moreover, a check with \pageref might not be expandable, and therefore be useless within the comparison with \ifthenelse. The following implements an automated \label with a checking mechanism using refcount's expandable ...

0

Ad 2) perl -pi -e 's/\|\)/\|hyperpage\)/g' myfile.idx after the first latex call, before the xindy call.

3

The following is a slightly different approach to Christian's. It creates an automated \label for each \ref in order to ensure that the page numbering will be accurate. \documentclass{article} \usepackage{lipsum}% Just for this example \usepackage{refcount,hyperref,graphicx} \newcounter{refcnt} \AtBeginDocument{% \let\oldref\ref ...

3

Rather than redefine \ref, you may want to look into loading the varioref package and using that package's \vref and \fullref macros. They basically do what your modified \ref macro does. If the hyperref package is loaded as well, with \fullref the figure number (e.g., "n") and the page number (e.g, "m") are separate hypertargets. With \vref, the entire ...

4

hyperref overrules \ref, unless the new definition is in \AtBeginDocument egreg will strike me down for keeping xspace ;-) In addition: I doubt that \pageref{#1} will give a number at all, if it's inside the \ifthenelse expression. I used \getpagerefnumber from refcount which provides a number which can be used in calculations. Additionally, I shifted ...

0

The elsarticle class redefines \@citecolor (and several others) at the beginning of the document to blue, overriding the settings you are making in the preamble. You can override this override by appending the changes to the code executed at the beginning of the document by adding \makeatletter \AtBeginDocument{\def\@citecolor{DarkGreen}} \makeatother ...

1

The \ead command in elsarticle writes the \emailauthor command to the aux file with the passed email address and the associated author as arguments. On subsequent runs, the aux file is read and the \emailauthor command is executed. The issue with adding \href as you have tried is that the \immediate\write\@auxout tries to expand it prior to writing the ...

5


3

You can use the \doitext command to modify what is displayed. You may need to use something like: \renewcommand*{\doitext}[1]{doi: #1} See http://anorien.csc.warwick.ac.uk/mirrors/CTAN/macros/latex/contrib/doipubmed/doc/doipubmed.pdf for more details.

1

I fixed this issue by using the hyperxmp package. \documentclass{article} \usepackage{hyperxmp} % <-- added \newcommand*\metadata{% a, b, c% <-- problem } \usepackage[ pdftitle={\metadata}, % never enquoted pdfauthor={\metadata}, % enquoted if , or ; is present pdfsubject={\metadata}, % never enquoted pdfkeywords={\metadata}, % ...

1

Solutions have no own counter so setting a \label is of no use. A \label always sets a reference to the last counter that's been stepped with \refstepcounter. That's why your example with the equation seems to work. But it doesn't: the label refers to the equation rather than the solution. What you can do is add a \hypertarget and link to that with ...

3

From hyperref manual: So if you want to refer to some thing with correct counter but don't want that to be a hyper link, use \ref* instead of \ref. So you have to define: \newenvironment{rtheorem}[1] {\newcommand\variant{\ref*{#1}}\begin{theorem*}} {\end{theorem*}} Full code will be: \documentclass{article} \usepackage{hyperref} ...

1

It seems, that hyperref package is not aware of new float name, so it is necessary to define it with: \def\graficoautorefname{Gráfico} Complete code (without Spanish babes, since I haven't it installed): \documentclass[11pt,a4paper,table]{report} %\usepackage[spanish,es-tabla,english]{babel} %\addto\shorthandsspanish{\spanishdeactivate{~<>}} ...

5

(Updated answer after the OP posted a second, more elaborate MWE.) The varioref package implements the following decision rule with regard to generating page call-outs: If the item being cross-referenced and the cross-reference are on the same page, no page-related affix is produced; If the item being cross-referenced and the cross-reference are on ...

1

\documentclass{article} \usepackage{refcount} \usepackage{blindtext} \makeatletter \let\latex@@ref\ref \newcounter{pagegaptreshhold} \setcounter{pagegaptreshhold}{2} \newcounter{tmpcntr} \renewcommand{\ref}[1]{% \setcounter{tmpcntr}{\value{page}}% \addtocounter{tmpcntr}{-\getpagerefnumber{#1}}% \ifnum\value{tmpcntr} < 0 % ...

2


1

2

It's necessary to use \protect\href{} and most of the hyperref macros in conjunction with \index, e.g. like in this answer of mine here: Linking indexed term to index entry

3

This is perhaps what is requested: a \ati - macro which allows forward-backward linking with an automatically generated label depending on a special counter. As long this counter is only changed by \ati and not manipulated otherwise, the label is unique. Use the starred command to prevent hyperlinking to the index and use the optional argument (in ...

0

Too long for a comment: hyperref is loaded by the beamer class. At that stage natbib is not loaded, so hyperref does not activate its natbib compatibility code. There is no easy way to turn that code on, a second loading of hyperref is simply ignored, and beamer messes with some of the same macros that natbib does. (Incidentally using natbib you should ...

1

I have asked Frank Holzwarth from Springer and he answered that he managed to solve this problem with the latest release 2.20 (24 June 2015) of the llncs.cls file. Until the file is officially available from the official springer site, you can find it here.

Top 50 recent answers are included