New answers tagged chemfig
2
I know Clemens loves \arrow{0} but his solution sounds complicated to me. Why don't you use \schemestart...\schemestop inside \chemname, which seems more natural?
\documentclass{article}
\usepackage{chemfig}
\begin{document}
\schemestart
\chemname{%
\schemestart
\chemfig{R-[:30](=[:90]O)-[:-30]R}
\arrow{0}[,.5]
...
2
If you place the first two compounds in a \subscheme{...} the whole subscheme gets a unique name that you can refer to in an arrow using the \arrow{@<name>--) syntax:
\documentclass{article}
\usepackage{chemfig}
\begin{document}
% uncomment to see the names:
% schemedebug{true}
\schemestart
\subscheme{
\chemfig{R-[:30](=[:90]O)-[:-30]R}
...
2
Since compounds are per default centered with respect to arrow in chemfig's schemes I usually use an invisible arrow (type 0) with length 0 (\arrow{0}[,0], the second optional argument scales the arrow relative to the basic length, the “compoundsep”) to center compounds:
\documentclass{article}
\usepackage{chemfig,chemmacros}
\begin{document}
...
6
I'll answer under the assumption that you're the one who emailed me the other day about Missing bond type in chemical rendering packages? and to whom I suggested the following definition of the submol {Rsubst}:
\tikzset{
subst/.style={shorten <= 10pt,preaction={draw=white,line width=6pt}}
}
\definesubmol{subst}{-[,-1,,,draw=none]-[::-30,1.5,,,subst]}
...
1
I believe the easiest way out is not to scale the scheme but to slightly rearrange it:
\documentclass{article}
\usepackage{chemfig}
\usepackage[version=3]{mhchem}
\usepackage{showframe}% show page layout
\begin{document}
\begin{figure}[ht]
\centering
\schemestart
\ce{O2^.-}\arrow (c1--c2){0}\ce{NO^.}
\merge{v}(c1)(c2)--(c3)\ce{ONOO-}
\arrow ...
0
The optional argument to the figure environment only deals with the allowed position of the float, it cannot contain scaling or other things.
Another way of reducing the size is to simply reduce the fontsize, by adding \scriptsize right after \begin{figure}.
You can also squeeze things together a bit with the optional argument to \schemestart, e.g. ...
1
Just put it in a \scalebox perhaps:
\documentclass{report}
\usepackage{chemfig}
\usepackage{graphicx}
\usepackage[version=3]{mhchem}
\begin{document}
\begin{figure}[width=.9\textwidth]
\scalebox{.6}{
\schemestart
\ce{O2^.-}\arrow (c1--c2){0}\ce{NO^.}\merge{v}(c1)(c2)--(c3)\ce{ONOO-}
\arrow (--c4){<=>[*{0}\parbox{1.2cm}{\ce{+ H+}\\ pK 6.6}][*{0}\ce{- ...
2
chemfig does not provide curved arrows. It is possible to define something with \definearrow - the documentation gives an example. This is not comfortable to use and is only part of what your scheme has: combined curved arrows.
It is probably possible to define such arrows, too, but I don't believe that they're any more comfortable to use. I would try to ...
7
\centerline{ isn't really a latex command (it is in the latex format but just escaped from plain TeX). It makes a box \hsize wide but does not know about latex list structures and the indentation they introduce. So you line is too wide by 25pt which will be the left margin of the list item. Just remove \centerline and replace it with a ...
4
You could place the arrow's label's contents in a \parbox:
\documentclass{article}
\usepackage{chemfig}
\begin{document}
\schemestart
A \arrow{->[\parbox{5cm}{\centering a\\b}][c]} B
\schemestop
\end{document}
or for convenience define a command:
\documentclass{article}
\usepackage{chemfig}
\makeatletter
...
1
You're looking for \chemabove{<atom>}{<above>}:
\documentclass{article}
\usepackage{chemfig}
\begin{document}
\chemfig{R^1-[:30]\chemabove{N}{H}-[:-30]R^2}
\end{document}
Just for the record: there's also \chembelow{<atom>}{<below>}. I've described them in a little more detail in my answer to “Changing space between atoms in ...
3
Solution
Reordering the load order will solve this issue: Gonzalo's answer demonstrates this nicely.
Underlying cause
The underlying problem here is how the file easy.sty does its allocation of registers:
%
% define dimens for internal computation.
%
\@tempcnta=30\relax
\@whilenum\@tempcnta>\z@\do{%
\expandafter\global\expandafter\newdimen\csname ...
5
There seems to be some problem with chemfig and easytable; loading chemfig after easytable solves the problem (I commented out the line loading the morehelp package, since my LaTeX system doesn't have it):
\documentclass[12pt,doublespacing,letterpaper]{report}
\usepackage{etex}
\usepackage{cite}
%\usepackage{morehelp}
\usepackage{setspace}
...
5
All of chemfig's bonds have optional arguments which accept the following input:
<bond symb>[<angle spec>,<length factor>,<dpt atom>,<arr atom>,<tikz spec>]
The third, <dpt atom>, and fourth ,<arr atom>, are the important ones here: they specify from which atom of a group of atoms the bond departs and at ...
1
Turning my comment into an answer (just to remove this question from the unanswered ones):
As always when you want to use square brackets in an optional argument you have to enclose the argument in an extra pair of braces. There are quite a number of questions related to this fact:
LaTeX: optional arguments with square brackets
] inside an optional ...
Top 50 recent answers are included