Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

feste Spaltenbreite in Tabellen

1 view
Skip to first unread message

H0Iger SchuIz

unread,
Feb 1, 2021, 10:38:23 AM2/1/21
to
Hallo,

ich möchte Wertetabellen zum Auffüllen setzen. Dazu hätte ich gerne eine
feste Spaltenbreite und innerhalb der Spalten soll zentriert werden.

Ich haben das Paket array gefunden und folgendes probiert:

======schnippel=======
\documentclass[12pt,a4paper]{article}


\usepackage{array}

\newcolumntype{C}{>{\centering}m{1cm}}

\begin{document}


\[\begin{array}{l|*5{C}}
x & 0 & +0{,}5 & +1 & +1{,}5 & +2\\
&&&&&
\end{array}\]


\end{document}
========dischnappel======

Erstes Problem: Die "+2" in der letzten Spalte ist ach oben verschoben.

Das zweite Problem ergibt sich, wenn ich eine waagerechte Linie einfügen
möchte:

======schnippel=======


Da bekomme ich jedoch die Meldung:

! Extra alignment tab has been changed to \cr.
<recently read> \endtemplate

l.14 ^^I^^I^^I &
&&&&
?

Kann mir da jemand einen Tipp geben?

Danke.

hs

samcarter8

unread,
Feb 1, 2021, 10:58:46 AM2/1/21
to
Für Problem 1:

\documentclass[12pt,a4paper]{article}


\usepackage{array}

\newcolumntype{C}{>{\centering\arraybackslash}m{1cm}}

\begin{document}


\[\begin{array}{l|*5{C}}
x & 0 & +0{,}5 & +1 & +1{,}5 & +2 \\
&&&&&
\end{array}\]


\end{document}

H0Iger SchuIz

unread,
Feb 2, 2021, 5:48:23 AM2/2/21
to
samcarter8 <sam.c...@aol.com> wrote:

> \newcolumntype{C}{>{\centering\arraybackslash}m{1cm}}

Cool. Danke. Ich versteh|s noch nicht ganz, aber es löst bisher alle
Probleme.

Danke.

hs

Tobias Dussa

unread,
Feb 2, 2021, 6:45:05 AM2/2/21
to
>> \newcolumntype{C}{>{\centering\arraybackslash}m{1cm}}
> Cool. Danke. Ich versteh|s noch nicht ganz, aber es löst bisher alle
> Probleme.

https://tex.stackexchange.com/questions/387737/what-is-arraybackslash-doing-on-my-table-column

Cheers,
Toby.
--
If "Microsoft Word" is the right tool to write longer texts, then why is it not
called "Microsoft Sentence" or "Microsoft Paragraph"?

H0Iger SchuIz

unread,
Feb 4, 2021, 6:03:22 AM2/4/21
to
Tobias Dussa <tob...@dussa.de> wrote:

> https://.... doing-on-my-table-column

Danke.

hs
0 new messages