Advertisement
a-z-

"Margin note over body text"

Nov 20th, 2018
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 1.21 KB | None | 0 0
  1. \documentclass[twoside]{article}
  2. \usepackage{lipsum}
  3. \usepackage{wrapfig}
  4. \setlength{\wrapoverhang}{\marginparwidth}
  5. \addtolength{\wrapoverhang}{\marginparsep}
  6. \usepackage[left=1in,right=2.5in,top=1in,bottom=1in]{geometry}
  7. \begin{document}
  8. \lipsum[1]
  9. \begin{wrapfigure}[11]{O}{6.3cm}
  10. \vspace{-10pt} %% If needed
  11. This is a margin note getting wrapped with the text and going into margin as well.
  12. In \verb!\begin{wrapfigure}[8]{O}[2cm]{6cm}!, \texttt{[8]} denotes the number of line space in the margin note, \texttt{{O}} is the alignment, \texttt{[2cm]} is amount by which the note goes in to the margin (called over hang) and \texttt{{6cm}} is the width.
  13. \vspace{10pt} %% If needed
  14. \end{wrapfigure}
  15. \lipsum[2-3]
  16. \clearpage
  17. \lipsum[3]
  18. \begin{wrapfigure}[11]{O}{6.3cm}
  19. % \vspace{-10pt} %% If needed
  20. This is a margin note getting wrapped with the text and going into margin as well.
  21. In \verb!\begin{wrapfigure}[8]{O}[2cm]{6cm}!, \texttt{[8]} denotes the number of line space in the margin note, \texttt{{O}} is the alignment, \texttt{[2cm]} is amount by which the note goes in to the margin (called over hang) and \texttt{{6cm}} is the width.
  22. % \vspace{10pt} %% If needed
  23. \end{wrapfigure}
  24. \lipsum[4-5]
  25.  
  26. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement