blob: a6066ad0232a30f1d302cc699d46c88b448f7501 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
\subsection{Crossing bonds}
The cubane molecule contains several bonds that cross each other:
\lstinputlisting{cubane-n.sh}
\cfpic{cubane-n.tex}
Use the \lstinline!--cross-bond! or \lstinline!-k! option to specify which bonds should go into the foreground:
\lstinputlisting{cubane-cross-n.sh}
\cfpic{eschers-cubane.tex}
The implementation of this feature is a bit of a hack, I'm afraid; the following code listing (with hand-written comments) illustrates the contortions it adds to the generated code.
\lstinputlisting{hand-coded-tex/twisted-commented.tex}
The styling of the bond in the foreground can be adjusted by tweaking the \lstinline!mcfcrossbond! \tkz key in the \lstinline!mol2chemfig.sty! package. Alternatively, as of version 1.2b, \lstinline!mol2chemfig.sty! patches \chf's \lstinline!\setbondstyle! macro, such that the background for crossing bonds can be passed as an optional argument:
\lstinputlisting{setbondstyle.tex}\input{setbondstyle.tex}
\cfpic{eschers-cubane.tex}
|