TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using this code to generate chemical structure with chemfig package:


enter image description here

I am not happy how chemfig makes connection, which is crossed with red. I need to have bond going from Nto first C atom, not to the second one.

How the code should be changed to avoid this problem.

share|improve this question
up vote 3 down vote accepted

Here is another idea: if you place each of the parentheses between braces ({(} and {)}) they are treated like an atom (i.e. like C or H) and you can use the optional argument of the bonds to determine where the bond arrives:

<bond>[<angle>,<length factor>,<departure atom>,<arrival atom>,<TikZ options>]

Where <departure atom> and<arrival atom> are the position numbers of the atoms where the bond should start or end, respectively.

In your case the following fragment (the rest of the MWE unchanged)



enter image description here

share|improve this answer

It can be done like this:

{$\left\delimleft\vrule height\delimhalfdim depth\delimhalfdim
{$\left.\vrule height\delimhalfdim depth\delimhalfdim

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.