Package pgf problem update (tikz)

I have a pgf problem on this. I don't understand why.

\documentclass[mathtools,amsmath,frenchb,12pt,oneside,a4paper]{article}
\usepackage{listings,amssymb,babel,tikz,tkz-tab,fontenc,fancyhdr,mathrsfs,amsmath}

\title{TP3-MPE4}
\date{\today}

\graphicspath{ {./ressources/} }

\begin{document}

\maketitle

\section{Etude complète de $C_{1}$}

\subsection{Tableau de variation}
\resizebox{400}{200}{
\begin{tikzpicture}
\tkzTabInit{$t$/1,$x'(t)$/2, $x(t)$/2, $y'(t)$/3, $y(t)$/4,$-2,03$, $-\frac{\pi}{2}$, $0$, $1,10$, $\frac{\pi}{2}$}
\tkzTabLine{,-,0,,,,+,,,,0,,-,,}
\tkzTabVar{/$-1$,-/$2,24$,,,R/,R/,+/$2,24$,R/,-/$-1$}
\tkzTabLine{0,+,0,-,0,,+,0,-,,0,+,0,-,0}
\tkzTabVar{-/$-2$,+$-0,89$,-/$-1$,+/$2$,-/$0,89$,+/$1$,-/$2$}
\end{tikzpicture}
}

• Welcome to TeX.SE! Please make your document example minimal and compilable. Can you provide a sketch of desired result? Why you not write a simple table? Commented Mar 17, 2022 at 10:46
• @Zarko It's not really easy to do with a simple table ! Commented Mar 17, 2022 at 12:32
• If you have difficulties to make these tables, you can contact me with the email that is in the documentation. Commented Mar 17, 2022 at 12:34
• @AlainMatthes, you are right, table is not simple. +1 for your answer! Commented Mar 17, 2022 at 13:06

It is not easy to answer because you do not indicate exactly the problem that you encounter. The solution you propose does not compile because you have as in your question not respect the number of intervals on a line.

The resizebox is a bad idea because you modify the size of the fonts. It is better to use the scale option.

\documentclass[12pt,oneside,a4paper]{article}
\usepackage{tkz-tab}
\usepackage[french]{babel}
\usetikzlibrary{babel}
\title{TP3-MPE4}
\date{\today}

\begin{document}
\maketitle

\section{Etude complète de $C_{1}$}

\subsection{Tableau de variation}
\hspace{-1cm}\begin{tikzpicture}[scale=.6] \tkzTabInit[deltacl=0.8]{$t$/1,$x'(x)$/2,$x(t)$/3,$y'(t)$/4,$y(t)$/5}{$\pi$,$-2.03$,$\frac{\pi}{2}$,$0$,$1.10$,$\frac{\pi}{2}$,$\pi$}
\tkzTabLine{,-,0, ,+, ,+,,,,0,-,}
\tkzTabVar{+/{1},-/$-2.24$,R/,R/,+/$2.24$,R/,-/$-1$}
\tkzTabLine{0,+,0,-,0,+,0,-,0,+,0,-,0}
\tkzTabVar{-/$-2$,+/$-0.89$,-/$-1$,+/$2$,-/$0.89$,+/$1$,-/$-2$}
\end{tikzpicture}
\end{document}


I do not know the package tikz-tab, but I'll try to help you to find the problem.

First of all --- it's better to load the packages one by one; putting the options in the documentclass ones is ...awkeard. I changed it a bit to solve the evident problems, but you should reorganize it further.

You have a plethora of (serious) warning that you ignored:

Package babel-french Warning: Option frenchb' for Babel is *deprecated*,
(babel-french)                it might be removed sooner or later. Please
(babel-french)                use french' instead; reported on input line 35.

LaTeX Warning: Unused global option(s):
[mathtools,amsmath].

(french.ldf)                AFTER babel/french; reported on input line 10.

Package french.ldf Warning: OT1 encoding should not be used for French.
(french.ldf)                Add \usepackage[T1]{fontenc} to the preamble
(french.ldf)                of your document; reported on input line 10.


Moreover, I loaded babel TikZ library to avoid problem with tikz (you can find a lot of examples on site). Maybe you can also use shorthands=off, but that seems not needed.

Solved this, the problem is in tikz-tab that I do not know and has a manual which is in French (that I can read, but not so easily). So I copied a minimum example. S

\documentclass[12pt,oneside,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{amssymb,tikz,tkz-tab,fancyhdr,mathrsfs,amsmath,mathtools}
\usepackage[french]{babel}
\usetikzlibrary{babel}
\usepackage{listings}

\title{TP3-MPE4}
\date{\today}

\graphicspath{ {./ressources/} }

\begin{document}

\maketitle

\section{Etude complète de $C_{1}$}

\subsection{Tableau de variation}
\begin{tikzpicture}
\tkzTabInit[color,
colorT = yellow!20,
colorC = orange!20,
colorL = green!20,
colorV = lightgray!20]
{ /1 , /1}{ , }
\end{tikzpicture}

% \begin{tikzpicture}
%         \tkzTabInit{$t$/1,$x'(t)$/2, $x(t)$/2, $y'(t)$/3, $y(t)$/4,$-2,03$, $-\frac{\pi}{2}$, $0$, $1,10$, $\frac{\pi}{2}$}
%         \tkzTabLine{,-,0,,,,+,,,,0,,-,,}
%         \tkzTabVar{/$-1$,-/$2,24$,,,R/,R/,+/$2,24$,R/,-/$-1$}
%         \tkzTabLine{0,+,0,-,0,,+,0,-,,0,+,0,-,0}
%         \tkzTabVar{-/$-2$,+$-0,89$,-/$-1$,+/$2$,-/$0,89$,+/$1$,-/$2$}
% \end{tikzpicture}

\end{document}


Now it's up to you:

start modifying the tables so that they do what you want. In that way, you'll find the error!

I manage to solve this problem on my own. I'll send the solution :

\subsection{Tableau de variation}
\resizebox{400}{200}{
\begin{tikzpicture}
\tkzTabInit{$t$/1,$x'(x)$/2,$x(t)$/3,$y(t)$/4,$y'(t)$/5}{$\pi$,$-2.03$,$\frac{\pi}{2}$,$0$,$1.10$,$\frac{\pi}{2}$,$\pi$}
\tkzTabLine{,-,0,,,,+,,,,0,,-,,}
\tkzTabVar{+/{1},-/$2.24$,R/,R/,+/$2.24$,R/,-/$-1$}
\tkzTabLine{0,+,0,-,0,,+,0,-,,0,+,0,-,0}
\tkzTabVar{-/$-2$,+/$-0.89$,-/$-1$,+/$2$,-/$0.89$,+/$1$,-/$2$}
\end{tikzpicture}


}

• This is not an answer, rather an explanation what is your problem. You should move image to your question. Commented Mar 17, 2022 at 13:04