请问如何将附件pdf文件夹下的tikz代码添加到主文件里面,变成整个文档的边框,我尝试着导入pdf文件夹下的tex文件,但一直出现错误
我用的是texlive2020,XeLaTeX编译
插入页边框的代码我参考的这个https://tex.stackovernet.com/cn/q/20081网站的代码:这个网站的页边框示例代码如下:
\documentclass[10pt]{scrartcl} \usepackage[margin=20mm,a6paper]{geometry} \usepackage{tikz} \usepackage{xifthen} \usetikzlibrary{fit,calc} \usepackage{lipsum} \usepackage{everypage} \parindent0mm \newcommand{\currentsidemargin}{% \ifodd\value{page}% \oddsidemargin% \else% \evensidemargin% \fi% } \AddEverypageHook{% \ifthenelse{\isodd{\thepage}} { \begin{tikzpicture}[overlay, remember picture] \path (current page.north west) ++(\hoffset, -\voffset) node[anchor=north west, shape=rectangle, inner sep=0, minimum width=\paperwidth, minimum height=\paperheight] (pagearea) {}; \path (pagearea.north west) ++(1in+\currentsidemargin,-1in-\topmargin-\headheight-\headsep) node[anchor=north west, shape=rectangle, inner sep=0, minimum width=\textwidth, minimum height=\textheight] (textarea) {}; \node[inner sep=0,fit=(pagearea.north east)(textarea.north east)(pagearea.south east)] (marginbox) {}; \draw (marginbox.south east) rectangle (marginbox.north west); \draw (marginbox.south east) -- (marginbox.north west); \end{tikzpicture} }{} } \begin{document} \lipsum[1-10] \end{document}