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}
6
  • 3
    Are you tied to diagrams?
    – egreg
    Nov 26, 2018 at 10:08
  • I think I found a solution to my problem by replacing the second line of the diagram with \dTo&&&\ruTo(4,2)&\dTo\\ Nov 27, 2018 at 0:00
  • 4
    I’m voting to close this question because teh OP commented "problem solved", long ago.
    – MS-SPO
    Feb 1 at 18:36
  • 1
    Voting to reopen, closing a question as "solved in comments" is not a good idea, see e.g. tex.meta.stackexchange.com/a/8778/36296 Feb 2 at 0:41
  • @samcarter_is_at_topanswers.xyz -- Please also post a brief answer based on the comment. Feb 2 at 2:29

1 Answer 1

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:

0

You must log in to answer this question.

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