-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: replace example for LaTeX to PNG conversion
We might need to use `tikz` package to draw some figures such as graphs, and this example would be help me discover that feature later.
- Loading branch information
Showing
1 changed file
with
22 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,24 @@ | ||
\documentclass[preview, convert={density=300,outext=.png}]{standalone} | ||
\documentclass[preview, convert={density=600,outext=.png}]{standalone} | ||
\usepackage{tikz} | ||
\begin{document} | ||
Hello. This is a test. | ||
\begin{equation} | ||
L = 2 | ||
\end{equation} | ||
\begin{tikzpicture} | ||
\tikzset{enclosed/.style={draw, circle, inner sep=0pt, minimum size=.15cm, fill=black}} | ||
|
||
\node[enclosed, label={left, yshift=.2cm: E}] (E) at (0.75,3.25) {}; | ||
\node[enclosed, label={above, xshift=.2cm: H}] (H) at (3,4) {}; | ||
\node[enclosed, label={right, yshift=0cm: B}] (B) at (4.5,2) {}; | ||
\node[enclosed, label={below, xshift=.2cm: M}] (M) at (3,0) {}; | ||
\node[enclosed, label={left, yshift=-.2cm: L}] (L) at (0.75,0.75) {}; | ||
|
||
\draw (E) -- (H) node[midway, sloped, above] (edge1) { $\infty$}; | ||
\draw (H) -- (B) node[midway, right] (edge2) {288}; | ||
\draw (B) -- (M) node[midway, right] (edge3) {585}; | ||
\draw (L) -- (M) node[midway, below] (edge4) {$\infty$}; | ||
\draw (E) -- (L) node[midway, left] (edge5) {640}; | ||
\draw (E) -- (B) node[midway, above] (edge6) {$\infty$}; | ||
\draw (E) -- (M) node[midway, left] (edge7) {$\infty$}; | ||
\draw (L) -- (H) node[midway, left] (edge8) {$\infty$}; | ||
\draw (L) -- (B) node[midway, below] (edge9) {$\infty$}; | ||
\draw (H) -- (M) node[midway, right] (edge10) {775}; | ||
\end{tikzpicture} | ||
\end{document} |