png

如何编译完成后,生成图片文件?

发布于 2023-09-09 07:27:43

需要使用TIKZ绘图如何编译完成时:自动附加生成png图片,没成功。现在是我用命令形式将pdf文件转化出 png实现的。

\documentclass[border=2pt,tikz, convert, convert={command=\unexpanded{
call ./util/mk_folder infilepng
&& cd /p infilepng
&& call ../util/pdf_to_png.bat 600 ../\infile\space
}}]{standalone}
\begin{document}
\begin{tikzpicture}
\draw[->] (0,0) -- (7,0);
\draw[->] (0,0) -- (0,1.5);    
\draw[thick,domain=0:6.28,smooth] plot(\x,{sin(\x r)}) node[above] {$\sin x$};
\end{tikzpicture}        
\end{document}
%P:\infilepng>pdftoppm -r 600 -png example1.pdf abc   “P为计算机硬盘分区”-“infilepng是文件夹”

查看更多

关注者
0
被浏览
656
2 个回答
羊羊羊
羊羊羊 2023-09-09
这家伙很懒,什么也没写!
\documentclass[margin=5pt,convert,
convert={outext=.png,command=\unexpanded{pdftocairo -r 600 -png \infile}}]{standalone}
\usepackage{tikz}
\begin{document}
    \begin{tikzpicture}
        \draw[->] (0,0) -- (7,0);
        \draw[->] (0,0) -- (0,1.5);    
        \draw[thick,domain=0:6.28,smooth] plot(\x,{sin(\x r)}) node[above] {$\sin x$};
    \end{tikzpicture} 
\end{document}
结果如下:
document-1.png
拿了橘子跑啊
拿了橘子跑啊 2024-01-28
这家伙很懒,什么也没写!

收藏了,不时之需

撰写答案

请登录后再发布答案,点击登录

发布
问题

分享
好友

手机
浏览

扫码手机浏览