Text hypenation inside array-typed environment

I'm trying to write a cases or array environment, inside display mode, with some long line of text. The thing is I can't achieve a linebreak. I know for certain that array won't allow this. I also know that a "brute force" solution can be achieved easily. However, before forcing a linebreak where I think it would be nice, I thought about asking here, not just for aesthetics but for learning too.

Here's the code I'm using

\ProvidesPackage{mystyle} \usepackage[spanish]{babel} %Idioma \usepackage[utf8]{inputenc} %Codificacion \usepackage[T1]{fontenc}    %Para que use las formas vectoriales de las fuentes %\usepackage{lmodern}       %Cambia Computer Modern por Latin Modern \usepackage{mathtools}      %Paquete matemático general \usepackage{commath}        %Funcionalidad matemática adicional, como por ejemplo, derivadas \usepackage{hyperref}       %Links dinámicos en los capítulos y demás \hypersetup{hidelinks}      %Configura hyperref \usepackage{siunitx}        %Notación científica y unidades \usepackage{cancel}         %Para tachar expresiones matemáticas \usepackage{graphicx}       %Importar imágenes  \begin{align}  \varepsilon_{\underbrace{ijl\hdots}_{n \text{ índices}}} =    \begin{cases}     0 & \text{si hay dos índices iguales}   \\                                    1 & \text{si todos los índices son distintos y son una permutación par de $1,2,\hdots n$ }   \\    -1 & \text{si todos los índices son distintos y son una permutación impar de $1,2,\hdots n$ }    \end{cases} \end{align}  

Here the output:

Text hypenation inside array-typed environment

It's very isolated from the rest of the text so it's impossible to take a screenshot where you can see the margins, but I think the equation number will suffice.

So, the thing is, is there an array-typed environment that allows automatic hyphenation?

Replay

Set the contents <stuff> inside a \parbox[t]{<len>}{<stuff>} of fixed width <len> that is [t]op-aligned:

Text hypenation inside array-typed environment

\documentclass{article}
\usepackage[spanish]{babel} %Idioma
\usepackage[utf8]{inputenc}
\usepackage{amsmath}

\begin{document}

\begin{align}
 \varepsilon_{\underbrace{ijl\hdots}_{n \text{ índices}}} =
  \begin{cases}
    0 & \text{si hay dos índices iguales}   \\
    1 & \parbox[t]{.6\linewidth}{si todos los índices son distintos y son una permutación par de $1,2,\hdots n$ }   \\
   -1 & \parbox[t]{.6\linewidth}{si todos los índices son distintos y son una permutación impar de $1,2,\hdots n$ }
  \end{cases}
\end{align} 

\end{document}

Category: line breaking Time: 2014-05-29 Views: 1

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.241 (s). 12 q(s)