Dear community members,
I'm working on a paper about a Latin American poet and I included in the appendix one of his poems that I analyse. In order to be able to mark the metrical accents and to use some other metrical symbols, I use the {verse} environment combined with the metre.sty package (which was originally designed for classical philologists).
Now, in the poem there are several cases of enjambement that I'd like to mark with a "]" on the right side of each of the pair of verses in question. So the square bracket should stretch over two lines, thereby "connecting" them. Unfortunately, I'd rather not use the math-environment as in that case the special metre.sty-commands would not work. Preferably, I would also like to be able to define the space between the right margin of the page and the square brackets, so that they be all vertically aligned without interfering with the line counting numbers (generated by the \poemlines{5} command) located a little further on the right.
Can somebody help me? Thanks already in advance,
best
Niko
Text Formatting ⇒ mark enjambement in {verse}-environment
NEW: TikZ book now 40% off at Amazon.com for a short time.
mark enjambement in {verse}-environment
Hi,
in order to do some tests and try some ideas that I have, can you please post here an actual complete and compilable example of some of the verses that you are using? Please include all the packages that you are using to format those particular verses.
in order to do some tests and try some ideas that I have, can you please post here an actual complete and compilable example of some of the verses that you are using? Please include all the packages that you are using to format those particular verses.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
mark enjambement in {verse}-environment
Hi gmedina,
Thanks for your interest. The example below should work, I tried it (on a Vista PC using MiKTeX 2.7). It would be nice to be able to add a square bracket (or something similar), as mentioned above, between lines 5 and 6 or 7 and 8 respectively, for example.
Best
Niko
Thanks for your interest. The example below should work, I tried it (on a Vista PC using MiKTeX 2.7). It would be nice to be able to add a square bracket (or something similar), as mentioned above, between lines 5 and 6 or 7 and 8 respectively, for example.
Best
Niko
Code: Select all
\documentclass[a4paper,12pt,titlepage,bibtotoc]{scrartcl}
\usepackage[ansinew]{inputenc}
\usepackage[ngerman, spanish]{babel}
\usepackage[T1]{fontenc}
\usepackage[paper=a4paper,left=35mm,right=30mm,top=30mm,bottom=30mm]{geometry}
\usepackage{setspace}
\usepackage{verse}
\usepackage{metre}
\begin{document}
\begin{verse}
\poemlines{5}
\poemtitle{Académica}
\begin{metrica}
\doublespacing
\Elevatio{1.75}
V\acutus[1.2]{e}n, m\=i cab\='all\itie{o, a} qu\=e t\itie{e e}nc\='inche: qui\='eren\\
Que n\=o con g\='arbo n\=atur\=`al el c\='oso\\
Al s\='ab\itie{io i}mp\='ulso c\=`orras d\=e la v\='ida,\\
Sin\=o qu\itie{e e}l p\='aso d\=e la p\='ist\itie{a a}pr\='endas,\\
Y l\=a l\acutus[1.2]{e}ng\={ua} del l\='{á}tig\itie{o, \=y} sum\='iso\\
Des \=a la s\='ill\itie{a e}l \=arrog\='ante l\='omo:---\\
V\acutus[1.2]{e}n, m\=i cab\='allo: d\='icen qu\itie{e \=e}n el p\='echo\\
Lo qu\itie{e \=e}s ci\acutus[1.2]{e}rt\=o, n\itie{o e}s ci\='erto: qu\=e l\itie{a e}str\='ofa\\
Ígne\=a qu\itie{e e}n l\itie{o h\='o}ndo d\=e las \='almas n\='ace[n],\\
\end{metrica}
\end{verse}
\end{document}
Last edited by nikor on Mon Sep 07, 2009 2:44 am, edited 1 time in total.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
mark enjambement in {verse}-environment
Concerning longer pieces of code please read Section 2.4 of the Board Rules and modify your post accordingly.
Best regards
Thorsten
Best regards
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
mark enjambement in {verse}-environment
Hi,
The basic idea is to use the tkz-linknodes package that allows to connect lines (of text, math, etc.). Since using the minipage environment or the \parbox command disable the effect of \poemlines, the solution is to enclose each verse in a box and to use the same width (the length of the longest verse) for all these boxes. For this purpose, I defined a new command called \myline.
The common width of the box used in \myline is stored in a new defined command that I called \longest and its value is calculated at the beginning of the verses by using \settowidth.
Now, using the \AddNode and the \LinkNodes commands, you can connect the lines that you desire. Please notice that you still have to manually calculate the value to be used for the margin option of the \LinkNodes command.
Please take a look at the following example (I replaced some accented vowels (é and Í) in your code for the corresponding comands (\'e and \'I) to make your code compilable without problems):
The basic idea is to use the tkz-linknodes package that allows to connect lines (of text, math, etc.). Since using the minipage environment or the \parbox command disable the effect of \poemlines, the solution is to enclose each verse in a box and to use the same width (the length of the longest verse) for all these boxes. For this purpose, I defined a new command called \myline.
The common width of the box used in \myline is stored in a new defined command that I called \longest and its value is calculated at the beginning of the verses by using \settowidth.
Now, using the \AddNode and the \LinkNodes commands, you can connect the lines that you desire. Please notice that you still have to manually calculate the value to be used for the margin option of the \LinkNodes command.
Please take a look at the following example (I replaced some accented vowels (é and Í) in your code for the corresponding comands (\'e and \'I) to make your code compilable without problems):
Code: Select all
\documentclass[a4paper,12pt,titlepage,bibtotoc]{scrartcl}
\usepackage[ansinew]{inputenc}
\usepackage[ngerman, spanish]{babel}
\usepackage[T1]{fontenc}
\usepackage[paper=a4paper,left=35mm,right=30mm,top=30mm,bottom=30mm]{geometry}
\usepackage{setspace}
\usepackage{verse}
\usepackage{metre}
\usepackage{tkz-linknodes}
\usepackage{tikz}
% supress the arrow tips from the lines used to connect the nodes
\tikzset{ArrowStyle/.style={text=black}}
% define a new length
\newlength\longest
% define a new command to write the verses in boxes of the same length
\newcommand\myline[1]{\makebox[\longest][l]{#1}}
\begin{document}
\begin{verse}
% calcxulate the length of the longest verse
\settowidth\longest{V\acutus[1.2]{e}n, m\=i cab\='all\itie{o, a} qu\=e t\itie{e e}nc\='inche: qui\='eren}
\poemlines{5}
\poemtitle{Acad\'emica}
\begin{NodesList}
\begin{metrica}
\doublespacing
\Elevatio{1.75}
\myline{V\acutus[1.2]{e}n, m\=i cab\='all\itie{o, a} qu\=e t\itie{e e}nc\='inche: qui\='eren}\\
\myline{Que n\=o con g\='arbo n\=atur\=`al el c\='oso}\\
\myline{Al s\='ab\itie{io i}mp\='ulso c\=`orras d\=e la v\='ida,}\\
\myline{Sin\=o qu\itie{e e}l p\='aso d\=e la p\='ist\itie{a a}pr\='endas,}\\
\myline{Y l\=a l\acutus[1.2]{e}ng\={ua} del l\='{\'a}tig\itie{o, \=y} sum\='iso}\AddNode\\
\myline{Des \=a la s\='ill\itie{a e}l \=arrog\='ante l\='omo:---}\AddNode\\
\myline{V\acutus[1.2]{e}n, m\=i cab\='allo: d\='icen qu\itie{e \=e}n el p\='echo}\AddNode[2]\\
\myline{Lo qu\itie{e \=e}s ci\acutus[1.2]{e}rt\=o, n\itie{o e}s ci\='erto: qu\=e l\itie{a e}str\='ofa}\AddNode[2]\\
\myline{\'Igne\=a qu\itie{e e}n l\itie{o h\='o}ndo d\=e las \='almas n\='ace[n],}\\
\LinkNodes[margin=2.8cm]{}%
\LinkNodes[margin=2.8cm]{}%
\end{metrica}
\end{NodesList}
\end{verse}
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: mark enjambement in {verse}-environment
Hi,
thank you so much, this works well! After some time, I figured out that you can even write some text beside the brackets -- Nice! Thanks again for your immediate help,
best,
Niko
thank you so much, this works well! After some time, I figured out that you can even write some text beside the brackets -- Nice! Thanks again for your immediate help,
best,
Niko