3

This question already has an answer here:

I'm trying to add a vertical space between H$_{2}$O$_{2}$ 30\% and \SI{25}{\degreeCelsius}, \SI{30}{\minute}, but I can't. Do you have any idea how to do it?

enter image description here

\documentclass[letter,10pt]{article}
\usepackage{chemfig}
\usepackage{chemnum}
\newcommand*\pkg[1]{\textsf{#1}}
\usepackage[version=3]{mhchem}

\begin{document}

\begin{figure}[!htbp]
\centering
\scalebox{0.9}{
\schemestart
\chemname{
\scriptsize
\chemfig[yshift=15pt]{*6((-(*6(=-=([:150]-[,,,,white]R|^1([:0]-))-=-)))=-(-(*6(-=-([:30]-[,,,,white]R|^2([:180]-))=-=)))(=[::60]O))}
}{\textbf{1}}
\arrow(.mid east--.mid west)
{->[LDH, solvente][H$_{2}$O$_{2}$ 30\%, \\ \SI{25}{\degreeCelsius}, \SI{30}{\minute}]}[0,2.0]
\chemname{
\scriptsize
\chemfig[yshift=15pt]{*6((-(*6(=-=([:150]-[,,,,white]R|^1([:0]-))-=-)))-(-[:210]O(-[:90]))-(-(*6(-=-([:30]-[,,,,white]R|^2([:180]-))=-=)))(=[::60]O))}
}{\textbf{2}}
\schemestop
}
\caption{Reacción de epoxidación. Oxidación de la doble ligadura de la chalcona en presencia de un peróxido de hidrógeno y una base orgánica.}
\label{fig:3}
\end{figure}

\end{document}

marked as duplicate by clemens, TeXnician, Zarko, Mico, Schweinebacke Apr 15 '17 at 11:32

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Based on your verbal description, that would be called horizontal space...? So which is it? – Steven B. Segletes Apr 14 '17 at 17:53
  • 1
    In other words, add a space as if I had occupied the enter key. I mean, put the temperature and time under the hydrogen peroxide. – Arturo García Flores Apr 14 '17 at 18:01
4

I don't know whether this is the best, but I made a \vbox of your text: this way it can be correctly rendered as you wish:

            \documentclass[letter,10pt]{article}
            \usepackage{chemfig}
            \usepackage{siunitx}
            \usepackage{chemnum}
            \newcommand*\pkg[1]{\textsf{#1}}
            \usepackage[version=3]{mhchem}

            \begin{document}

            \begin{figure}[!htbp]
            \centering
            \scalebox{0.9}{%
            \schemestart
            \chemname{%
            \scriptsize%
            \chemfig[yshift=28pt]{*6((-(*6(=-=([:150]-[,,,,white]R|^1([:0]-))-=-)))=-(-(*6(-=-([:30]-[,,,,white]R|^2([:180]-))=-=)))(=[::60]O))}
            }{\textbf{1}}
            \arrow(.mid east--.mid west)
            {->[LDH, solvente][\vbox{H$_{2}$O$_{2}$ 30\%,\\ \SI{25}{\degreeCelsius}, \SI{30}{\minute}}]}[0,2.0]
            \chemname{%
            \scriptsize%
            \chemfig[yshift=28pt]{*6((-(*6(=-=([:150]-[,,,,white]R|^1([:0]-))-=-)))-(-[:210]O(-[:90]))-(-(*6(-=-([:30]-[,,,,white]R|^2([:180]-))=-=)))(=[::60]O))}
            }{\textbf{2}}
            \schemestop
            }
            \caption{Reacción de epoxidación. Oxidación de la doble ligadura de la chalcona en presencia de un peróxido de hidrógeno y una base orgánica.}
            \label{fig:3}
            \end{figure}

            \end{document}

Yielding

enter image description here

EDIT

Please do mind that I had to play around with the yshift, because it did not give me a correct picture otherwise.

4

Here is an idea I used in Chemfig new line reaction scheme – it patches the nodes of the arrow. The code below has a few other enhancements. There is no need for the yshift for example. Also I'd use a package like chemnum for the numbering of the compounds instead of doing it manually…

\documentclass{article}
\usepackage{chemfig,chemnum,siunitx}

\usepackage{regexpatch}
\makeatletter
% \xpatchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
% the starred version replaces all instances of <search>
\xpatchcmd*\CF@arrow@display@label@a{node[}{node[align=center,}{}{}
\makeatother

\begin{document}

\begin{center}
  \setatomsep{1.3em}
  \schemestart
    \chemname{%
      \chemfig{
        *6((-(*6(=-=([:150]-[,,,,white]R|^1([:0]-))-=-)))
        =-(-(*6(-=-([:30]-[,,,,white]R|^2([:180]-))=-=)))(=[::60]O))
      }}{\cmpd{one}}
    \arrow{%
      ->[LDH, solvente]%
        [\chemfig{H_2O_2} \SI{30}{\percent}, \\ \SI{25}{\celsius}, \SI{30}{\minute}]%
      }[0,2.0]
    \chemname{%
      \chemfig{
        *6((-(*6(=-=([:150]-[,,,,white]R|^1([:0]-))-=-)))
        -(-[:210]O(-[:90]))-(-(*6(-=-([:30]-[,,,,white]R|^2([:180]-))=-=)))(=[::60]O))
      }}{\cmpd{two}}
  \schemestop
\end{center}

\end{document}

enter image description here

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