Skip to content

Instantly share code, notes, and snippets.

@dginev
Last active March 13, 2020 19:24
Show Gist options
  • Save dginev/fdec2fe71131eb1215cd96501a612111 to your computer and use it in GitHub Desktop.
Save dginev/fdec2fe71131eb1215cd96501a612111 to your computer and use it in GitHub Desktop.
An example of a computational stress test for LaTeXML's tikz support
% source: arXiv 1002.3757
\documentclass{article}
\usepackage{tikz}
\newcommand\dw[2]{\draw[#1!#2,fill=#1!#2]}
\begin{document}
\begin{tikzpicture}
\def\LL{10}
\pgfmathsetmacro{\LLQ}{200/(\LL*\LL)}
\def\list{0,.2,...,\LL}
\foreach \x in \list {
\foreach \y in \list {
\pgfmathsetmacro{\d}{(\LLQ*(\LL*(\x + \y) - \x*\x - \y*\y))}
\dw{black}{\d} (\x, \y) +(-.1, -.1) rectangle ++(.1, .1);
}
}
\end{tikzpicture}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment