2

enter image description here \documentclass[letterpaper,10pt]{report}

\newenvironment{packed_enum}{
\begin{enumerate}
  \setlength{\itemsep}{1pt}
  \setlength{\parskip}{0pt}
  \setlength{\parsep}{0pt}
}{\end{enumerate}}

\begin{document}

\chapter{Movies I need to watch}

Here is a short list of movies \marginpar{Flag A -- This note will appear in the margin.} I need to watch some day:

\begin{packed_enum}
   \item The Longest Day
   \item Kill Bill 1
   \item Kill Bill 2
   \item Pretty much every other movie created in the last 30 years. :)
\end{packed_enum}

\end{document}
  • What sort of frame? Lines or clip art? Every page or just part of text? – John Kormylo Sep 22 at 2:31
  • line --similar to ms_word has an option to give a page border of varying thickness – js bibra Sep 22 at 2:35
  • I like to use everypage and tikzpagenodes for that sort of thing. – John Kormylo Sep 22 at 2:37
  • If you want to frame individual boxes (like the marginpar) you should look at \fbox or tcolorbox. – John Kormylo Sep 22 at 21:11
2

You need to run this twice. It stores the tikzpicture locations in the aux file.

\documentclass[letterpaper,10pt]{report}
\usepackage{everypage}
\usepackage{tikzpagenodes}
\usetikzlibrary{calc}

\newenvironment{packed_enum}{
\begin{enumerate}
  \setlength{\itemsep}{1pt}
  \setlength{\parskip}{0pt}
  \setlength{\parsep}{0pt}
}{\end{enumerate}}

\newcommand{\myframe}{\begin{tikzpicture}[remember picture, overlay]
  \draw[blue,thick] ($(current page text area.south west) + (-2pt,-2pt)$) rectangle
    ($(current page text area.north east) + (2pt,2pt)$);
\end{tikzpicture}}% easier to debug
\AddEverypageHook{\myframe}

\begin{document}
\chapter{Movies I need to watch}

Here is a short list of movies \marginpar{Flag A -- This note will appear in the margin.} I need to watch some day:

\begin{packed_enum}
   \item The Longest Day
   \item Kill Bill 1
   \item Kill Bill 2
   \item Pretty much every other movie created in the last 30 years. :)
\end{packed_enum}

\end{document}
2

You can use eso-pic to tap into the shipout routine (\AddToShipoutPictureFG - the ForeGround of every page within the document), adding a \frame of desired width \AtPageCenter:

enter image description here

\documentclass{article}

\usepackage{eso-pic,lipsum}

\AddToShipoutPictureFG{%
  \AtPageCenter{%
    \makebox[0pt]{\raisebox{-.5\height}{%
      \frame{%
        \rule{.9\paperwidth}{0pt}% Horizontal 0pt-width rule
        \rule{0pt}{.9\paperheight}% Vertical 0pt-width rule
      }
    }}%
  }%
}

\begin{document}

\lipsum[1-50]

\end{document}

\makebox[0pt] ensures the \frame is set horizontally in the middle of the page, while \raisebox{-.5\height} ensures the \frame is set vertically in the middle of the page.

  • how do i place an arrow thickness 1pt with angle 45deg--kindly guide – js bibra Sep 23 at 1:10
  • 1
    @jsbibra: You need to be more clear in your request of an arrow. If you want a thicker line, add \setlength{\fboxrule}{1pt}. – Werner Sep 23 at 2:34

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.