AsciidocFX
AsciidocFX copied to clipboard
PDF Text Color
Hi, i have problems setting up text colors. The preview for PDF shows colored text, the actual output not.
tests in a fresh editor:
[blue]#*BLAU*# +
[yellow]#*GELB*# +
[red]*ROT*
For pdf theming you should define a asciidoctor-pdf theme and colors you want to use. Please check https://discuss.asciidoctor.org/Color-for-Text-td7509.html
I really dont know how to do this. I cant find a *.yml file in which it could find place. Further help appreciated.
Please ask on https://discuss.asciidoctor.org/ since it is Asciidoctor specific question
My settings cannot freely set the color for a specific WORD. I can only set it according to the defined blocks, such as Header1, Header2, Header3 and so on.
Create theme file
custom-color-theme.yml
# FOR Asciidoctor-PDF 2.x
extends: default-with-font-fallbacks
# Set the base text color
base_font_color: #333333
heading:
# Color for H1 headings
h1_font_color: #1a73e8
# Color for H2 headings
h2_font_color: #1a73e8
# Color for H3 headings
h3_font_color: #1a73e8
# Color for links
link:
font_color: #0000ee
# Color for literal text or code
literal:
font_color: #d63384
demo3.adoc
= Asciidoc Theme Custom Color Demo
:pdf-themesdir: {docdir}
:pdf-fontsdir: GEM_FONTS_DIR;
:pdf-theme: custom-color
== Test Level 2
This is a Test 2.
This is a Link https://docs.asciidoctor.org/pdf-converter/latest/theme/[Asciidoctor PDF Theming]
=== Test Level 3
This is a Test 3.
AsciidocFx open demo3.adoc
PDF -> Save
Show PDF Color
custom-color-theme.yml and demo3.adoc must be placed in the same directory.