在图片环境中使用 \special 移动线条的文字后记颜色

在图片环境中使用 \special 移动线条的文字后记颜色

在图片环境中用专色,线条相对于原始图片移动。

要将rgb颜色更改为cymk黑色或所需的 pantone,我引入了

\special{ps: XC@PANTONE7473C 1 setcolor}

彩色线条和

\special{color cmyk 0 0 0 1}

表示黑线。

这是原始文件和更改后的文件之间的区别:

原始图片

带有专色的图片

注意函数线和虚线是如何从其原始位置移动的。这可能与问题有关dvips 的“ps:”特殊功能会改变标准 PostScript (bp) 单位吗?,但我无法使用问题中的信息进行修复。special上面提到的任何一行都会产生错误。还有其他方法可以使用这些颜色吗?

pdf 的生成方式如下:

latex rectan2_standalone.tex
dvips -h tex.pro -h xcolor.pro -h spot_color.pro rectan2_standalone.dvi
ps2pdf rectan2_standalone.ps
pdfcrop rectan2_standalone.pdf

这是生成图像的latex文件rectan2_standalone.tex

\begin{filecontents*}{spot_color.pro}
TeXDict begin
/PANTONE7473CCMYK [0.76 0.06 0.44 0.08] def
/PANTONE (PANTONE7473C) def
/PANTONE7473CDef PANTONE7473CCMYK aload pop PANTONE findcmykcustomcolor def
/XC@PANTONE7473C{PANTONE7473CDef 1.0 setcustomcolor}XCdef
end
\end{filecontents*}

\documentclass{article}
\usepackage{colordvi}

\begin{document}
\thispagestyle{empty}
\input{rectan2_transformcolors.tec}
\end{document}

这是图片rectan2_transformcolors.tec

%%TeXCad32 V. 4.3.3.6
\def\dick{1pt}
\def\normal{0.4pt}
\def\duenn{0.1pt}
\unitlength .8mm
\def\emline#1#2#3#4#5#6{%
\put(#1,#2){\special{em:moveto}}%
\put(#4,#5){\special{em:lineto}}}

\begin{picture}(53.00,44.00)
%\color[rgb]{0.000,0.000,1.000}
\special{ps: XC@PANTONE7473C 1 setcolor}
\special{em:linewidth \dick}
\emline{20.00}{15.00}{1}{20.49}{15.88}{2}
\emline{20.49}{15.88}{1}{20.97}{16.75}{2}
\emline{20.97}{16.75}{1}{21.46}{17.60}{2}
\emline{21.46}{17.60}{1}{21.94}{18.44}{2}
\emline{21.94}{18.44}{1}{22.43}{19.26}{2}
\emline{22.43}{19.26}{1}{22.91}{20.06}{2}
\emline{22.91}{20.06}{1}{23.40}{20.85}{2}
\emline{23.40}{20.85}{1}{23.89}{21.62}{2}
\emline{23.89}{21.62}{1}{24.43}{22.46}{2}
\emline{24.43}{22.46}{1}{24.97}{23.28}{2}
\emline{24.97}{23.28}{1}{25.51}{24.09}{2}
\emline{25.51}{24.09}{1}{26.05}{24.87}{2}
\emline{26.05}{24.87}{1}{26.59}{25.63}{2}
\emline{26.59}{25.63}{1}{27.13}{26.38}{2}
\emline{27.13}{26.38}{1}{27.67}{27.10}{2}
\emline{27.67}{27.10}{1}{28.28}{27.90}{2}
\emline{28.28}{27.90}{1}{28.89}{28.66}{2}
\emline{28.89}{28.66}{1}{29.50}{29.41}{2}
\emline{29.50}{29.41}{1}{30.11}{30.13}{2}
\emline{30.11}{30.13}{1}{30.72}{30.82}{2}
\emline{30.72}{30.82}{1}{31.33}{31.49}{2}
\emline{31.33}{31.49}{1}{32.01}{32.21}{2}
\emline{32.01}{32.21}{1}{32.70}{32.91}{2}
\emline{32.70}{32.91}{1}{33.39}{33.57}{2}
\emline{33.39}{33.57}{1}{34.08}{34.20}{2}
\emline{34.08}{34.20}{1}{34.76}{34.80}{2}
\emline{34.76}{34.80}{1}{35.54}{35.44}{2}
\emline{35.54}{35.44}{1}{36.31}{36.03}{2}
\emline{36.31}{36.03}{1}{37.08}{36.59}{2}
\emline{37.08}{36.59}{1}{37.85}{37.11}{2}
\emline{37.85}{37.11}{1}{38.62}{37.58}{2}
\emline{38.62}{37.58}{1}{39.49}{38.07}{2}
\emline{39.49}{38.07}{1}{40.37}{38.51}{2}
\emline{40.37}{38.51}{1}{41.24}{38.90}{2}
\emline{41.24}{38.90}{1}{42.11}{39.24}{2}
\emline{42.11}{39.24}{1}{42.98}{39.53}{2}
\emline{42.98}{39.53}{1}{43.85}{39.76}{2}
\emline{43.85}{39.76}{1}{44.83}{39.97}{2}
\emline{44.83}{39.97}{1}{45.81}{40.11}{2}
\emline{45.81}{40.11}{1}{46.79}{40.19}{2}
\emline{46.79}{40.19}{1}{47.76}{40.21}{2}
\emline{47.76}{40.21}{1}{48.74}{40.16}{2}
\emline{48.74}{40.16}{1}{49.72}{40.04}{2}
\emline{49.72}{40.04}{1}{50.00}{40.00}{2}
%\color[rgb]{1.000,0.000,0.000}
\special{ps: XC@PANTONE7473C 0.5 setcolor}
\emline{20.00}{18.33}{1}{20.65}{19.09}{2}
\emline{20.65}{19.09}{1}{21.30}{19.85}{2}
\emline{21.30}{19.85}{1}{21.95}{20.61}{2}
\emline{21.95}{20.61}{1}{22.60}{21.37}{2}
\emline{22.60}{21.37}{1}{23.25}{22.13}{2}
\emline{23.25}{22.13}{1}{23.90}{22.89}{2}
\emline{23.90}{22.89}{1}{24.56}{23.65}{2}
\emline{24.56}{23.65}{1}{25.21}{24.41}{2}
\emline{25.21}{24.41}{1}{25.86}{25.17}{2}
\emline{25.86}{25.17}{1}{26.51}{25.93}{2}
\emline{26.51}{25.93}{1}{27.16}{26.69}{2}
\emline{27.16}{26.69}{1}{27.81}{27.44}{2}
\emline{27.81}{27.44}{1}{28.46}{28.20}{2}
\emline{28.46}{28.20}{1}{29.11}{28.96}{2}
\emline{29.11}{28.96}{1}{29.76}{29.72}{2}
\emline{29.76}{29.72}{1}{30.41}{30.48}{2}
\emline{30.41}{30.48}{1}{31.06}{31.24}{2}
\emline{31.06}{31.24}{1}{31.71}{32.00}{2}
\emline{31.71}{32.00}{1}{32.37}{32.76}{2}
\emline{32.37}{32.76}{1}{33.02}{33.52}{2}
\emline{33.02}{33.52}{1}{33.67}{34.28}{2}
\emline{33.67}{34.28}{1}{34.32}{35.04}{2}
\emline{34.32}{35.04}{1}{34.97}{35.80}{2}
\emline{34.97}{35.80}{1}{35.62}{36.56}{2}
\emline{35.62}{36.56}{1}{36.27}{37.31}{2}
\emline{36.27}{37.31}{1}{36.92}{38.07}{2}
\emline{36.92}{38.07}{1}{37.57}{38.83}{2}
\emline{37.57}{38.83}{1}{38.22}{39.59}{2}
\emline{38.22}{39.59}{1}{38.87}{40.35}{2}
\emline{38.87}{40.35}{1}{39.52}{41.11}{2}
\emline{39.52}{41.11}{1}{40.00}{41.67}{2}
%\color[rgb]{0.000,0.000,0.000}
\special{color cmyk 0 0 0 1}
\special{em:linewidth \normal}
\emline{ 9.00}{10.00}{1}{10.00}{10.00}{2}
\emline{10.00}{10.00}{1}{11.00}{10.00}{2}
\emline{11.00}{10.00}{1}{12.00}{10.00}{2}
\emline{12.00}{10.00}{1}{13.00}{10.00}{2}
\emline{13.00}{10.00}{1}{14.00}{10.00}{2}
\emline{14.00}{10.00}{1}{15.00}{10.00}{2}
\emline{15.00}{10.00}{1}{16.00}{10.00}{2}
\emline{16.00}{10.00}{1}{17.00}{10.00}{2}
\emline{17.00}{10.00}{1}{18.00}{10.00}{2}
\emline{18.00}{10.00}{1}{19.00}{10.00}{2}
\emline{19.00}{10.00}{1}{20.00}{10.00}{2}
\emline{20.00}{10.00}{1}{21.00}{10.00}{2}
\emline{21.00}{10.00}{1}{22.00}{10.00}{2}
\emline{22.00}{10.00}{1}{23.00}{10.00}{2}
\emline{23.00}{10.00}{1}{24.00}{10.00}{2}
\emline{24.00}{10.00}{1}{25.00}{10.00}{2}
\emline{25.00}{10.00}{1}{26.00}{10.00}{2}
\emline{26.00}{10.00}{1}{27.00}{10.00}{2}
\emline{27.00}{10.00}{1}{28.00}{10.00}{2}
\emline{28.00}{10.00}{1}{29.00}{10.00}{2}
\emline{29.00}{10.00}{1}{30.00}{10.00}{2}
\emline{30.00}{10.00}{1}{31.00}{10.00}{2}
\emline{31.00}{10.00}{1}{32.00}{10.00}{2}
\emline{32.00}{10.00}{1}{33.00}{10.00}{2}
\emline{33.00}{10.00}{1}{34.00}{10.00}{2}
\emline{34.00}{10.00}{1}{35.00}{10.00}{2}
\emline{35.00}{10.00}{1}{36.00}{10.00}{2}
\emline{36.00}{10.00}{1}{37.00}{10.00}{2}
\emline{37.00}{10.00}{1}{38.00}{10.00}{2}
\emline{38.00}{10.00}{1}{39.00}{10.00}{2}
\emline{39.00}{10.00}{1}{40.00}{10.00}{2}
\emline{40.00}{10.00}{1}{41.00}{10.00}{2}
\emline{41.00}{10.00}{1}{42.00}{10.00}{2}
\emline{42.00}{10.00}{1}{43.00}{10.00}{2}
\emline{43.00}{10.00}{1}{44.00}{10.00}{2}
\emline{44.00}{10.00}{1}{45.00}{10.00}{2}
\emline{45.00}{10.00}{1}{46.00}{10.00}{2}
\emline{46.00}{10.00}{1}{47.00}{10.00}{2}
\emline{47.00}{10.00}{1}{48.00}{10.00}{2}
\emline{48.00}{10.00}{1}{49.00}{10.00}{2}
\emline{49.00}{10.00}{1}{50.00}{10.00}{2}
\emline{50.00}{10.00}{1}{51.00}{10.00}{2}
\emline{51.00}{10.00}{1}{52.00}{10.00}{2}
\emline{52.00}{10.00}{1}{53.00}{10.00}{2}
\emline{53.00}{10.00}{1}{51.06}{ 9.51}{2}
\emline{51.06}{10.49}{1}{53.00}{10.00}{2}
\emline{10.00}{ 9.00}{1}{10.00}{10.00}{2}
\emline{10.00}{10.00}{1}{10.00}{11.00}{2}
\emline{10.00}{11.00}{1}{10.00}{12.00}{2}
\emline{10.00}{12.00}{1}{10.00}{13.00}{2}
\emline{10.00}{13.00}{1}{10.00}{14.00}{2}
\emline{10.00}{14.00}{1}{10.00}{15.00}{2}
\emline{10.00}{15.00}{1}{10.00}{16.00}{2}
\emline{10.00}{16.00}{1}{10.00}{17.00}{2}
\emline{10.00}{17.00}{1}{10.00}{18.00}{2}
\emline{10.00}{18.00}{1}{10.00}{19.00}{2}
\emline{10.00}{19.00}{1}{10.00}{20.00}{2}
\emline{10.00}{20.00}{1}{10.00}{21.00}{2}
\emline{10.00}{21.00}{1}{10.00}{22.00}{2}
\emline{10.00}{22.00}{1}{10.00}{23.00}{2}
\emline{10.00}{23.00}{1}{10.00}{24.00}{2}
\emline{10.00}{24.00}{1}{10.00}{25.00}{2}
\emline{10.00}{25.00}{1}{10.00}{26.00}{2}
\emline{10.00}{26.00}{1}{10.00}{27.00}{2}
\emline{10.00}{27.00}{1}{10.00}{28.00}{2}
\emline{10.00}{28.00}{1}{10.00}{29.00}{2}
\emline{10.00}{29.00}{1}{10.00}{30.00}{2}
\emline{10.00}{30.00}{1}{10.00}{31.00}{2}
\emline{10.00}{31.00}{1}{10.00}{32.00}{2}
\emline{10.00}{32.00}{1}{10.00}{33.00}{2}
\emline{10.00}{33.00}{1}{10.00}{34.00}{2}
\emline{10.00}{34.00}{1}{10.00}{35.00}{2}
\emline{10.00}{35.00}{1}{10.00}{36.00}{2}
\emline{10.00}{36.00}{1}{10.00}{37.00}{2}
\emline{10.00}{37.00}{1}{10.00}{38.00}{2}
\emline{10.00}{38.00}{1}{10.00}{39.00}{2}
\emline{10.00}{39.00}{1}{10.00}{40.00}{2}
\emline{10.00}{40.00}{1}{10.00}{41.00}{2}
\emline{10.00}{41.00}{1}{10.00}{42.00}{2}
\emline{10.00}{42.00}{1}{10.00}{43.00}{2}
\emline{10.00}{43.00}{1}{10.00}{44.00}{2}
\emline{10.00}{44.00}{1}{10.49}{42.06}{2}
\emline{ 9.51}{42.06}{1}{10.00}{44.00}{2}
\special{em:linewidth \duenn}
\emline{30.00}{30.00}{1}{30.00}{29.00}{2}
\emline{30.00}{28.00}{1}{30.00}{27.00}{2}
\emline{30.00}{26.00}{1}{30.00}{25.00}{2}
\emline{30.00}{24.00}{1}{30.00}{23.00}{2}
\emline{30.00}{22.00}{1}{30.00}{21.00}{2}
\emline{30.00}{20.00}{1}{30.00}{19.00}{2}
\emline{30.00}{18.00}{1}{30.00}{17.00}{2}
\emline{30.00}{16.00}{1}{30.00}{15.00}{2}
\emline{30.00}{14.00}{1}{30.00}{13.00}{2}
\emline{30.00}{12.00}{1}{30.00}{11.00}{2}
\emline{30.00}{10.00}{1}{30.00}{ 9.00}{2}
\emline{30.00}{30.00}{1}{29.00}{30.00}{2}
\emline{28.00}{30.00}{1}{27.00}{30.00}{2}
\emline{26.00}{30.00}{1}{25.00}{30.00}{2}
\emline{24.00}{30.00}{1}{23.00}{30.00}{2}
\emline{22.00}{30.00}{1}{21.00}{30.00}{2}
\emline{20.00}{30.00}{1}{19.00}{30.00}{2}
\emline{18.00}{30.00}{1}{17.00}{30.00}{2}
\emline{16.00}{30.00}{1}{15.00}{30.00}{2}
\emline{14.00}{30.00}{1}{13.00}{30.00}{2}
\emline{12.00}{30.00}{1}{11.00}{30.00}{2}
\emline{10.00}{30.00}{1}{ 9.00}{30.00}{2}
\put(44.00,35.00){\makebox(0,0)[cc]{\tiny$y=f(x)$}}
\put(30.00, 7.00){\makebox(0,0)[cc]{\tiny$x_0$}}
\put( 4.00,30.00){\makebox(0,0)[cc]{\tiny$f(x_0)$}}
\end{picture}

答案1

由于缺少%行尾,因此添加了空白并替换了图片模式构造。

所有图片模式命令都用于\ignorespaces忽略后面的空白并\unskip删除前面的空白,但如果插入\special基元(甚至简单{}),那么您需要注意不要同时添加空白。

相关内容