Skip to main content
added 715 characters in body
Source Link
samcarter
  • 508
  • 5
  • 11

I think the hatched lines could be simplified a bit. Instead of drawing two lines and then all the tiny lines in the for-loop, you could draw a double line and fill it with a hatched pattern:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{patterns,patterns.meta}

\begin{document}
\begin{tikzpicture}

\draw[gray,double distance=0.25cm] (3,-1.625)--++(5,0);
\fill[pattern={Lines[angle=45,distance={5pt}]},pattern color=gray] (3,-1.5) rectangle ++(5,-0.25);

\end{tikzpicture}
\end{document}

And instead of manually calculating all your coordinates, you could position them relative to the nodes you names, e.g. you can position the arrow relative to the n-eptane node:

\documentclass{article}

\usepackage{chemfig}
\usetikzlibrary{arrows.meta}
\setchemfig{%
%       %scheme debug=true,
        arrow offset=9pt,
        arrow coeff=0.7,
%       compound sep=5em,
        + sep left=0.6em,
        + sep right=0.6em,
        atom sep=1.25em,
        fixed length=true
}
\begin{document}
\begin{tikzpicture}
        
\node (n-eptane) at (0, 0) {\chemfig{[:30]--[:-30]--[:-30]--[:-30]}};
\draw[-Triangle] (n-eptane) ++(1.8,0)--++(1,0);

\end{tikzpicture}
\end{document}

I think the hatched lines could be simplified a bit. Instead of drawing two lines and then all the tiny lines in the for-loop, you could draw a double line and fill it with a hatched pattern:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{patterns,patterns.meta}

\begin{document}
\begin{tikzpicture}

\draw[gray,double distance=0.25cm] (3,-1.625)--++(5,0);
\fill[pattern={Lines[angle=45,distance={5pt}]},pattern color=gray] (3,-1.5) rectangle ++(5,-0.25);

\end{tikzpicture}
\end{document}

I think the hatched lines could be simplified a bit. Instead of drawing two lines and then all the tiny lines in the for-loop, you could draw a double line and fill it with a hatched pattern:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{patterns,patterns.meta}

\begin{document}
\begin{tikzpicture}

\draw[gray,double distance=0.25cm] (3,-1.625)--++(5,0);
\fill[pattern={Lines[angle=45,distance={5pt}]},pattern color=gray] (3,-1.5) rectangle ++(5,-0.25);

\end{tikzpicture}
\end{document}

And instead of manually calculating all your coordinates, you could position them relative to the nodes you names, e.g. you can position the arrow relative to the n-eptane node:

\documentclass{article}

\usepackage{chemfig}
\usetikzlibrary{arrows.meta}
\setchemfig{%
%       %scheme debug=true,
        arrow offset=9pt,
        arrow coeff=0.7,
%       compound sep=5em,
        + sep left=0.6em,
        + sep right=0.6em,
        atom sep=1.25em,
        fixed length=true
}
\begin{document}
\begin{tikzpicture}
        
\node (n-eptane) at (0, 0) {\chemfig{[:30]--[:-30]--[:-30]--[:-30]}};
\draw[-Triangle] (n-eptane) ++(1.8,0)--++(1,0);

\end{tikzpicture}
\end{document}
Source Link
samcarter
  • 508
  • 5
  • 11

I think the hatched lines could be simplified a bit. Instead of drawing two lines and then all the tiny lines in the for-loop, you could draw a double line and fill it with a hatched pattern:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{patterns,patterns.meta}

\begin{document}
\begin{tikzpicture}

\draw[gray,double distance=0.25cm] (3,-1.625)--++(5,0);
\fill[pattern={Lines[angle=45,distance={5pt}]},pattern color=gray] (3,-1.5) rectangle ++(5,-0.25);

\end{tikzpicture}
\end{document}