Tag Info

New answers tagged

3

Add \urlstyle{rm} to your preamble.


1

This is caused by the frontmatter environment: if there is no frontmatter, links work just fine. In the definition of the environment, they open a NoHyper environment, but they do not close it. Adding \endNoHyper after the frontmatter fixes the problem. There is probably a cleaner solution, patching the environment, but since this environment is only ...


3

The PDF standard does not provide a means for displaying remote images from URLs at viewing time. So \includegraphics cannot embed these. But the Adobe Supplement to the ISO 32000 defines the RichMedia Annotation. It is implemented in AdobeReader on Windows and MacOSX and allows playing media (embedded or from URL). Here is an example, using ...


6

The URL is not specifying a location of an image to TeX, it is specifying what the PDF reader should do when the user clicks on the link. You have \includegraphics{hbv} so tex needs a file of that name in its search path.


2

You can change allcolors to the current color . inside the footline template using \addtobeamertemplate{footline}{\hypersetup{allcolors=.}}{} Code: \documentclass[leqno]{beamer} \usetheme{Madrid} \usecolortheme{whale} \usepackage{lmodern} \hypersetup{colorlinks=true, allcolors=blue} \addtobeamertemplate{footline}{\hypersetup{allcolors=.}}{} ...


1

The problem is not the toc but the bookmarks. You can remove the hebrew with \texorpdfstring. You can enter single hebrew letters in the booksmarks with \unichar (needs the unicode-option): \documentclass{article} \usepackage{cjhebrew} % This package allows you to write in Hebrew. % Write in Hebrew like this: \<hebrew> ...


0

And I've since written a package called latex-markdown-linking to include similar formatting. \usepackage{hyperref} % required by linking.sty \usepackage{linking} % include linking.sty in your compile folder % Markdown equivalent: [Bode Miller]:https://... \SSdefine{Bode Miller}{https://en.wikipedia.org/wiki/Bode_Miller} \begin{document} % Markdown ...


8

In my point of view, it's sufficient to set a \hypertarget{destname}{} and use the destname as argument to the evince --named-dest option. This works at least in my evince version (3.6.1, very old, I believe) It works with Acrobat Reader as well, the calling syntax is slightly different, however: acroread /a "nameddest=pos2" nameddestexample.pdf to ...


4

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


5

\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

Ok, I think I got it; first, found like this that \part - or rather \@part - actually has an optional argument: $ texdef -t latex -c book part -f \part first defined in "book.cls". \part: \long macro:->\if@openright \cleardoublepage \else \clearpage \fi \thispagestyle {plain}\if@twocolumn \onecolumn \@tempswatrue \else \@tempswafalse \fi \null \vfil ...


2

This could be a possible solution, by providing a \enhancedpart command, having an 3rd argument containing the bookmark title. Since hyperref automatically adds the bookmarks via \addcontentsline, this has to be kicked out. The bookmark package provides some features, but the destination key has to be set then. This is automatically done using a ...


0

This is a MWE with the solution provided by @egreg, and including the language options which were clashing, in case it can be useful for someone else \documentclass[a4paper,12pt]{report} \usepackage[hyphens]{url} \usepackage[style=apa, backend=biber]{biblatex} \DeclareLanguageMapping{british}{british-apa} \addbibresource{bibliography.bib} ...


1

The first thing to note is that breakurl is useful only if the document is processed with latex+dvips+ps2pdf in order to produce a PDF file. If pdflatex is used, there's no point in loading breakurl instead of url. Second: the package hyperref requires url, so this package should be loaded before hyperref if we want to add options to it. Third: also ...


1

You'll have to patch \makecvtitle after loading the classic style using something like etoolbox. I've done so below, replacing the \httplink{\@homepage} piece with a conditional based on whether you supplied a shorthand argument <desc> or not through the updated \homepage[<desc>]{<URL>}: \documentclass{moderncv} \moderncvstyle{classic} ...


0

The problem is that beamer requests hyperref not to load fully, and so hyperref's \ref (and support commands) are not used. Instead, beamer tries to emulate the behaviour of hyperref's \ref in terms of link support, but does not attempt to emulate the external link support. I'm sure the following is really bad and will break lots of things, but one can ...


1

Solution: Simply add pdfauthor={Michael Shell, My institution} to the options of hyperref, i.e. \documentclass[conference]{IEEEtran} \usepackage [pdfusetitle, pdfauthor={Michael Shell, My institution}] {hyperref} \begin{document} \title{A simple test} \author{ \IEEEauthorblockN{Michael Shell} \IEEEauthorblockA{My institution} } \maketitle \end{document} ...


1

Just try this \phantomsection. This is old style ref/label format using hyperref, and works. \documentclass[a4paper]{report} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[hidelinks]{hyperref} \begin{document} \chapter{First chapter} Get to know more about what is a \hyperref[frog]{frog}. \chapter{Second chapter} Did you know, that ...


2

You're probably loading hyperref which causes internal links to be coloured: \documentclass{article} \usepackage{hyperref} \hypersetup{% colorlinks=true,% Colour links without boxes linkcolor=black}% Internal link colour is black \begin{document} \tableofcontents \section{A section} \subsection{A subsection} \end{document} Other internal links ...


2

Well, I discovered it by myself. The solution is customizing the numbering of pages by redefining the \thepage command, using \renewcommand{\thepage}{C\arabic{page}} Also, if we want to avoid page numbers to appear in that cover section, we can use \thispagestyle{empty} So the MWE that would work for me is this: \documentclass[11pt]{book} ...


2

Define a new command. Below I've called it \pref (short for parenthesis ref): \documentclass{article} \usepackage{gb4e} \newcommand{\pref}[1]{(\ref{#1})} \begin{document} \section{Introduction} \label{intro} \begin{exe} \ex \label{a} asdf \end{exe} In \pref{a} \dots. In \ref{intro} \dots. \end{document}


1

Citations here are handled by the natbib package which the document class loads with the sort&compress option. The compression part means that the list 1,2,3,4 gets reduced to 1--4 and in the process the back references to the intermediate items are not created. One way around this is to switch of the compression by issuing ...


4

There is no need to escape a dollar symbol in a url. \documentclass[a4paper]{article} \usepackage[T1]{fontenc} \usepackage{hyperref} \begin{document} \url{test$test} \end{document}


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

This turned out to be an easy and simple fix. Just add the following: \renewcommand\thesection{\arabic{section}} You can also then remove my earlier kludge to remove the section number from printing in the body of the text: \renewcommand\section{\@startsection {section}{1}{\z@}{0ex}{0ex}{\@gobble}} Results:


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 \begin{equation} 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

Here I also found a perfect one: \documentclass{article} \usepackage[pagebackref]{hyperref} \renewcommand*{\backref}[1]{} \renewcommand*{\backrefalt}[4]{ \ifcase #1 No cited. \or page #2. \else pages #2. \fi } \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @book {jost1995riemannian, AUTHOR = ...


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



Top 50 recent answers are included