1

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?

  • Did you really have /] in your code? – Bernard Dec 4 '15 at 14:19
  • 1
    Welcome to TeX.SE. The code snippet you've posted does not give rise to the associated screenshot, since the . (dot) occurs before \end{cases}. Please fix either the code or the screenshot. Incidentally, is \ri a synonym for \to? – Mico Dec 4 '15 at 14:20
  • Sorry for the trouble, the code was part of a bigger code. \ri is a synonym for \rightarrow. – Iulia Dec 4 '15 at 14:25
8

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} 
10

cases was designed as a matrix to have two horizontal columns, separated by \quad, which is triggered by &. the second column was intended to hold the explanation.

you have run the two parts together, and the \quad intended to come between them has instead been added at the end, before the period.

here is the intended use of this environment.

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

\begin{document}
\[
\Hom(V,U)=
\begin{cases}      
    \{i\colon V\ri U \vert i(v)=v, \forall v\in V\}
      & \text{dac\u a $V\subset U$,}\\
    \emptyset & \text{altfel}
\end{cases} .
\]
\end{document} 

output of example code

by the way, mico's recommendation to use \mid rather than \vert is a good one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.