使用 includestandalone 移动超链接

使用 includestandalone 移动超链接

我对 includestandalone 和带有 hyperref 的 tikz-grafic 有疑问。

我的 MWE:我将图像定义为 picture.tex:

%Save as picture.tex
\documentclass[tikz]{standalone}
\usepackage{hyperref}
\usetikzlibrary{positioning}
% ----------------------------------------------------------------
\begin{document}

\begin{tikzpicture}
\node (problem) {Problem};
\node (ask) [below=of problem] {Ask at \url{http://www.stackexchange.com}};
\node (solution) [below=of ask] {Solution};
\draw[->] (problem) -- (ask) -- (solution);
\end{tikzpicture}
\end{document}

图片看起来不错,链接正确。

现在我将图片包含到includestandalone我的主文档中:

\documentclass[paper=a6]{scrartcl}
\usepackage{tikz,standalone}
\usepackage{hyperref}
\usetikzlibrary{positioning}

% ----------------------------------------------------------------
\begin{document}
\includestandalone{picture}
\end{document}
% ----------------------------------------------------------------

图片看起来不错,但超链接移到了底部: 在此处输入图片描述

一些附加信息:

  • a6 选项仅用于获取较小的屏幕截图。它对问题没有影响。
  • 截图中的红色箭头不是文档的一部分,它应该只是展示问题。
  • 如果我改用\input\includestandalone链接是正确的。但这不是我需要的解决方案。我的原始图片很大,我用 缩放它\includestandalone[width=\textwidth]{picture}
  • 到目前为止我用它\usepackage[hidelinks]{hyperref}来使错误的链接不可见。

我的问题:如何在包含的 tikz 图片中获取超链接的正确位置?


同时我更新到 TeXLive 2013 但错误仍然存​​在。

我的列表文件结果:

 *File List*
scrartcl.cls    2012/07/29 v3.11b KOMA-Script document class (article)
scrkbase.sty    2012/07/29 v3.11b KOMA-Script package (KOMA-Script-dependent basics and keyval usage)
 scrbase.sty    2012/07/29 v3.11b KOMA-Script package (KOMA-Script-independent basics and keyval usage)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
scrlfile.sty    2012/06/15 v3.12 KOMA-Script package (loading files)
tocbasic.sty    2012/04/04 v3.10b KOMA-Script package (handling toc-files)
scrsize11pt.clo    2012/07/29 v3.11b KOMA-Script font size class option (11pt)
typearea.sty    2012/07/29 v3.11b KOMA-Script package (type area)
    tikz.sty    2010/10/13 v2.10 (rcs-revision 1.76)
     pgf.sty    2008/01/15 v2.10 (rcs-revision 1.12)
  pgfrcs.sty    2010/10/25 v2.10 (rcs-revision 1.24)
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
  pgfrcs.code.tex
 pgfcore.sty    2010/04/11 v2.10 (rcs-revision 1.7)
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
luatex-loader.sty    2010/03/09 v0.4 Lua module loader (HO)
  pgfsys.sty    2010/06/30 v2.10 (rcs-revision 1.37)
  pgfsys.code.tex
pgfsyssoftpath.code.tex    2008/07/18  (rcs-revision 1.7)
pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
 pgfcore.code.tex
pgfcomp-version-0-65.sty    2007/07/03 v2.10 (rcs-revision 1.7)
pgfcomp-version-1-18.sty    2007/07/23 v2.10 (rcs-revision 1.1)
  pgffor.sty    2010/03/23 v2.10 (rcs-revision 1.18)
 pgfkeys.sty    
 pgfkeys.code.tex
  pgffor.code.tex
    tikz.code.tex
standalone.sty    2012/09/15 v1.1b Package to include TeX sub-files with preambles
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
 xkeyval.sty    2012/10/14 v2.6b package option processing (HA)
 xkeyval.tex    2012/10/14 v2.6b key=value parser (HA)
currfile.sty    2013/02/01 v0.7b Provides the file path elements of the current input file
kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)
kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)
etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
filehook.sty    2011/10/12 v0.5d Hooks for input files
filehook-scrlfile.sty    2011/01/03 v0.1 filehook patch for scrlfile package
gincltex.sty    2011/09/04 v0.3 Include external LaTeX files like graphics
svn-prov.sty    2010/04/24 v3.1862 Package Date/Version from SVN Keywords
adjustbox.sty    2012/05/21 v1.0 Adjusting TeX boxes (trim, clip, ...)
 adjcalc.sty    2012/05/16 v1.1 Provides advanced setlength with multiple back-ends (calc, etex, pgfmath)
trimclip.sty    2012/05/16 v1.0 Trim and clip general TeX material
collectbox.sty    2012/05/17 v0.4b Collect macro arguments as boxes
tc-pdftex.def    2012/05/13 v1.0 Clipping driver for pdftex
ifoddpage.sty    2011/09/13 v1.0 Conditionals for odd/even page detection
varwidth.sty    2009/03/30 ver 0.92;  Variable-width minipages
filemod-expmin.sty    2011/09/19 v1.2 Get and compare file modification times (expandable; minimal)
hyperref.sty    2012/11/06 v6.83m Hypertext links for LaTeX
hobsub-hyperref.sty    2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty    2012/05/28 v1.13 Bundle oberdiek, subset generic (HO)
  hobsub.sty    2012/05/28 v1.13 Construct package bundles (HO)
  ifvtex.sty    2010/03/01 v1.5 Detect VTeX and its facilities (HO)
 intcalc.sty    2007/09/27 v1.1 Expandable calculations with integers (HO)
kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)
pdfescape.sty    2011/11/25 v1.13 Implements pdfTeX's escape features (HO)
bigintcalc.sty    2012/04/08 v1.3 Expandable calculations on big integers (HO)
  bitset.sty    2011/01/30 v1.1 Handle bit-vector datatype (HO)
uniquecounter.sty    2011/01/30 v1.2 Provide unlimited unique counter (HO)
letltxmacro.sty    2010/09/02 v1.4 Let assignment for LaTeX macros (HO)
 hopatch.sty    2012/05/28 v1.2 Wrapper for package hooks (HO)
xcolor-patch.sty    2011/01/30 xcolor patch
atveryend.sty    2011/06/30 v1.8 Hooks at the very end of document (HO)
atbegshi.sty    2011/10/05 v1.16 At begin shipout hook (HO)
refcount.sty    2011/10/16 v3.4 Data extraction from label references (HO)
 hycolor.sty    2011/01/30 v1.7 Color options for hyperref/bookmark (HO)
 auxhook.sty    2011/03/04 v1.3 Hooks for auxiliary files (HO)
  pd1enc.def    2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive
     url.sty    2006/04/12  ver 3.3  Verb mode for urls, etc.
 hpdftex.def    2012/11/06 v6.83m Hyperref driver for pdfTeX
rerunfilecheck.sty    2011/04/15 v1.7 Rerun checks for auxiliary files (HO)
supp-pdf.mkii
epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf
  grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO)
epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
 nameref.sty    2012/10/27 v2.43 Cross-referencing by name of section
gettitlestring.sty    2010/12/03 v1.4 Cleanup title references (HO)
myarticle.out
myarticle.out
 picture.tex    Graphic file (type tex)
 picture.tex    Graphic file (type tex)
 ***********

我使用 Acrobat Reader 和 Sumatra(均在 Windows 上)测试了我的结果。

任何想法?

答案1

这是当前版本的一个错误luatex调整大小后超链接位置错误

相关内容