TransWikia.com

Persian and German poetry side by side

TeX - LaTeX Asked on May 11, 2021

I am looking to typeset a document of Persian poems side by side with their German translations. I have some experience with Latex, but have never type-set Persian before. I have looked into this a little, it seems I cannot use my current PDFLatex setup for this.

I am looking to produce a layout similar to this. I tried using babel with ngerman
and farsi and switching between languages by selectlanguage as described here. Unfortunately, the document remained mostly blank.

This is what I currently have:

documentclass[a5paper,10pt,twoside]{memoir}

usepackage[farsi,ngerman]{babel}
usepackage[utf8x]{inputenc}
renewcommand{PoemTitlefont}{%
normalfontscshapeflushleft% Remove centering from poem title
hspace*{0.5linewidth}hspace*{-0.5versewidth}}% Makes poem title flush left with body block.

checkandfixthelayout

begin{document}

  selectlanguage{farai}
  settowidth{versewidth}{کسی سر بر نیارد کرد پاسخ گفتن و دیدار یاران را} 
  PlainPoemTitle % Removes the counter from PoemTitle
  PoemTitle{زمستان}
  begin{verse}[versewidth]
      سلامت را نمی خواهند پاسخ گفت
      سرها در گریبان است
      کسی سر بر نیارد کرد پاسخ گفتن و دیدار یاران را
      نگه جز پیش پا را دید ، نتواند
  end{verse}
end{document}

Is this just a font issue? Am I making a major mistake? On reading into this, it seems that only the package xepersian offers solid support for Persian-language documents. As I only have sections in Persian script, I was hoping to keep my current setup. Any advice would be greatly appreciated!

One Answer

With following preamble it works:

documentclass[a5paper,10pt,twoside]{memoir}

usepackage[LAE,T1]{fontenc}

usepackage[farsi,ngerman]{babel}

renewcommand{PoemTitlefont}{%
normalfontscshapeflushleft% Remove centering from poem title
hspace*{0.5linewidth}hspace*{-0.5versewidth}}% Makes poem title flush left with body block.

checkandfixthelayout

Farsi-babel

But as suggested by @Davislor, with lualatex it would be much simpler (it depends largely on your needs). Here is the setup:

usepackage[ngerman, bidi=basic]{babel}
babelprovide[import=fa]{farsi}
babelfont{rm}{Amiri}

Correct answer by Javier Bezos on May 11, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP