我正在使用以下代码
\documentclass{report}
\usepackage[ngerman]{babel}
\usepackage{lmodern}
\usepackage{tikz}
\usetikzlibrary{external}
\tikzset{external/system call={lualatex \tikzexternalcheckshellescape -halt-on-error -interaction=batchmode -jobname "\image" "\texsource"}}
\tikzexternalize
\begin{document}
\begin{figure}
\begin{center}
\hspace*{.0\linewidth}\resizebox{\linewidth}{!}{\input{picture.tex}}
\end{center}
\end{figure}
\end{document}
包含这张相当长的 TikZ 图片picture.tex
。看起来很丑,但我使用 Inkscape 创建了原始图像,然后使用导出工具将其转换为 TikZ。
\begin{tikzpicture}[y=0.80pt, x=0.8pt,yscale=-1, inner sep=0pt, outer sep=0pt]
\begin{scope}[shift={(7471.7426,2551.8505)}]% layer1
\begin{scope}% g5193
\begin{scope}% g5148
\begin{scope}[cm={{1.17388,0.0,0.0,1.17388,(-7186.7124,-2753.3928)}}]% g3934
\begin{scope}% g3927
% path15-7
\path[draw=black,miter limit=4.00,line width=3.200pt] (596.8110,270.9895) --
(575.1970,284.3355) .. controls (571.3210,286.7295) and (566.3920,287.7725) ..
(561.8570,287.3165) -- (510.6700,282.1515)(593.0770,269.1245) --
(573.5910,281.0345) .. controls (570.3660,283.0065) and (566.3080,284.0135) ..
(562.5460,283.6295) -- (513.1500,278.5855) .. controls (511.6520,277.1425) and
(509.8060,275.7835) .. (507.6100,274.5565);
% path19-4
\path[draw=black,miter limit=4.00,line width=3.200pt] (61.1280,177.3815) --
(43.7980,302.6695)(52.5390,303.9275) .. controls (63.9900,300.9715) and
(80.5510,301.8085) .. (99.4350,304.3755);
% path21-0
\path[draw=black,miter limit=4.00,line width=3.200pt] (497.3920,247.1955) ..
controls (500.1060,246.7475) and (502.8180,246.2995) .. (505.5300,245.8555) ..
controls (519.3440,243.5885) and (537.0710,243.3185) .. (556.7760,250.0855) ..
controls (570.2670,254.7175) and (583.4920,262.0625) .. (594.5470,268.6015) ..
controls (597.1920,270.1635) and (598.1890,270.5795) .. (601.2070,271.0925) ..
controls (630.8390,276.1565) and (662.9960,282.5555) .. (689.1340,298.2395) ..
controls (698.0900,303.6095) and (702.1660,313.0465) .. (689.3220,318.3635) ..
controls (657.0540,331.7185) and (613.7270,336.4585) .. (579.4820,338.3655) ..
controls (552.0290,339.8885) and (520.6710,339.1255) .. (485.6280,333.8435) ..
controls (458.9970,329.8335) and (432.5170,323.9235) .. (405.9420,319.5745) ..
controls (385.0670,316.1575) and (363.6860,314.5305) .. (342.6410,312.4985) ..
controls (318.7300,310.1855) and (294.9960,308.7555) .. (271.0340,307.3185) ..
controls (241.6040,305.5565) and (212.0980,305.3605) .. (182.6410,304.1105) ..
controls (155.6020,302.9665) and (114.4990,303.2895) .. (106.1600,304.4455) ..
controls (99.6290,305.3475) and (93.7130,308.4365) .. (87.2050,309.4915) ..
controls (76.7000,311.1935) and (65.8180,310.1085) .. (55.1490,307.3455) ..
controls (45.5700,304.8675) and (2.5530,291.8745) .. (7.8310,273.6985) --
(35.4760,178.4945) .. controls (45.3490,175.4225) and (89.2910,167.4655) ..
(91.9300,182.9515) -- (103.2140,249.1855) .. controls (103.7110,252.1065) and
(104.4220,256.6135) .. (105.6430,259.5085) .. controls (113.0950,260.7115) and
(115.0920,264.0495) .. (108.9230,265.5235) .. controls (109.6000,266.8605) and
(110.0520,267.5555) .. (110.5310,268.1385) -- (110.6940,268.3365) .. controls
(113.9480,272.2955) and (118.3380,274.5435) .. (125.0570,274.1895) .. controls
(223.6570,268.9695) and (322.1850,262.4185) .. (420.7750,256.9965) .. controls
(429.4630,256.5175) and (438.1990,255.6695) .. (446.9450,254.6485) --
(456.3310,247.7535) .. controls (457.3500,247.0075) and (457.8290,245.8835) ..
(458.1350,244.9545) .. controls (480.8850,239.9015) and (495.4440,242.1085) ..
(496.9950,246.1985) -- (497.3870,247.2265);
% path25-9
\path[draw=black,miter limit=4.00,line width=3.200pt] (446.9870,254.6805) --
(430.3170,267.0385) -- (408.2080,289.5885) .. controls (411.5730,289.3365) and
(414.9750,289.0825) .. (418.3470,288.9045) .. controls (421.7950,288.7175) and
(425.2040,288.5015) .. (428.6580,288.4995) .. controls (432.0950,288.4965) and
(435.5350,288.6445) .. (438.9680,288.8165) .. controls (442.4060,288.9885) and
(445.8300,289.3135) .. (449.2660,289.5265) .. controls (452.7490,289.7405) and
(456.2340,290.0175) .. (459.7240,290.0925) .. controls (463.1480,290.1705) and
(466.5790,290.1245) .. (470.0020,289.9805) .. controls (473.4030,289.8355) and
(476.8010,289.5455) .. (480.1900,289.2185) .. controls (483.5970,288.8915) and
(487.0030,288.5215) .. (490.3870,288.0255) .. controls (493.7880,287.5235) and
(497.2020,286.9815) .. (500.5410,286.2235) .. controls (504.0800,285.4165) and
(510.6800,283.9415) .. (510.5080,281.9565) .. controls (510.4960,281.8025) and
(510.4560,281.6435) .. (510.3960,281.4775) -- (497.3930,247.2225);
% path29-4
\path[draw=black,miter limit=4.00,line width=3.200pt] (49.5890,262.7865) --
(65.8180,260.8505) .. controls (86.7740,258.3515) and (112.4220,258.8725) ..
(112.4220,262.7865) .. controls (112.4220,266.7015) and (86.7750,267.2225) ..
(65.8180,264.7225) -- cycle;
\end{scope}
\end{scope}
\begin{scope}% g4576
% path3925
\path[color=black,fill=black,line width=10.803pt] (-5977.0000,-2398.4062) ..
controls (-6179.8869,-2397.1578) and (-6293.3830,-2397.5938) ..
(-6344.9688,-2397.5938) -- (-6344.9688,-2384.0938) .. controls
(-6293.4557,-2384.0938) and (-6179.8426,-2383.6575) .. (-5976.9062,-2384.9062)
.. controls (-5956.4512,-2385.0321) and (-5936.4877,-2374.0238) ..
(-5916.2188,-2351.5312) .. controls (-5895.9498,-2329.0387) and
(-5875.8963,-2295.3171) .. (-5856.2812,-2252.2188) .. controls
(-5817.0511,-2166.0220) and (-5779.3691,-2042.4019) .. (-5740.9062,-1895.1562)
.. controls (-5678.1494,-1654.9070) and (-5613.2450,-1351.6677) ..
(-5534.9062,-1043.6875) .. controls (-5431.6615,-637.7916) and
(-5305.2073,-223.6769) .. (-5128.7188,66.3750) .. controls
(-5047.6660,199.5819) and (-4899.4184,274.3444) .. (-4748.2500,316.0000) ..
controls (-4597.0816,357.6556) and (-4442.5775,366.2813) ..
(-4347.2812,366.2813) -- (-4347.2812,352.7813) .. controls
(-4441.7572,352.7813) and (-4595.3338,344.1243) .. (-4744.6875,302.9688) ..
controls (-4894.0412,261.8132) and (-5038.7449,188.2410) ..
(-5117.1562,59.3750) .. controls (-5292.1639,-228.2429) and
(-5418.6769,-641.5645) .. (-5521.8125,-1047.0312) .. controls
(-5600.0684,-1354.6858) and (-5664.9602,-1657.8280) .. (-5727.8438,-1898.5625)
.. controls (-5766.3843,-2046.1055) and (-5804.1074,-2170.1603) ..
(-5844.0000,-2257.8125) .. controls (-5863.9463,-2301.6386) and
(-5884.4064,-2336.3918) .. (-5906.1875,-2360.5625) .. controls
(-5927.9686,-2384.7332) and (-5951.6104,-2398.5625) .. (-5977.0000,-2398.4062)
-- cycle;
% path4582
\path[draw=black,fill=black,even odd rule,line width=5.402pt]
(-6030.9682,-2391.3358) -- (-6057.8092,-2364.1625) -- (-5963.4504,-2391.7512)
-- (-6058.1415,-2418.1767) -- (-6030.9682,-2391.3358) -- cycle;
% path4584
\path[draw=black,fill=black,even odd rule,line width=5.402pt]
(-5748.0139,-1949.1198) -- (-5780.9705,-1968.4248) -- (-5730.9494,-1883.7927)
-- (-5728.7088,-1982.0764) -- (-5748.0139,-1949.1198) -- cycle;
% path4586
\path[draw=black,fill=black,even odd rule,line width=5.402pt]
(-5541.6740,-1097.7085) -- (-5574.5059,-1117.2250) -- (-5525.0296,-1032.2731)
-- (-5522.1575,-1130.5404) -- (-5541.6740,-1097.7085) -- cycle;
% path4588
\path[draw=black,fill=black,even odd rule,line width=5.402pt]
(-5151.0138,16.7330) -- (-5188.1247,7.6996) -- (-5115.9168,74.4135) --
(-5141.9804,-20.3779) -- (-5151.0138,16.7330) -- cycle;
% path4590
\path[draw=black,fill=black,even odd rule,line width=5.402pt]
(-4401.2891,359.5360) -- (-4428.2967,386.5436) -- (-4333.7700,359.5360) --
(-4428.2967,332.5283) -- (-4401.2891,359.5360) -- cycle;
\end{scope}
\begin{scope}[cm={{1.17388,0.0,0.0,1.17388,(794.91163,334.55886)}}]% g3934-8
\begin{scope}% g3927-2
% path15-7-45
\path[draw=black,miter limit=4.00,line width=3.200pt] (596.8110,270.9895) --
(575.1970,284.3355) .. controls (571.3210,286.7295) and (566.3920,287.7725) ..
(561.8570,287.3165) -- (510.6700,282.1515)(593.0770,269.1245) --
(573.5910,281.0345) .. controls (570.3660,283.0065) and (566.3080,284.0135) ..
(562.5460,283.6295) -- (513.1500,278.5855) .. controls (511.6520,277.1425) and
(509.8060,275.7835) .. (507.6100,274.5565);
% path19-4-5
\path[draw=black,miter limit=4.00,line width=3.200pt] (61.1280,177.3815) --
(43.7980,302.6695)(52.5390,303.9275) .. controls (63.9900,300.9715) and
(80.5510,301.8085) .. (99.4350,304.3755);
% path21-0-1
\path[draw=black,miter limit=4.00,line width=3.200pt] (497.3920,247.1955) ..
controls (500.1060,246.7475) and (502.8180,246.2995) .. (505.5300,245.8555) ..
controls (519.3440,243.5885) and (537.0710,243.3185) .. (556.7760,250.0855) ..
controls (570.2670,254.7175) and (583.4920,262.0625) .. (594.5470,268.6015) ..
controls (597.1920,270.1635) and (598.1890,270.5795) .. (601.2070,271.0925) ..
controls (630.8390,276.1565) and (662.9960,282.5555) .. (689.1340,298.2395) ..
controls (698.0900,303.6095) and (702.1660,313.0465) .. (689.3220,318.3635) ..
controls (657.0540,331.7185) and (613.7270,336.4585) .. (579.4820,338.3655) ..
controls (552.0290,339.8885) and (520.6710,339.1255) .. (485.6280,333.8435) ..
controls (458.9970,329.8335) and (432.5170,323.9235) .. (405.9420,319.5745) ..
controls (385.0670,316.1575) and (363.6860,314.5305) .. (342.6410,312.4985) ..
controls (318.7300,310.1855) and (294.9960,308.7555) .. (271.0340,307.3185) ..
controls (241.6040,305.5565) and (212.0980,305.3605) .. (182.6410,304.1105) ..
controls (155.6020,302.9665) and (114.4990,303.2895) .. (106.1600,304.4455) ..
controls (99.6290,305.3475) and (93.7130,308.4365) .. (87.2050,309.4915) ..
controls (76.7000,311.1935) and (65.8180,310.1085) .. (55.1490,307.3455) ..
controls (45.5700,304.8675) and (2.5530,291.8745) .. (7.8310,273.6985) --
(35.4760,178.4945) .. controls (45.3490,175.4225) and (89.2910,167.4655) ..
(91.9300,182.9515) -- (103.2140,249.1855) .. controls (103.7110,252.1065) and
(104.4220,256.6135) .. (105.6430,259.5085) .. controls (113.0950,260.7115) and
(115.0920,264.0495) .. (108.9230,265.5235) .. controls (109.6000,266.8605) and
(110.0520,267.5555) .. (110.5310,268.1385) -- (110.6940,268.3365) .. controls
(113.9480,272.2955) and (118.3380,274.5435) .. (125.0570,274.1895) .. controls
(223.6570,268.9695) and (322.1850,262.4185) .. (420.7750,256.9965) .. controls
(429.4630,256.5175) and (438.1990,255.6695) .. (446.9450,254.6485) --
(456.3310,247.7535) .. controls (457.3500,247.0075) and (457.8290,245.8835) ..
(458.1350,244.9545) .. controls (480.8850,239.9015) and (495.4440,242.1085) ..
(496.9950,246.1985) -- (497.3870,247.2265);
% path25-9-7
\path[draw=black,miter limit=4.00,line width=3.200pt] (446.9870,254.6805) --
(430.3170,267.0385) -- (408.2080,289.5885) .. controls (411.5730,289.3365) and
(414.9750,289.0825) .. (418.3470,288.9045) .. controls (421.7950,288.7175) and
(425.2040,288.5015) .. (428.6580,288.4995) .. controls (432.0950,288.4965) and
(435.5350,288.6445) .. (438.9680,288.8165) .. controls (442.4060,288.9885) and
(445.8300,289.3135) .. (449.2660,289.5265) .. controls (452.7490,289.7405) and
(456.2340,290.0175) .. (459.7240,290.0925) .. controls (463.1480,290.1705) and
(466.5790,290.1245) .. (470.0020,289.9805) .. controls (473.4030,289.8355) and
(476.8010,289.5455) .. (480.1900,289.2185) .. controls (483.5970,288.8915) and
(487.0030,288.5215) .. (490.3870,288.0255) .. controls (493.7880,287.5235) and
(497.2020,286.9815) .. (500.5410,286.2235) .. controls (504.0800,285.4165) and
(510.6800,283.9415) .. (510.5080,281.9565) .. controls (510.4960,281.8025) and
(510.4560,281.6435) .. (510.3960,281.4775) -- (497.3930,247.2225);
% path29-4-1
\path[draw=black,miter limit=4.00,line width=3.200pt] (49.5890,262.7865) --
(65.8180,260.8505) .. controls (86.7740,258.3515) and (112.4220,258.8725) ..
(112.4220,262.7865) .. controls (112.4220,266.7015) and (86.7750,267.2225) ..
(65.8180,264.7225) -- cycle;
\end{scope}
\end{scope}
% path4204
\path[draw=black,line join=miter,line cap=butt,miter limit=4.00,line
width=13.504pt] (-7471.7354,856.0697) -- (2053.0309,856.0697);
% path3946
\path[cm={{0.72139,0.0,0.0,0.8304,(-3559.1797,-2575.6467)}},draw=black,line
cap=butt,miter limit=4.00,line width=16.000pt]
(-723.3183,4124.8642)arc(180.013:359.987:185.853);
% path3948
\path[draw=black,line join=miter,line cap=butt,miter limit=4.00,line
width=6.192pt] (-3532.8463,853.6449) -- (-3532.8463,649.2598) --
(-3448.2967,664.5541) -- (-3448.2967,690.9713) -- (-3534.0542,704.8750);
% path3950
\path[draw=black,line join=miter,line cap=butt,miter limit=4.00,line
width=6.192pt] (-3468.5953,658.9924) -- (-3468.5953,692.3614);
% path3952
\path[draw=black,line join=miter,line cap=butt,miter limit=4.00,line
width=6.192pt] (-3485.9750,657.6021) -- (-3485.9750,695.1422);
% path3954
\path[draw=black,line join=miter,line cap=butt,miter limit=4.00,line
width=6.192pt] (-3501.4422,652.0406) -- (-3501.4422,697.9229);
% path3956
\path[draw=black,line join=miter,line cap=butt,miter limit=4.00,line
width=6.192pt] (-3516.6744,652.0406) -- (-3516.6744,702.0941);
% path4244
\path[draw=black,dash pattern=on 64.82pt off 64.82pt,line join=miter,line
cap=butt,miter limit=4.00,line width=10.803pt] (-4255.0378,354.7662) --
(-4255.0378,-714.6359);
% path4244-1
\path[draw=black,dash pattern=on 64.82pt off 64.82pt,line join=miter,line
cap=butt,miter limit=4.00,line width=10.803pt] (251.8578,354.7662) --
(251.8578,-714.6359);
\begin{scope}% g4592
% path4454
\path[color=black,fill=black,line width=10.803pt] (-4225.2812,-669.2188) --
(-4225.2812,-655.7188) -- (222.5313,-655.7188) -- (222.5313,-669.2188) --
(-4225.2812,-669.2188) -- cycle;
% path4598
\path[draw=black,fill=black,even odd rule,line width=5.402pt]
(-4171.2618,-662.4633) -- (-4144.2542,-689.4710) -- (-4238.7809,-662.4633) --
(-4144.2542,-635.4557) -- (-4171.2618,-662.4633) -- cycle;
% path4600
\path[draw=black,fill=black,even odd rule,line width=5.402pt]
(168.5264,-662.4633) -- (141.5188,-635.4557) -- (236.0455,-662.4633) --
(141.5188,-689.4710) -- (168.5264,-662.4633) -- cycle;
\end{scope}
% text4836
\path[fill=black] (-2760.2979,-716.64734) node[above right,font=\fontsize{130}{10}\selectfont] (text4836)
{Messsegment (H = const.)};
% text4844
\path[fill=black] (316.43518,312.34344) node[above right,font=\fontsize{130}{10}\selectfont] (text4844) {$V_{min}$ (Abriss)};
% path5749
\path[draw=black,line join=miter,line cap=butt,miter limit=4.00,line
width=10.803pt] (-4380.4882,359.4433) -- (284.1386,359.4433);
\begin{scope}% g4602
% path5751
\path[color=black,fill=black,line width=10.803pt] (283.9063,352.6875) --
(283.3750,366.1875) .. controls (480.5931,373.6510) and (615.0762,502.2643) ..
(764.5625,607.4375) -- (772.3125,596.4063) .. controls (623.9694,492.0373) and
(486.7386,360.3635) .. (283.9063,352.6875) -- cycle;
% path4608
\path[draw=black,fill=black,even odd rule,line width=5.402pt]
(724.2578,570.8487) -- (686.6287,577.3965) -- (779.4789,609.7003) --
(717.7100,533.2196) -- (724.2578,570.8487) -- cycle;
\end{scope}
% path3946-1
\path[cm={{0.55379,0.0,0.0,0.63748,(-3650.7574,-1780.6716)}},draw=black,line
cap=butt,miter limit=4.00,line width=16.000pt]
(-723.3183,4124.8642)arc(180.013:359.987:185.853);
\end{scope}
\end{scope}
\end{scope}
\end{tikzpicture}
如您所见,我正在使用tikzexternalize
LuaLaTeX。我已在 Windows 7 x64 上使用 MiKTeX 2.9 进行了尝试。
处理运行没有给我任何错误,但 TeXWorks 中的查看器和 Adobe Reader 都没有在最终文档中显示图片。图像似乎仍然在那里,因为仍然可以标记所包含的文本(尽管不可见)。但是,使用 Foxit Reader 可以看到图片。此外,最终文档中包含的单独生成的 PDF 在 Adobe Reader 中显示得很好。当我不使用外部化时,整个问题不会发生。
由于该问题仅出现在此图像上,因此我猜测错误出在 TikZ 图片本身。
我已经知道在外部化过程中可以使用以下选项跳过单个图像
\tikzset{external/export next=false}
但我还是想知道哪里出了问题。