Tag Info

Hot answers tagged

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


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


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


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


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


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


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


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



Only top voted, non community-wiki answers of a minimum length are eligible