asciidoctor-latex
asciidoctor-latex copied to clipboard
Doesn't convert my diagrams to LaTex compatible
This doesn't convert the plantuml and other supported by asciidoctor-diagram to proper Latex requirements.
Workaround is to transform diagram part into tikz after the conversion.
Are you saying that if you use Asciidoctor Diagram, it doesn't work with this converter? Does LaTeX handle plantuml diagrams?
I use Asciidoctor diagramto convert to pdf directly and works well, I didn't get a reference where LaTex handles plantuml directly but will have to use plantuml plugin tikz or similar in this tool to convert the plantUML and other stuff Asciidoctor diagram supports to LaTex compatible text like tikz,
But still if Plantuml script is supported in LaTex would be better but not sure if the discussion should be made here. e.g \usepackage{plantuml} \startuml User -> (Start) User --> (Use the application) : A small label :Main Admin: ---> (Use the application) : This is\nyet another\nlabel \enduml
Plantuml script
@startuml User -> (Start) User --> (Use the application) : A small label :Main Admin: ---> (Use the application) : This is\nyet another\nlabel @enduml
plantuml to tikz plugin command line is as below
java -jar plantuml.jar -tlatex test.plantuml
output tikz script which can be used in LaTex document
\documentclass{article}
\usepackage{tikz}
\usepackage{aeguill}
\begin{document}
% generated by Plantuml 8029
\definecolor{plantucolor0000}{RGB}{254,254,206}
\definecolor{plantucolor0001}{RGB}{168,0,54}
\begin{tikzpicture}[yscale=-1]
\draw[color=plantucolor0001,fill=plantucolor0000,line width=2.0pt] (21pt,164pt) ellipse (8pt and 8pt);
\draw[color=plantucolor0001,line width=2.0pt] (21pt,172pt) -- (21pt,199pt)(8pt,180pt) -- (34pt,180pt)(21pt,199pt) -- (8pt,214pt)(21pt,199pt) -- (34pt,214pt);
\node at (6.5pt,221pt)[below right]{User};
\draw[color=plantucolor0001,fill=plantucolor0000,line width=1.5pt] (130.2132pt,196.4517pt) ellipse (24.2132pt and 15.4517pt);
\node at (115.2132pt,187.2232pt)[below right]{Start};
\draw[color=plantucolor0001,fill=plantucolor0000,line width=1.5pt] (147.9182pt,334.8836pt) ellipse (77.4182pt and 17.8836pt);
\node at (87.9182pt,325.6551pt)[below right]{Use the application};
\draw[color=plantucolor0001,fill=plantucolor0000,line width=2.0pt] (224pt,18pt) ellipse (8pt and 8pt);
\draw[color=plantucolor0001,line width=2.0pt] (224pt,26pt) -- (224pt,53pt)(211pt,34pt) -- (237pt,34pt)(224pt,53pt) -- (211pt,68pt)(224pt,53pt) -- (237pt,68pt);
\node at (187.5pt,75pt)[below right]{Main Admin};
\draw[color=plantucolor0001,line width=1.0pt] (36.3281pt,196.5pt) ..controls (57.7822pt,196.5pt) and (79.2363pt,196.5pt) .. (100.6904pt,196.5pt);
\draw[color=plantucolor0001,fill=plantucolor0001,line width=1.0pt] (105.8502pt,196.5pt) -- (96.8502pt,192.5pt) -- (100.8502pt,196.5pt) -- (96.8502pt,200.5pt) -- (105.8502pt,196.5pt) -- cycle;
\draw[color=plantucolor0001,line width=1.0pt] (36.0673pt,213.694pt) ..controls (59.1133pt,238.464pt) and (103.1142pt,285.7566pt) .. (128.544pt,313.0883pt);
\draw[color=plantucolor0001,fill=plantucolor0001,line width=1.0pt] (132.156pt,316.971pt) -- (128.9532pt,307.6575pt) -- (128.7498pt,313.3107pt) -- (123.0966pt,313.1073pt) -- (132.156pt,316.971pt) -- cycle;
\node at (105pt,270pt)[below right]{A small label};
\draw[color=plantucolor0001,line width=1.0pt] (224.758pt,93.067pt) ..controls (224.116pt,141.745pt) and (218.188pt,223.763pt) .. (189pt,287pt) ..controls (184.476pt,296.8006pt) and (177.259pt,306.0953pt) .. (170.131pt,313.792pt);
\draw[color=plantucolor0001,fill=plantucolor0001,line width=1.0pt] (166.652pt,317.4372pt) -- (175.7595pt,313.6885pt) -- (170.1042pt,313.8203pt) -- (169.9725pt,308.165pt) -- (166.652pt,317.4372pt) -- cycle;
\node at (235.5pt,172pt)[below right]{This is};
\node at (222pt,188.3516pt)[below right]{yet another};
\node at (241pt,204.7031pt)[below right]{label};
\end{tikzpicture}
\end{document}