In relation to this question How to create cram bonds with anchors, I wanted to put the segment in the background and the black triangle hiding it in the foreground.
How is this possible with chemfig?
Here there is my answer
\documentclass{article}
\usepackage{chemfig}
\begin{document}
\chemfig{
% 7
-[:270,0.963]% 4
-[:328.2,1.019]% 3
-[:270]% 2
-[:210]% 1
(
-[:150]% 6
-[:90]% 5
-[:31.8,1.019]% -> 4
)
-[:267.9,1.001]% 8
(
-[:210]% 10
)
(
-[:330]% 11
)
<[:102.9,1.696]O% 9
(
>[:73.3,1.445]% -> 4
)
}
\end{document}
Reading the chemfig manual I have not found nothing.
Edit: Considering the output after the very nice comments, I have a white space below probably why I have not a straight line?
\documentclass{article}
\usepackage{chemfig}
\begin{document}
\chemfig{
% 7
-[:270,0.963]% 4
-[:328.2,1.019]% 3
-[:270]% 2
-[:210]% 1
(
-[:150]% 6
-[:90]% 5
-[:31.8,1.019]% -> 4
)
-[:267.9,1.001]% 8
(
-[:210]% 10
)
(
-[:330]% 11
)
<[:102.9,1.696,,,,{preaction={draw=white,-,line width=2pt}}]O% 9
(
>[:73.3,1.445]% -> 4
)
}
\end{document}




tikz? :-( I wanted use only chemfig and just the moment I am not able to solve my question. – Sebastiano Apr 30 '20 at 20:36chemfigusestikzso withouttikzis not a good idea. In @leandriis link there are two answers, and if you use<[:102.9,1.696,,,,{preaction={draw=white, -,line width=2pt}}]for the<path it gets already close. – Apr 30 '20 at 20:39<[:102.9,1.696,,,,{preaction={draw=white, -,line width=2pt}}]– Sebastiano Apr 30 '20 at 20:42