0

I'm using presentation with and . I have a markdown file like this:

---
lang: fa
dir: rtl
title: "عنوان ارائه"
author: "نام دانشجو"
date: "تاریخ"
institute: "نام دانشگاه"
theme: "metropolis"
---

# فهرست

1. [شماره ۱](#شماره-۱)
2. [شماره ۲](#شماره-۲)


# شماره ۱
متنی در مورد شماره ۱

# شماره ۲
متنی در مورد شماره ۲

And I'm trying to convert it to PDF, using this command:

pandoc pres.md -t beamer -o pres.pdf --pdf-engine=xelatex -V mainfont="Sahel"

But there are two problems.

  1. Not everything goes RTL.

enter image description here

As you can see, the author, date, and institute elements are in the correct direction, but the title isn't. Also, list elements in Table of Contents aren't in the right direction:

enter image description here

But I thought specifying dir: rtl would solve that. It does make a change when I add dir: rtl, but it's not working as expected.

  1. Links in Table of Contents don't work

In the English version of the same markdown file, everything works. But when I change it to Persian, links don't work. And when I open the PDF file with mupdf, the moment I change the page to ToC, mupdf gives out this warning:

warning: undefined link destination
warning: ... repeated 2 times...

enter image description here

How can I fix these issues?

1 Answer 1

1

Edit your code as:

---
lang: "fa"
dir: "rtl"
title: "عنوان ارائه"
author: "نام دانشجو"
date: "تاریخ"
institute: "نام دانشگاه"
theme: "metropolis"
header-includes: "\\raggedleft"
---

# فهرست
\raggedleft
۱. [شماره ۱](#شماره-۱)

\raggedleft
۲. [شماره ۲](#شماره-۲)


# شماره ۱
متنی در مورد شماره ۱

# شماره ۲
متنی در مورد شماره ۲

Output: enter image description here Links in Table of Contents do work. Pdf

Suggestion: beamer example and template on @Tex_Ahmadi Telegram channel .

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .