jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.04k stars 3.35k forks source link

Footnote mark rendered on the wrong side of a right-to-left string after .tex to .docx #9556

Open dan-reznik opened 6 months ago

dan-reznik commented 6 months ago

Using "pandoc main.tex -o main.docx" on the .tex below, we identify the following deviation from a latex-generated PDF:

a footnote following a right-to-left string (e.g., hebrew below) appears correctly on its right side on the PDF and incorrectly on its left side on the .docx

Cheers


\documentclass[letter]{article} \title{Right-To-Left Footnote problem} \author{}

\usepackage{fontspec} \setmainfont{FreeSerif} \setsansfont{FreeSans} \setmonofont{FreeMono} \usepackage{polyglossia} \setdefaultlanguage[variant=american]{english} \setotherlanguages{hebrew} \newfontfamily\hebrewfont[Script=Hebrew]{Hadasim CLM}

\begin{document} \maketitle

Two Pandoc bugs in going from \texttt{.tex} to \texttt{.docx}:

A footnote on a right-to-left string, e.g., \texthebrew{טוֹב}\footnote{A footnote.} appears incorrectly on the left side of the string. \end{document}

jgm commented 6 months ago

Could you upload a minimal docx created in Word with a couple Hebrew words and a footnote, so I can see how Word represents this and how it differs from pandoc's version?