includesvg:自动生成的 .pdf 和 .pdf_tex 文件与引号

includesvg:自动生成的 .pdf 和 .pdf_tex 文件与引号

我想包含一个 .svg 文件,其中包含一个 excel 表,我将其导出到 pdf.file 并将其导入到 inkscape 中。我在 excel 表中使用了一些引号 ("),将 .pdf 文件导入 inkscape 后,一切看起来都很好。在 Latex 中,我使用包 {svg} 自动生成 .pdf 和 .pdf-tex 文件。问题是所有引号都没有被转义(我可以在 .pdf_tex 文件中看到)。我该如何解决这个问题?

\documentclass[12pt,oneside,titlepage,listof=totoc,bibliography=totoc]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[babel,german=quotes]{csquotes}
\usepackage{mathptmx}
\usepackage{underscore}
\usepackage[T1]{fontenc}
\usepackage{fancyhdr}
\usepackage{fancybox}
\usepackage[a4paper, left=4cm, right=2cm, top=4cm, bottom=2cm]{geometry}
\usepackage{graphicx}
\usepackage{trimspaces}
\usepackage{svg}
\usepackage{colortbl}
\usepackage{array}
\usepackage{float}
\usepackage{footnote}
\usepackage{caption}
\usepackage{enumitem}
\usepackage{amssymb}
\usepackage{mathptmx}
\usepackage{amsmath}
\usepackage{marvosym}
\usepackage[colorlinks=true,linkcolor=black]{hyperref}
\pdfminorversion=7
\definecolor{darkblack}{rgb}{0,0,0}
\hypersetup{colorlinks=true, breaklinks=true, linkcolor=darkblack, menucolor=darkblack, urlcolor=darkblack}
\usepackage{times}
\fontfamily{ptm}\selectfont

\begin{document}

\begin{figure}[h!]
\fontsize{4}{6}\selectfont
\includesvg[width=\textwidth]{Literaturrecherche.svg}
\caption[Ergebnisse Literaturrecherche]{Ergebnisse Literaturrecherche}
\end{figure}

\end{document}

.pdf_tex 文件的示例部分:

\put(0.17426477,1.49716511){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\lineheight{1.25}\smash{\begin{tabular}[t]{l}bitcoin) AND ("social \end{tabular}}}}%
\put(0.17426477,1.47727188){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\lineheight{1.25}\smash{\begin{tabular}[t]{l}media" OR "soziale \end{tabular}}}}%
\put(0.17426477,1.45737864){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\lineheight{1.25}\smash{\begin{tabular}[t]{l}Medien" OR facebook OR \end{tabular}}}}%

答案1

通常"不会导致错误,但是由于您使用 babel 的德语选项,它会设置"为简写字符来访问重音和其他命令。

因此你可以使用

\shorthandoff{"}

在输入 svg 衍生的 tex 时本地禁用此功能。

这将使其正常工作而不会出现错误,但"foo"会产生“foo”,因此您可能在任何情况下都希望编辑生成的 tex(或更改原始源)以使用

``foo''

因此得到左引号和右引号“foo”

相关内容