## LaTeX forum ⇒ Math & Science ⇒ Triangolar Diagram

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
arkanoid
Posts: 4
Joined: Fri Feb 13, 2015 12:27 pm

### Triangolar Diagram

Hi everybody.
It's the first time that i write i this forum so i hope i've choose the right topic.
I'm writing my math-thesis using latex.
I've to create a triangolar diagram to show the composition law of three functions.
So i use this code:

\begin{tikzcd}[column sep=small] & S^{'} \arrow[dl,dashrightarrow] \arrow[dr] & \\ S \arrow{rr} & & C \end{tikzcd}

but the program produces an error when i insert the code to label the arrow:

\begin{tikzcd}[column sep=small] & S^{'} \arrow[dl,dashrightarrow,"\epsilon"] \arrow[dr] & \\ S \arrow{rr} & & C \end{tikzcd}

The error is the seguent:

! Undefined control sequence.\it@cwm  ->\let \it@@next                            \relax \ifcat \noexpand \it@temp a\def \it@@next {...l.395 ...[dr] & \\ S \arrow{rr} & & C \end{tikzcd} The control sequence at the end of the top lineof your error message was never \def'ed. If you havemisspelled it (e.g., \hobx'), type I' and the correctspelling (e.g., I\hbox'). Otherwise just continue,and I'll forget about whatever was undefined.

here i have my preamble:
\documentclass[oneside,italian]{book}\usepackage[T1]{fontenc}\usepackage[latin9]{inputenc}\setcounter{secnumdepth}{3}\setcounter{tocdepth}{3}\usepackage{units}\usepackage{amsthm}\usepackage{amsmath}\usepackage{amssymb}\usepackage{esint} \makeatletter%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.\numberwithin{equation}{section}\numberwithin{figure}{section}  \theoremstyle{definition}  \newtheorem*{defn*}{\protect\definitionname}   \theoremstyle{remark}   \newtheorem*{rem*}{\protect\remarkname} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.\usepackage{tikz-cd} \AtBeginDocument{   \def\labelitemi{i}   \def\labelitemii{$$\bigtriangledown$$}   \def\labelitemiv{i)}} \makeatother \usepackage{babel}   \providecommand{\definitionname}{Definizione}   \providecommand{\remarkname}{Osservazione}

Can someone tell help me to find the error?
STRANGE FACT:
I've copied only the diagram text with the label code \epsilon in a new file and it works???? Are there some packages that create the error?
I've found that setting the language to english instead of italian all works. When i change language, i use italian, there is the extra babel package. i think the problem is this but i cannot say why.
Any ideas?
Last edited by Stefan Kottwitz on Fri Feb 13, 2015 2:22 pm, edited 1 time in total.
Reason: inline code changed to code blocks

Tags:

Johannes_B
Site Moderator
Posts: 4078
Joined: Thu Nov 01, 2012 4:08 pm
Hi and welcome, can you extend the code you have been posting to a fully compilabel example? It is easier this way to reproduce an error and give a perfect testing suite.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Stefan Kottwitz
Posts: 9504
Joined: Mon Mar 10, 2008 9:44 pm
Welcome to the forum!

I tested both tikz-cd drawings with your whole preamble. It worked fine. There was no error. And this preamble still is Italian.

Perhaps post a minimal working example which brings that error when compiled. The cause of the error is somewhere, but not in the code above.

Stefan

arkanoid
Posts: 4
Joined: Fri Feb 13, 2015 12:27 pm
\documentclass[oneside,italian]{book}\usepackage[T1]{fontenc}\usepackage[latin9]{inputenc}\setcounter{secnumdepth}{3}\setcounter{tocdepth}{3} \makeatletter%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.\usepackage{tikz-cd} \makeatother \usepackage{babel}\begin{document}\begin{tikzcd} A \arrow[rd] \arrow[r, "\phi"] & B \\ & C \end{tikzcd} \end{document}

This code gives me the error. If i delete the part "\phi" it works. I don't know what is the problem.

here the error message:

... \arrow[r, "\phi"] & B \\ & C \end{tikzcd}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., \hobx'), type I' and the correct
spelling (e.g., I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

Stefan Kottwitz
Posts: 9504
Joined: Mon Mar 10, 2008 9:44 pm
This is a very good minimal example! I tested it. It works fine on my system with TikZ 3.0.

You are using a handy quoting syntax for the labels, which has been introduced in TikZ 3.0 and got support in tikz-cd as well. But I think you are using an older version. So an update of the pgf and tikz-cd packages should solve the problem.

Stefan

arkanoid
Posts: 4
Joined: Fri Feb 13, 2015 12:27 pm
How can i upgrade that packages?

Stefan Kottwitz
Posts: 9504
Joined: Mon Mar 10, 2008 9:44 pm
You got a package manager, both with MikTeX and TeX Live, which you can use.
Open it, search the package, click and choose update.

Stefan