For answering the peer reviewers of a venue, one way is creating a TeX file in which you quote the reviews by putting a ">" before the lines and, then, answering your edits in simple lines.

Putting the ">" symbols at the beginning of each line, manually, is not that easy and, moreover, the lines will not be aligned, because you should go to the first of the next line, manually.

Is there any automatic way to put ">" symbols at the beginning of the entire lines of a paragraph?

  • You are obviously talking about an editor, but not mentioning its name. Any decent editor with regex can substitute the beggining of a line with that character s/^/>/ EDIT: Wait, scientific-workplace is the editor?
    – Johannes_B
    Commented Jun 6, 2015 at 17:38
  • @Johannes_B I am not sure if my question is about an editor because I expected a latex package solution or something like that. However, my editor is TeXstudio.
    – hossayni
    Commented Jun 6, 2015 at 17:40
  • You want to have those symbols in front of lines in the output pdf?
    – Johannes_B
    Commented Jun 6, 2015 at 17:41
  • At the beginning of each line.
    – hossayni
    Commented Jun 6, 2015 at 17:43
  • @Mico I was not aware of such software. One of the synonyms of workplace is structure by which I suppose that this tag is for scientific structures.
    – hossayni
    Commented Jun 6, 2015 at 17:55

3 Answers 3


enter image description here


 \advance\count0 -1


\begin{q}One two three four \def\z{Red blue elephant giraffe green yellow monkey dog cat purple}
\z. \z\ \z. Five six seven \z.
Some comment on the quoted text

  • May I ask the reason for including it in a minipage? Commented Jun 6, 2015 at 22:39
  • @MyUserIsThis a page break in the quoted paragraph would be bad, the > would all be on the second page, going up into the page head, so simplest thing is to use a minipage to avoid the problem Commented Jun 6, 2015 at 23:02
  • I tried that solution here: \begin{q} \input{foo.txt} \end{q}, but didn't respect the break lines of the input text. Commented Nov 21, 2016 at 11:50

ConTeXt users can use the delimitedtext environment which is used for quotations and blockquotes. With the nextleft you can set a symbol which is shown at the left margin of each line.

%    indenting=no,
     left={> },
     nextleft={> }]



\input ward

\input ward\par
\input ward

\input ward


A limitation of this method is that you to disable the indentation of the paragraphs because the symbol in the first line will be placed at the wrong position.

Repeated symbol at the left margin with the delimited text mechanism.

Even though one can fix this for the first line when you never have more than one paragraph there is a better solution with the help of the linenumbering mechanism. The counter for the line numbers can be hidden with the conversion=empty setting.

     margin=\widthofstring{> },
     left={> }]



\input ward

\input ward\par
\input ward

\input ward


Repeated symbol at the left margin with the line numbering mechanism.


The following solution also works across pages, but it still requires a bit of luck:



  \dimen@ \prevdepth
  \setbox\z@ \vbox\bgroup
    \prevdepth \dimen@
    \sbox\z@{\textgreater\ }%
    \leftskip \wd\z@ \relax
    % A legal breakpoint must exist between any two lines of a paragraph:
      \interlinepenalty 9999
      \clubpenalty 9999
      \widowpenalty 9999
    % Also ensure that e-TeX extensions are not used (standard LaTeX does not 
    % use them):
    \interlinepenalties \z@
    \clubpenalties \z@
    \widowpenalties \z@
  \egroup % finish \vbox
  \splitmaxdepth \maxdepth % to be safe
  \splittopskip \z@skip
  \vfuzz \maxdimen % suppress overfull \vbox warnings
  \savingvdiscards \@ne
    \setbox\tw@ \vsplit\z@ to\z@
    \setbox\tw@ \lastbox
      \hbox{\rlap{\textgreater\ }\box\tw@}
    \else \ifvbox\tw@ % this should never happen...
      \box\tw@ % ... but if it does, simply reinsert the box


\tracingpages = 1 % You can check in the log file that the club line at the end 
                  % of page 1 has been assessed at the usual penalty.

Text with some descenders: fgjpqy.


Output from the code

  • 1
    …what do you mean by 'luck'? Commented Jun 7, 2015 at 3:08
  • @SeanAllred: I just mean that the solution is not perfect: for one thing, it doesn’t fully preserve the settings for the interline penalties (although it works in standard situations). Also, if a box is followed by a mark, a whatsit, or something like this, \lastbox will not be able to remove it.
    – GuM
    Commented Jun 7, 2015 at 3:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .