Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm happily using the verse environment to typeset French poetry. However, I'm unsatisfied with the behavior of long-line breaks (when the verse is too long to fit on the page).

The verse behavior is to do: 

Most of verses are short
here is another
foo bar bar foo long things will at one moment
      break on another line
another short

What French typesetting convention requires is: 

Most of verses are short
here is another
foo bar bar foo long things will at one moment
                          [break on another line
another short

It's to say long line remainder part right-aligned, starting with an opening bracket, while the normal lines are still left aligned.

Any ideas on how to change this behavior?

share|improve this question
1  
a similar problem was addressed in appendix d ("dirty tricks") in the texbook. it's in section 7 (p.392ff), "paragraph maneuvers", and it was devised to handle long entries in the key index of math reviews. it redefines spaces so that, on running out of space at the end of a line, the line is broken automatically, with the beginning flush left, and the end flush right. it's plain tex of course, but someone with better plain-to-latex skills than i can certainly adapt it. @Yiannis' answer works, but could be more automatic. i'd also suggest `\obeylines' to make input more natural. –  barbara beeton Dec 24 '11 at 15:32
    
Thanks for the pointer Barbara. I read the book's part. Unfortunately, it's far beyond my understanding of LaTeX… –  Jocelyn delalande Dec 26 '11 at 14:23
add comment

1 Answer

This can be set using TeX's paragraph settings as follows:

\documentclass{article}
\usepackage{lipsum}
\newcommand*{\justlastragged}{%
\leftskip=0pt plus 1fil
\rightskip=-\leftskip
\parfillskip=\leftskip
\parindent=0pt}
\begin{document}
\justlastragged
This is a short poem line to see\\
what is this?

\lipsum[3]
\end{document}

The image below shows the result.

enter image description here

To enter the break and have an automatic "[" inserted use the following short definition:

\def\c[{\\\relax[$\!$}

You can use it as follows:

\justlastragged
This is a short poem line to see\c[ 
what is this?

Edit:

A different method closer to what the OP wants:

\documentclass{article}
\def\X{\rightskip0pt \leftskip=0pt \parfillskip=0pt plus 1.0fil}
\long\def\B#1\par{%
\par
\rightskip0pt plus 1pt
\leftskip=0pt plus 2fill
\parfillskip=0pt  [#1{\par}\X}
\parindent0pt

\begin{document}

\hsize3in
Another short line to test what is happening \B this is a  test

Some more test to just see what is happening here\B Testing another stanza

Testing etc 
\end{document}

Ultimately the best method might be the one commented by Barbara, where one makes the space character active, but that is a job for after Christmas! The second method works well, but one has to be careful with the \hsize to get it to the right value to make the poems look right.

share|improve this answer
    
It seems the OP doesn't want the first line ragged right, even in a verse environment with manual line breaks. –  lockstep Dec 24 '11 at 14:09
    
@lockstep First line is not a real ragged right line, if it is a full line. See the second example based on lipsum. I asked for a fuller example with a full stanza to understand better, what the OP needs. If all stanzas are two lines long then the \def\c[ can be modified to provide simply an \hfil[. –  Yiannis Lazarides Dec 24 '11 at 14:17
2  
@YiannisLazarides : Thanks :) I tried to be more clear/accurate in the question. –  Jocelyn delalande Dec 24 '11 at 14:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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