Hot answers tagged

6

Here is a “chemfig only” idea: \documentclass{article} \usepackage{chemfig} \definesubmol{wallpart}{-[:-90,.5](-[:110,.5])} \definesubmol{wall}{!{wallpart}!{wallpart}!{wallpart}} \begin{document} \chemfig{ !{wall} (-[:0]**6(---(-CH_3)---)) !{wall} } \end{document} As far as I know the size of the circle (relative to the size of the ring) is ...


6

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 > Angular Position for the arc inside the ring and section Customization of bonds (for draw=none) of chemfig's manual.


5

The package siunitx works very well, so I would use it: \SI{1.819}{\angstrom}. To change what you call the arrow style you can just make the line to start from one of the several anchors that TikZ automatically defines when you draw a node. To access them use the syntax <node_name>.anchor where anchor can be south, east, west, north and center (in ...


5

Citing chemfig's manual ChemFig always places the first atom of the molecule on the baseline of the preceding code. This means that the first atom in a molecule determines the baseline of the whole molecule. A solution in this case it is rather easy: add an invisible bond upwards before the “wall” (i.e. three bonds scaled by .5 going down (the angle ...


5

Update As clemens mentions in a comment, from v1.2 2015-10-08 \setarrowdefault{,,,<arrow tip>} is possible: \documentclass{article} \usepackage{chemfig} \usetikzlibrary{arrows.meta} \begin{document} \setarrowdefault{,,,-Stealth} \schemestart A\arrow B\arrow{<-} C\arrow{<->}[,,red] D\arrow{-/>}[45,2,thick] E \schemestop ...


5

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 has to be the first atom: \chemfig{(-[:-150]H)(=[:90]O)-[:-30]OH} In other words, you must start from the atom you want to be on the baseline and treat the ...


5

I couldn't trace the cause for the change, but the problem is in your code and not in chemfig. The macro \CF@atom@sep expands to 3em, unless \setatomsep is issued. What happens is that, with previous versions of TikZ/PGF, your segment length=\the\dimexpr\csname CF@atom@sep\endcsname/5\relax was evaluated when the current font was the standard text font; ...


5

I'm not sure why you want to typeset the reactions with chemfig. It is an excellent package for drawing skeletal formulae of organic compounds. However, the reactions in your example are much easier typeset with mhchem or chemformula. The latter is loaded by chemmacros so you already have it available. \documentclass{memoir} \usepackage[utf8]{inputenc} ...


5

No need the extra package since chembove can stack stuff. \documentclass{article} \usepackage{chemfig} \begin{document} \chemfig{A-\chemabove[0pt]{\Lewis{4.,\vphantom o}}{\scriptstyle+}O-B} \end{document} EDIT: Still no need of extra package like "stackengine" or extra complicated macro. Lewis and chemabove can do the job: \documentclass{article} ...


5

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} \usetikzlibrary{decorations.pathmorphing} \pgfdeclaredecoration{complete sines}{initial}{ \state{initial}[ width=+0pt, next state=sine, persistent ...


4

Use \Chembelow (upper case!) instead of \chembelow. From the manual (emphasis by me): The macro[...] \chembelow[<dim>]{<code>}{<stuff>} place[s] the <stuff> [...] below the <code> [...] without changing the bounding box of <code>. The uppercase version on the other hand does extend the bounding box. (\lewis ...


4

Only after I had the code finished I realised that your code shows something different than the picture. But the alignment idea should work nonetheless. As you might know chemfig allows to add anchor names in compounds using the @{<name>} syntax which can be referred to in \chemmove for example, but also in arrows \arrow(@<name>--). The code ...


4

Chemfig documentation has an example, in French, about making a customized lewis macro accepting an arbitrary angle in degrees. I am reproducing it irresponsibly translated to English. (I am a native Brazilian Portuguese speaker, so I don't master neither English nor French). This example appeared on page 45 (46th page as there is a cover): \example*{Pairs ...


4

The overall structure is a simple table, so a tabular should do fine \begin{tabular}{llll} \chemfig{...} & ... \\ Myoglobin & ... \\ Fleischfarbe \\ purpurrot & ... \end{tabular} As for the chemical formulas: using the bonds optional parameters they are quite easy with chemfig. Here is an example for one of the structures: ...


4

You can use the uppercase version \Chembelow (there's also \Chemabove) to extend the bounding box of the molecule: $\underbrace{ \chemfig{*6(-\Chembelow{N}{H}-(=O)--\chemabove{N}{H}-(=O)-)} }_{\textnormal{glycine anhydride}}$ BTW: you can use chemfig's tools and avoid mathmode completely: \schemestart[-90] \chemup. ...


4

Ignoring the chemically incorrect structure of my 1st example, one can nonetheless use a stack to do what you ask. This question also seems related: Draw Lewis structures like a book EDITED to achieve vertical spacing more in line with OP's desire, and to place code in the macro \cation. \documentclass{article} \usepackage{chemfig,stackengine} % ORIGINAL ...


4

Another approach: \documentclass{article} \usepackage{chemfig} \begin{document} \schemestart[0,1.5,thick] \chemfig{**6(------)} \arrow{0}[,0] \+ \chemfig{E} \arrow(--.base west) \chemfig[yshift=\the\dimexpr-1.5em\relax]{**[60,-240]6(----(-[:135]H)(-[:45]E)--)(-[:30,,,,draw=none]+)} \schemestop \end{document} EDIT Here is 3 ...


3

An easy way is to split up the schemes. Since the two rings are the same size and drawn from the same starting atom, the centers will be aligned. I've also made use of the \+ command: \documentclass{article} \usepackage{chemfig} \begin{document} \schemestart[0, 1.5, thick] \chemfig{**6(------)} \arrow{0}[,0]% used for alignment \+{5mm,5mm} ...


3

You have several errors in your code: the \chemfig formulae are both missing a closing ) to end the ring. \beta and \delta must be placed in math mode. \text is undefined; you need to load amsmath or amstext. \documentclass{article} \usepackage{chemfig,amsmath} \begin{document} \schemestart \chemname ...


3

Use invisible bond: \documentclass{article} \usepackage{chemfig} \begin{document} \chemfig{-[:30](=[::+60]O)-[:-30]-[:30](-[:-90,0.2,,,draw=none]\scriptstyle\oplus)(-[:90])-[:-30]N(-[:-90]H)-[:30]OH} \end{document}


3

This feature is not hard coded in chemfig but with decorations, it becomes easy: \documentclass{article} \usepackage{chemfig} \usetikzlibrary{decorations.markings} \makeatletter \tikzset{clrdbl/.style args={#1 and #2}{% draw=none,% decoration={% markings,% mark=at position 0 with {\coordinate (CFstart@) at (0,0);}, ...


3

I'm sure there is a more elegant way, but a crude approach is to calculate the difference in width between each of the smaller left compounds (the first two) and the largest (the last) and add that as \hspace before the start of the smaller reactions. Showing each step: \documentclass[a4paper,pdftex,ngerman,12pt]{article} \usepackage{chemfig} ...


3

Here is something to get you started, based upon the Porphyrin example from the gallery in chemfig's manual: \documentclass{article} \usepackage{chemfig} \begin{document} \chemfig{ a-?[a]=[::+63]*5( -N?[b]=( -(-[::63]d)=[::-54]*5( -N?[c]-( =(-[::63]g)-[::-54]*5( =N?[d]-( =(-[::63]j)-[::-54]*5( ...


3

Hi, if you don´t wont to make double compilation, I draw a Ferrocene Methanol molecule with \chemfig and \tikz that requieres only one compilation. Here is the code. Regards. \documentclass{article} \usepackage{chemfig,xstring} \usepackage{tikz} \usetikzlibrary{shapes,shadows,arrows,positioning,graphs} \begin{document} \begin{tikzpicture} %Lineas de ...


3

Remove the \ce command, that will fix the links. The arrow is done with the command \arrow. Also remember to enclose it between \schemestart and \schemestop. Output Code \documentclass[11pt]{article} \usepackage[version=4]{mhchem} \usepackage{chemfig} \begin{document} \schemestart \chemfig{CH_3}\chemfig{CH(-[2]OH)}\chemfig{CH_3} + HI \arrow(.mid ...


3

As the manual mentions textmath will make all text math subject to previews. Since math mode is used throughly inside of LaTeX even for other purposes, this works by redefining \(, \) and $ and the math environment (apparently some people use that). Only occurences of these text math delimiters in later loaded packages and in the main document will ...


3

Compounds inside \schemestart and \schemestop are tikz nodes with names you can refer to. chemfig names them c1, c2, … but you can also give them own names. You can use this in \chemdraw to place the minus: \documentclass{article} \usepackage{chemfig} \usetikzlibrary{calc} \begin{document} \begin{center} \schemestart \chemleft[ ...


3

A name can be put below a molecule with \chemname{<molecule>}{<name>}. In a scheme everything between different \arrows is consideres as one compound and the arrow is centered to the whole structure. This can be made visible with \schemedebug{true}: So one possibility is to put invisible arrows of zero length (\arrow{0}[,0]) in between: ...


3

Here it is. chemfig basically works like Tikz. You can set nodes and use those nodes to draw arrows, etc. I did the brackets by drawing arcs, and setting nodes on the lines. It would have been easier if each "atom" was a node, but I haven't found anything in the documentation. In any case, if you discover something like that, you can remove the extra nodes ...


3

Do you mean something like this? It uses the fact that chemfig's formulas are tikzpictures. chemfig offers the possibility to give explicite names to the nodes in a formula using @{name} (this is explained in the manual). Later one can refer to those nodes in a seperate tikzpicture. \chemmove simply is a wrapper for a tikzpicture with the options remember ...



Only top voted, non community-wiki answers of a minimum length are eligible