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.

How do I get the line to break in an equation like in the example below between starName=name and birthdate=1960.

Relational Algebra exmaple

\begin{document}
$\Pi_{movieTitle} \sigma_{starName = name \wedge birthDate = 1960}(StarsIn \times MovieStar)$
\end{document}
share|improve this question
    
Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  Jubobs Mar 2 at 17:34

2 Answers 2

up vote 2 down vote accepted
\documentclass{article}
\usepackage{stackengine}
\stackMath
\begin{document}
$\pi_{\mathtt{movieTitle}}\sigma 
  \stackunder{\scriptstyle\mathtt{starName=name}}
    {\scriptstyle\wedge\mathtt{birthdate=1960}}
  (\mathtt{StarsIn} \times \mathtt{MovieStar}).$
\end{document}

enter image description here

share|improve this answer
    
Thank you Steven! –  RSB Mar 2 at 17:47

Here's a solution that uses the \substack macro of the amsmath package:

enter image description here

\documentclass{article}
\usepackage{amsmath} % for \substack macro
\newcommand{\V}[1]{\texttt{#1}} % place argument in monospaced font
\begin{document}
$\Pi_{\V{MovieTitle}} \ 
\sigma_{\substack{\V{StarName} = \V{name}\\ \wedge\V{BirthDate} = 1960}}\ (\V{StarsIn}\times \V{MovieStar})$
\end{document}
share|improve this answer

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.