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 have two-column text that consists of multiple verses that are numbered sequentially. Imagine a text like below flowing into page in two columns.

1 Text for verse one that belongs to first verse. 2 Text for verse two that belongs to second verse. 3 Text for verse three that belongs to third verse. 4 Text for verse four that belongs to fourth verse. 5 Text for verse five that belongs to fifth verse.

Now, instead of displaying verse number next to the verse text, I would like the number appear on the left side of the column that it belongs to (similar to marginpar).

So, something like following as desired out...

1 Text for verse one    |   belongs to third 
  that belongs to first | 4 verse. Text for
2 verse. Text for verse |   verse four that
  two that belongs to   |   belongs to fourth
3 second verse. Text    | 5 verse. Text for
  for verse three that  |   verse five that...

Is something like this possible? I was looking at Tikz package, but have not been able to figure out the positioning. Would appreciate some direction and help.

I'm using {multicol} package for the double-column layout.

share|improve this question
    
How are you writing the verses? –  egreg Jan 18 '12 at 11:29
2  
Not a complete solution but it might help... Have a look at this answer to another question. Incidentally by egreg... –  McGafter Jan 18 '12 at 11:34
    
@egreg, would you mind elaborating what you mean by how I am writing the verses? They are basically plain text with numbers scattered in between, which are called verse numbers. I would like this number project out to the left of the column at the line where it appears. So, say, I bring in text like this... \v{1} Text for verse one that belongs to first verse. I may be able to \newcommand{\v} and write some code in there to dictate how this number should be placed. Does that make sense? –  Yasutaka Jan 19 '12 at 1:12
1  
I think it is best to if you compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages. This will eliminate the confusion, hopefully yield a solution that works for your specific case, and will also provide a starting point for those trying to help. –  Peter Grill Jan 19 '12 at 22:36
    
@Yasutaka: Try to put \def\v#1{\item[#1]} and \usepackage{enumitem}\setlist{nolistsep} in the preamble and enclose the whole text in the itemize environment. I would try and debug it myself if you included a working example. –  yo' Jan 23 '12 at 23:07

1 Answer 1

In case your text doesn't have any big objects inside you can use a combination of \vadjust and \strut (to get a standard line depth). By the way, \v is not really a good idea as that command already exists (it is a check accent, so your verse are better not in a language that need it ;-).

\documentclass{article}

\usepackage{multicol}
\setlength\columnsep{3em}   % open up the column sep a bit

\makeatletter
\renewcommand\v[1]{\leavevmode
   \@bsphack                                %                  try to keep the spacing ok
   \strut
   \def\strutdepth{\dp\strutbox}%                   this varies depending on fontsize 
   \vadjust{\kern-\strutdepth      %                   hopefully back to baseline now ;-)
                  \vtop to\strutdepth{%                   and this gets us back to the depth in the end
                                \baselineskip\strutdepth  %
                                \vss 
                                \llap{\scriptsize #1\quad }%
                                \null                                   % using a null box adds the right amount of baselineskip
                                                                          % (even if #1 is something with a depth)
                         }%
                 }%
  \@esphack
}
\makeatother

\begin{document}

\begin{multicols}{3}
\v1 Text for verse one that belongs to first verse. \v2 Text for verse two that 
belongs to second verse. \v3 Text for verse three that belongs to third verse. 
\v4 Text for verse four that belongs to fourth verse. 
\v5 Text for verse five that belongs to fifth verse.

\end{multicols}

\end{document}

This gives you (and of course this could be further embellished):

enter image description here

Sorry for the lense ... that is of course not produced by LaTeX, I just noticed too late :-)

share|improve this answer

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.