2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-19 11:38:05 +02:00

added chemistry example

This commit is contained in:
Martin Thoma 2012-09-27 22:06:11 +02:00
parent fdb29b3846
commit fdbee981f3
2 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,32 @@
SOURCE = chemistry-example
DELAY = 80
DENSITY = 300
WIDTH = 500
make:
pdflatex $(SOURCE).tex -output-format=pdf
make clean
clean:
rm -rf $(TARGET) *.class *.html *.log *.aux
gif:
pdfcrop $(SOURCE).pdf
convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif
make clean
png:
make
make svg
inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png
transparentGif:
convert $(SOURCE).pdf -transparent white result.gif
make clean
svg:
make
#inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg
pdf2svg $(SOURCE).pdf $(SOURCE).svg
# Necessary, as pdf2svg does not always create valid svgs:
inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg

View file

@ -0,0 +1,17 @@
\documentclass[varwidth=true, border=2pt]{standalone}
\usepackage{chemfig,chemmacros}
% Source: http://www.latex-community.org/know-how/latex/51-latex-math-science/434-chemistry-molecules
% See Source for explanations
\begin{document}
\begin{center}
\small\setatomsep{1.5em}
\schemestart
\chemfig{*6(=-=(-(=[2]O)-[::-60]O-[0]O-[::30](=[2]O)-[::-60]*6(=-=-=-))-=-)}
\arrow{->[$\Delta$]}
2 \chemfig{*6(=-=(-(=[2]O)-[::-60]\lewis{0.,O})-=-)}
\arrow
2 \chemfig{*6(=-=(-[,.15,,,draw=none]\lewis{0.,})-=-)}\+\ch{2 CO2 ^}
\schemestop
\end{center}
\end{document}