TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

I just have a question. I do have the impression that s21 (and also s22, s23, s24) is not exactly in the middle of the lines "Falls Spieler 1 'schiessen' wählt, wähle 'schiessen'." and "Falls Spieler 1 'passen' wählt, wähle 'passen'." How can I center s21 (and also s22, s23, s24) horizontally and vertically? I hope you see what I mean. Thank you for your help!!

enter image description here

\documentclass[a4paper, fontsize=11pt]{scrbook}
\usepackage{geometry} \geometry{a4paper, top=25mm, left=25mm, right=25mm, bottom=20mm, headsep=10mm, footskip=12mm} 

\usepackage[ngerman]{babel}  
\usepackage[T1]{fontenc}         
\usepackage[latin1]{inputenc}   
\usepackage{csquotes}             

\usepackage{amsmath} 
\usepackage{amssymb} 

\usepackage{multirow,array} 
\usepackage{arydshln}         

\begin{document}

\begin{center}
\begin{tabular}{l|l}

\multirow{2}{10mm}{$s_{21}$} & Falls Spieler 1 \enquote*{schiessen} wählt, wähle \enquote*{schiessen}. \\
& Falls Spieler 1 \enquote*{passen} wählt, wähle \enquote*{passen}. \\
\hline

\multirow{2}{10mm}{$s_{22}$} & Falls Spieler 1 \enquote*{schiessen} wählt, wähle \enquote*{schiessen}. \\
& Falls Spieler 1 \enquote*{passen} wählt, wähle \enquote*{schiessen}. \\
\hline

\multirow{2}{10mm}{$s_{23}$} & Falls Spieler 1 \enquote*{schiessen} wählt, wähle \enquote*{passen}. \\
& Falls Spieler 1 \enquote*{passen} wählt, wähle \enquote*{passen}. \\
\hline

\multirow{2}{10mm}{$s_{24}$} & Falls Spieler 1 \enquote*{schiessen} wählt, wähle \enquote*{passen}. \\
& Falls Spieler 1 \enquote*{passen} wählt, wähle \enquote*{schiessen}. \\

\end{tabular}
\end{center}

\end{document}
share|improve this question
    
Your MWE is not complete. In compilation I get error \textcurrency is not available in T1 coding. – Zarko Feb 10 at 10:53
up vote 3 down vote accepted

For centering you need to make two changes in your code:

  • first column type should be c
  • for multirow use \multirow{2}*{...} instead \multirow{2}{10mm}{

Since I can not compile your original MWE, I comment parts which doing troubles. SO I get the following result:

enter image description here

\documentclass[a4paper,fontsize=11pt]{scrbook}
\usepackage[margin=25mm]{geometry} 

\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{csquotes}

%\usepackage{amsmath,amssymb}

\usepackage{array,multirow}
\usepackage{arydshln}

\begin{document}
    \begin{center}
\begin{tabular}{c|l}
\multirow{2}*{$s_{21}$} 
    &   Falls Spieler 1 \\    %\enquote*{schiessen} wählt, wähle \enquote*{schiessen}. \\
    &   Falls Spieler 1 \\    %\enquote*{passen} wählt, wähle \enquote*{passen}. \\
\hline
\multirow{2}*{$s_{22}$} 
    &   Falls Spieler 1 \\    %\enquote*{schiessen} wählt, wähle \enquote*{schiessen}. \\
    &   Falls Spieler 1 \\    %\enquote*{passen} wählt, wähle \enquote*{schiessen}. \\
\hline
\multirow{2}*{$s_{23}$} 
    &   Falls Spieler 1 \\    %\enquote*{schiessen} wählt, wähle \enquote*{passen}. \\
    &   Falls Spieler 1 \\    %\enquote*{passen} wählt, wähle \enquote*{passen}. \\
\hline
\multirow{2}*{$s_{24}$} 
    &   Falls Spieler 1 \\    %\enquote*{schiessen} wählt, wähle \enquote*{passen}. \\
    &   Falls Spieler 1 \\    %\enquote*{passen} wählt, wähle \enquote*{schiessen}. \\
\hline
\end{tabular}
    \end{center}
\end{document}
share|improve this answer
    
Thanks a lot!!! : ) – hpz1719 Feb 10 at 11:47

Without multirow:

\documentclass[a4paper,fontsize=11pt]{scrbook}
\usepackage[margin=25mm]{geometry} 
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
%\usepackage{amsmath,amssymb}
\usepackage{array}

\begin{document}
\begin{center}
\begin{tabular}{>{$}c<{$}|m{0.55\linewidth}}\hline
  s_{21} &   Falls Spieler 1 \enquote*{schiessen} wählt, wähle 
  \enquote*{schiessen}\newline
             Falls Spieler 1 \\\hline
  s_{22} &   Falls Spieler 1 \newline
             Falls Spieler 1 \\   \hline
  s_{23} &   Falls Spieler 1 \newline 
             Falls Spieler 1 \\  \hline
  s_{24} &   Falls Spieler 1 \newline
             Falls Spieler 1 \\\hline
\end{tabular}
\end{center}
\end{document}

enter image description here

share|improve this answer
    
Thank you for your help! : ) – hpz1719 Feb 10 at 16:34

You also might use the \makecell command, which allows for line breaks inside cells I took the liberty to slightly improve your table (in my opinion) with a thicker vertical rule and increasing \arraystretch:

\documentclass[a4paper, fontsize=11pt]{scrbook}
\usepackage{geometry} \geometry{a4paper, top=25mm, left=25mm, right=25mm, bottom=20mm, headsep=10mm, footskip=12mm}

\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}

\usepackage{amsmath}
\usepackage{amssymb}

\usepackage{array, makecell}
\usepackage{arydshln}

\begin{document}

\begin{center}
  \renewcommand{\cellalign}{lc}\renewcommand\arraystretch{1.333}
  \begin{tabular}{ >{$}c<{$}!{\vrule width 1pt}l}

    s_{21} & \makecell{Falls Spieler 1 \enquote*{schiessen} wählt, wähle \enquote*{schiessen}. \\
    Falls Spieler 1 \enquote*{passen} wählt, wähle \enquote*{passen}. }\\
    \hline

    s_{22} & \makecell{Falls Spieler 1 \enquote*{schiessen} wählt, wähle \enquote*{schiessen}. \\
    Falls Spieler 1 \enquote*{passen} wählt, wähle \enquote*{schiessen}.} \\
    \hline

    s_{23} & \makecell{ Falls Spieler 1 \enquote*{schiessen} wählt, wähle \enquote*{passen}. \\
    Falls Spieler 1 \enquote*{passen} wählt, wähle \enquote*{passen}.} \\
    \hline

    s_{24} & \makecell{Falls Spieler 1 \enquote*{schiessen} wählt, wähle \enquote*{passen}. \\
    Falls Spieler 1 \enquote*{passen} wählt, wähle \enquote*{schiessen}.} \\

  \end{tabular}
\end{center}

\end{document} 

enter image description here

share|improve this answer
    
Thank you also for your answer! : ) – hpz1719 Feb 10 at 16:35

Your Answer

 
discard

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.