如何在 tikzpicture 环境中包含 pdf 图像?

如何在 tikzpicture 环境中包含 pdf 图像?

使用以下脚本后 pdf 图像不会出现...,为什么呢?

\documentclass[12pt]{article}
\usepackage{tikz,amsmath, amssymb,bm,color}
\usepackage[margin=0cm,nohead]{geometry}
\usepackage[active,tightpage]{preview}
% needed for BB
\usetikzlibrary{calc}

\usepackage{amsmath,sectsty,booktabs,fixltx2e,setspace}
\usepackage{siunitx}
\usepackage{tikz}
\tikzset{every picture/.style={font issue=\footnotesize},
        font issue/.style={execute at begin picture={#1\selectfont}}
        }
\usepackage{pgfplots}
\newcommand{\td}{\mathrm{d}}

\begin{document}

\begin{tikzpicture}

\node[draw=none,fill=none] at (3.7,3.7) {${\bm\varepsilon }$};
\node[draw=none,fill=none] at (2.4,0.3) {${\bm\varepsilon ^{\rm{e}}}$};
\node[draw=none,fill=none] at (5.1,0.3) {${\bm\varepsilon ^{\rm{i}}}$};
\node[draw=none,fill=none] at (3.7,3.1) {${\bf{C}}$};
\node[draw=none,fill=none] at (2.7,1.6) {${{\bf{C}}^{\rm{M}}}$};
\node[draw=none,fill=none] at (4.8,1.6) {${{\bf{C}}^{\rm{V}}}$};
\node[draw=none,fill=none] at (7.7,1.9) {${\bm\sigma }$};
\node[draw=none,fill=none] at (-0.2,1.9) {${\bm\sigma }$};

\node[draw=none,fill=none] at (0,0){\includegraphics[bb=0 0 0 0]{sls.pdf}};

\end{tikzpicture}


\end{document}

答案1

如果使用 运行示例pdflatex,则会出现以下警告:

Package pdftex.def Warning: Option `bb' does not make sense,
(pdftex.def)                using `viewport' instead on input line 30.

使用空的边界框/视口删除错误的选项bb=0 0 0 0

如果要将数学内容放在图像顶部,则请将图像节点移到数学内容节点之前的开头。

相关内容