페이지 배경에 접힌 표시

페이지 배경에 접힌 표시

LaTeX로 만든 A4 용지를 가로로 세 부분으로 접어야 합니다. 텍스트 아래에 가장자리에서 가장자리로 이어지는 두 개의 회색 점선과 같은 것을 갖고 싶습니다. 일종의 워터마크와 같습니다. 이것이 가능한가?

(페이지의 마지막 3분의 1에는 주소가 포함되고 처음 2/3에는 메시지가 포함됩니다. 따라서 테두리가 있는 미니페이지는 완벽한 솔루션이 아닙니다.)

답변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모든 페이지다음을 사용하여 페이지에 몇 줄을 추가하는 패키지TikZ그리고TikZpagenodes. 기본적으로 다음에서 제공하는 페이지 노드를 사용합니다.TikZpagenodes매 페이지 아래로 1/3과 2/3 지점에 수평선을 그립니다.

다음은 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}

여기에 이미지 설명을 입력하세요

관련 정보