Skip to content

Commit

Permalink
Update docs and templates to recommend an absolute path for the `pdf-…
Browse files Browse the repository at this point in the history
…fontsdir` (#1750)
  • Loading branch information
ahus1 committed Dec 20, 2024
1 parent 81332cc commit b5c91f7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
5 changes: 4 additions & 1 deletion doc/users-guide/modules/ROOT/pages/faq.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -116,21 +116,24 @@ See xref:faq/diagrams-in-pdf-without-text.adoc[] for more details.

=== Themes are not used when creating a PDF via the IDE

To use a theme when creating PDFs in the IDE, always specify an absolute directory pointing to the `themes` folder.
To use a theme when creating PDFs in the IDE, always specify an absolute directory pointing to the folders with the
themes and the fonts.

When specifying the folder in a regular AsciiDoc file, use the `{docdir}` attribute as a prefix to point to a folder
relative to the current document:

[source,asciidoc]
----
:pdf-themesdir: {docdir}/themes
:pdf-fontsdir: {docdir}/fonts
----

When specifying a theme relative in an `.asciidoctorconfig` file, use the folder of that file by prefixing `{asciidoctorconfigdir}`:

[source,asciidoc]
----
:pdf-themesdir: {asciidoctorconfigdir}/themes
:pdf-fontsdir: {asciidoctorconfigdir}/fonts
----

== Other Troubles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ A complete example is available in https://github.com/ahus1/asciidoctor-deepdive
= 标题
:pdf-themesdir: {docdir}/themes <1>

Check warning on line 22 in doc/users-guide/modules/ROOT/pages/features/advanced/pdf-non-latin-languages.adoc

View workflow job for this annotation

GitHub Actions / Qodana Docs

Typo

Typo: In word 'docdir'
:pdf-theme: zh_CN <2>
:pdf-fontsdir: fonts <3>
:pdf-fontsdir: {docdir}/fonts <3>
This is a show case for Chinese letters in AsciiDocs.
Expand Down
7 changes: 4 additions & 3 deletions src/main/resources/AsciiDocBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -644,17 +644,18 @@ asciidoc.attributes.builtin.pdf-style.default-value=not set
asciidoc.attributes.builtin.pdf-style.values=any

asciidoc.attributes.builtin.pdf-themesdir.text=The directory where the theme file is located. Specifying an absolute path is recommended.\n\
Prefix with {docdir} to ensure a path relative to the current document\n\
Prefix with {docdir} to ensure a path relative to the current document.\n\
If you use images in your theme, image paths are resolved relative to this directory. If :pdf-theme: ends with .yml, and :pdf-themesdir: is not specified, then :pdf-themesdir: defaults to the directory of the path specified by :pdf-theme:.
asciidoc.attributes.builtin.pdf-themesdir.default-value=not set
asciidoc.attributes.builtin.pdf-themesdir.values=any
asciidoc.attributes.builtin.pdf-stylesdir.text=The directory where the theme file is located. Specifying an absolute path is recommended.\n\
Prefix with {docdir} to ensure a path relative to the current document\n\
Prefix with {docdir} to ensure a path relative to the current document.\n\
If you use images in your theme, image paths are resolved relative to this directory. If :pdf-theme: ends with .yml, and :pdf-themesdir: is not specified, then :pdf-themesdir: defaults to the directory of the path specified by :pdf-theme:.
asciidoc.attributes.builtin.pdf-stylesdir.default-value=not set
asciidoc.attributes.builtin.pdf-stylesdir.values=any

asciidoc.attributes.builtin.pdf-fontsdir.text=The directory or directories where the fonts used by your theme, if any, are located. Multiple entries must be separated by a semi-colon. To reference a file inside a JAR file on the classpath, prefix with the path with uri:classloader: (AsciidoctorJ only). Specifying an absolute path is recommended.
asciidoc.attributes.builtin.pdf-fontsdir.text=The directory or directories where the fonts used by your theme, if any, are located. Multiple entries must be separated by a semi-colon. To reference a file inside a JAR file on the classpath, prefix with the path with uri:classloader: (AsciidoctorJ only). Specifying an absolute path is recommended.\n\
Prefix with {docdir} to ensure a path relative to the current document.
asciidoc.attributes.builtin.pdf-fontsdir.default-value=not set
asciidoc.attributes.builtin.pdf-fontsdir.values=any

Expand Down

0 comments on commit b5c91f7

Please sign in to comment.