Open pela9 opened 2 years ago
Thanks for providing this feedback regarding the documentation. I've been thinking about restructuring the documentation to have a short generic section followed by a section per diagram type. That would provide an excellent place to put diagram type specific details like what you're describing above. I'll make sure to keep your questions in mind when I get around to the documentation rework.
Thanks for the tips on how to use preamble
, but I cannot make it work.
I added :tikz-preamble: \input{path/to/preamble.tex}
. I'm wondering if you can give more tips.
I found some tips in the change log. I know how to add preamble now.
As I have understood it, the preamble
attribute is instead a Boolean flag which, if true, allows to separate LaTeX stuff for the internal preamble of the generated LaTeX file and the tikz picture using ~~~~
, for example:
[tikz, TikzTest3, pdf, preamble=true, width=30%]
....
\usetikzlibrary{shapes.multipart}
~~~~
\begin{tikzpicture}
\node [circle split,draw,double,fill=red!20]{Upper \nodepart{lower} Lower};
\end{tikzpicture}
....
@pela9 Thanks for the quick reply. This is very helpful.
To include your example as PDF works, but if I try to include as SVG, it's like this:
If I convert the generated diagram PDF using pdf2svg
manually, the SVG works. So I guess there is something wrong with my AsciiDoctor PDF
settings.
So far, I'm using the font settings in the default AsciiDoctor PDF
theme:
font:
catalog:
# Noto Serif supports Latin, Latin-1 Supplement, Latin Extended-A, Greek, Cyrillic, Vietnamese & an assortment of symbols
Noto Serif:
normal: GEM_FONTS_DIR/notoserif-regular-subset.ttf
bold: GEM_FONTS_DIR/notoserif-bold-subset.ttf
italic: GEM_FONTS_DIR/notoserif-italic-subset.ttf
bold_italic: GEM_FONTS_DIR/notoserif-bold_italic-subset.ttf
# M+ 1mn supports ASCII and the circled numbers used for conums
M+ 1mn:
normal: GEM_FONTS_DIR/mplus1mn-regular-subset.ttf
bold: GEM_FONTS_DIR/mplus1mn-bold-subset.ttf
italic: GEM_FONTS_DIR/mplus1mn-italic-subset.ttf
bold_italic: GEM_FONTS_DIR/mplus1mn-bold_italic-subset.ttf
I don't have experience with the font settings so far, so I'm working on it.
@pela9 I just render the same file in Linux. The text inside tikz
diagrams works now :-) So I guess it's because I was using Windows.
Thanks for the tikz extension, works perfectly. I took me however some time to figure out some details in the setup. Some extra documentation will save time for future users.
preamble
option is excellent, but I found no documentation, I had to look in the sources to see how it worked.standalone
is used:\standaloneconfig{border=0pt}
. But again I had to read the ruby sources to figure this out. (Maybe this can also be a diagram option.)-a pdlflatex=/bin/lualatex
. This also seems worthwhile to document.