Size: 609
Comment:
|
Size: 2479
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
=== Hyperref and Tikz Externalize === | ## page was renamed from Computer/Latex/Hyperref_tikzexternalize == Tikz Externalize and conflicts with some other packages == === Tikz Externalize and Lualatex === In order to use tikzexternalize in lualatex another package is also necessary: {{{ \usepackage{shellesc} }}} This package may also be used with latex and pdflatex, but is necessary with lualatex. Other packages also require `{shellesc}` with lualatex, and therefore it may seem that it is not necessary sometimes. It is always necessary. === Tikz Externalize and Large Documents === If you follow the pattern described in [[../LargeDocuments|LaTeX-files for large documents]] and use Tikz Externalize, you should also add an extra command to the beginning of the individual chapter files. Example: * London.tex {{{ \renewcommand\thisdir{London} \tikzsetfigurename{London} }}} The reason is that === Tikz Externalize and Hyperref === |
Line 6: | Line 27: |
\tikzifexternalizing{% \renewcommand{\hypersetup[1]}{} }{% \usepackage{hyperref} } \hypersetup{ colorlinks, % These are of course only example options. bookmarksnumbered, linkcolor={black}, citecolor={black}, urlcolor={blue!90!black} } % \hypersetup{draft} % Remove the comment character for printing. |
|
Line 20: | Line 28: |
\tikzifexternalizing{% \newcommand{\hypersetup}[1]{} }{% \usepackage{hyperref} } \hypersetup{% colorlinks, allcolors={blue!40!black}, % allcolors={black}, % Uncomment for the printed version } |
|
Line 21: | Line 40: |
=== Tikz Externalize and Todonotes === The package {{{{todonotes}}}} uses Tikz internally, and therefore some extra work is necessary if Tikz Externalize is used in the document. One possibility is to create an extra command to handle this: {{{unique \newcommand\Etodo[2][]{{\tikzexternaldisable\todo[#1]{#2}}} unique}}} This command should be used instead of the original {{{\todo}}} if externalize is active. The command name can of course be changed to anything easy to remember. Note that the matching {{{\tikzexternalenable}}} is not needed, because the internal commmand is enclosed in an extra group. === Tikz Externalize and Tcolorbox === The package {{{{tcolorbox}}}} uses Tikz internally, and therefore a special command is needed if Tikz Externalize is in action. The command sequence is {{{ \usetikzlibrary{external} \tikzexternalize \tcbsetforeverylayer{shield externalize} }}} The long command {{{\tcbsetforeverylayer}}} is only necessary for older TeX versions. For newer versions {{{\tcbset}}} should be sufficient. Check and see which version works for you. |
Tikz Externalize and conflicts with some other packages
Tikz Externalize and Lualatex
In order to use tikzexternalize in lualatex another package is also necessary:
\usepackage{shellesc}
This package may also be used with latex and pdflatex, but is necessary with lualatex. Other packages also require {shellesc} with lualatex, and therefore it may seem that it is not necessary sometimes. It is always necessary.
Tikz Externalize and Large Documents
If you follow the pattern described in LaTeX-files for large documents and use Tikz Externalize, you should also add an extra command to the beginning of the individual chapter files. Example:
- London.tex
\renewcommand\thisdir{London} \tikzsetfigurename{London}
The reason is that
Tikz Externalize and Hyperref
Tikz Externalize does not work well with Hyperref without some extra measures. In order to get around the problem, include the following lines in your preamble
\tikzifexternalizing{% \newcommand{\hypersetup}[1]{} }{% \usepackage{hyperref} } \hypersetup{% colorlinks, allcolors={blue!40!black}, % allcolors={black}, % Uncomment for the printed version }
Tikz Externalize and Todonotes
The package {todonotes} uses Tikz internally, and therefore some extra work is necessary if Tikz Externalize is used in the document. One possibility is to create an extra command to handle this:
\newcommand\Etodo[2][]{{\tikzexternaldisable\todo[#1]{#2}}}
This command should be used instead of the original \todo if externalize is active. The command name can of course be changed to anything easy to remember. Note that the matching \tikzexternalenable is not needed, because the internal commmand is enclosed in an extra group.
Tikz Externalize and Tcolorbox
The package {tcolorbox} uses Tikz internally, and therefore a special command is needed if Tikz Externalize is in action. The command sequence is
\usetikzlibrary{external} \tikzexternalize \tcbsetforeverylayer{shield externalize}
The long command \tcbsetforeverylayer is only necessary for older TeX versions. For newer versions \tcbset should be sufficient. Check and see which version works for you.