3

I am trying to define in latex the following function: enter image description here

We also want everything to be aligned.

I tried including another align environment but it seems this is not possible:

\begin{align*} 
\Psi: C([0,1],\mathbb{R}) &\longrightarrow C([0,1],\mathbb{R}) \\ 
f & \longmapsto \Psi f:\begin{align*}
[0,1]&\longrightarrow \mathbb{R}\\
x &\longmapsto (\Psi(f))(x)=\int_0^x\!f(y)\,\mathrm{d}y
\end{align*}
\end{align*}

How to fix this problem?

1
  • 2
    Please can you make your snippet compilable?
    – cfr
    Commented Jun 22 at 2:05

3 Answers 3

7

Use aligned inside align*:

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}

\begin{align*} 
  \Psi: C([0,1],\mathbb{R}) &\longrightarrow C([0,1],\mathbb{R}) \\ 
  f & \longmapsto \Psi(f):
  \begin{aligned}[t]
    [0,1] & \longrightarrow \mathbb{R} \\
    x     & \longmapsto (\Psi(f))(x)=\int_0^x\!f(y)\,\mathrm{d}y
  \end{aligned}
\end{align*}

\end{document}

enter image description here

Similar Question: Problem with multiple alignments in equation

2
  • What is the objective of [t]?
    – mathex
    Commented Jun 22 at 3:37
  • To specify vertical position of the contents in aligned. Try to use [c] and [b] to see the difference.
    – Stephen
    Commented Jun 22 at 6:39
3

Using alignat enviroment and text and math font Cambria with XeLaTeX engine.

\documentclass[12pt]{article}
\usepackage{fontspec,unicode-math}
\setmainfont{Cambria}
\setmathfont{Cambria Math}

\begin{document}
Text
\begin{alignat*}{2}
&\Psi \colon C([0,1],\mathbb{R}) \longrightarrow C([0,1],\mathbb{R}) \\
& f \longmapsto \Psi(f)\colon [0,1] \longrightarrow \mathbb{R} \\
& x \longmapsto (\Psi(f))(x) = \int_0^x\!f(y)\,\mathrm{d}y
\end{alignat*}

\end{document}

enter image description here

Another option can be this:

\documentclass[12pt]{article}
\usepackage{fontspec,unicode-math}
\setmainfont{Cambria}
\setmathfont{Cambria Math}

\begin{document}
Textual mode 
\begin{alignat*}{2}
\Psi \colon C([0,1],\mathbb{R}) &\longrightarrow C([0,1],\mathbb{R}) \\
 f& \longmapsto \Psi(f)\colon [0,1] \longrightarrow \mathbb{R} \\
 x& \longmapsto (\Psi(f))(x) = \int_0^x\!f(y)\,\mathrm{d}y
\end{alignat*}

\end{document}

enter image description here

1

Nest aligned[t] inside aligned inside equation.

I provide two realizations; in the bottom one there are a couple of improvements:

  1. the arrows are shorter (and nicer);
  2. the parentheses around [0,1],\RR are a bit larger.

Why \RR instead of \mathbb{R}? Because the real numbers are a specific symbol for your document and you want to ensure consistent typesetting. As a bonus, if your coauthor comes up with a different way of typesetting the set of real numbers (and other number sets), you can just modify the definition of \numberset.

Similarly, by defining \diff for the “differential d”, you can ensure consistent typesetting without the need of remembering to add \,. You can change d in the definition to \mathrm{d} if you (or your coauthor) really want an upright “d” (I fervently hope not 😀).

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}

\newcommand{\numberset}[1]{\mathbb{#1}}% generic
\newcommand{\RR}{\numberset{R}}% specific

\newcommand{\diff}{\mathop{}\!d}

\begin{document}

\begin{equation*}
\begin{aligned}
  \Psi\colon C([0,1],\RR) &\longrightarrow C([0,1],\RR) \\ 
  f & \longmapsto 
  \begin{aligned}[t]
    \Psi(f)\colon [0,1] & \longrightarrow \RR \\
                  x     & \longmapsto (\Psi(f))(x)=\int_0^x f(y) \diff y
  \end{aligned}
\end{aligned}
\end{equation*}

\begin{equation*}
\begin{aligned}
  \Psi\colon C\bigl([0,1],\RR\bigr) &\rightarrow C\bigl([0,1],\RR\bigr) \\ 
  f & \mapsto 
  \begin{aligned}[t]
    \Psi(f)\colon [0,1] & \rightarrow \RR \\
                  x     & \mapsto (\Psi(f))(x)=\int_0^x f(y)\diff y
  \end{aligned}
\end{aligned}
\end{equation*}

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .