Graphics, Figures & TablesDescription of \tkzTabVal - how does it work?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Tolaso
Posts: 37
Joined: Tue Dec 20, 2016 12:23 am

Description of \tkzTabVal - how does it work?

Post by Tolaso »

Hello,

I am new here. I am writing a journal in LaTeX. I am no beginner in it but I am still facing some problems trying to undestand some packages. For example the Journal requires me to actually "draw" some monotony tables. I am using my favorite package to do so , namely tikz. Thus I load "tikz - tab".

I follow the manual , which has quite plenty of examples but since it is in French and that's not my native language I cannot make the most of it. Therefore when I have to use \tkzTabVal function I get stuck and I work blind.

So, can someone explain to me how it works? I know the general syntax is like this: \tkzTabVal{}{}{}{}{}

where the 4th argument is optional and the 5th argument is actually the one to fill so that it is injected into the drawing but the first three arguements I have completely no idea how they are filled.

If you could enlighten me that would be great. Thank you in advance.
Tolaso.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
TikZ book
Tolaso
Posts: 37
Joined: Tue Dec 20, 2016 12:23 am

Description of \tkzTabVal

Post by Tolaso »

No one ?
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Description of \tkzTabVal

Post by Johannes_B »

Welcome, you need a bit of patience.

We are very very few helpers, and personally, i don't know much of TikZ. I don't even know which package you are referring to, right now. A few more information would be great, maybe even a minimal working example to know what all this is about.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10315
Joined: Mon Mar 10, 2008 9:44 pm

Description of \tkzTabVal - how does it work?

Post by Stefan Kottwitz »

Hi Johannes,

it's tkz-tab. One may use a translator software (or do it online) and read the source code.

Tolaso: I read there and found it complicated too. :-) But for sure it should be understandable. I just gave up after a minute since I did not really know what you are doing. If you would post a Infominimal working example with such a table drawing, that we can test and understand too, that would help.

Stefan
LaTeX.org admin
Tolaso
Posts: 37
Joined: Tue Dec 20, 2016 12:23 am

Description of \tkzTabVal - how does it work?

Post by Tolaso »

Hi Stefan. I just saw the answer ... I thought my question remained answered. OK, I'll try to add an MWE later ..
Tolaso
Posts: 37
Joined: Tue Dec 20, 2016 12:23 am

Description of \tkzTabVal - how does it work?

Post by Tolaso »

Take this code for example.

Code: Select all

\documentclass[10pt]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{pgf,tikz}
\usepackage{tkz-tab}
\usetikzlibrary{shapes,snakes,arrows,backgrounds}
\usetikzlibrary{scopes,svg.path,shapes.geometric,shadows}
\usepackage{graphicx}
\usepackage{xcolor}


\begin{document}


\begin{tikzpicture}
\tkzTabInit[color, colorT = red!30, colorC = yellow!20,colorL        =             
blue!20,  colorV = lightgray!20, espcl=4]{$x$ /1,$f''(x)$ /1, $f'(x)$ /2,   $f(x)$ /2 }
  {$-\infty$ ,$0$, $+\infty$}%
\tkzTabLine {,+ , z,+ ,  }
\tkzTabVar[color=red]{-/  $-\infty$,R/ /,+/ $+\infty$ /}%
\tkzTabVal[draw]{1}{3}{0.5}{}{$0$}
\tkzTabVar{+/ $+\infty$, -/$f(0)=0$/, +/ $+\infty$ / }


\end{tikzpicture}
\end{document}
that produces the following
monotony_table.jpg
monotony_table.jpg (19.37 KiB) Viewed 13176 times
What I wanted to do there was to add a last detail. In the box of the derivative of f, that shows its monotony I would like to add the sign of the derivative. That is , add a plus sing at the right in the center below the arrow and a minus sign at the left in the center above the arrow.

It was suggested to me to add the following two lines.

Code: Select all

\tkzTabVal{1}{3}{.25}{}{$-$}
\tkzTabVal{1}{3}{.75}{}{$+$}
after \tkzTabVal. Why those two lines work, I still cannot figure that out!! :(
User avatar
Stefan Kottwitz
Site Admin
Posts: 10315
Joined: Mon Mar 10, 2008 9:44 pm

Description of \tkzTabVal - how does it work?

Post by Stefan Kottwitz »

The syntax is:

\tkzTabVal[local options]{start}{end}{position}{antecedent}{object}

It draws an arrow from the start cell (column? row?) to the end position (column? row?), while position is a value between 0 (start) and 1 (end) of the arrow. object can simply be a node text.

So, here we got two invisible arrows with - at 25% and + at 75% of the width.

Stefan
LaTeX.org admin
Post Reply