Snippet Testing


Site index page
Site Settings page

Testing a runlatex JavaScript Parameterised as requested by Stefan for his forum sites. This drops the Overleaf link, just posting to TeXLive.net and supports adding a guessed default preamble to fragments that have no \documentclass or % !TEX ... ??tex comment.

full doc

  \documentclass{article}
 
  \usepackage{graphicx}
  \begin{document}
  
 something  \includegraphics[height=1cm]{example-image}

  \end{document}

snippet (graphics)

something \includegraphics[height=1cm]{example-image}

snippet (math)

  something \includegraphics[height=1cm]{example-image}

  something
  \begin{align}
  x+y&=1\\
  y&=2
  \end{align}

snippet (tikz)

\tikz \draw[thick,rounded corners=8pt]
(0,0) -- (0,2) -- (1,3.25) -- (2,2) -- (2,0) -- (0,2) -- (2,2) -- (0,0) -- (2,0);

default latex (for pstricks)

An example from texwelt.de.

\documentclass[a4paper]{scrartcl}

\usepackage{pstricks} 
\usepackage{pstricks-add} 
\usepackage[scale=1]{geometry}

\begin{document}

\begin{pspicture}[linecolor=red,linewidth=5pt](0,5)(0,0) 
\pscurve[showpoints=false](4.6,5.1)(3.9,3)(2.8,1.5)(1,0.3)(-0.05,-0.1) 
\end{pspicture}

\begin{pspicture}[linecolor=blue,linewidth=5pt](0,-1)(0,0) 
\pscurve[showpoints=false](3.7,5.05)(3.2,3)(2.4,1.3)(1,-0.4)(0,-1.2) 
\end{pspicture}

\end{document}

default lualatex (for \directlua)

An example from learn LaTeX.

\documentclass{article}

\begin{document}

$ 2\pi \approx \directlua{ tex.print(2 * math.pi) } $

\end{document}

Editor but no texlive button

# !TEX none

# Editable bash script
export TEXINPUTS=zzzz
export PATH=somewhere

Raw pre, no editing

/* !TEX noedit
*/

void noneEditC(int x);