折疊標記到頁面背景

折疊標記到頁面背景

用 LaTeX 製成的 A4 紙應水平折疊為三個部分。我想要在文字下方有兩條從邊緣到邊緣的灰色虛線 - 有點像水印。這可能嗎?

(頁面的後三分之一將包含地址,前三分之二包含訊息。因此帶有邊框的迷你頁面不是完美的解決方案。)

答案1

eso-pic帶有和 的短代碼dashrule

\documentclass[12pt, a4paper]{article}
\usepackage{ebgaramond}
\usepackage{xcolor}
\usepackage{lipsum}
\usepackage{dashrule}
\usepackage{eso-pic}

\AddToShipoutPictureBG{\color{lightgray}%
\AtPageLowerLeft{\hdashrule[0.667\paperheight]{\paperwidth}{0.4pt}{6pt 3pt}}%
\AtPageLowerLeft{\hdashrule[0.333\paperheight]{\paperwidth}{0.4pt}{6pt 3pt}}}%

\begin{document}

\lipsum

\end{document}

在此輸入影像描述

答案2

\AddEverypageHook這是一種使用以下方法來執行此操作的方法每頁包添加一些行到頁面使用蒂克茲TikZpage節點。基本上,您使用以下提供的頁面節點TikZpage節點在每頁下方三分之一和三分之二處繪製水平線。

以下是 MWE 製作的一些頁面:

在此輸入影像描述

這是代碼:

\documentclass{article}
\usepackage{everypage}
\usepackage{tikz}
\usepackage{tikzpagenodes}
\usetikzlibrary{calc}
\AddEverypageHook{%
  \begin{tikzpicture}[remember picture,overlay]
    \draw[gray!50,dashed]($(current page.north west)!0.33!(current page.south west)$)
          --($(current page.north east)!0.33!(current page.south east)$);
    \draw[gray!50,dashed]($(current page.north west)!0.66!(current page.south west)$)
          --($(current page.north east)!0.66!(current page.south east)$);
  \end{tikzpicture}
}

\usepackage{blindtext}
\begin{document}

  \blinddocument

\end{document}

就我個人而言,我發現整個頁面上的線條有點太分散注意力,而是會選擇類似以下內容的內容:

在此輸入影像描述

這是修改後的程式碼:

\documentclass{article}
\usepackage{everypage}
\usepackage{tikz}
\usepackage{tikzpagenodes}
\usetikzlibrary{calc}
\AddEverypageHook{%
  \begin{tikzpicture}[remember picture,overlay]
    \foreach \side/\offset/\pos in {west/1/0.33, west/1/0.66, east/-1/0.33, east/-1?0.66} {
      \draw[gray!50, thin]($(current page.north \side)!\pos!(current page.south \side)$)--++(\offset,0);
    }
  \end{tikzpicture}
}

\usepackage{blindtext}
\begin{document}

  \blinddocument

\end{document}

答案3

eso-pic使用類似建議的解決方案@伯納德

\documentclass[]{article}

\usepackage{eso-pic}
\usepackage[]{color}


\AddToShipoutPictureBG
  {%
    \textcolor{gray}
      {%
        \multiput
          (0,\LenToUnit{\paperheight/3})
          (\LenToUnit{0.02\paperwidth},0)
          {50}
          {\line(1,0){\LenToUnit{0.01\paperwidth}}}
        \multiput
          (0,\LenToUnit{2\paperheight/3})
          (\LenToUnit{0.02\paperwidth},0)
          {50}
          {\line(1,0){\LenToUnit{0.01\paperwidth}}}
      }
  }

\usepackage{duckuments}

\begin{document}
\duckument
\end{document}

在此輸入影像描述

相關內容