- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想在 LaTeX 文档中包含一个 svg 文件。
a.svg(给定)
a.pdf(目标)
我使用 OpenOffice 创建了表格,将其导出为 pdf 文件,然后将其导入inkscape 并将其另存为 svg 文件。
我试过的
直接包含 svg
我尝试使用 svg package 直接包含给定的 svg 文件:
\usepackage{svg}
...
\includesvg{img/a}
inkscape -D -z --file=a.svg --export-pdf=a.pdf --export-latex
%% Creator: Inkscape inkscape 0.92.1, www.inkscape.org
%% PDF/EPS/PS + LaTeX output extension by Johan Engelen, 2010
%% Accompanies image file 'RLE1.pdf' (pdf, eps, ps)
%%
%% To include the image in your LaTeX document, write
%% \input{<filename>.pdf_tex}
%% instead of
%% \includegraphics{<filename>.pdf}
%% To scale the image, write
%% \def\svgwidth{<desired width>}
%% \input{<filename>.pdf_tex}
%% instead of
%% \includegraphics[width=<desired width>]{<filename>.pdf}
%%
%% Images with a different path to the parent latex file can
%% be accessed with the `import' package (which may need to be
%% installed) using
%% \usepackage{import}
%% in the preamble, and then including the image with
%% \import{<path to file>}{<filename>.pdf_tex}
%% Alternatively, one can specify
%% \graphicspath{{<path to file>/}}
%%
%% For more information, please see info/svg-inkscape on CTAN:
%% http://tug.ctan.org/tex-archive/info/svg-inkscape
%%
\begingroup%
\makeatletter%
\providecommand\color[2][]{%
\errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}%
\renewcommand\color[2][]{}%
}%
\providecommand\transparent[1]{%
\errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}%
\renewcommand\transparent[1]{}%
}%
\providecommand\rotatebox[2]{#2}%
\ifx\svgwidth\undefined%
\setlength{\unitlength}{608.85768187bp}%
\ifx\svgscale\undefined%
\relax%
\else%
\setlength{\unitlength}{\unitlength * \real{\svgscale}}%
\fi%
\else%
\setlength{\unitlength}{\svgwidth}%
\fi%
\global\let\svgwidth\undefined%
\global\let\svgscale\undefined%
\makeatother%
\begin{picture}(1,0.13941476)%
\put(0.12815803,0.12595718){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{352}}}%
\put(0.18117534,0.12595718){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{320}}}%
\put(0.23419265,0.12595718){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{288}}}%
\put(0.28720997,0.12595718){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{256}}}%
\put(0.34027656,0.12595718){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{224}}}%
\put(0.39329387,0.12595718){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{192}}}%
\put(0.44631119,0.12595718){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{160}}}%
\put(0.4993285,0.12595718){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{128}}}%
\put(0.56160906,0.12595718){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{96}}}%
\put(0.61462638,0.12595718){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{64}}}%
\put(0.66767654,0.12595718){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{32}}}%
\put(0.7299571,0.12595718){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{0}}}%
\put(0.12007732,0.10191216){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{0x1}}}%
\put(0.17309463,0.10191216){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{0x1}}}%
\put(0.22611195,0.10191216){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{0x3}}}%
\put(0.27912926,0.10191216){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{0x2}}}%
\put(0.33214658,0.10191216){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{0x2}}}%
\put(0.38521317,0.10191216){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{0x1}}}%
\put(0.43823048,0.10191216){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{0x1}}}%
\put(0.49124779,0.10191216){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{0x1}}}%
\put(0.54426511,0.10191216){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{0x1}}}%
\put(0.59728242,0.10191216){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{0x1}}}%
\put(0.65033259,0.10191216){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{0x1}}}%
\put(0.7033499,0.10191216){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{0x1}}}%
\put(0.39329387,0.03056543){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{192}}}%
\put(0.44631119,0.03056543){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{160}}}%
\put(0.4993285,0.03056543){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{128}}}%
\put(0.56160906,0.03056543){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{96}}}%
\put(0.61462638,0.03056543){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{64}}}%
\put(0.66767654,0.03056543){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{32}}}%
\put(0.7299571,0.03056543){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{0}}}%
\put(0.33214658,0.00652041){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{\textit{0}\textit{x}\textit{2}}}}%
\put(0.38521317,0.00652041){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{0x1}}}%
\put(0.43823048,0.00652041){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{\textit{0}\textit{x}\textit{1}}}}%
\put(0.49124779,0.00652041){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{0x3}}}%
\put(0.54426511,0.00652041){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{\textit{0}\textit{x}\textit{2}}}}%
\put(0.59728242,0.00652041){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{0x2}}}%
\put(0.65033259,0.00652041){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{\textit{0}\textit{x}\textit{7}}}}%
\put(0.7033499,0.00652041){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{0x1}}}%
\put(0.04755463,0.10270052){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{…}}}%
\put(0.15358269,0.00730877){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{…}}}%
\put(0.82929066,0.10210925){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{unkomprimierte Daten}}}%
\put(0.90260828,0.05441337){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{RleCompress}}}%
\put(0.84821134,0.0067175){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{komprimierte Daten}}}%
\put(0,0){\includegraphics[width=\unitlength,page=44]{img/a.pdf}}%
\end{picture}%
\endgroup%
\begin{figure}
\centering
\def\svgwidth{\textwidth}
\input{a.pdf_tex}
\end{figure}
\tiny
.
\tiny
调整它们的大小时,索引值周围的框的行为如下所示。 :
最佳答案
奇怪,你使用的方法对我来说非常有效,但是我从转换中得到了一个不同的 pdf_tex 文件。
b.pdf_tex
%% Creator: Inkscape inkscape 0.92.1, www.inkscape.org
%% PDF/EPS/PS + LaTeX output extension by Johan Engelen, 2010
%% Accompanies image file 'b.pdf' (pdf, eps, ps)
%%
%% To include the image in your LaTeX document, write
%% \input{<filename>.pdf_tex}
%% instead of
%% \includegraphics{<filename>.pdf}
%% To scale the image, write
%% \def\svgwidth{<desired width>}
%% \input{<filename>.pdf_tex}
%% instead of
%% \includegraphics[width=<desired width>]{<filename>.pdf}
%%
%% Images with a different path to the parent latex file can
%% be accessed with the `import' package (which may need to be
%% installed) using
%% \usepackage{import}
%% in the preamble, and then including the image with
%% \import{<path to file>}{<filename>.pdf_tex}
%% Alternatively, one can specify
%% \graphicspath{{<path to file>/}}
%%
%% For more information, please see info/svg-inkscape on CTAN:
%% http://tug.ctan.org/tex-archive/info/svg-inkscape
%%
\begingroup%
\makeatletter%
\providecommand\color[2][]{%
\errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}%
\renewcommand\color[2][]{}%
}%
\providecommand\transparent[1]{%
\errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}%
\renewcommand\transparent[1]{}%
}%
\providecommand\rotatebox[2]{#2}%
\ifx\svgwidth\undefined%
\setlength{\unitlength}{798bp}%
\ifx\svgscale\undefined%
\relax%
\else%
\setlength{\unitlength}{\unitlength * \real{\svgscale}}%
\fi%
\else%
\setlength{\unitlength}{\svgwidth}%
\fi%
\global\let\svgwidth\undefined%
\global\let\svgscale\undefined%
\makeatother%
\begin{picture}(1,0.23026316)%
\put(0,0){\includegraphics[width=\unitlength,page=1]{b.pdf}}%
\end{picture}%
\endgroup%
\documentclass[10pt]{scrreprt}
\usepackage{graphicx}
\usepackage[T1]{fontenc}
\begin{document}
\begin{figure}
\centering
\def\svgwidth{\columnwidth}
\input{b.pdf_tex}
\end{figure}
\end{document}
关于pdf - 将 SVG 包含到 LaTeX 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42787798/
有没有办法让某些文本仅在 [draft] 选项处于事件状态时显示。 例如,当草稿选项处于事件状态时,我希望在我的标题和摘要之间出现一些文字:“草稿:未经许可不得引用”或诸如此类。 最佳答案 通常这是用
我有一个小问题,我想将 LaTeX 文档的 svn diff 插入到 另一个 LaTeX 文档,目标是显示自修订版 XXX 以来发生的变化。 但是,由于差异包含大量 LaTeX 命令,我无法将其直接包
如何用它们的定义替换所有出现的用户定义的 latex 宏? 例如,给定这个文件 旧的.tex \newcommand{\blah}[2]{#1 \to #2} ... foo \blah{egg}{s
是否可以在 LaTeX 的一个环境 block 中使用多个命令?我试过类似的东西,但没有用...... \begin{sffamily,emph} I'm sans serif and ita
已结束。此问题不符合 Stack Overflow guidelines .它目前不接受答案。 这个问题似乎与 help center 中定义的范围内的编程无关。 . 关闭 8 年前。 Improve
我想将每个项目彼此更靠近,即减少行距,但我没有找到任何有用的东西。 \begin{itemize} \item Processor: Intel Core \textsuperscr
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题? Update the question所以它是on-topic对于堆栈溢出。 9年前关闭。 Improve this que
我试图在 LaTeX 文档中插入四个数字,但如果我使用 subfigure 命令,我的两个数字保留在第一行,另外两个转到第二行。像这样: 我尝试的另一个解决方案是使用 minipage 命令,但 mi
我将做大量的讲义,然后将它们编译成 LaTeX,这样我就可以拥有出色的文档供将来查看。我正在尝试组织事物,以便我可以拥有一堆包含讲座笔记的小文档,然后在学期结束时将它们编译成包含所有内容的大文档。我过
我有几个引理,其中指定了常量 $C_1$、$C_2$ 等以供以后引用。当然,当我稍后在中间插入一个新的常量定义时,这很烦人。我想要的是一个宏,它可以让我为常量分配标签并为我处理编号。我在想一些事情 %
我想制作一个包含两个目录的 LaTeX 文档,例如: Contents overview 1 - Introduction 2 - Solution Detailed contents 1 - Int
我正在使用 Latex 输入一堆数字 \begin{figure}[h] \centering \subfloat 等等。 如何让 subfloat 数字转到下一页?我的意思是,我输入了大
我在 \documentclass{article}在 latex 。我如何将顾问的名字放在第一页上?我在 latex 中看到过类似 \principaladvisor{} 的例子。但这似乎是通过论文
我目前卡住了,有两个单独的词汇表:main & acronyms . Acronyms词汇表在文本中首次使用时打印脚注,但 main词汇表没有。除了 acronyms 之外,还有什么方法可以制作任何其
如何在 Latex 中定义标签和对自定义环境的相应引用? 例子: \newcounter{fpcounter} \newenvironment{fp}[2] { \stepcounter{fpcoun
我希望doxygen文档生成器根本不生成任何LaTeX文件。 HTML对我来说足够了。是否可以配置doxygen.ini来这样做? 最佳答案 如果使用doxygen.ini是doxygen的配置文件,
我有一个关于 Latex 表的简单对齐问题。在 它看起来如下: \begin{center} \begin{tabular}{| c | l | l | } \hline \tt {
我对 LaTeX 中的定理编号有疑问。我可以按小节编号,例如 Theorem 1.2.1 对于第一节第二小节中的第一个定理。但我需要它给我看 只有小节和定理的编号,而不是节编号,如下所示: Theor
在标题部分中,我引用了文档的各个部分: \section {标题\cite {abc},\cite {def}} 文本 我也在使用目录功能,但是Latex必须首先查看标题(针对目录)中的引文,并为它们
我正在写一个程序(用C语言编写,但我想那不太重要),它与LaTeX中的一些记录 Material 有关。我希望纪录片 Material 包含原始代码中的代码片段。 为了包括源代码并使其保持最新,我在文
我是一名优秀的程序员,十分优秀!