包含的 svg 渲染不正确

包含的 svg 渲染不正确

我正在尝试svg使用包包含一个文件svg。该过程有效,但最终输出不正确。

svg文件在 Inkscape 中如下所示:

在此处输入图片描述

LaTeX文件如下:

\documentclass{article}
%
\usepackage{graphicx}
\usepackage{svg}

\begin{document}

  \includesvg[
    inkscapeformat=pdf,
    inkscapelatex=true,
    inkscapearea=drawing
  ]
    {test-x.svg}

\end{document}

我正在用命令进行编译

pdflatex --shell-escape x.tex

输出如下所示:

在此处输入图片描述

我是否做错了什么导致 y 轴标记出现错误?

编辑:包括文件test-x.svg

<?xml version="1.0" encoding="UTF-8"?>
<svg viewBox="0 0 451.04 437.02" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd">
 <g fill="none" stroke="#000">
  <path d="m34.907 416.12h415.74v-415.74h-415.74z" stroke-width=".76"/>
  <path d="m72.701 416.12v-415.74m-37.794 377.94h415.74m-340.15 37.8v-415.74m-75.589 340.15h415.74m-302.37 75.59v-415.74m-113.38 302.36h415.74m-264.56 113.38v-415.74m-151.17 264.56h415.74m-226.77 151.18v-415.74m-188.97 226.77h415.74m-188.98 188.97v-415.74m-226.76 188.97h415.74m-151.18 226.77v-415.74m-264.56 151.17h415.74m-113.39 264.57v-415.74m-302.36 113.39h415.74m-75.59 302.35v-415.74m-340.14 75.589h415.74m-37.8 340.15v-415.74m-377.94 37.79h415.74" stroke-width=".1"/>
 </g>
 <text transform="matrix(1.3333 0 0 1.3333 -2.94 454.38)" x="33.56" y="-310.98" font-family="DejaVu Sans,sans-serif" font-size="30" stroke-width=".75"><tspan x="33.56" y="-310.98">$d_e$</tspan></text>
 <text transform="matrix(1.3333 0 0 1.3333 -2.94 454.38)" x="257.24" y="-41.16" font-family="DejaVu Sans,sans-serif" font-size="30" stroke-width=".75"><tspan x="257.24" y="-41.16">$d_i$</tspan></text>
 <g font-family="cmr10" font-size="11.34">
  <text transform="matrix(1.3333 0 0 1.3333 16.01 435.02)" ><tspan x="0" y="0">(Å)</tspan></text>
  <text transform="matrix(1.3333 0 0 1.3333 61.37 435.02)" ><tspan x="0" y="0">0</tspan><tspan x="6.8" y="0">.6</tspan><tspan x="-46.77"  y="-39.68"  sodipodi:role="line">0</tspan><tspan x="-39.97"  y="-39.68" >.6</tspan></text>
  <text transform="matrix(1.3333 0 0 1.3333 99.17 435.02)" ><tspan x="0" y="0">0</tspan><tspan x="6.8" y="0">.8</tspan><tspan x="-75.12"  y="-68.03"  sodipodi:role="line">0</tspan><tspan x="-68.32"  y="-68.03" >.8</tspan></text>
  <text transform="matrix(1.3333 0 0 1.3333 136.95 435.02)"><tspan x="0" y="0">1</tspan><tspan x="6.8" y="0">.0</tspan><tspan x="-103.47" y="-96.38"  sodipodi:role="line">1</tspan><tspan x="-96.66"  y="-96.38" >.0</tspan></text>
  <text transform="matrix(1.3333 0 0 1.3333 174.75 435.02)"><tspan x="0" y="0">1</tspan><tspan x="6.8" y="0">.2</tspan><tspan x="-131.81" y="-124.73" sodipodi:role="line">1</tspan><tspan x="-125.01" y="-124.73">.2</tspan></text>
  <text transform="matrix(1.3333 0 0 1.3333 212.54 435.02)"><tspan x="0" y="0">1</tspan><tspan x="6.8" y="0">.4</tspan><tspan x="-160.16" y="-153.07" sodipodi:role="line">1</tspan><tspan x="-153.35" y="-153.07">.4</tspan></text>
  <text transform="matrix(1.3333 0 0 1.3333 250.34 435.02)"><tspan x="0" y="0">1</tspan><tspan x="6.8" y="0">.6</tspan><tspan x="-188.5"  y="-181.42" sodipodi:role="line">1</tspan><tspan x="-181.7"  y="-181.42">.6</tspan></text>
  <text transform="matrix(1.3333 0 0 1.3333 288.14 435.02)"><tspan x="0" y="0">1</tspan><tspan x="6.8" y="0">.8</tspan><tspan x="-216.85" y="-209.76" sodipodi:role="line">1</tspan><tspan x="-210.05" y="-209.76">.8</tspan></text>
  <text transform="matrix(1.3333 0 0 1.3333 325.93 435.02)"><tspan x="0" y="0">2</tspan><tspan x="6.8" y="0">.0</tspan><tspan x="-245.2"  y="-238.11" sodipodi:role="line">2</tspan><tspan x="-238.39" y="-238.11">.0</tspan></text>
  <text transform="matrix(1.3333 0 0 1.3333 363.73 435.02)"><tspan x="0" y="0">2</tspan><tspan x="6.8" y="0">.2</tspan><tspan x="-273.54" y="-266.46" sodipodi:role="line">2</tspan><tspan x="-266.74" y="-266.46">.2</tspan></text>
  <text transform="matrix(1.3333 0 0 1.3333 401.53 435.02)"><tspan x="0" y="0">2</tspan><tspan x="6.8" y="0">.4</tspan><tspan x="-301.89" y="-294.8"  sodipodi:role="line">2</tspan><tspan x="-295.09" y="-294.8" >.4</tspan></text>
 </g>
</svg>

相关内容