TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The code:


    row sep=\\,
    col sep=&,
    trim cells,
    columns/f(x)/.style={string type, column type={|C|}},
    columns/f'(x)/.style={string type, column type={C|}},
    every nth row={1}{before row=\hline},
    every head row/.style={before row=\hline, after row=\hline},
    every last row/.style={after row=\hline}
f(x) & f'(x) \\
{$k$} & $0$\\
{$x$} & $1$\\
{$x^{n}$} & $n\cdot x^{n-1}$\\
{$u^{n}$} & $n\cdot x^{n-1}\cdot u^{'}$\\
{$\sqrt{x}$} & $\dfrac{1}{2\sqrt{x}}$\\
{$\sqrt[n]{u}$} & $\cfrac{u^{'}}{n\sqrt[n-1]{u^{n-1}}}$\\
{$\ln u$} & $\dfrac{u^{'}}{u}$\\
{$\log_{a}u$} & $\dfrac{u^{'}}{u}\cdot\dfrac{1}{\ln a}$\\
{$a^{u}$} & $a^{u}\cdot u^{'}\cdot\ln a$\\
{$e^{x}$} & $e^{x}$\\
{$e^{u}$} & $e^{x}\cdot u^{'}$\\
{$\sin u$} & $\cos u\cdot u^{'}$\\
{$\cos u$} & $-\sin u\cdot u^{'}$\\
{$\tan u$} & $\dfrac{u^{'}}{\cos^{2}u}$\\
{$\arcsin u$} & $\dfrac{u^{'}}{\sqrt{1-u^{2}}}$\\
{$\arccos u$} & $-\dfrac{u^{'}}{\sqrt{1-u^{2}}}$\\
{$\arctan u$} & $\dfrac{u^{'}}{1+u^{2}}$\\
{$\sinh u$} & $u^{'}\cdot\cosh u$\\
{$\cosh u$} & $u^{'}\cdot\sinh u$\\
{$\tanh u$} & $-u^{'}\cdot cosech^{2}u$\\
{$cosech\: u$} & $-u^{'}\cdot cosech\: u\cdot\coth u$\\
{$sech\: u$} & $-u^{'}\cdot sech u\cdot\tanh u$\\
{$coth\: u$} & $-u^{'}\cdot cosech^{2} u$\\
\caption{Tabla De Derivadas}

I want put in blue color to the text in f(x) and f'(x) When I use in a cell a fraction expression, the text touches the bottom line and top line of the cell, How can I increase the high of these cells?


share|improve this question
up vote 2 down vote accepted

You can simplifyt things a little by putting the content in math mode automatically and removing the header row since you have math in the first row


    row sep=\\,
    col sep=&,
    column type=,
    string type,header=false,
    begin table=\begin{tabular}{|C|C|},
    every head row/.style={after row=\hline,output empty row},
    every nth row={1}{before row=\hline},
    every row/.append style={before row=\hline},
    every last row/.style={after row=\hline},
    postproc cell content/.style={/pgfplots/table/@cell content/.add={$\displaystyle}{$}},
\color{blue}f(x)    & \color{blue}f'(x)                    \\
k                   & 0                                    \\
x                   & 1                                    \\
x^{n}               & n\cdot x^{n-1}                       \\
u^{n}               & n\cdot x^{n-1}\cdot u'               \\
\sqrt{x}            & \dfrac{1}{2\sqrt{x}}                 \\
\sqrt[n]{u}         & \cfrac{u'}{n\sqrt[n-1]{u^{n-1}}}     \\
\ln u               & \dfrac{u'}{u}                        \\
\log_{a}u           & \dfrac{u'}{u}\cdot\dfrac{1}{\ln a}   \\
a^{u}               & a^{u}\cdot u'\cdot\ln a              \\
e^{x}               & e^{x}                                \\
\caption{Tabla De Derivadas}

enter image description here

share|improve this answer
Thank you very much, it works very fine and you've solved the problem with math expressions too.I've added [!hbt] in \begin{table} because i have got some text before the table, and now the table appears after this text. Thank you very much! – Tobal Aug 28 '13 at 7:19
@user1792344 My pleasure – percusse Aug 28 '13 at 8:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.