4

I would like to have several arrows going from one molecule (chemfig). I managed left and right, but now I also want one going 90° down from the molecule in the middle. This is what I tried (ignore the spacing problems on the right side):

\documentclass[12pt,a4paper,twocolumn]{article}

\usepackage{chemfig}

\usepackage{tikz}

\begin{document}

\schemestart
excretion
\arrow{<-}[90]
APAP-sulf \arrow{<-[SULT][sulfation]}[0,1.3]
    \chemname{\chemfig{HO-[:30]*6(-=-(-NH-[:-30](=[:-90]O)-[:30])=-=)}}{Acetaminophen}
    \arrow{->[UGT][glucorination]}[0,1.3]APAP-gluc
    \arrow {->}[-90] excretion
    \arrow{->}[-90] NAPQI       
\schemestop
\end{document}

enter image description here

2
  • Welcome to TeX.SE! I am not sure I understand the question, the code already produces vertical arrows on the left and right. What precisely do you want to achieve? An additional, vertical arrow from the molecule in the middle? If so, where precisely is it supposed to start and end?
    – user121799
    Oct 23, 2018 at 15:33
  • There is one arrow, at the left side going down pointing at the word "NAPQI". this arrow is supposed to originate from the molecule in the middle. Oct 23, 2018 at 15:39

1 Answer 1

3

Here is a proposal. Please make sure that you have updated your TeX distribution when you run it because it relies on some recent updates of the tikzmark library. You can remember

  1. elements of a chemfig with the @{<name>}{<element>} syntax and
  2. other things with the \tikzmarknode{<name>}{<object>} syntax.

And then you can use an overlay TikZ picture to draw arrows and whatever. I used the calc library to determine a possibly suitable starting point of the arrow. If you drop blue in the \draw command, the arrow will be black.

\documentclass[12pt,a4paper,twocolumn]{article}

\usepackage{chemfig}

\usepackage{tikz}
\usetikzlibrary{tikzmark,calc}

\begin{document}

\schemestart
excretion
\arrow{<-}[90]
APAP-sulf \arrow{<-[SULT][sulfation]}[0,1.3]
\chemname{\chemfig{@{HO}{HO}-[:30]*6(-=-(-NH-[:-30](=[:-90]@{O}{O})-[:30])=-=)}}{Acetaminophen}
    \arrow{->[UGT][glucorination]}[0,1.3]APAP-gluc
    \arrow {->}[-90] excretion
    \arrow{->}[-90] \tikzmarknode{NAPQI}{NAPQI}
\schemestop
\begin{tikzpicture}[overlay,remember picture]
\draw[blue,-latex] ($(O)!0.1!(HO)-(0,0.5)$) -- (NAPQI.north west);
\end{tikzpicture}
\end{document}

enter image description here

Here is a second proposal with a vertical arrow. If you want to restore the arrow from excretion, just remove opacity=0.

\documentclass[12pt,a4paper,twocolumn]{article}

\usepackage{chemfig}

\usepackage{tikz}
\usetikzlibrary{tikzmark}

\begin{document}

\schemestart
excretion
\arrow{<-}[90]
APAP-sulf \arrow{<-[SULT][sulfation]}[0,1.3]
\chemname{\chemfig{@{HO}{HO}-[:30]*6(-=-(-NH-[:-30](=[:-90]@{O}{O})-[:30])=-=)}}{
\tikzmarknode{A}{Acetaminophen}}
\arrow{->[UGT][glucorination]}[0,1.3]APAP-gluc
\arrow {->}[-90] excretion
\arrow{->}[-165,3,opacity=0] \tikzmarknode{NAPQI}{NAPQI}
\schemestop
\begin{tikzpicture}[overlay,remember picture]
\draw[-latex,shorten >=4pt,shorten <=2pt] (A) -- (NAPQI);
\end{tikzpicture}
\end{document}

enter image description here

And here is a version that does not rely on tikzmark.

\documentclass[12pt,a4paper,twocolumn]{article}

\usepackage{chemfig}

\begin{document}

\schemestart
excretion
\arrow{<-}[90]
APAP-sulf \arrow{<-[SULT][sulfation]}[0,1.3]
\chemname{\chemfig{@{HO}{HO}-[:30]*6(-=-(-NH-[:-30](=[:-90]@{O}{O})-[:30])=-=)}}{
Acetaminophen}
\arrow{->[UGT][glucorination]}[0,1.3]APAP-gluc
\arrow {->}[-90] excretion
\arrow{->}[-165,3,opacity=0] NAPQI
\arrow{<-}[90]
\schemestop
\end{document}

enter image description here

17
  • Hey, thanks for you suggestion. How would I also place the NAPQI in the middle then? it is on the side just by accident and just supposed to be right under the middle molecule... Oct 23, 2018 at 15:55
  • @Maj-BrittterHell Do you want to connect it to excretion by an arrow or not?
    – user121799
    Oct 23, 2018 at 16:00
  • No, I am sorry I put it a little unclear. I want a vertical arrow, down from the middle molecule and then the word NAPQI underneath Oct 23, 2018 at 16:06
  • @Maj-BrittterHell I made an update...
    – user121799
    Oct 23, 2018 at 16:11
  • nice thanks! I am currently updating my tex distribution. It didn't work and I am pretty sure I don't have the updated version :D Stupid question, but since I've never updated before: If I update now, can I just use my script that I already have an compile it again, and then it will be compiled with the newest version? Oct 23, 2018 at 16:29

You must log in to answer this question.

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