Take the 2-minute tour ×
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.

So I have the table below. It's very ugly how e.g. the contents of the second cell in row two is split. I'd prefer the automatic break to only occur between words -- that is, I don't want it to split any of the words/symbol strings. Is there any way to do this? Thanks a lot.

\documentclass[11pt,a4paper]{book} \setcounter{secnumdepth}{4}
\usepackage{graphicx} \usepackage{gb4e} \usepackage{tipa}
\usepackage{setspace} \usepackage[T1]{fontenc} \usepackage{multirow}
\setcounter{part}{-1} \setcounter{subsection}{0}

\begin{document}

\begin{table}   
\begin{center}
    \begin{tabular}{ |p{0.18\textwidth}| p{0.18\textwidth}| p{0.18\textwidth} p{0.18\textwidth}|p{0.18\textwidth} |}  \hline  \textbf{S>O} &
    \textbf{A'rau} & \textbf{Northern (Zam)} & \textbf{Intermediate(Ba'ro)} &\textbf{Southern (nGora)}\\ \hline  1(>3) & -isratha $\sim$ -sajana & -iriska:ta & -ira:tha & irijatha\\ \hline   
    \end{tabular}
\end{center}  
\caption{Past counterfactual paradigm}  
\label{pastCFcompare}  
\end{table}

\end{document}
share|improve this question
    
Not related to your question, but note that you should use \centering instead of \begin{center}...\end{center}, due spacing issues. –  Xavier Jul 2 '13 at 5:13

1 Answer 1

After some corrections, in particular \\, not \ before \hline. As far as I understand, the string sajana should appear in the next line. If - belongs to the string, all may be surrounded by \mbox.

\documentclass[11pt,a4paper]{book} 
\setcounter{secnumdepth}{4} 
\usepackage{graphicx} 
\usepackage{gb4e}
\usepackage{tipa}
\usepackage{setspace}
\usepackage[T1]{fontenc}
\usepackage{multirow}

\begin{document}

\setcounter{part}{-1} \setcounter{subsection}{0}

\begin{table} 
\begin{center} 
\begin{tabular}{ |p{0.18\textwidth}| p{0.18\textwidth}| p{0.18\textwidth}| p{0.18\textwidth}|p{0.18\textwidth} |} 
  \hline 
  \textbf{S>O} & \textbf{A'rau} & \textbf{Northern (Zam)} & \textbf{Intermediate (Ba'ro)} &\textbf{Southern (nGora)}\\
  \hline 
  1(>3) & -isratha $\sim$ -sajana & -iriska:ta & -ira:tha & irijatha\\
  \hline 
\end{tabular}
\end{center}
\caption{Past counterfactual paradigm}
\label{pastCFcompare} 
\end{table}

\end{document}

enter image description here

share|improve this answer
    
Thanks a lot -- but this is precisely the issue I'm trying to resolve: the dash belongs to the string. How can \mbox solve this? –  mateuz Jul 2 '13 at 5:33
    
Try putting \mbox{-sajana}. \mbox will but a box around it's argument, boxes cannot be split over lines so it will be all together on one line. –  GDanger Jul 2 '13 at 6:21

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.