1

Per the formatting requirements for a specific proposal, I need a way to mark sections of the documents (possibly breaking across pages) with asterisk symbols going down both margins. Ideally I would like to be able to do a \begin and \end command to make the section and not guess it's length. Something along the lines of this:

*  Lorem ipsum dolor sit amet, consectetur adipiscing    *
*  elit, sed do eiusmod tempor incididunt ut labore et   *
*  dolore manga aliqua. Ut enim ad minim veniam, quis    *
*  nostrud exercitation ullamco laboris nisi ut aliquip  *
*  ex ea commodo *consequat. Duis aute irure dolor in    *

1 Answers1

1

Update: Another try with fancypar:

\documentclass[a4paper]{article}
\usepackage{lipsum}
\usepackage{parskip}

\usepackage{fancypar} \makeatletter \define@choicekey+[FP]{fancypar}{position}[\val\nr]{left,right,both}{% \ifcase\nr\relax \def\FancyMarkPosition{\llap{\mbox{\FancyMark\quad}}\box\linebox} \or \def\FancyMarkPosition{\box\linebox\rlap{\mbox{\quad\FancyMark}}} \or \def\FancyMarkPosition{\llap{\mbox{\FancyMark\quad}}\box\linebox\box\linebox\rlap{\mbox{\quad\FancyMark}}} \fi }{% \PackageWarning{fancypar}{erroneous input ignored}% } \makeatother

\usepackage{environ} \NewEnviron{stars}{% \MarkedPar[mark=$\star$, position=both]{\BODY}% }

\begin{document}

\begin{stars} \lipsum[1] \end{stars}

\end{document}

enter image description here


Until someone comes up with a nice answer, here is a quick and dirty hack:

Using Werner's answer here, I abused the mechanism of lineno to print stars instead of numbers in the margin.

\documentclass[a4paper]{article}
\usepackage{lipsum}
\usepackage{parskip}

\usepackage{lineno} \makeatletter \def\makeLineNumberLeft{% \llap{\hb@xt@\linenumberwidth{$\star$\hss}\hskip\linenumbersep}% left line number \hskip\columnwidth% skip over column of text \rlap{\hskip\linenumbersep\hb@xt@\linenumberwidth{\hss$\star$}}\hss}% right line number \leftlinenumbers% Re-issue [left] option \makeatother

\begin{document}

\begin{linenumbers} \lipsum[1] \end{linenumbers}

\end{document}

enter image description here

DG'
  • 21,727
  • Thanks, almost, although hopefully, the lineno version will make do

    The fancypar version looks much better when it's just text, but breaks across sections

    The lineno option is more stable in that sense, but symbols change size and spacing on sections and itemize (doesn't seem like I can put an example image in a comment) Using the displaymath,mathlines options does make it work on equations though:

    \usepackage[displaymath, mathlines]{lineno}

    – Laughingrice Nov 26 '20 at 20:12