# Tag Info

6

If you don't load hyperref, then you'd get macro:->\T1-cmd \textasciitilde \T1\textasciitilde although the default encoding is EU1 (or EU2 with LuaLaTeX). With hyperref you get macro:->\PU-cmd \textasciitilde \PU\textasciitilde because puenc.def has been loaded later. The macro \PU-cmd looks for two arguments and does ...

5

The syntax is not \ifx<firsttoken><secondtoken>{<true code>}\else{<false code>}\fi The correct one is \ifx<firsttoken><secondtoken><true code>\else<false code>\fi So you can remove the braces around {#1} and {#2} (which, in the case of \usepackage{fontspec} act as a group delimiter).

4

In order to yield an appropriate hyperlink, issue \phantomsection at the end of \thing: \makeatletter \newcommand{\thing}[1]{% \thingnamestyle{#1}% \def\@currentlabel{\thingnamerefstyle{#1}}% \phantomsection% } \makeatother Note that if \thingnamerefstyle is expanded what written to the .aux file. It is sometimes more customary to \protect this: ...

3

You need to use \href for this: \href[options]{URL}{text} The text is made a hyperlink to the URL; this must be a full URL (relative to the base URL, if that is defined). The special characters # and ˜ do not need to be escaped in any way (from hyperref manual, page 15). Or use \url. \documentclass{article} \usepackage{hyperref} \begin{document} Here's ...

3

Package apacite sets \urlstyle inside \AtBeginDocument to APACtt. Therefore switching back to rm should be done at a later time, e.g.: \documentclass[12pt]{article} \usepackage{apacite} \usepackage{hyperref} \AtBeginDocument{% \urlstyle{APACrm}% APAC version of rm % \urlstyle{rm}% } \begin{document} ...

3

Use \textsc and not the deprecated command \sc: \documentclass[10pt]{book} \usepackage{hyperref} \begin{document} This renders correctly'' \textsc{Do small caps break it?} No'' \hyperlink{a}{How about hyperlinks?} No'' \hyperlink{a}{\textsc{But... small caps inside hyperlinks}} make everything afterwards render as small caps, and break the ...

3

Package hyperref already fixes \appendix by prepending \appendix to fix the anchor names. Your redefinition of \appendix throws the fix away. Therefore the redefinition, not hyperref is faulty. Options: Redefine \appendix before package hyperref, because hyperref redefinition is defensive and keeps the current meaning of \appendix in the redefined ...

2

You can use eps files together with pdflatex. In a modern texsystem you only need to load \usepackage{epstopdf}. Or convert your eps to pdf before the compilation. Beside this: your example doesn't work with pdflatex either as your \addcontentsline commands have no sensible anchor. Use \phantomsection: \documentclass{book} \usepackage[utf8]{inputenc} ...

2

Ideally, one would just use an \apptocmd command (from etoolbox package) or \xapptocmd (from xpatch package) in order to hook the appropiate hypertarget/hyperlink command, but unfortunately, this breaks due to the definition of the structuring commands (such as \part, \chapter etc.) A generic 'slight' redefinition of those commands provides this, however. ...

1


1

[This is perhaps not a full solution, but too long for a comment...] I am not sure what you are trying to achieve as in your MWE the pdf file, with the \renewcommand commented out, hyperref is doing the right thing. Presumably you want to redefine \appendix so that it does something different to what is described in the comments. In which case, rather than ...

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