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.

I am trying to use itemize inside an equation, but I am getting a bunch of errors

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
\begin{equation}
\begin{itemize}
\item V_{p}=\Biggl\{F\in\Phi\hspace{2mm}\Bigg|\begin{cases}
p^2\nmid \text{disc}(F)\hspace{1mm} \text{if}\hspace{1mm} p\neq 2
\item\text{disc}(F)\equiv 1\pmod 4 \vee \text{disc}(F)\equiv 8\vee 12 
\pmod{16} \hspace{1mm}\text{if} \hspace{1mm}p=2\Biggr\}
\end{itemize}
\end{equation}
\end{document}

so I tried with begin cases instead but I am not really satisfied with how it looks

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
\begin{equation}
V_{p}=\Biggl\{F\in\Phi\hspace{2mm}\Bigg|\begin{cases}
p^2\nmid \text{disc}(F)\hspace{1mm} \text{if}\hspace{1mm} p\neq
2\\\text{disc}(F)\equiv 1\pmod 4 \vee \text{disc}(F)\equiv 8\vee 12 
\pmod{16} \hspace{1mm}\text{if} \hspace{1mm}p=2\Biggr\}
\end{cases}
\end{equation}
\end{document}

and the output enter image description here

I would like to get something similar but without being forced to use ''begin cases'', I thought itemize would look better after the vertical line. Does anyone have an idea how to make this equation to look prettier?

Thank you in advance

share|improve this question
    
Instead of cases you could use gathered. And instead of the manual \hspace, it would be better if you just left a space in the \text{} macro which is where you want the space anyway. –  Peter Grill Mar 19 at 18:14
1  
@user124471 you could also use aligned within the equation environment. –  Nicolas Mar 19 at 19:29

2 Answers 2

up vote 5 down vote accepted

A solution with small bullets, and your code simplified, using the nccmath , relsize and braket packages. I patched the definition of the \Set command thanks to David Carlisle to improve the spacing of the braces. Note that "discr" is actually a math operator, and I declare it as such, in order to have better horizontal spacings.

    \documentclass[11pt, a4paper]{article}
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage[textwidth = 15cm]{geometry} 
    \usepackage{lmodern, amssymb}
    \usepackage{mathtools}
    \usepackage{braket, relsize, nccmath} 
    \renewcommand\Set[1]{%
    \csname Set \endcsname{\mskip-\medmuskip#1\mskip-\medmuskip}}%
    \DeclareMathOperator{\disc}{disc}
     \pagestyle{empty}

    \begin{document}

    \begin{equation}
    V_{p}=\Set{%
    F\in\Phi | %
    \begin{medsize}\begin{array}{@{\mathsmaller{\bullet}\enspace}l@{}}
    p^2 \nmid \disc(F) \quad \text{if}\enspace p \neq 2\\[1ex]
    \disc(F)\equiv 1\pmod 4 \vee \disc(F)\equiv 8\vee 12
    \pmod{16} \quad\text{if} \enspace p =2
    \end{array}\end{medsize}
    }%
    \end{equation}

     \end{document}

enter image description here

share|improve this answer
    
Thank you Bernard. The equation looks great! –  user124471 Mar 23 at 16:30

I'd avoid lengthy set descriptions; just provide two definitions for p different from 2 and for 2:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}

\DeclareMathOperator{\disc}{disc}

\begin{document}

We say that $\disc(F)$ is \emph{quozzy} if $\disc{F}\equiv1\pmod{4}$ or
$\disc(F)\equiv8\pmod{16}$ or $\disc(F)\equiv12\pmod{16}$; we shall use
this notion mostly for $p=2$; then we set
\begin{equation}
\begin{aligned}
V_{p}&=\{\, F\in\Phi : p^2\nmid \disc(F)\,\}\quad(p\neq 2) \\
V_{2}&=\{\, F\in\Phi : \text{$\disc(F)$ is quozzy}\,\}
\end{aligned}
\end{equation}

\end{document}

Choose a better word than “quozzy”.

enter image description here

share|improve this answer
    
Thank you Egreg. This is a good alternative. –  user124471 Mar 23 at 16:31

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.