1

I ran into a problem of drawing an arrow \ruTo(4,2). The following example didn't draw the diagonal arrow, as in

ruTo

However, it works well for \rdTo(4,2) and \ruTo(2,2), as in

rdTo

and

ruto2

I'm really confused and would appreciate it if someone could help me solve this problem. Thank you.

\documentclass[a4paper,11pt]{article}
\usepackage[small,nohug,heads=LaTeX]{diagrams}
\diagramstyle[labelstyle=\scriptstyle]

\begin{document}
\begin{diagram}
    a&\rTo&a&\rTo&a\\
    \dTo&\ruTo(4,2)&&&\dTo\\
    a&\rTo&a&\rTo&a
\end{diagram}
\end{document}
Stefan Pinnow
  • 29,535

1 Answers1

1

As commented by the OP, the problem can be solved by using \dTo&&&\ruTo(4,2)&\dTo\\

Full MWE:

\documentclass[a4paper,11pt]{article}
\usepackage[small,nohug,heads=LaTeX]{diagrams}

\makeatletter \def\foo#1\endgraf\unskip#2\foo{\def\row@to@buffer{#1\endgraf\unskip\unskip#2}} \expandafter\foo\row@to@buffer\foo \makeatother

\diagramstyle[labelstyle=\scriptstyle]

\begin{document} \begin{diagram} a&\rTo&a&\rTo&a\ \dTo&&&\ruTo(4,2)&\dTo\ a&\rTo&a&\rTo&a \end{diagram} \end{document}

enter image description here

Some useful hints how to get the diagrams package and compile documents using the package can be found in these answers: