# Tag Info

## New answers tagged hyperref

3

Not any character is possible in a PDF bookmark -- Unicode is supported but this requires a different setup of the content of bookmarks. This can be achieved with \texorpdfstring{TeX content}{pdf content} \documentclass{article} \usepackage{textgreek} \usepackage{hyperref} \hypersetup{pdftex,unicode,colorlinks=true,allcolors=black} \usepackage{hypcap} ...

4

The warnings (not errors) come from the bookmark code. The setting of the space factor by \@ can be used with TeX, but not in bookmark strings. There the command can be disabled by: \usepackage{hyperref}% option "pdfencoding=auto" or "unicode" recommended \pdfstringdefDisableCommands{\let\@\@empty}

1

Similar to Hendrik Vogt's answer, but using the expandable \getpagerefnumber from refcount (which is part of the hyperref bundle anyway!) (I used his example, however!) I've redefined \autoref to provide the feature instead of using a new macro name for this. \documentclass{article} \usepackage{xparse}% \usepackage{blindtext} \usepackage{letltxmacro} \...

2

The apacite manual clearly states on page 47, Section 8.2: The hyperref package turns (cross-) references into hypertext links. This can be used in conjunction with a program such as LATEX2HTML to compose .html les with clickable links, to internet pages or within the same document, or it can be used to create a .pdf document with clickable ...

2

With a KOMA-Script class you can use \addsec. Then it is possible to define a short title in the optional argument. \documentclass{scrreprt} \usepackage{hyperref} \usepackage{cleveref} \begin{document} \tableofcontents \chapter{chapter} \section[short title 1]{Long Title Section One}\label{sec:One} In \cref{sec:One} (\nameref{sec:One}) I refer to \nameref{...

3

Perhaps KOMA classes provide better ways, but \@currentlabelname has to be set (alternativle \NR@gettitle) to be effective with nameref, i.e. use the optional argument value #2 as content of \@currentlabelname! \documentclass{scrreprt} \usepackage{hyperref} \usepackage{cleveref} \usepackage{xparse} \makeatletter \let\latex@@section\section \...

8

The change to hyperref was to fix this issue https://github.com/ho-tex/hyperref/issues/11 which I have just re-opened, pointing here. I will update hyperref to address this (somehow:-) but meanwhile, this works: \documentclass{article} \usepackage{amsthm} \usepackage{hyperref} \usepackage{cleveref} \newtheorem{thm}[equation]{Theorem} \makeatletter ...

4

Credits go to Christian Hupfer for solving the requests in his answer. I can add a shorter way to implement Christians solution: \documentclass{article} \usepackage{nameref} \usepackage{hyperref} \usepackage{tcolorbox} \tcbuselibrary{theorems} \makeatletter \newtcbtheorem{thm}{Theorem}{code={\edef\@currentlabelname{#2}}}{thm} %\newtcbtheorem{thm}{...

2

You can do this as follows -- \documentclass{article} \usepackage{hyperref} \usepackage{xcolor} \hypersetup{pdftitle={main.pdf}, colorlinks=false, linkbordercolor=red } \begin{document} \tableofcontents \section{test} \section{test2} This is testing hyperref \end{document} Here is the result - That's what you wanted. ...

4

The reason is that \@currentlabelname is not defined which is written to the .aux by nameref's version of \label. The easiest way to solve this is either a patch or slight redefinition, setting \@currentlabelname with {##2}, which expands later on to contain the theorem name. (A patch would also do!) \documentclass{article} \usepackage{tcolorbox} \...

1

Do not say \global\let\value=\value You need to pick something other than \value and other than any other existing macro which you wish to later use, either implicitly or explicitly. When you use \pgfmathsetmacro, TeX defines the macro to whatever you say, even if the macro already exists. I'm not sure what \global\let\value=\value is intended to do,...

1

In your example code you have \newsubfloat{figure} behind \usepackage{hyperref}. This is correct and compile without warnings. But in your screenshot you have \newsubfloat{figure} before \usepackage{hyperref}, and this leads to the warning as now hyperref can't patch the subfloat.

4

The following employs moredelim and some boxing to have any (syntax-formatted) part of a listing as hyperlink: int main(){ @foo@(); // <-- identifier is hyperlink } The link target (URL) is specified with the macro \btSetUrl{ theurl }. You could setup it once or redefine it inside the listing using any of listings's escape-to-latex options. In the ...

5

The simplest method I can think of is to just use listings's escapechar key. This requires choosing a character that doesn't appear in the code. For example, I've used the pipe character | below, but this would need to be changed to something else if the code fragment contained, say, a logical or bitwise or operation. \documentclass{article} \usepackage{...

1

Here's a method which demonstrates two different approaches: one uses a tabular and the other not. The code: fixes the order of package loading to put hyperref last`; eliminates inconsistent layout by reading the console and using geometry with the value fancyhdr provides for headheight; demonstrates how to avoid TeX's complaints about bad boxes while ...

3

You might try something like one of these (note: I have simplified your original .tex file): \documentclass[11pt]{article}% note the change from 11Pt to 11pt \usepackage{hyperref,wasysym,array} % Not needed for minimal working example (MWE): % \usepackage{fancyhdr} % \pagestyle{fancy} % \fancyhf{} % \fancyhead[LE,RO]{ATA-27} % \fancyhead[RE,LO]{Acceptance ...

4

The tocdepth must be set again to 1, lately at the end of the document. This can be done either manually or in the \AtEndDocument hook. This must be written to the .toc. In addition the tocdepth counter must be set to 0 before using the various blabla sections. \documentclass[11pt]{article} \usepackage[left=2cm,top=2cm,right=2cm,bottom=2cm]{geometry} \...

2

Let's assume the theorem in question has been defined with a package such as amsthm or ntheorem and that it's been given the "label" thm:abc. Two suggestions: Since you're loading the hyperref package, you could use the command \autoref{thm:abc} to cross-reference the theorem. In addition to loading the hyperref package, you could load the cleveref ...

2

I suggest using this, if I've well understood: \documentclass{article} \usepackage{hyperref} \begin{document} \tableofcontents\label{toc} \thispagestyle{empty} \clearpage \section{A section} \clearpage \section{B section} \end{document}

5

You're forgetting an argument to \IfEq: \IfEq{<string-a>}{<string-b>}{<true>}{<false>} and the false branch is missing. Besides, \ref and \autoref are “robusted” commands, so it's better to use \LetLtxMacro for saving copies of them. \documentclass{article} %\usepackage{fontspec} \usepackage{xstring} \usepackage{letltxmacro} \...

5

The command \IfEq{foo}{foobar}{true}{false} has a true/false argument pair at the end -- this was missing in all tests within the definition of \setlocale, such that \section etc. was gobbled up, leading to being omitted here. \documentclass{article} \usepackage{fontspec} \usepackage{xstring} \usepackage{hyperref} \AtBeginDocument{% Must come after ...

6


6


1

This should work: \documentclass{article} \usepackage{acro} \ExplSyntaxOn \cs_new:Npn \acro_expandable_long:n #1 { \prop_item:Nn \l__acro_long_prop {#1} } \cs_new:Npn \acro_expandable_long_plural:n #1 { \bool_if:nTF { \prop_item:Nn \l__acro_long_plural_form_prop {#1} } { \prop_item:Nn \l__acro_long_plural_prop {#1} } { \...

0

Try this hyperref command \pdfstringdefDisableCommands{\def\thepart{\Roman{part}}} in your preamble. There's a line in classicthesis.sty that otherwise sets this to nothing.

1

You can simplify your setup in several ways. \documentclass{article} \usepackage{hyperref} \hypersetup{pdfproducer=Tester Schmitty (set in preamble)} \AtBeginDocument{% \hypersetup{ pdfproducer = \myproducer, } } \makeatletter \newcommand*\myhypersetuptoaux[1]{% command to tell LaTeX to save the value for the next run \AtEndDocument{% \...

1

To answer my question, one may define a new command that replaces the link target of the \cite command: \newcommand{\cpap}[1]{\hyperref[pap:#1]{\begin{NoHyper}\cite{#1}\end{NoHyper}}}‌​ A \label{pap:citationkey} is put at the location where you want the updated link to point, or could be defined using the (experimental) addtotoc command of the pdfpages ...

0

AUX File Solution This could potentially be simplified and may have weaknesses. I am just starting to experiment with writing/reading AUX files. It is very important to note that certain things MUST be set early in the document: \hypersetup{ colorlinks=true, linkcolor=red, urlcolor=red, hyperfootnotes=false, hypertexnames, ...

4

\autoref does only work completely with a corresponding \....autorefname macro, i.e. \sectionautorefname etc. hyperref extracts the reference information from its specific label information, where the relevant counter name is stored as well. This means, if the counter is named foo, \fooautorefname must exist -- otherwise it's ignored (and a warning ...

3

I changed a bit your fine example just to make some more comparisons: \documentclass[]{article} \usepackage{ifxetex} \ifxetex\else\usepackage[utf8]{inputenc}\fi \usepackage{hyperref} %\usepackage{bookmark} \begin{document} \section{\%á} \section{\%a} \end{document} When pdflatex is used for processing, the .out file reads \BOOKMARK [1][-]{section.1}{\045\...

0

To use appendixname instead of \chaptername in the table of contents, add these lines to you preamble: \usepackage{apptools, etoolbox} \makeatletter \patchcmd{\@chapter}{\protect {CHAPTER }}{\ifappendix{APPENDIX }\else{CHAPTER }\fi}{}{} \makeatother

0

With proper opening it works fine: \documentclass{article} \usepackage{hyperref} \begin{document} % here - PS Here's a link to \href{http://twitter.com/home}{Twitter}. \end{document}

1

Fixing your compile problem (Question was edited with a new problem) After going through you code, I renamed these lines(subfiles are commented out, only becouse I don't have them, just comment them in): \begin{appendices} \chapter{Listado de frecuencias de industrias} %\subfile{appendices/listado_frecuencias_industrias} \chapter{Distribuciones ...

2

Use the bookmark package and \bookmarksetup{color=...} for coloured bookmarks. The settings are persistent until the next \bookmarksetup or an explicit \bookmark command. \documentclass[11pt,twoside,openany,x11names,svgnames]{memoir} %\usepackage[margin=1in]{geometry} %\usepackage[T1]{fontenc} %\usepackage{verbatim} %\usepackage{vector} %\usepackage{...

4

The bookmark package is designed to fix a few features of hyperref; although the documentation doesn't tell it explicitly, it should be loaded after hyperref. Actually, bookmark loads hyperref itself, if not already done. Since hyperref changes the meaning of \index, it should be loaded later than imakeidx for hyperlinks to be added to index entries. So ...

2

Perhaps there are better ways to split the My content\label{tag} stuff such that \hypertarget does not choke on \label: Use \def\splitcmd#1\label#2 and a similar command that splits the with undelimited arguments (actually, \label is the argument delimiter here). This uses a dummy counter and to refer to the text, use \nameref instead. \documentclass{...

0

Sonmething like this? \documentclass[a4paper, 11pt]{article} \usepackage[ngerman]{babel} \usepackage[utf8x]{inputenc} \usepackage{hyperref} \newcounter{book} \newcounter{subbook}[book] \def\bookagraph#1{\stepcounter{book}\stepcounter{subbook} \paragraph{B \arabic{book} -\arabic{subbook} #1}\expandafter\label{bookagraph_\arabic{book}\arabic{subbook}}} \...

1


2

The strange issue is that different fonts are selected when compiled with pdftex and luatex. I cannot figure out how the selection works from the mathdesign source code, anyway, when I took a look at the DVI code, there is a difference: pdftex: set: 'what' w: 2.678421pt set: 'happened' w0: set: 'to' w0: set: 'the' ...

Top 50 recent answers are included