Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom sprites not working with -tlatex option #33

Open
skyfrk opened this issue Nov 14, 2019 · 4 comments
Open

Custom sprites not working with -tlatex option #33

skyfrk opened this issue Nov 14, 2019 · 4 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@skyfrk
Copy link

skyfrk commented Nov 14, 2019

When I render this example with the VSCode plantuml plugin it works:

Source:

@startuml

!define AzurePuml https://raw.githubusercontent.com/RicardoNiepel/Azure-PlantUML/release/2-1/dist
!includeurl AzurePuml/AzureCommon.puml
!includeurl AzurePuml/Analytics/AzureEventHub.puml
!includeurl AzurePuml/Analytics/AzureStreamAnalytics.puml
!includeurl AzurePuml/Databases/AzureCosmosDb.puml

left to right direction

agent "Device Simulator" as devices #fff

AzureEventHub(fareDataEventHub, "Fare Data", "PK: Medallion HackLicense VendorId; 3 TUs")
AzureEventHub(tripDataEventHub, "Trip Data", "PK: Medallion HackLicense VendorId; 3 TUs")
AzureStreamAnalytics(streamAnalytics, "Stream Processing", "6 SUs")
AzureCosmosDb(outputCosmosDb, "Output Database", "1,000 RUs")

devices --> fareDataEventHub
devices --> tripDataEventHub
fareDataEventHub --> streamAnalytics
tripDataEventHub --> streamAnalytics
streamAnalytics --> outputCosmosDb

@enduml

Rendered:
image

If the -tlatex:nopreamble is specified rendering it creates this .latex file:

% generated by Plantuml 1.2019.08      
\definecolor{plantucolor0000}{RGB}{255,255,255}
\definecolor{plantucolor0001}{RGB}{168,0,54}
\definecolor{plantucolor0002}{RGB}{0,0,0}
\definecolor{plantucolor0003}{RGB}{60,127,192}
\definecolor{plantucolor0004}{RGB}{102,102,102}
\begin{tikzpicture}[yscale=-1
,pstyle1/.style={color=plantucolor0003,fill=white,line width=1.5pt}
,pstyle2/.style={color=plantucolor0004,line width=1.0pt}
,pstyle3/.style={color=plantucolor0004,fill=plantucolor0004,line width=1.0pt}
]
\draw[color=plantucolor0001,fill=white,line width=1.5pt] (6pt,163pt) rectangle (139.2247pt,200.7461pt);
\node at (16pt,173pt)[below right,color=black]{Device Simulator};
\draw[pstyle1] (199pt,8pt) rectangle (384.0761pt,163.9141pt);
\node at (240.1017pt,18pt)[below right,color=black]{\textit{\guillemotleft AzureEventHub\guillemotright }};
\node at (251.7969pt,33.2109pt)[below right,color=black]{\textbf{Fare Data}};
\node at (257.538pt,53.4922pt)[below right]{{null}};
\node at (209pt,123.4922pt)[below right,color=black]{\textit{[PK: Medallion HackLicense }};
\node at (240.8323pt,138.7031pt)[below right,color=black]{\textit{VendorId; 3 TUs]}};
\draw[pstyle1] (199pt,199pt) rectangle (384.0761pt,354.9141pt);
\node at (240.1017pt,209pt)[below right,color=black]{\textit{\guillemotleft AzureEventHub\guillemotright }};
\node at (253.3688pt,224.2109pt)[below right,color=black]{\textbf{Trip Data}};
\node at (257.538pt,244.4922pt)[below right]{{null}};
\node at (209pt,314.4922pt)[below right,color=black]{\textit{[PK: Medallion HackLicense }};
\node at (240.8323pt,329.7031pt)[below right,color=black]{\textit{VendorId; 3 TUs]}};
\draw[pstyle1] (444pt,118.5pt) rectangle (611.7032pt,245.2031pt);
\node at (459.0875pt,128.5pt)[below right,color=black]{\textit{\guillemotleft AzureStreamAnalytics\guillemotright }};
\node at (454pt,143.7109pt)[below right,color=black]{\textbf{Stream Processing}};
\node at (492.8516pt,163.9922pt)[below right]{{null}};
\node at (506.1569pt,219.9922pt)[below right,color=black]{\textit{[6 SUs]}};
\draw[pstyle1] (672pt,111.5pt) rectangle (827.1158pt,252.2031pt);
\node at (695.0728pt,121.5pt)[below right,color=black]{\textit{\guillemotleft AzureCosmosDb\guillemotright }};
\node at (682pt,136.7109pt)[below right,color=black]{\textbf{Output Database}};
\node at (714.5579pt,156.9922pt)[below right]{{null}};
\node at (714.5579pt,226.9922pt)[below right,color=black]{\textit{[1,000 RUs]}};
\draw[pstyle2] (116.632pt,162.919pt) ..controls (138.832pt,153.098pt) and (166.852pt,140.701pt) .. (193.878pt,128.745pt);
\draw[pstyle3] (198.557pt,126.675pt) -- (188.7082pt,126.659pt) -- (193.9846pt,128.6983pt) -- (191.9454pt,133.9748pt) -- (198.557pt,126.675pt) -- cycle;
\draw[pstyle2] (117.152pt,201.11pt) ..controls (139.381pt,210.842pt) and (167.347pt,223.085pt) .. (194.289pt,234.88pt);
\draw[pstyle3] (198.953pt,236.922pt) -- (192.3107pt,229.6501pt) -- (194.3722pt,234.918pt) -- (189.1043pt,236.9794pt) -- (198.953pt,236.922pt) -- cycle;
\draw[pstyle2] (384.171pt,123.529pt) ..controls (402.136pt,130.883pt) and (420.944pt,138.582pt) .. (438.793pt,145.889pt);
\draw[pstyle3] (443.8pt,147.939pt) -- (436.9864pt,140.8274pt) -- (439.1727pt,146.0447pt) -- (433.9555pt,148.231pt) -- (443.8pt,147.939pt) -- cycle;
\draw[pstyle2] (384.171pt,239.862pt) ..controls (402.136pt,232.584pt) and (420.944pt,224.965pt) .. (438.793pt,217.734pt);
\draw[pstyle3] (443.8pt,215.706pt) -- (433.9566pt,215.3774pt) -- (439.1657pt,217.5831pt) -- (436.96pt,222.7922pt) -- (443.8pt,215.706pt) -- cycle;
\draw[pstyle2] (612.297pt,182pt) ..controls (629.992pt,182pt) and (648.663pt,182pt) .. (666.316pt,182pt);
\draw[pstyle3] (671.76pt,182pt) -- (662.76pt,178pt) -- (666.76pt,182pt) -- (662.76pt,186pt) -- (671.76pt,182pt) -- cycle;
\end{tikzpicture}

Which looks like this if compiled with Lualatex:
image

Instead of the icons it displays null. I guess that custom sprites are not being translated to a tikz image?

@pablojimpas
Copy link

I'm facing the same issue compiling with pdfLatex but I don't see null, just a blank space.

What's holding back this feature? What work needs to be done to achieve this?

@arnaudroques
Copy link
Contributor

Well, it would really help if you could tell us about possible options to use PNG image within a LaTeX file :-)

@pablojimpas
Copy link

Well, it would really help if you could tell us about possible options to use PNG image within a LaTeX file :-)

I ended up using EPS output but this is a legit issue anyways, at least it shouldn't fail silently.

@arnaudroques arnaudroques added question Further information is requested enhancement New feature or request labels Mar 20, 2023
@arnaudroques
Copy link
Contributor

We still are looking for some way to use PNG images with TikZ.

@arnaudroques arnaudroques transferred this issue from plantuml/plantuml Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants