我正在尝试匹配期刊图表中的字体,为此我使用了独立包。我遇到的问题是,无论我做什么(我在网上看到过很多不同的帖子),图表都保持相同的大小,并且部分文本被从图表中裁剪掉!这是代码:
\documentclass[border=10pt, convert={size=640x}]{standalone}
\usepackage{varwidth}
\usepackage{graphicx}
\usepackage[dvipsnames,svgnames,table]{xcolor} % use color
\usepackage{amsmath} % AMS Math Package
\usepackage{mathptmx} % Use the Adobe Times Roman as the default text font together with math symbols from the Symbol, Chancery and Computer Modern fonts
\usepackage{tikz}
\usepackage[customcolors]{hf-tikz}
\hfsetfillcolor{black!10}
\hfsetbordercolor{black!0}
\usepackage{pgfplots}
\usetikzlibrary{plotmarks, calc, spy, pgfplots.polar}
\usepgflibrary{shapes.geometric}
\usepackage[notext, nomath]{stix}
\usepackage[safe]{tipa}
\newcommand{\scOmega}{\text{\textscomega}} % small omega
\begin{document}
\begin{varwidth}{0.5\linewidth}
\input{./bar.pdf_tex}
\end{varwidth}
\end{document}
输入文件是使用 inkscape 生成的 LaTeX 文件,其中包含真实图形和大量文本:
\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}{149.64100342bp}%
\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.30124765)%
\put(0,0){\includegraphics[width=\unitlength,page=1]{bar.pdf}}%
\put(0.23646628,0.15941548){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{}}}%
\put(0.12434405,0.14187978){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{$E_{\textsc{i}}A$}}}%
\put(0.43,0.14187978){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{$E_{\textsc{ii}}A$}}}%
\put(0.18809462,0.07146346){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{$x_{\Gamma}$}}}%
\put(0.44530057,0.23115246){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{$k$}}}%
\put(0.69398861,0.19129858){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{$P$}}}%
\put(0.70302227,0.03028893){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{$ u \left(L \right) = \frac{ P wL} { E_{\textsc{i}} A}+ \frac{P}{k} + \frac{ P (1 - w)L} { E_{\textsc{ii}} A} $}}}%
\put(0.30366301,0.02409467){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{$L$}}}%
\end{picture}%
\endgroup%
使用独立包的结果是: