0

I'm using some semantics formula that contains both math symbols and text inside a p{} column in a tabular environment. The formula is too long to fit in the column, then LaTeX has to create new lines inside the formula.

The problem is that it adds much space between some symbols of the formula, and I'd like to know if there is a way to prevent that (other than telling LaTeX manually where to add new lines).

Here is a MWE:

\documentclass{article} \begin{document} \begin{tabular}[t]{rlp{5cm}} {NP1} &$=$ &$\lambda{x_e}.~\textsc{gen}_{\textsc{e}}: \textrm{relevant}_c(\textsc{e})[\textrm{dance}(\textsc{e}) \wedge \textrm{beautiful}(\textsc{e}) \wedge \textrm{agent}(\textsc{e}) = x]$ \end{tabular} \end{document} 

In this example, the output looks like this: image

Thanks for the help!

1 Answer 1

0

You can align the p-column. Based on this answer I added the following to your MWE

>{\raggedright}p{5cm} 

Or to have the column to be automatically in math mode even insert the $-signs.

\documentclass{article} \usepackage{array} \begin{document} \begin{tabular}[t]{rl >{\raggedright\arraybackslash$}p{6.5cm}<{$}} {NP1} &$=$ &\lambda{x_e}.~\textsc{gen}_{\textsc{e}}: \textrm{relevant}_c(\textsc{e})[\textrm{dance}(\textsc{e}) \wedge \textrm{beautiful}(\textsc{e}) \wedge \textrm{agent}(\textsc{e}) = x] \end{tabular} \end{document} 
1
  • Thank you for the help, that was simpler than what I expected! Commented May 26, 2014 at 13:01

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.