Skip to content

TikZJax not rendering #3069

Oct 22, 2024 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

Thanks! That seems to work! I threw together a macro as a proof of concept.

macro tikz_str(input, height)
	base = """
	<head>
		<link rel="stylesheet" type="text/css" href="https://tikzjax.com/v1/fonts.css">
		<script src="https://tikzjax.com/v1/tikzjax.js"></script>
	</head>
	<body>
	<script type="text/tikz">
		$input
	</script>
	</body>
	"""
	return @htl("""
          <iframe srcdoc='
          $base
          ' width=100% height=$height></iframe>
          """)
end

tikz"""
\huge
\begin{tikzcd}
	A \arrow[r, "\phi"] \arrow[d, red]
	  & B \arrow[d, "\psi" red] \\
	C \arrow[r, red, "\eta" blue]
	  & |[blue, rotate=-15]| D
\end{tikzcd}
"""200

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@AwesomeQuest
Comment options

Answer selected by AwesomeQuest
@fonsp
Comment options

Comment options

You must be logged in to vote
1 reply
@fonsp
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants