章节标题中的非拉丁符号

问题描述

我有以下 asciidoc文件

:doctype: book
Перший розділ
-----------------
Chapters can contain sub-sections nested up to three deep.

出现以下错误

asciidoctor: WARNING: b.txt: line 3: unterminated listing block
M+ 1mn is not a kNown font.

我使用以下命令运行它:

asciidoctor -r asciidoctor-pdf -b pdf b.txt -a pdf-style=my.yml -a pdf-fontsdir="/usr/share/fonts/truetype/msttcorefonts"

my.yml 在哪里有这个内容

extends: default
font:
  catalog:
    Times_New_Roman:
      normal: Times_New_Roman.ttf
      bold: Times_New_Roman_Bold.ttf
      italic: Times_New_Roman_Italic.ttf
      bold_italic: Times_New_Roman_Bold_Italic.ttf  
base:
  font-family: Times_New_Roman  

显然,问题出在乌克兰符号上。我该如何解决

编辑:

只有当章节标题是西里尔文时才会发生这种情况,正文正常工作。

:doctype: book
The First Chapter
-----------------
Розділи можуть містити підрозділи.

解决方法

我认为问题在于您在文档标题中使用了 4 个额外的破折号。

Перший розділ
-----------------

应该是:

Перший розділ
-------------

请注意,不推荐使用 settext(两行)标题,而应使用以下语法:

= Перший розділ
:doctype: book

Chapters can contain sub-sections nested up to three deep.