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

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

Description of \tkzTabVal - how does it work?

Postby Tolaso » Mon Jan 09, 2017 1:20 am

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.

Tags:

Tolaso
Posts: 31
Joined: Tue Dec 20, 2016 12:23 am

Postby Tolaso » Fri Jan 20, 2017 12:38 am

No one ?

User avatar
Johannes_B
Site Moderator
Posts: 3551
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Fri Jan 20, 2017 6:53 pm

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: 8453
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Sat Jan 21, 2017 6:59 pm

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
Site admin

Tolaso
Posts: 31
Joined: Tue Dec 20, 2016 12:23 am

Postby Tolaso » Tue Aug 22, 2017 10:11 pm

Hi Stefan. I just saw the answer ... I thought my question remained answered. OK, I'll try to add an MWE later ..

Tolaso
Posts: 31
Joined: Tue Dec 20, 2016 12:23 am

Postby Tolaso » Thu Aug 24, 2017 7:45 am

Take this code for example.


  1. \documentclass[10pt]{article}
  2. \usepackage{amsmath}
  3. \usepackage{amsfonts}
  4. \usepackage{amssymb}
  5. \usepackage{pgf,tikz}
  6. \usepackage{tkz-tab}
  7. \usetikzlibrary{shapes,snakes,arrows,backgrounds}
  8. \usetikzlibrary{scopes,svg.path,shapes.geometric,shadows}
  9. \usepackage{graphicx}
  10. \usepackage{xcolor}
  11.  
  12.  
  13. \begin{document}
  14.  
  15.  
  16. \begin{tikzpicture}
  17. \tkzTabInit[color, colorT = red!30, colorC = yellow!20,colorL =
  18. blue!20, colorV = lightgray!20, espcl=4]{$x$ /1,$f''(x)$ /1, $f'(x)$ /2, $f(x)$ /2 }
  19. {$-\infty$ ,$0$, $+\infty$}%
  20. \tkzTabLine {,+ , z,+ , }
  21. \tkzTabVar[color=red]{-/ $-\infty$,R/ /,+/ $+\infty$ /}%
  22. \tkzTabVal[draw]{1}{3}{0.5}{}{$0$}
  23. \tkzTabVar{+/ $+\infty$, -/$f(0)=0$/, +/ $+\infty$ / }
  24.  
  25.  
  26. \end{tikzpicture}
  27. \end{document}


that produces the following

monotony_table.jpg
monotony_table.jpg (19.37 KiB) Viewed 244 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.

  1. \tkzTabVal{1}{3}{.25}{}{$-$}
  2. \tkzTabVal{1}{3}{.75}{}{$+$}


after \tkzTabVal. Why those two lines work, I still cannot figure that out!! :(

User avatar
Stefan Kottwitz
Site Admin
Posts: 8453
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Thu Aug 24, 2017 5:03 pm

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
Site admin


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: Baidu [Spider] and 5 guests