如何获取页面三面上的网格标尺?

如何获取页面三面上的网格标尺?

我目前的方法只能将标尺粘在一起,因此标尺的起点与实际(打印)页面的边缘不同:

\documentclass{scrartcl}
\usepackage[
  type=lowerright
  ,hshift=-1.8cm
  ,vshift=-1.8cm    
]{fgruler}
\RequirePackage{draftwatermark}
\SetWatermarkText{\sffamily Proofreading}
\SetWatermarkScale{1.2}
\SetWatermarkColor{black!5!white}  
\usepackage[
  cam,
  center,
  font=textsf,
  width=25truecm,
  height=33.7truecm
]{crop}

\begin{document}
  Only for Testing
\end{document}

在此处输入图片描述

但结果我希望得到下面这个经过粗略 Photoshop 处理的版本。标尺应该只在 -package 实现的未打印的侧面可见crop在此处输入图片描述

答案1

也许你可以使用包装scrlayer-scrpage并为所有页面样式添加三层:

\documentclass{scrartcl}
\usepackage{xcolor}
\usepackage{draftwatermark}
\SetWatermarkText{\sffamily Proofreading}
\SetWatermarkScale{1.2}
\SetWatermarkColor{black!5!white}  
\usepackage[
  cam,
  center,
  font=textsf,
  width=25truecm,
  height=33.7truecm
]{crop}

\usepackage{scrlayer-scrpage}
\DeclareNewLayer[
  background,
  addhoffset=-1.8cm,
  width=1.4cm,
  contents=\layercontentsmeasure
]{leftruler}
\DeclareNewLayer[
  background,
  addhoffset=\paperwidth+.4cm,
  width=1.4cm,
  contents=\layercontentsmeasure
]{rightruler}
\DeclareNewLayer[
  background,
  addvoffset=\paperheight+.4cm,
  height=1.4cm,
  contents=\layercontentsmeasure
]{bottomruler}
\AddLayersToPageStyle{@everystyle@}{leftruler,rightruler,bottomruler}

\begin{document}
Only for Testing
\end{document}

结果:

在此处输入图片描述


但是也可以将标尺添加到裁切标记中。这样就不需要额外的包了。

\documentclass{scrartcl}
\usepackage{xcolor}
\usepackage{draftwatermark}
\SetWatermarkText{\sffamily Proofreading}
\SetWatermarkScale{1.2}
\SetWatermarkColor{black!5!white}  
\usepackage[
  center,
  font=textsf,
  width=25truecm,
  height=33.7truecm
]{crop}

\makeatletter
\providecommand*{\LenToUnit}[1]{\strip@pt\dimexpr#1*\p@/\unitlength}
\renewcommand*\CROP@@urc{%
  \begin{picture}(0,0)
    \unitlength\p@\thinlines
    \put(30,0){\circle{10}}
    \put(30,-5){\line(0,1){10}}
    \put(35,0){\line(-1,0){30}}
    \put(0,30){\circle{10}}
    \put(-5,30){\line(1,0){10}}
    \put(0,35){\line(0,-1){30}}
    \put(5,0){\line(0,-1){\LenToUnit{\paperheight}}}
    \setlength{\unitlength}{1mm}
    \@tempcnta=\numexpr \dimexpr\paperheight + .5mm\relax/\dimexpr 1mm\relax\relax
    \multiput(\LenToUnit{5pt},0)(0,-1){\@tempcnta}{%
      \line(1,0){1}%
    }%
    \@tempcnta=\numexpr \dimexpr\paperheight + 2.5mm\relax/\dimexpr 5mm\relax\relax
    \multiput(\LenToUnit{5pt},0)(0,-5){\@tempcnta}{%
      \line(1,0){2}%
    }%
    \@tempcnta=\numexpr \dimexpr\paperheight + 5mm\relax/\dimexpr 10mm\relax\relax
    \multiput(\LenToUnit{5pt},0)(0,-10){\@tempcnta}{%
      \put(0,0){\line(1,0){3}}%
      \put(\LenToUnit{\dimexpr5pt+3.5mm\relax},0){%
            \makebox(0,0)[c]{\the\numexpr\@tempcnta-\@multicnt\relax}}%
    }%
  \end{picture}%
}
\renewcommand*\CROP@@ulc{%
  \begin{picture}(0,0)
    \unitlength\p@\thinlines
    \put(-30,0){\circle{10}}
    \put(-30,-5){\line(0,1){10}}
    \put(-35,0){\line(1,0){30}}
    \put(0,30){\circle{10}}
    \put(-5,30){\line(1,0){10}}
    \put(0,35){\line(0,-1){30}}
    \put(-5,0){\line(0,-1){\LenToUnit{\paperheight}}}
    \setlength{\unitlength}{1mm}
    \@tempcnta=\numexpr \dimexpr\paperheight + .5mm\relax/\dimexpr 1mm\relax\relax
    \multiput(\LenToUnit{-5pt},0)(0,-1){\@tempcnta}{%
      \line(-1,0){1}%
    }%
    \@tempcnta=\numexpr \dimexpr\paperheight + 2.5mm\relax/\dimexpr 5mm\relax\relax
    \multiput(\LenToUnit{-5pt},0)(0,-5){\@tempcnta}{%
      \line(-1,0){2}%
    }%
    \@tempcnta=\numexpr \dimexpr\paperheight + 5mm\relax/\dimexpr 10mm\relax\relax
    \multiput(\LenToUnit{-5pt},0)(0,-10){\@tempcnta}{%
      \put(0,0){\line(-1,0){3}}%
      \put(\LenToUnit{\dimexpr-5pt-3.5mm\relax},0){%
            \makebox(0,0)[c]{\the\numexpr\@tempcnta-\@multicnt\relax}}%
    }%
  \end{picture}%
}
\renewcommand*\CROP@@lrc{%
  \begin{picture}(0,0)
    \unitlength\p@\thinlines
    \put(30,0){\circle{10}}
    \put(30,-5){\line(0,1){10}}
    \put(35,0){\line(-1,0){30}}
    \put(0,-30){\circle{10}}
    \put(-5,-30){\line(1,0){10}}
    \put(0,-35){\line(0,1){30}}
    \put(0,-5){\line(-1,0){\LenToUnit{\paperwidth}}}
    \setlength{\unitlength}{1mm}
    \@tempcnta=\numexpr \dimexpr\paperwidth + .5mm\relax/\dimexpr 1mm\relax\relax
    \multiput(0,\LenToUnit{-5pt})(-1,0){\@tempcnta}{%
      \line(0,-1){1}%
    }%
    \@tempcnta=\numexpr \dimexpr\paperwidth + 2.5mm\relax/\dimexpr 5mm\relax\relax
    \multiput(0,\LenToUnit{-5pt})(-5,0){\@tempcnta}{%
      \line(0,-1){2}%
    }%
    \@tempcnta=\numexpr \dimexpr\paperwidth + 5mm\relax/\dimexpr 10mm\relax\relax
    \multiput(0,\LenToUnit{-5pt})(-10,0){\@tempcnta}{%
      \put(0,0){\line(0,-1){3}}%
      \put(0,\LenToUnit{\dimexpr-5pt-3.5mm\relax}){%
            \makebox(0,0)[ct]{\the\numexpr\@tempcnta-\@multicnt\relax}}%
    }%
  \end{picture}%
}
\makeatother
\crop[cam]

\begin{document}
Only for Testing
\end{document}

在此处输入图片描述

答案2

fgruler您还可以采用以下更简单的方法来完成:

\documentclass{scrartcl}
\usepackage[type=none]{fgruler}
\usepackage{draftwatermark}
\SetWatermarkText{\sffamily Proofreading}
\SetWatermarkScale{5}
\SetWatermarkColor{black!20}  
\usepackage[
  cam,
  center,
  font=textsf,
  width=25truecm,
  height=33.7truecm
]{crop}

\begin{document}
\AddToShipoutPictureFG{
\setlength{\unitlength}{1mm}
\rulernorotatenum
\put(0,-4){\ruler*{leftdown}{\paperwidth}}
\put(-9,0){\ruler{upleft}{\paperheight}}
\put(214,0){\ruler{upright}{\paperheight}}}
  Only for Testing
\end{document}

结果:

在此处输入图片描述

相关内容