pgfornament宏包在文章四角用矢量图修饰的问题

发布于 2021-07-23 08:55:42

在pgfornament宏包使用手册中有个利用eso-pic宏包进行矢量图修饰文章四角的例子,我用了手册中的代码在我的tex中演示但发现只能出现三个角有矢量图,右上角(东北方向)没有,这是怎么回事,正确的代码应该是什么?
原代码如下:

\usepackage{pgfornament}
\usepackage{eso-pic}
\makeatletter
\AddToShipoutPicture{%
    \begingroup
    \setlength{\@tempdima}{2mm}%
    \setlength{\@tempdimb}{\paperwidth-\@tempdima-2cm}%
    \setlength{\@tempdimc}{\paperheight-\@tempdima}%
    \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimc}){%
        \pgfornament[anchor=north west,width=2cm]{61}}
    \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdima}){%
        \pgfornament[anchor=south west,width=2cm,symmetry=h]{61}}
    \put(\LenToUnit{\@tempdimc},\LenToUnit{\@tempdimc}){%
        \pgfornament[anchor=north east,width=2cm,symmetry=v]{61}}
    \put(\LenToUnit{\@tempdimb},\LenToUnit{\@tempdima}){%
        \pgfornament[anchor=south east,width=2cm,symmetry=c]{63}}
    \endgroup
}
\makeatother

我做的结果如下:
DU85T52S.png

查看更多

关注者
0
被浏览
959
LaTeXStudio
LaTeXStudio 2021-07-28
这家伙很懒,什么也没写!

调整下顺序即可,感谢莲枝提供的方案:

\makeatletter
\AddToShipoutPicture{%
    \begingroup
    \setlength{\@tempdima}{2mm}%
    \setlength{\@tempdimb}{\paperwidth-\@tempdima-2cm}%
    \setlength{\@tempdimc}{\paperheight-\@tempdima}%
    %\setlength{\@tempdimd}{\paperheight-\@tempdima}%
    \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimc}){%
        \pgfornament[anchor=north west,width=2cm]{61}}
    \put(\LenToUnit{\@tempdimb},\LenToUnit{\@tempdimc}){%
        \pgfornament[anchor=north east,width=2cm,symmetry=v]{61}}
    \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdima}){%
        \pgfornament[anchor=south west,width=2cm,symmetry=h]{61}}
    \put(\LenToUnit{\@tempdimb},\LenToUnit{\@tempdima}){%
        \pgfornament[anchor=south east,width=2cm,symmetry=c]{63}}
    \endgroup
}
\makeatother
1 个回答

撰写答案

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

发布
问题

分享
好友

手机
浏览

扫码手机浏览