Math & Science ⇒ Chemistry Textbooks and LaTeX
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Chemistry Textbooks and LaTeX
There is a textbook called "Exploring Chemical Analysis" from Daniel C. Harris 4th edition and as I was browsing through the textbook, I find it quite interesting how they made their chemical equations so extraordinarly organized. For example for anyone who has this textbook or any other textbook of the like, look at the acids and bases section. It's brilliant.
How can I find LaTeX code or templates such as this textbook or in general any general chemistry highschool/first year textbooks.
How can I find LaTeX code or templates such as this textbook or in general any general chemistry highschool/first year textbooks.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Chemistry Textbooks and LaTeX
I can't recognize any real question here. What are you after? If it's about typesetting chemical structures and reaction schemes, take a look at chemfig and chemmacros.
Thorsten
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Chemistry Textbooks and LaTeX
I very much doubt that there are ready made LaTeX templates. However, if you showed us a picture of a concrete example I'm sure someone'll be able to help you.ghostanime2001 wrote:For example for anyone who has this textbook or any other textbook of the like, look at the acids and bases section. It's brilliant.
How can I find LaTeX code or templates such as this textbook or in general any general chemistry highschool/first year textbooks.
Regards
site moderator & package author
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Re: Chemistry Textbooks and LaTeX
A sample picture is attached.
- Attachments
-
- titration.png (17.51 KiB) Viewed 11035 times
Last edited by localghost on Mon Aug 06, 2012 11:19 am, edited 1 time in total.
Reason: Preferably no external links (see Board Rules). Attachments go onto the forum server where possible.
Reason: Preferably no external links (see Board Rules). Attachments go onto the forum server where possible.
Chemistry Textbooks and LaTeX
Easy to build:
And the result:
Code: Select all
\documentclass{article}
\usepackage{chemfig}
\usepackage[a4paper]{geometry}
\begin{document}
\setatomsep{2.5em}\setandsign{1pt,1pt}\setarrowoffset{3pt}
\schemestart
5\chemname{\chemfig{HO-C(=[2]O)-C(=[2]O)-OH}}{\textbf{Analyte}\\Oxalic acid\\(colorless)}
\+
\chemname{{\color{cyan}\chemfig{2MnO_4^{-}}}}{\textbf{Titrant}\\Permanganate\\{\color{cyan}Purple}}
\+
\chemfig{6H^+}
\arrow(.mid east--.mid west)
\chemname{\chemfig{10CO_2}}{\strut\\\strut\\(colorless)}
\+
\chemname{\chemfig{2Mn^{2+}}}{\strut\\\strut\\(colorless)}
\+
\chemfig{8H_2O}
\schemestop
\end{document}
-
- Posts: 402
- Joined: Fri May 20, 2011 9:41 am
Re: Chemistry Textbooks and LaTeX
How can I the "cleanliness" as in the picture in post #4 ? for example, the little space between the double bond and the atom ?
Re: Chemistry Textbooks and LaTeX
Sorry, I don't understand.
Could you explain what is wrong for you in my picture and what you expect?
Could you explain what is wrong for you in my picture and what you expect?
Chemistry Textbooks and LaTeX
Hello everyone,
My first thought on seeing ghostanime2001's post was "chemfig can do that!". I am not sure what the op means about the 'cleanliness' between the two examples, but I can see a few places where the chemfig output is different:
My first thought on seeing ghostanime2001's post was "chemfig can do that!". I am not sure what the op means about the 'cleanliness' between the two examples, but I can see a few places where the chemfig output is different:
- 1. The alignment of the double bonds is somewhat 'off'. While the bonds are actually exactly centered on the atom, this alignment is visually unaesthetic (if I may say so). The double bonds in the textbook example seem slightly to the left but look better (This may be specific to the letter C).
2. The alignment of the positive sign on 6H is not consistent with the negative sign on 2MnO4 (+ appears lower). This not only jarrs with the - sign but also with the top of H.
Last edited by niteshs on Wed Aug 08, 2012 1:04 am, edited 1 time in total.
Chemistry Textbooks and LaTeX
Please, do not criticize without even compiling and seing the result by yourself!niteshs wrote:The alignment of the double bonds is somewhat 'off'. While the bonds are actually exactly centered on the atom, this alignment is visually unaesthetic (if I may say so). The double bonds in the textbook example seem slightly to the left but look better (This may be specific to the letter C).
The "off" alignment is just an artefact of the capture. Proof on this zoom:
This has nothing to see with chemfig. What you thing "not consistent" is a TeX feature. Could you compare the the placement of the expononent "+" between $O^+$ and $O^+_4$ and see what happens by yourself?niteshs wrote:The alignment of the positive sign on 6H is not consistent with the negative sign on 2MnO4 (+ appears lower). This not only jarrs with the - sign but also with the top of H.
There is no issue in what you said.niteshs wrote:I am hoping that chemfig will take care of these minor alignment issues in the future.
Chemistry Textbooks and LaTeX
Thanks for clarifying the situation with the double bonds, unbonpetit.
I am aware that the position of the positive sign is by design. However, I must maintain that it looks better in the "textbook example".
Once again, I understand that everything is as intended by chemfig (hence my quotes around the words: off and improved), and the preference is probably very much in the eye of the beholder as they say.

I am aware that the position of the positive sign is by design. However, I must maintain that it looks better in the "textbook example".
Once again, I understand that everything is as intended by chemfig (hence my quotes around the words: off and improved), and the preference is probably very much in the eye of the beholder as they say.