Texto fuera de un entorno de casos y dentro de un entorno enumerado

Texto fuera de un entorno de casos y dentro de un entorno enumerado

Estoy intentando escribir algo de texto al lado de un entorno de casos. A continuación se muestra mi MWE. Parece que tengo dos problemas: el espacio adicional entre los números de la lista enumerada y el contenido de dicha lista y los corchetes no son lo suficientemente grandes. Mi primer intento (que utilizó exclusivamente el entorno de casos) resultó en errores. Vi esto en algún lugar de la web (algún foro de Texas, lo siento, no estoy seguro de cuál) y lo probé.

   \documentclass{article}
   \usepackage[left=1.65cm,right=1.65cm,top=2.45cm,bottom=2.60cm]{geometry}
    \usepackage{amsmath,amssymb,amscd,amsbsy,array,color}
\usepackage{fancyhdr,framed,latexsym,multicol,pstricks,slashed,xcolor,multicol}
    \usepackage{picture}
    \usepackage{indentfirst}
    \usepackage{enumitem}

    \usepackage[amsmath,framed,thmmarks]{ntheorem}


\title{Analysis Notes}
\author{Michael Dykes}

\begin{document}

\maketitle



Prove that: 
    \begin{enumerate}
        \item   \begin{align*}
                    \begin{split}
                        2-x, &\textrm{ if } x \le 1\\
                        \frac{1}{x}, &\textrm{ if } x> 1.
                    \end{split}\;\bigg\} \quad \text{is one-to-one but  not onto $\mathbb{R}$.}
                \end{align*}

        \item   \begin{align*}
            \begin{split}
                x+4, &\textrm{ if } x \le -2\\
                -x, &\textrm{ if } -2 < x < 2\\
                x-4 &\textrm{ if } x \ge 2.
            \end{split}\;\bigg\} \quad \text{is onto $\mathbb{R}$ but not one-to-one.}
        \end{align*}
    \end{enumerate}

\end{document}

No estoy seguro de qué hacer desde aquí.

-MARYLAND

Respuesta1

Para evitar que haya un espacio entre los números de enumeración y las fórmulas asociadas, utilice un entorno matemático en línea en lugar de un entorno matemático de visualización.

Para obtener el tamaño correcto de las llaves de la derecha, le sugiero que utilice un drcases*entorno proporcionado por el mathtoolspaquete. (La "r" en "rcases" denota el hecho de que la llave se coloca a la derecha del entorno. La versión "con asterisco" de este entorno le evita tener que encerrar el material acondicionador en \textenvoltorios).

ingrese la descripción de la imagen aquí

\documentclass{article}
\usepackage[hmargin=1.65cm,top=2.45cm,bottom=2.6cm]{geometry}
\usepackage{mathtools,amsfonts}

\begin{document}

Prove that: 
\begin{enumerate}
\item \qquad 
$\begin{drcases*}
     2-x, &if $x \le 1$\\
     1/x, &if $x> 1$.
\end{drcases*}$
is one-to-one but  not onto $\mathbb{R}$.

\item \qquad
$\begin{drcases*}
     x+4, &if $x \le -2$  \\
     -x,  &if $-2 < x < 2$\quad\\
     x-4  &if $x \ge 2$.
\end{drcases*}$
is onto $\mathbb{R}$ but not one-to-one.
\end{enumerate}

\end{document}

Apéndicepara abordar la pregunta de seguimiento del OP: si el material matemático debe estar rodeado por llaves en ambos lados, probablemente sea mejor configurar un arrayentorno personalizado de la siguiente manera:

ingrese la descripción de la imagen aquí

\documentclass{article}
\usepackage[hmargin=1.65cm,top=2.45cm,bottom=2.6cm]{geometry}
\usepackage{amsfonts,array}
\newenvironment{myarray}{% custom "array" env.
  \renewcommand\arraystretch{1.33} % mimic spacing of display-style math
  \left\{ \begin{array}{@{\,} >{\displaystyle}l >{$}l<{$} @{\,}}}{%
  \end{array} \right\}}

\begin{document}
Prove that:
\begin{enumerate}
\item \quad
$f(x)=\begin{myarray}
         2-x & if $x \le 1$\\
         1/x & if $x> 1$.
      \end{myarray}$
is one-to-one but not onto $\mathbb{R}$.

\item \quad
$g(x)=\begin{myarray}
         x+4 & if $x \le -2$  \\
         -x  & if $-2 < x < 2$ \\
         x-4 & if $x \ge 2$.
      \end{myarray}$
is onto $\mathbb{R}$ but not one-to-one.
\end{enumerate}
\end{document}

Respuesta2

Aquí hay algunas opciones usando arrayy/oempheq:

ingrese la descripción de la imagen aquí

\documentclass{article}

\usepackage{amsfonts}% ...for \mathbb
\usepackage{empheq}% Load mathtools, which loads amsmath

\begin{document}

Prove that:
\begin{enumerate}
  \item \mbox{}

  \nobreak
  \vspace{\dimexpr-\baselineskip-\abovedisplayskip-\parskip}
  \[
    \renewcommand{\arraycolsep}{0pt}
    \left.\kern-\nulldelimiterspace
    \begin{array}{ r l }
             2 - x, &\text{ if $x \leq 1$} \\[\jot]
      \dfrac{1}{x}, &\text{ if $x > 1$.}
    \end{array}\right\} \quad \text{is one-to-one but  not onto $\mathbb{R}$.}
  \]

  \item \mbox{}

  \nobreak
  \vspace{\dimexpr-\baselineskip-\abovedisplayskip-\parskip}
  \begin{empheq}[right=\empheqrbrace \quad \text{is onto $\mathbb{R}$ but not one-to-one.}]{align*}
    x + 4, &\text{ if $x \leq -2$} \\
       -x, &\text{ if $-2 < x < 2$} \\
    x - 4, &\text{ if $x \geq 2$.}
  \end{empheq}
\end{enumerate}

\end{document}

Respuesta3

Según lo que Mico escribió y tiene aquí, se me ocurrió lo siguiente, que es lo que estaba buscando.

\documentclass{article}
\usepackage[hmargin=1.65cm,top=2.45cm,bottom=2.6cm]{geometry}
\usepackage{mathtools,amsfonts}

\begin{document}

    Prove that: 
    \begin{enumerate}
        \item \qquad 
        $\begin{aligned}
        f(x) =
        \begin{dcases*}
        2-x, &if $x \le 1$\\
        \frac{1}{x}, &if $x> 1$.
        \end{dcases*}
        \text{is one-to-one but  not onto $\mathbb{R}$.}
        \end{aligned}$

        \item \qquad
        $\begin{aligned}
        f(x) =
        \begin{dcases*}
        x+4, &if $x \le -2$  \\
        -x,  &if $-2 < x < 2$\quad\\
        x-4,  &if $x \ge 2$.
        \end{dcases*}
        \text{is onto $\mathbb{R}$ but not one-to-one.}
        \end{aligned}$
    \end{enumerate}

\end{document}

¡¡¡Gracias a todos por toda vuestra ayuda!!!

-MARYLAND

información relacionada