How to convert an asciidoc with cyrillic symbols to pdf?

332 Views Asked by At

I have created an .adoc file and want to convert it to PDF.

I am using Linux Debian and GEdit for writing the .adoc. I followed all the steps to install asciidoc-pdf, RVM, etc. from here. And it actually works, but for some reason it doesnt want to convert my file.

I downloaded a readme for Asciidoctor PDf converter and tried to convert it to pdf to see if all is working correctly and it converted with no problem.

When I try to convert my file, it only converts the title and that's it. When I try to convert it to HTML, I get a bit more - the line with the name of the author (my name). And I can't understand what's wrong.

I even tried to write the same file from scratch with no result.

Here is a sample of my file:

= Как купить билет на сайте РЖД
Маркиев Владимир <[email protected]>
:hide-uri-scheme:
:imagesdir: img
ifdef::env-github[]
:importatnt-caption: :warning:
:source-highlighter: rouge



Инструкция:: Данная инструкция поможет вам приобрести билет най сайте hhtps://rzd.ru

. Наберите в адресной строке браузера rzd.ru, откроется главная страница сайта.
+
--
image::1.png[главная страница]
--

After some reading, I found out that this is due to Cyrillic symbols in my document. I found out that now Asciidoc supports Cyrillic symbols in documents, but you need to specify font family as "Noto Serif" in the header:

base-font-family: Noto Serif

I tried to set the font family, added the line, but it still doesn't want to convert to pdf.

I guess, now the main question is: how to use Cyrillic symbols in asciidoc.

1

There are 1 best solutions below

3
On BEST ANSWER

This ifdef

ifdef::env-github[]

is never closed.

Try to close it that way:

ifdef::env-github[]
:importatnt-caption: :warning:
:source-highlighter: rouge
endif::env-github[]