Tag Info

New answers tagged

3

You can locally redefine \printatom in order to force atom depths to 0pt: \documentclass{article} \usepackage{chemfig} \setatomsep{1.5em} \begin{document} something \( \renewcommand\printatom[1]{\setbox0=\hbox{\ensuremath{\mathrm{#1}}}\dp0=0pt \box0 } \chemfig{CH_3-*6(-=-(-CH_2-*6(-=-(-CH_2-*6(-=-(-CH_3)=-=))=-=))=-=)} \) something \end{document}


0

I have a successful attempt, but it is not elegant enough. Code: \documentclass{article} \usepackage{chemfig} \setatomsep{1.5em} \newcommand{\vr}{{\tikz \draw[draw=none] (0,0) rectangle (0,\dimexpr\fontcharht\font`A);}} \begin{document} something \( \chemfig*{CH_3|\vr-*6(-=-(-CH_2|\vr-*6(-=-(-CH_2|\vr-*6(-=-(-CH_3)=-=))=-=))=-=)} \) something ...


2

First of all please avoid using $$ ... $$ in a LaTeX document. See Why is \[ ... \] preferable to $$ ... $$? for reasons why. You need to understand that the first atom in a chemfig formula determines the baseline of the formula. If you know this you'll see that the first atom of the first benzene (which is just a point: the left-most edge) aligns with the ...


2

If you need to typeset chemical equations, then I suggest using the mhchem package. The chemfig package is intended more for drawing two-dimensional chemical figures. \documentclass{article} \usepackage[version=3]{mhchem} \begin{document} \ce{2NaClO {=} 2NaCl + O2 ^} \ce{CH3CHO + 2Ag(NH3)2OH -> CH3COONH4 + 2Ag v + 3NH3 ^ + H2O} \end{document} ...


3

You can use any software able to export in smiles format or MDL molfile format. That done, you can use the mol2chemfig package to convert it to a chemfig command. I also want to point the excellent moltochemfig site in which you can draw a molecule whith your mouse, convert it to mol format and then to chemfig command. For example, in a few seconds, I draw ...


4

Disclaimer: I did not know how to solve this myself when I asked the question, but managed to figure it out almost immediately after asking it. The author of chemfig said he did not speak English well enough to participate in the previous issue that was similar to this, and the correspondence was written in French. Although I'm Canadian, my French is ...



Top 50 recent answers are included