Text FormattingBrackets over multiple lines of text

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Damien_G
Posts: 2
Joined: Fri Apr 01, 2011 12:43 pm

Brackets over multiple lines of text

Post by Damien_G »

Hi everyone,

I've been looking for a particular format feature recently, but haven't been able to find a way to do it.

I would like to show interaction patterns in a dialogue by placing phrases from two different lines into brackets (or any kind of visual marker, if possible). A picture is worth a thousand words, so I have attached an extract of an article from G.H. Lerner on Overlapping (source: http://www.soc.ucsb.edu/faculty/lerner/ ... letion.pdf).
Graphical example of overlapping.
Graphical example of overlapping.
sma_article_extract.png (24.49 KiB) Viewed 3178 times
What is usually recommended for this amongst linguistics Latex users is the use of the tabbing environment. The problem is that I want to number the lines as well (the conversation I'm working on is quite a stretch), and lineno, as far as I've found, seems to skip the tabbing environment:

Code: Select all

\begin{document}
\begin{linenumbers}
Y : t'as bien aim\'{e} le truc ?
D : ouais j'ai bien aim\'{e}:
\begin{tabbing}
D : et euh: alors Charlotte aime pas la voix de \= Pierre 
Y : \> ah non?
\end{tabbing}
D : \c{c}a c'est c'est des choses qui arrivent hein
\end{linenumbers}
\end{document}
I used, alternatively, the tabular environment, and more particularly the edtable option available in the lineno package. If I use the tabular environment, only one line is counted (for the table) whereas I want the two of them counted. And I tried edtable, but the numbering seems to start at the table and I can't find a way to fix this.

(Plus I think tabular and table might not be the most elegant way to proceed. But if they could do the trick, I'd be happy to use them.)

Code: Select all

\begin{document}
\begin{linenumbers}
Y : t'as bien aim\'{e} le truc ?
D : ouais j'ai bien aim\'{e}:
\begin{edtable}{tabular}{ l l }
D : et euh: alors Charlotte aime pas la voix de & Pierre 
Y : & ah non?
\end{edtable}
D : \c{c}a c'est c'est des choses qui arrivent hein
\end{linenumbers}
\end{document}
Has anybody come across something like this before? I've tried quite a number of things, using the math mode as well (and with not much result, but I might be doing something wrong).

Thanks a lot for your help,

Damien
Last edited by Damien_G on Sun Apr 03, 2011 1:25 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Damien_G
Posts: 2
Joined: Fri Apr 01, 2011 12:43 pm

Re: Brackets over multiple lines of text

Post by Damien_G »

Hi all.

An update: the edtable option in the lineno package does work. It was my mistake to judge a bit quickly, as I simply forgot to run latex three times before watching the result. Noob.

As I said, it's not the cleanest option but it does the job.

Anyways, thanks if you spent some time trying to solve this problem.

Cheers,

Damien
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Brackets over multiple lines of text

Post by localghost »

Damien_G wrote:[…] it's not the cleanest option but it does the job. […]
Then please mark the topic (not the last post) accordingly as written in Section 3 of the Board Rules (to be read before posting).


Best regards and welcome to the board
Thorsten
Post Reply