1

The option [showframe] for the geometry package makes nice lines so that we can see the frame layout of each page. What I want, however, is to only see the line that gives the right margin for the main body text (this is the vertical line after which any letter gets flushed to the next line).

Please let me know what specific option I would have to use.

2

well you could build a tikzpictureoverlay and insert it at every page using the following code.

\documentclass[10pt,a4paper]{article}
\usepackage{everypage}
\usepackage{tikzpagenodes}
\usepackage{tikz}
\usepackage{lipsum}
\usepackage[left=2.00cm, right=2.00cm, top=3.00cm, bottom=3.00cm]{geometry} 
\AddEverypageHook{
   \begin{tikzpicture}[remember picture, overlay, black]
   \draw (current page text area.north east) node (A){};
   \draw (current page text area.south east) node (B){};
   \draw (B.center) -- (A.center);
   \end{tikzpicture}    
}
\begin{document}
\lipsum
\end{document}

enter image description here

I know that this isn't using any option of the geometry package, but this "dirty" solution may come in handy for other uses..

  • Thank you for trying to help. However, copy pasting your code does not compile? I get the error "Missing \begin{document}.A" – Lentes Feb 12 at 23:09
  • 1
    sorry there was a backslash missing somehow... try it now.. – celi Feb 12 at 23:12
  • Thanks it's working now, and does precisely what I need. – Lentes Feb 12 at 23:14
2

\renewcommand of \ShowFramePicture command in showframe.sty as:

\renewcommand*\ShowFramePicture{%
  \begingroup
      \AtTextLowerLeft{%
      \put(\LenToUnit{\textwidth},0){%
        \line(0,0){\LenToUnit{\textheight}}}}%
             \endgroup             
}

shows us only right margin. Full code and example:

\documentclass[11pt]{article}
\usepackage{showframe}
\usepackage{lipsum}
\renewcommand*\ShowFramePicture{%
  \begingroup
      \AtTextLowerLeft{%
      \put(\LenToUnit{\textwidth},0){%
        \line(0,0){\LenToUnit{\textheight}}}}%
             \endgroup             
}
\begin{document}
\section{A}
\lipsum[1]
\section{B}
\lipsum[1-4]
\end{document} 

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.