2

I found this extremely cool package "t-angles.sty" (manual found here)

which seems to fit perfectly to what I was looking for. Unfortunately I can't figure out what's the problem in my code. I want to "draw" the following diagram (where the Bs and Hs are not necessary for me): enter image description here

My code in a minimal example looks like this:

\documentclass[twoside,12pt]{scrartcl}
\usepackage[emtex]{t-angles}

\begin{document}
\[ 
\m \;=\enspace
\begin{tangles}{lccr}
\HH \id & \cd & \id & \id \\ %(1)
\HH \id & \id & \x & \id \\  %(2)
\HH \id & \hlu & \id \id \\
\HH \Cu && \cu
\end{tangles}
\]

\end{document}

Unfortunately I get the following output: enter image description here Anyone here who can help me? It would help a lot to understand this package. As I said, it seems to be exactly what I need!

Thanks in advance!

  • 1
    Welcome! No idea about the package and I did not compile. But your lcr looks as if you do define 3 columns but you clearly fill up 4 columns. lcr is most probably left centered right. So start trying to add one of those more. – LaRiFaRi Dec 6 '18 at 12:30
  • Regarding the &: You should read a bit about matrices and tables in LaTeX. Those are separators between columns. So && does just show an empty column. & & would yield the same. Generally talking, but I bet it is the same for this package here. – LaRiFaRi Dec 6 '18 at 12:32
  • @LaRiFaRi Thanks for the first hint, now its not an error anymore, the diagram just doesn't look at all like I wanted. I'll update the question! :D – Polly Dec 6 '18 at 12:33
  • Glad that helped a bit. The manual (pirbot.com/mirrors/ctan/macros/latex/contrib/t-angles/…) has only 7 pages and some examples. Maybe you start by doing those tutorials first. – LaRiFaRi Dec 6 '18 at 12:50
  • Yes I tried that, and I thought I had understood the examples quite well. My code ist build upon the first example... but thanks for helping :) – Polly Dec 6 '18 at 13:23
0

With some small improvements the output can be made close to the image. The \hlu command has an optional argument to set the width (e.g., \hlu[2]). Note that the third and fourth line have only two & symbols instead of three. Because the \Cu command is too big, the \cu command can be used. This leads to the following output:

enter image description here

Now, the \cu is too small. It appears that the package does not provide any customization for \cu or \Cu, so a new command should be made for that. For \Cu the source of the package contains the following definition:

\hbx(4,2){\pr@d{20,20,40,20}{b}{20,0,0,10}}

Using this definition it is possible to create a new command with changed numbers that result in a smaller output.

MWE:

\documentclass[twoside,12pt]{scrartcl}
\usepackage[emtex]{t-angles}

\makeatletter
\def\mycu{%
% \hbx{width,height} \pr@d{left offset,bottom offset,width,height}{oval part}{line left,top,?,length}
\hbx(1,1){\pr@d{10,10,20,10}{b}{10,0,0,5}}%
}
\makeatother

\begin{document}
\[ 
m \;=\enspace
\begin{tangles}{llrr}
\HH \id & \cd & \id & \id \\ %(1)
\HH \id & \id & \x & \id \\  %(2)
\HH \id & \hlu[2] & \id & \id \\
\HH \mycu & & & \cu
\end{tangles}
\]
\end{document}

Result:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.