0

I am trying to use chemfig package, and some bonds seem to slip lower. I want all bonds to be the same height (of course?). There is a similar issue posted 2 years ago, and I have included the solution, but since I don't want the extra atom in front of the bond, I don't know what to do.

I want C_{\italics{sp}^3}-H.

Here's the code. Suggestions much appreciated.

\documentclass[11pt, oneside]{article}
\usepackage{geometry}
\geometry{letterpaper}
\usepackage{graphicx}
\usepackage{chemfig}
\usepackage{amssymb}


\begin{document}

\begin{enumerate}
    \item \chemfig{C\textsubscript{\textit{sp}\textsuperscript{3}}-H} bond
    \item \chemfig{C\textsubscript{\textit{sp}\textsuperscript{3}}{-}H} bond
    \item \chemfig{C_{\textit{sp}^3}C(-H)}
    \item \chemfig{C_{\textit{sp}^3}(-H)}
\end{enumerate}

\end{document}

enter image description here

Here is a hand-drawn image of what I'm trying to do, per request of js

1
  • Please have a look at the section “Bonds between atoms” in the chemfig manual
    – cgnieder
    Jun 23, 2020 at 13:32

2 Answers 2

1

Try this

\documentclass[11pt, oneside]{article}
\usepackage{geometry}
\geometry{letterpaper}
\usepackage{graphicx}
\usepackage{chemfig}
\usepackage{amssymb}


\begin{document}
        \setbondoffset{14pt}
    \begin{enumerate}
        \item \chemfig{C(\hspace{20pt}_{\textit{sp}^3})-#(,0pt)H}
    \end{enumerate}

    
\end{document}

enter image description here

0

Taking into account the suggestion+1 given by @cgnieder -- from page 30 of the documentation -- http://mirrors.ctan.org/macros/generic/chemfig/chemfig-en.pdf#30

enter image description here

\documentclass[11pt, oneside]{article}
\usepackage{geometry}
\geometry{letterpaper}
\usepackage{graphicx}
\usepackage{chemfig}
\usepackage{amssymb}


\begin{document}
    \definesubmol\I{\vphantom{X}}
    \begin{enumerate}
        \item \chemfig{C\textsubscript{\textit{sp}\textsuperscript{3}}-H} bond
        \item \chemfig{C\textsubscript{\textit{sp}\textsuperscript{3}}{-}H} bond
        \item \chemfig{C_{\textit{sp}^3}C(-H)}
        \item \chemfig{C_{\textit{sp}^3}|!\I(-H)}
    \end{enumerate}
    
\end{document}
4
  • Thanks for the initial edits, cgnieder. And the documentation seems to address what I'm trying to do, although when I cut and paste code straight out of the manual, it renders slightly differently. The initial atom is missing! Still looking through the details. Will post code solution once I have it figured out.
    – Patrick C
    Jun 23, 2020 at 14:43
  • please give a handrawn sketch of your requirement --initial atom missing?
    – js bibra
    Jun 23, 2020 at 15:32
  • 1
    Thanks for the steer toward the manual. I can't tell why, but the code in the manual doesn't work. I can see it was published only a week ago(!), and I updated my TexShop today. I'm new enough that I don't know how to check what version of chemfig I have. The correct code is same as manual, except without the "!". Odd. Here 'tis. \chemfig{[0,0.6]C\textsubscript{\textit{sp}\textsuperscript{3}}|\I-H}
    – Patrick C
    Jun 23, 2020 at 17:48
  • 1
    And I'm sorry I can't tell how to set that all like code. I guess comments don't have same formatting capabilities as OP?
    – Patrick C
    Jun 23, 2020 at 17:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .