发布时间:2012-06-02 14:27:48
文章类别:TeX绘图
原文地址:http://blog.sina.com.cn/s/blog_5e16f1770102epsg.html

QQ群:91940767/145316219/141877998/80300084/194770436
淘宝店:http://latexstudio.taobao.com
技巧续篇:http://latexstudio.net/
常见数学公式问题集下载

看图说话:

wangzhaoli11_博客图片/LaTeX_files_73f822068f8fd42a62212c7a8a650c2ba984c737/1.png

wangzhaoli11_博客图片/LaTeX_files_73f822068f8fd42a62212c7a8a650c2ba984c737/2.png

选自:http://tex.stackexchange.com/questions/9559/drawing-on-an-image-with-tikz

节选代码:

\documentclass{article}

\def\M{4}% columns
\def\N{4}% rows
\def\scale{0.25}% scale
\def\filename{mycena_interrupta}% filename


\usepackage{graphicx}
\newsavebox\IBox
\savebox\IBox{\includegraphics[scale=\scale]{\filename}}


\usepackage{pstricks}
\newpsstyle{gridstyle}
{
gridcolor=red!25,
subgridcolor=cyan!25,
gridwidth=0.4pt,
subgridwidth=0.2pt,
}

\psset
{
xunit=0.5\dimexpr\wd\IBox/\M\relax,
yunit=0.5\dimexpr\ht\IBox/\N\relax,
style=gridstyle,
}


\usepackage[active,tightpage]{preview}
\PreviewBorder=12pt
\PreviewEnvironment{pspicture}

\begin{document}
\begin{pspicture}[showgrid=false](-\M,-\N)(\M,\N)
\rput(0,0){\usebox\IBox}
\psframe[linecolor=red,linewidth=2pt,dimen=inner,framearc=0.5](0.9,1.2)(2.2,2)
\end{pspicture}
\end{document}

点赞(0)

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部