snippet latexpic
This commit is contained in:
parent
084106bbd5
commit
cc34de45df
30
latexpic
Executable file
30
latexpic
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
color=$1
|
||||
input=$2
|
||||
|
||||
outpdf="/tmp/latexpic.pdf"
|
||||
outpng="/tmp/latexpic.png"
|
||||
|
||||
cat <<EOF | pdflatex --output-directory /tmp --jobname latexpic --
|
||||
\documentclass[12pt,varwidth]{standalone}
|
||||
|
||||
\usepackage[ngerman]{babel}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage{xcolor}
|
||||
\usepackage{pagecolor}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{amssymb}
|
||||
\usepackage{graphicx}
|
||||
|
||||
\color{$1}
|
||||
|
||||
\begin{document}
|
||||
$input
|
||||
\end{document}
|
||||
EOF
|
||||
|
||||
convert -density 600 "$outpdf" -quality 90 "$outpng"
|
||||
xdg-open "$outpng"
|
Loading…
Reference in New Issue
Block a user