2022 Developer Survey is open! Take survey.

# Tag Info

Accepted

### How can I draw a Lewis structure?

The length of the arm is set by a number after the angle of the arm: :angle,length. I used 0.6 for you. The style of the dots can be changed with the fourth argument of \setlewis. I didn't find a "...
• 67.4k
Accepted

### Simpler way to create chemical graphs using chemfig

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 ...
• 6,050
Accepted

### TeXstudio chemfig commands marked as unrecognized

Short answer: It's not in the .cwl file for some reason, you're gonna have to add it in manually. (I think(!) that's the only alternative. I'm happy to be proven wrong..) Long answer: The Why: ...
• 13.2k
Accepted

### Chemfig: length and angle of bonds

Something like this? MWE: \documentclass{article} \usepackage{chemfig} \begin{document} \chemfig{P(=[2,0.7]O)(-[:-30,0.8]C_{5}H_{11})(-[:150,0.8]C_{5}H_{11}O)(-[:210,0.8]C_{5}H_{11}O)} \end{document}...
• 120k
Accepted

### How to get Anki working with TikZ-based packages?

tl dr; Putting it all together Little background first Anki uses latex compiler to create .dvi intermediate documents from the input LaTeX code, which are then converted to .png bitmap image using ...
• 443

### How can I remove the space around chemfig figures?

You do not need at all the math mode for this: \documentclass{article} \usepackage{chemfig} \begin{document} \schemestart \chemleft[\subscheme{ \chemfig[][scale=.7]{-[:-30]=^[:30]-[2]=^[: 150]-[:-...
• 73k
Accepted

### Connect a 5-Ring to two 6-Rings in chemfig

The angles differ in case of rings with five and six corners. Therefore, the angles need to be specified manually. Trigonometric calculations using the regular/symmetric structure give the angles: \...
• 261k
Accepted

### Color functional groups in chemfig syntax

Relate to this post. \documentclass{article} \usepackage{chemfig} \begin{document} \def\RED{\gdef\printatom##1{\color{red}\ensuremath{\mathrm{##1}}}} \def\BLACK{\gdef\printatom##1{\color{...
• 35.4k
Accepted

### How to annotate chemfig drawing with circles and lines?

I was able to draw using \chemmove, remember picture and @{} syntax for naming atoms and links. \documentclass[varwidth,border=50]{standalone} \usepackage{tikz} \usepackage{chemfig} \begin{document} ...
• 22.3k

### Issue with cram bonds in chemfig

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 ...
• 131
Accepted

### How do you draw a dative bond with chemfig?

Use the TikZ parameter of the corresponding bond, i.e., the fifth parameter in the optional argument and specify an arrow according to TikZ syntax: \documentclass{article} \usepackage{chemfig} \...
• 64.2k
Accepted

### Move shaded polygon behind chemfig schemes

You could put it on a background layer, but why bother? Does it matter if it is behind? Or only that it looks as if it is behind? If the latter, what about the following? \documentclass{article} \...
• 183k

### Resonance structure of acetate

Probably something like this? \documentclass[ crop, border=5, tikz=true, multi={page}, 12pt ]{standalone} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsfonts} \...
• 2,535
Accepted

### Chemfig: set points at ends of bonds

You can set the distance between the dots in \lewis with the macro \setlewisdist. Note that this also affects the distance between the electrons above and below the O, but that is probably good in ...
• 29.6k
Accepted

### How I can write polymeric reaction in latex

I propose the following solution. I've made a number of changes: First of all I find your use of enumerate a bit strange. It looks like you want equation numbers for your reactions. If that's it then ...
• 64.2k
Accepted

### Problem with mesomeric effect in chemfig

Here is how to draw the 2 first arrows: \documentclass{article} \usepackage{chemfig} \begin{document} \chemfig{*6((-[@{a1}]H_2@{a2}\Lewis{26,N})=[@{r1}]-[@{r2}]=(-N=N-*6(=-=(-OH)-=-))-=-=)} \chemmove[...
• 6,050

### Easy way to write below arrow (\arrow{-U>}) in chemfig?

Here's an update on @runiq's extension to @clemens' code above (and partially an extension of my answer here), that is compatible with current versions of chemfig (as of 2017, v1.2e), for an all-...
• 13.2k
Accepted

### How to use chemfig for chemical reaction with skeletal forms

You had a syntax error with a final } bracket missing on the last compound. Apart from that to put a label on an arrow use the general form \arrow{->[up][down]} To colour atoms, use {\color{red}...
• 91.7k

### Using the mhchem and chemfig packages in conjunction

Bundling my comments into an answer: I wrote »There is no way to make chemfigs bonds all the same length. Quoting part II section 4 Length of a bond of chemfig's manual:« Rather than speaking of ...
• 64.2k
Accepted

### chemfig, how to do these wavy markings?

You might want to use the decoration complete sines from Nicer wavy line with TikZ as I've used in a blog post of mine a while ago: \documentclass{article} \usepackage{tikz} \usepackage{chemfig} \...
• 64.2k
Accepted

### Wall, molecules and drawing with tikz/chemfig

Here is a “chemfig only” idea: \documentclass{article} \usepackage{chemfig} \definesubmol{wallpart}{-[:-90,.5](-[:110,.5])} \definesubmol{wall}{!{wallpart}!{wallpart}!{wallpart}} \begin{document} \...
• 64.2k
Accepted

### How to align all the molecules, the + sign and arrow at the same level?

chemfig always places the first atom of the molecule on the baseline, so if you write \chemfig{O=[:-90](-[:-150]H)-[:-30]OH} the oxygen will be on the baseline. To put the carbon on the baseline it ...
• 1,437
Accepted

### How to draw an arenium ion with chemfig?

Here's an idea: \documentclass{article} \usepackage{chemfig} \begin{document} \chemfig{**[60,-240]6(-(-[:90,,,,draw=none]+)---(-[:60]R)(-[:120]H)--)} \end{document} Have a look at section Rings > ...
• 64.2k