LaTeX forum ⇒ Graphics, Figures & TablesConvexity table with TiKz Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
Pierrotdu18
Posts: 22
Joined: Sun Dec 01, 2013 11:24 pm

Convexity table with TiKz

Postby Pierrotdu18 » Sat Mar 22, 2014 10:27 pm

Hello there,

I would need your help to build a convexity table with the package TiKz...
I already know how to make a variation table or a sign chart, but I have no idea to make a convexity one...

I joined a picture on which you'll be able to see how kind of table I want to create (sorry, it's in french)

convex.png
convex.png (8.9 KiB) Viewed 5159 times


Thanks to everyone who will help me!

PS : Sorry for my bad English, I'm french ;)

Pierrotdu18
Posts: 22
Joined: Sun Dec 01, 2013 11:24 pm

Postby Pierrotdu18 » Mon Mar 24, 2014 6:55 pm

I feel... alone :p

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

Postby Johannes_B » Mon Mar 24, 2014 7:02 pm

Your information are sparse. I myself don't know, what convexity tables are.
What have you tried so far? Meaning, can you post a compilable but minimal working example? That gives helpers a good starting point, and all are on the same base of important knowledge.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Pierrotdu18
Posts: 22
Joined: Sun Dec 01, 2013 11:24 pm

Postby Pierrotdu18 » Mon Mar 24, 2014 7:49 pm

Hmm... For the moment, I only have my phone, si I will send a piece of code when I'll have my computer...
Otherwise, to me, a convexity table is just a just like a sign chart, but instead of studying the sign of the function, it studies the convexity of the function, or in other words, the sign of the second derivative of the function.
If the function is convex, the word "convex" appears in the table just as the symbol "-" if the function was negative.
You car see in the picture the design that I'm looking for for the inflexion points.

Pierrotdu18
Posts: 22
Joined: Sun Dec 01, 2013 11:24 pm

Postby Pierrotdu18 » Mon Mar 24, 2014 9:16 pm

Finally, I carefully read the documentation of tkz-tab, and I found almost all what I wnated...

Here's a code that you can test :

  1. \documentclass[a4paper, 12pt, fleqn]{article}
  2. \usepackage{tkz-tab}
  3. \usepackage[utf8]{inputenc}
  4. \usepackage{amsmath}
  5. \usepackage[frenchb]{babel}
  6. \usepackage{makeidx}
  7.  
  8. \begin{document}
  9. \begin{tikzpicture}[double distance=0.04cm]
  10. \tkzTabInit[color,espcl=3.5, lgt=2.3]{$x$ /1,Convexité\\ de $\left(\mathcal{C}_f\right)$ /3}{$- \infty$, $a$, $+\infty$}\tkzTabLine{,\text{Convexe},\genfrac{}{}{0pt}{0}{\text{Point}}{\text{d'inflexion}},\text{Concave},}
  11. \draw (N21) to (M12);
  12. \draw (N21) to (M22);
  13. \end{tikzpicture}
  14. \end{document}


However, as you can see, there still is a problem of proportions...

Could you help me to make it prettier? :)

Pierrotdu18
Posts: 22
Joined: Sun Dec 01, 2013 11:24 pm

Postby Pierrotdu18 » Tue Mar 25, 2014 6:09 pm

Here's what I get with the code that I sent in my last post :

temp.png
temp.png (18.96 KiB) Viewed 5102 times

Pierrotdu18
Posts: 22
Joined: Sun Dec 01, 2013 11:24 pm

Postby Pierrotdu18 » Thu Mar 27, 2014 6:56 pm

Hm... Above all, do not rush... :p

hugovdberg
Posts: 133
Joined: Sat Feb 25, 2012 6:12 pm

Postby hugovdberg » Thu Mar 27, 2014 10:41 pm

The lack of replies might be caused by other people being busy with their own problems ;) and maybe also by you using a package with french documentation which reduces the number of people able to read it (I think I kind of understand it, but it takes me much longer than a plain english manual would, especially since I have to read everything because I don't know what to search for ;) )

That being said, I have a few tips to get the alignment at least a little better:

  1. \documentclass[a4paper, 12pt, fleqn]{article}
  2. \usepackage{tkz-tab}
  3. \usepackage[utf8]{inputenc}
  4. \usepackage{amsmath}
  5. \usepackage[frenchb]{babel}
  6. \usepackage{makeidx}
  7.  
  8. \begin{document}
  9. \begin{tikzpicture}[double distance=0.04cm]
  10. \tkzTabInit[color,espcl=3.5, lgt=2.3,deltacl=1]{$x$ /1,Convexité\\ de $\left(\mathcal{C}_f\right)$ /2}%
  11. {$- \infty$, $a$, $+\infty$}%
  12. \tkzTabLine{\text{Convexe},,\genfrac{}{}{0pt}{0}{\text{Point}}{\text{d'inflexion}},,\text{Concave}}
  13. \draw (N21) to (M12);
  14. \draw (N21) to (M22);
  15. \end{tikzpicture}
  16. \end{document}


Edits:
  • Changed /3 to /2 after "Convexité de C_f", this is simply the height of the row in cm
  • moved the comma's before convexe and after concave between the words and the point d'inflexion, this moves these words to the left and right side of the box instead of cramped up in the middle
  • added the deltacl option, which sets the margin before the first and after the last item

So all in all, as you're writing a french text I'd expect you to be able to at least understand the french manual, and the best summary of this post is RTFM ;) on page 10 it clearly displays graphically which option sets which length, you don't even have to understand a single word in the rest of the manual to understand that :P
Ubuntu 13.10 + Tex Live 2013 + Texmaker / Windows 7 Pro + MikTex 2.9 + TexnicCenter / Android 4.3 + TexPortal + DroidEdit

Pierrotdu18
Posts: 22
Joined: Sun Dec 01, 2013 11:24 pm

Postby Pierrotdu18 » Thu Mar 27, 2014 11:16 pm

Oh, thank you so much... :D
Indeed, I should have read the whole documentation, since, in addition, it's written in French :P

Otherwise, I love what you have done, but I still have a last question : could I "center" the words "convexe" and "concave" so that they don't stick to the edges? :)

hugovdberg
Posts: 133
Joined: Sat Feb 25, 2012 6:12 pm

Postby hugovdberg » Thu Mar 27, 2014 11:25 pm

Actually, this is all just a little hacking about at the code, trying to add some more columns to have a little more fine grained placement options, maybe there is a more elegant solution in the manual :P
I reduced the column spacing a little, added some commas to move the text away from the borders, and changed the coordinates of the triangle.

  1. \documentclass[a4paper, 12pt, fleqn]{article}
  2. \usepackage{tkz-tab}
  3. \usepackage[utf8]{inputenc}
  4. \usepackage{amsmath}
  5. \usepackage[frenchb]{babel}
  6. \usepackage{makeidx}
  7.  
  8. \begin{document}
  9. \begin{tikzpicture}[double distance=0.04cm]
  10. \tkzTabInit[color,espcl=2.5, lgt=2.3,deltacl=1]{$x$ /1,Convexité\\ de $\left(\mathcal{C}_f\right)$ /2}%
  11. {$- \infty$,, $a$,, $+\infty$}%
  12. \tkzTabLine{,\text{Convexe},,,\genfrac{}{}{0pt}{0}{\text{Point}}{\text{d'inflexion}},,,\text{Concave},}
  13. \draw (N31) to (M12);
  14. \draw (N31) to (M42);
  15. \end{tikzpicture}
  16. \end{document}
Ubuntu 13.10 + Tex Live 2013 + Texmaker / Windows 7 Pro + MikTex 2.9 + TexnicCenter / Android 4.3 + TexPortal + DroidEdit


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 5 guests