5

I have a difficulty in separating paragraphs where is Math text, for instance between lines 8-9 in the output. One option is to have space at the beginning of the first sentence in each new paragraph.

Code

\documentclass{article}

\usepackage{mathtools,amssymb}
\usepackage[mathlines]{lineno} 
\usepackage{polyglossia} % also loads package fontspec

%% http://tex.stackexchange.com/q/43648/13173
\newcommand*\patchAmsMathEnvironmentForLineno[1]{%
  \expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname
  \expandafter\let\csname oldend#1\expandafter\endcsname\csname end#1\endcsname
  \renewenvironment{#1}%
     {\linenomath\csname old#1\endcsname}%
     {\csname oldend#1\endcsname\endlinenomath}}% 
\newcommand*\patchBothAmsMathEnvironmentsForLineno[1]{%
  \patchAmsMathEnvironmentForLineno{#1}%
  \patchAmsMathEnvironmentForLineno{#1*}}%
\AtBeginDocument{%
\patchBothAmsMathEnvironmentsForLineno{equation}%
\patchBothAmsMathEnvironmentsForLineno{align}%
\patchBothAmsMathEnvironmentsForLineno{flalign}%
\patchBothAmsMathEnvironmentsForLineno{alignat}%
\patchBothAmsMathEnvironmentsForLineno{gather}%
\patchBothAmsMathEnvironmentsForLineno{multline}%
}

\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}
\NewDocumentCommand{\normL}{ s O{} m }{%
  \IfBooleanTF{#1}{\norm*{#3}}{\norm[#2]{#3}}_{L_2(\Omega)}%
}

\usepackage{enumitem}   
\linenumbers
\begin{document}

\begin{enumerate}
\item % do not use an empty line here 
\begin{enumerate}[label={(\alph*)}]
\item Recall that

Then, $c_{0}$ and $c$ are linear spaces with respect to the natural operations for addition and scalar multiplication and Banach spaces with respect to the norm 
$\norm{u}_{l^{\infty}} 
= \sup\nolimits_{ j \in \mathbb{N} } \abs{ u_{j} } 
\,\,\, \forall u 
= (u_{j})_{j \in \mathbb{N}} \in c_{0} \text{ or } c$. 

For $1 \leq p < +\infty$ and $n \in \mathbb{N}$, we denote $e_{n} = (0 ... 0.1.0...) \in l_{p}$ (1 in the $n^{th}$ position). 
The notation is used for the space $c_{0}$. 
Also, for $X = l_{p}$ with $1 \leq p < \infty,$ or $c_{0}$, we define the canonical projections 
$(p_{j})_{j \in \mathbb{N}} \cdot p_{n} : 
X \to \mathbb{K}, p_{n} (u_1, ..., u_{n}, ...) 
= u_{n} 
\, \forall (u_{1}, ..., u_{j}, ...) \in X$. 

For $n \in \mathbb{N}$ and $1 \leq p \leq +\infty$, we denote 
$l_{p}^{j} = ( \mathbb{K}^{n}, \norm{ \cdot }_{p} )$, 
where 
$\norm{ (u_{1}, ..., u_{n}) }_{p} 
= (\sum\nolimits_{k=1}^{n} \abs{u_{k}}^{p} )^{1/p}$ 
for $1 \leq p < \infty$ 
and 
$\norm{ (u_{1}, ..., u_{n} ) }_{\infty} 
= \max\nolimits_{1 \leq k \leq j} \abs{u_{k}}$. 

\end{enumerate}
\end{enumerate}    
\end{document}

Output

enter image description here

Comments

  • I use \nolimits within the text making the sentences maintain better the height of the line.
  • The paragraphs starting at the lines 5 and 9 are difficult to separate from other text.

How can you make the text better readable? I think the better separation of paragraphs (by somehow adding spaces at the start of paragraphs is one option).

  • you don't need \nolimits on things like \sum that is automatic in inline math – David Carlisle Sep 14 '15 at 13:19
  • 4
    no. \sum\nolimits is exactly the same as \sum in inline math, just longer to type, and harder to read the source. – David Carlisle Sep 14 '15 at 13:30
  • 3
    There are no \semantics in \nolimits: the semanics of a summation is the same however it is laid out, it is a purely redundant visual command. – David Carlisle Sep 14 '15 at 13:52
4

The paragraph spacing in latex lists is called \parsep. As you are already using enumitem this can be set with the parsep option. Also as noted in comments you don't need \nolimits here,

enter image description here

\documentclass{article}

\usepackage{mathtools,amssymb}
\usepackage[mathlines]{lineno} 
\usepackage{polyglossia} % also loads package fontspec

%% http://tex.stackexchange.com/q/43648/13173
\newcommand*\patchAmsMathEnvironmentForLineno[1]{%
  \expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname
  \expandafter\let\csname oldend#1\expandafter\endcsname\csname end#1\endcsname
  \renewenvironment{#1}%
     {\linenomath\csname old#1\endcsname}%
     {\csname oldend#1\endcsname\endlinenomath}}% 
\newcommand*\patchBothAmsMathEnvironmentsForLineno[1]{%
  \patchAmsMathEnvironmentForLineno{#1}%
  \patchAmsMathEnvironmentForLineno{#1*}}%
\AtBeginDocument{%
\patchBothAmsMathEnvironmentsForLineno{equation}%
\patchBothAmsMathEnvironmentsForLineno{align}%
\patchBothAmsMathEnvironmentsForLineno{flalign}%
\patchBothAmsMathEnvironmentsForLineno{alignat}%
\patchBothAmsMathEnvironmentsForLineno{gather}%
\patchBothAmsMathEnvironmentsForLineno{multline}%
}

\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}
\NewDocumentCommand{\normL}{ s O{} m }{%
  \IfBooleanTF{#1}{\norm*{#3}}{\norm[#2]{#3}}_{L_2(\Omega)}%
}

\usepackage{enumitem}   
\linenumbers
\begin{document}

\begin{enumerate}
\item % do not use an empty line here 
\begin{enumerate}[label={(\alph*)},parsep=\medskipamount]
\item Recall that

Then, $c_{0}$ and $c$ are linear spaces with respect to the natural operations for addition and scalar multiplication and Banach spaces with respect to the norm 
$\norm{u}_{l^{\infty}} 
= \sup_{ j \in \mathbb{N} } \abs{ u_{j} } 
\,\,\, \forall u 
= (u_{j})_{j \in \mathbb{N}} \in c_{0} \text{ or } c$. 

For $1 \leq p < +\infty$ and $n \in \mathbb{N}$, we denote $e_{n} = (0 ... 0.1.0...) \in l_{p}$ (1 in the $n^{th}$ position). 
The notation is used for the space $c_{0}$. 
Also, for $X = l_{p}$ with $1 \leq p < \infty,$ or $c_{0}$, we define the canonical projections 
$(p_{j})_{j \in \mathbb{N}} \cdot p_{n} : 
X \to \mathbb{K}, p_{n} (u_1, ..., u_{n}, ...) 
= u_{n} 
\, \forall (u_{1}, ..., u_{j}, ...) \in X$. 

For $n \in \mathbb{N}$ and $1 \leq p \leq +\infty$, we denote 
$l_{p}^{j} = ( \mathbb{K}^{n}, \norm{ \cdot }_{p} )$, 
where 
$\norm{ (u_{1}, ..., u_{n}) }_{p} 
= (\sum_{k=1}^{n} \abs{u_{k}}^{p} )^{1/p}$ 
for $1 \leq p < \infty$ 
and 
$\norm{ (u_{1}, ..., u_{n} ) }_{\infty} 
= \max_{1 \leq k \leq j} \abs{u_{k}}$. 

\end{enumerate}
\end{enumerate}    
\end{document}
  • I didn't change here but ... should be \dots – David Carlisle Sep 14 '15 at 14:09
  • I accept this answer because this do the same as Przemyslaw's command but without manual additions. – Léo Léopold Hertz 준영 Sep 14 '15 at 16:16
4

There are standard vertical spaces: \smallskip, \medskip and \bigskip. Using them (in this case probably the first one) leaves some flexibility in creating a paragraph.

I am assuming that you don't want to set \parskip to some positive value globally, what may be an alternative method.

Output with two \smallskip and one \medskip:

enter image description here

0

You could define some bigger line spacing inside your enumerate. Not really beautiful, but well, if you think this helps for readability.

% arara: pdflatex

\documentclass{article}
\usepackage{mathtools,amssymb}
\usepackage[mathlines]{lineno} 
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}
\usepackage{enumitem}   
\linenumbers
\usepackage{setspace}
\usepackage{blindtext}

\begin{document}
\blindtext  
\begin{enumerate}
    \item 
        \begin{enumerate}[label={(\alph*)}]\setstretch{1.1}
            \item Recall that\par           
            Then, $c_0$ and $c$ are linear spaces with respect to the natural operations for addition and scalar multiplication and Banach spaces with respect to the norm 
            $\norm{u}_{l^{\infty}} 
            = \sup\nolimits_{ j \in\mathbb{N}} \abs{u_j}\ \forall u 
            = (u_{j})_{j \in \mathbb{N}} \in c_{0}$ or $c$.\par         
            For $1 \leq p < +\infty$ and $n \in \mathbb{N}$, we denote $e_{n} = (0 \dots 0.1.0\dots) \in l_{p}$ ($1$ in the $n$th position). 
            The notation is used for the space $c_0$. 
            Also, for $X = l_{p}$ with $1 \leq p < \infty$, or $c_{0}$, we define the canonical projections 
            $(p_{j})_{j \in \mathbb{N}} \cdot p_{n} : 
            X \to \mathbb{K}, p_{n} (u_1,\dots, u_{n},\dots) = u_{n}\ \forall (u_{1},\dots, u_{j},\dots) \in X$.\par
            For $n \in \mathbb{N}$ and $1 \leq p \leq +\infty$, we denote 
            $l_{p}^{j} = ( \mathbb{K}^{n}, \norm{\cdot}_{p} )$, 
            where 
            $\norm{ (u_{1},\dots, u_{n})}_{p} 
            = (\sum\nolimits_{k=1}^{n} \abs{u_{k}}^{p} )^{1/p}$ 
            for $1 \leq p < \infty$ 
            and 
            $\norm{ (u_{1},\dots, u_{n})}_{\infty} 
            \linebreak = \max\nolimits_{1 \leq k \leq j} \abs{u_{k}}$.          
        \end{enumerate}
\end{enumerate}  
\blindtext  
\end{document}

enter image description here

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.