LaTeX forum ⇒ Document ClassesPoem side by side in two languages

Information and discussion about specific document classes and how to create your own document classes.
marek_step
Posts: 25
Joined: Sun Aug 19, 2012 8:48 am

Poem side by side in two languages

Postby marek_step » Sat Nov 04, 2017 7:53 am

Hello all!

I am disappointed of my LaTeX-knowledge. Even a little poem in Russian I am unable to put in a document. Here a minimal not working example:

  1. \documentclass{article}
  2. \usepackage[T1,T2A]{fontenc}
  3. \usepackage[utf8]{inputenc}
  4. % \usepackage[russian,german]{babel}
  5. \usepackage[english,main=russian,german]{babel}
  6.  
  7. %\usepackage{poetrytex}
  8. \usepackage{poetry}
  9. \begin{document}
  10.  
  11. \begin{abstract}
  12. Это вводный абзац в начале документа.
  13. \end{abstract}
  14.  
  15. % \begin{poem}
  16. % До свиданья, друг мой, до свиданья. \\
  17. % Милый мой, ты у меня в груди. \\
  18. % Предназначенное расставанье \\
  19. % Обещает встречу впереди. \\
  20. %
  21. % До свиданья, друг мой, без руки, без слова, \\
  22. % Не грусти и не печаль бровей, \\
  23. % В этой жизни умирать не ново, \\
  24. % Но и жить, конечно, не новей. \\
  25. % \end{poem}
  26.  
  27. %
  28. \poemlinenumsfalse
  29. \begin{poem}
  30. Leb wohl, mein Freund, leb wohl. \\
  31. Mein lieber Freund, du bist in meinem Herzen. \\
  32. Eine vorausgesehene Trennung \\
  33. Verspricht ein baldiges Wiedersehen. \\!
  34.  
  35. Leb wohl, mein Freund, ohne Berührung und ohne Wort, \\
  36. Sei nicht traurig und gräme dich nicht. \\
  37. Sterben ist nichts Neues in diesem Leben, \\
  38. Und Leben, natürlich, ist keineswegs neuer. \\-
  39. \end{poem}
  40.  
  41. \end{document}


Somebody could help me out? I would be very grateful for any hint!


marek

Tags:

User avatar
Johannes_B
Site Moderator
Posts: 3551
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sat Nov 04, 2017 9:07 am

Poems are not meant to be typeset with this package, as far as i can see. You have to cheat by using minipages.
  1. \documentclass{article}
  2. \usepackage[T1,T2A]{fontenc}
  3. \usepackage[utf8]{inputenc}
  4. % \usepackage[russian,german]{babel}
  5. \usepackage[english,main=russian,german]{babel}
  6.  
  7. %\usepackage{poetrytex}
  8. \usepackage{poetry}
  9. \usepackage{geometry}
  10. \geometry{margin=1in}
  11. \usepackage{hyperref}
  12. \begin{document}
  13.  
  14. \begin{abstract}
  15. Это вводный абзац в начале документа.
  16. \end{abstract}
  17. \setlength{\poemmaxlinewd}{.45\textwidth}
  18.  
  19. \begin{minipage}{.5\linewidth}
  20. \begin{poem}
  21. До свиданья, друг мой, до свиданья. \\
  22. Милый мой, ты у меня в груди. \\
  23. Предназначенное расставанье \\
  24. Обещает встречу впереди. \\
  25.  
  26. До свиданья, друг мой, без руки, без слова, \\
  27. Не грусти и не печаль бровей, \\
  28. В этой жизни умирать не ново, \\
  29. Но и жить, конечно, не новей.
  30. \end{poem}
  31. %
  32. \end{minipage}%
  33. \begin{minipage}{.5\linewidth}
  34. \poemlinenumsfalse
  35. \begin{poem}
  36. Leb wohl, mein Freund, leb wohl. \\
  37. Mein lieber Freund, du bist in meinem Herzen. \\
  38. Eine vorausgesehene Trennung \\
  39. Verspricht ein baldiges Wiedersehen. \\!
  40.  
  41. Leb wohl, mein Freund, ohne Berührung und ohne Wort, \\
  42. Sei nicht traurig und gräme dich nicht. \\
  43. Sterben ist nichts Neues in diesem Leben, \\
  44. Und Leben, natürlich, ist keineswegs neuer.
  45. \end{poem}
  46. \end{minipage}%
  47.  
  48. \end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

marek_step
Posts: 25
Joined: Sun Aug 19, 2012 8:48 am

Postby marek_step » Sat Nov 04, 2017 10:55 am

Thank you Johannes!

Impressing!

Poems are not meant to be typeset with this package


Did you mean with this
\documentclass{article}
? I tried with many document classes, like memoir, scrartcl, book ... But neither the \usepackage{poetry} nor \usepackage{poetrytex} are working without minipage. Why the TeX-manuals are not presenting a minimal working example of their package as it is standard even on a forum like this one?

The two columns I will try with \usepackage{paracol} I only have had no time to try it. I am wondering, which surprises are waiting with this package ... I will post later my result.


So long and thanks again


marek

User avatar
Johannes_B
Site Moderator
Posts: 3551
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sat Nov 04, 2017 3:24 pm

No, the class is not important. The poetry package starts every poem in a new paragraph. Paragraphs are typeset on a new line, so you have to cheat by placing the poem into a box.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.


Return to “Document Classes”

Who is online

Users browsing this forum: No registered users and 1 guest