TransWikia.com

Plus sign isn't in the middle

TeX - LaTeX Asked on June 13, 2021

How it currently looks like
As you can see in the picture the plus sign is a little bit under the middle. How can I fix it?
Here’s a short-code:

documentclass[a4paper, 12pt]{scrartcl}

usepackage{chemfig}

begin{document}
    schemestart[][west]
    % first molecule
    chemfig{[:30]
            **6(
                -
                -
                    (-[0]C
                        (=[2]charge{45=|, 135=|}{O})
                        (-[0]charge{0=., 90=|, 270=|}{O})
                    )
                -
                -
                -
                -
            )
        }
        arrow{0}[,0]
        +
        % second molecule
        chemfig{
            **6(------)
        }
    schemestop
    
    % product
    schemestart
        arrow{->}
        chemfig{[:90]
            **6(
                -
                    (-[0]C
                        (-[0]charge{90=|, 270=|}{O}
                            (-[0]C
                                (-[0]C)
                                (-[2]H)
                            )
                        )
                    )
                -
                -
                -
                -
                -
            )
        }
    schemestop
end{document}

According to the docs I could add an offset to the plus sign:
Doc image
but isn’t there a better solution than trying to find the correct offset?

One Answer

Sorry guys... I just found a solution: Just wrap the plus sign between two zero-length arrows, than it will look like this (I continued writing the reaction so don't be suprised if it doesn't look like the reaction of the question):
Solution
Here's the code:

documentclass[a4paper, 12pt]{scrartcl}

usepackage{chemfig}

begin{document}
schemestart[][west]
% first molecule
chemfig{[:30]
        **6(
            -
            -
                (-[0]C
                    (=[2]charge{45=|, 135=|}{O})
                    (-[0]charge{0=., 90=|, 270=|}{O})
                )
            -
            -
            -
            -
        )
    }
    arrow{0}[,0]
    +{0.5cm, 0.5cm}
    arrow{0}[,0]
    % second molecule
    chemfig{
        H
        -[7]C
            (-[6]**6(------))
        =[0]C
            ( -[1]H)
            ( -[7]H)
    }
schemestop

% product
schemestart
    arrow{->}
    chemfig{[:90]
        **6(
            -
                (-[0]C
                    (-[0]charge{90=|, 270=|}{O}
                        (-[0]C
                            (-[0]C)
                            (-[2]H)
                        )
                    )
                )
            -
            -
            -
            -
            -
        )
    }
schemestop
end{document}

Correct answer by TornaxO7 on June 13, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP