如何在页面右侧创建可撕下的存根

如何在页面右侧创建可撕下的存根

我想制作一张带有可撕存根的传单,因为它们是由存根包。但我希望存根出现在右边距页面(横向模式)。该软件包似乎仅支持页面底部的存根。有人知道其他软件包或解决方法吗?

答案1

这是使用 tikz 包的替代方案stubs

它将根据页面高度和所选的存根高度容纳一定数量的存根。(在此“横向”示例中有 11 个存根)。

它也适用于肖像页面。

使用的命令是:

\rightstubs{<stub text width>}{<stub height>}{<front page text>}{<back page information>}

埃

\documentclass[11pt,landscape]{article}
\usepackage{tikz}

\newcommand{\rightstubs}[4]{%
    \begin{tikzpicture}[overlay,remember picture]   
            \pgfmathparse{int(\pageheight/#2)}
            \foreach \y in {1,2,...,\pgfmathresult}
            \node [draw,
            text width= #1,
            minimum height= #2,
            anchor=east,
            font=\large,
            align=center
            ] (stub) at ([shift={(0,-#2*(\y-0.5))}]current page.north east) {#3};       
        \end{tikzpicture}
        \newpage
        \begin{tikzpicture}[overlay,remember picture]   
            \pgfmathparse{int(\pageheight/#2)}
            \foreach \y in {1,2,...,\pgfmathresult}
            \node [draw,
            text width= #1,
            minimum height= #2,
            anchor=east,            
            align=center
            ] (stub) at ([shift={(0,-#2*(\y-0.5))}]current page.north east) {#4};       
        \end{tikzpicture}
}

\begin{document}
    
\pagestyle{empty} % suppress page numbers  for a flyer
    
\begin{center}
    \Huge Simple alternative to the \texttt{stubs} package!
\end{center}
    
%\rightstubs{<stub text width>}{<stub height>}{<front page text>}{<back page information>}  
\rightstubs{4cm}{1.95cm}{ALTERNATIVE \\ to \texttt{stubs} package}{More information \\ More information}    

\end{document} 

此代码将在页面底部添加存根。

\newcommand{\bottomstubs}[4]{%
    \begin{tikzpicture}[overlay,remember picture]   
            \pgfmathparse{int(\pagewidth/#2)}
            \foreach \x in {1,2,...,\pgfmathresult}
            \node [draw,
            text width= #1,
            minimum height= #2,
            anchor=east,
            font=\large,
            rotate=-90,
            align=center
            ] (stub) at ([shift={(#2*(\x-0.25,0)}]current page.south west) {#3};        
        \end{tikzpicture}
        \newpage
        \begin{tikzpicture}[overlay,remember picture]   
            \pgfmathparse{int(\pagewidth/#2)}
            \foreach \x in {1,2,...,\pgfmathresult}
            \node [draw,
            text width= #1,
            minimum height= #2,
            anchor=east,
            font=\large,
            rotate=-90,
            align=center
            ] (stub) at ([shift={(#2*(\x-0.25,0)}]current page.south west) {#4};        
        \end{tikzpicture}
}

\bottomstubs{4cm}{1.95cm}{ALTERNATIVE \\ to \texttt{stubs} package}{More information \\ More information}将产生

F

相关内容