[Tex/LaTex] Remove space after cases environment

casesspacing

After I write a begin cases environment, usually there appears a big space which bothers me. I do not know how to remove it.

$\Hom(V,U)=\begin{cases}\{i:V\rightarrow U\vert i(v)=v, \forall v\in V\}, \text{ dac\u a } V\subset U\\
\emptyset, \text{ altfel}\end{cases}$.

It looks something like this:enter image description here

Can you give me any suggestions?

Best Answer

Your code snippet -- at least the one that was posted initially -- cannot give rise to the screenshot you've posted as the . ("period", "full stop") symbol occurs before \end{cases}.

I suggest you put a comma at the end of the first line of the cases environment and a period at the end of the second -- before the \end{cases} statement.

In addition to fixing some obvious typos, you may want to look into using the cases environment more systematically, specifically, by using the feature of splitting the result and conditioning information via an & character.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\Hom}{Hom}
\let\ri\rightarrow

\begin{document}
\[
\Hom(V,U)=
% Don't use "\vert" here; instead, use "\mid"
% And, don't use ":" here; instead, use "\colon"
\begin{cases}      
    \{i\colon V\ri U \mid i(v)=v, \forall v\in V\} & \text{dac\u a $V\subset U$,}\\
    \emptyset & \text{altfel.}
\end{cases}
\]
\end{document} 
Related Question