Math & ScienceVertical and horizontal centering of formulars

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
masoher
Posts: 2
Joined: Sun Nov 21, 2010 3:04 pm

Vertical and horizontal centering of formulars

Post by masoher »

Hi,

i created a table comprising mathematical formulars. But these formulars seem to stick at the bottom of each cell and that makes the whole tabular ugly.

Here is the table:

Code: Select all

\begin{tabular}{|l|l|l|l|l|l|}	
  \hline \multicolumn{2}{|c|}{Kriterium}  & \multicolumn{2}{|c|}{Konvergenz} & \multicolumn{2}{|c|}{Divergenz} \\
  \hline Bezeichnung & Formel & notw. & hinr. & notw. & hinr. \\
  \hline Cauchy & $\displaystyle\left|\sum_{n=1}^{\infty}{a_n}\right|<\varepsilon$ & X & X & & \\
  \hline Leibniz & $\displaystyle\left\{\begin{array}{l} b_n\geq0\\{\displaystyle\lim_{n\to\infty}b_n = 0}\end{array}\right\} a_n :=(-1)^{n+1}b_n$  & & X & & \\
  \hline Majoranten & $\displaystyle\left|{a_n}\right|\leq{b_n}; \sum_{n=1}^{\infty}{b_n}$ konv & & ABS & & \\
  \hline Minoranten & $\displaystyle{0}\leq{b_n}\leq{a_n}$ ffa $\displaystyle n\in\mathds{N};\sum_{n=1}^{\infty}{b_n}$ div  & & & & X \\
  \hline \multirow{2}{*}{Quotienten} & $\displaystyle {\limsup_{x\to\infty}}\left|{\frac{a_{n+1}}{a_n}}\right| < 1$ & & ABS & & \\
  \cline{2-6} &  ${\displaystyle {\limsup_{x\to\infty} }\left|{\frac{a_{n+1}}{a_n}}\right| > 1}$ & & & & X \\
  \hline \multirow{3}{*}{Wurzel} & $\displaystyle\sqrt[n]{\left|{a_n}\right|}$ unbeschr\"{a}nkt & & & X & \\
  \cline{2-6} & $\displaystyle\limsup_{n\to\infty}{\sqrt[n]{\left|{a_n}\right|}}<1$ & & ABS & & \\
  \cline{2-6} & $\displaystyle\limsup_{n\to\infty}{\sqrt[n]{\left|{a_n}\right|}}>1$ & & & & X \\
  \hline Limes & $\displaystyle\lim_{n\to\infty}{a_n=0}$ & X & & & \\
  \hline
\end{tabular}
Basically I want all cell-contents to be vertically and horzontally centered.

Ideas for improvement ?

I just began writing Latex (Yesterday :roll:) and it's my first post in this forum, so please excuse me in case I did something 'newbish' :).

Greetings

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Vertical and horizontal centering of formulars

Post by frabjous »

Could you produce a complete minimal working example -- i.e., one that can be compiled on its own, with a document class and preamble, etc. When I try to insert your snippet into a minimal document, it does not compile; I get "undefined command sequence" errors. More likely than not, this is because you are using commands defined by some package, and it's difficult to try to guess what those packages are.
masoher
Posts: 2
Joined: Sun Nov 21, 2010 3:04 pm

Vertical and horizontal centering of formulars

Post by masoher »

Stupid me.

I hope it's minimal enough:

Code: Select all

\documentclass[a4paper,10pt]{article}
%\documentclass[a4paper,10pt]{scrartcl}

\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\usepackage{dsfont}
\usepackage{multirow}
\usepackage{geometry}

\geometry{a4paper,left=36mm,right=36mm}

\renewcommand{\arraystretch}{1.6}

\begin{document}
\title{Grenzwertanalyse von Reihen der Form $\displaystyle\sum_{n=1}^{\infty}{a_n}$}
\maketitle

\begin{tabular}{|l|l|l|l|l|l|}	
  \hline \multicolumn{2}{|c|}{Kriterium}  & \multicolumn{2}{|c|}{Konvergenz} & \multicolumn{2}{|c|}{Divergenz} \\
  \hline Bezeichnung & Formel & notw. & hinr. & notw. & hinr. \\
  \hline Cauchy & $\displaystyle\left|\sum_{n=1}^{\infty}{a_n}\right|<\varepsilon$ & X & X & & \\
  \hline Leibniz & $\displaystyle\left\{\begin{array}{l} b_n\geq0\\{\displaystyle\lim_{n\to\infty}b_n = 0}\end{array}\right\} a_n :=(-1)^{n+1}b_n$  & & X & & \\
  \hline
\end{tabular}

\end{document}
Post Reply