tex

tex で絶対値記号やノルムの縦棒を長くする方法

投稿日:2020年12月25日 更新日:

ノルムの絶対値記号を単純に入力しただけでは短くて困ることがあるので、長くしたいときがある。

\amsmath パッケージで、 \lVert や \rVert, \lvert や \rvert  を使う。

以下のコマンドでは、ノルム(\norm)と絶対値(\abs)のコマンドを自分で定義して使用している。

\usepackage{amsmath}

\newcommand{\norm}[1]{\left\lVert#1\right\rVert}
\newcommand{\abs}[1]{\left\lvert#1\right\rvert}

\begin{document}

\begin{equation}
    \norm{\sum_{k=1}^{n} a_k }
\end{equation}

\begin{equation}
    \abs{\sum_{k=1}^{n} a_k }
\end{equation}

\end{document}

結果

-tex
-

執筆者:


comment

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

関連記事

no image

tex で集合の内部集合(上に丸)を書く方法

集合の「内部」を表す記号を入力するには、\mathring{} を使う。 例 $\mathring{S}$ 結果

no image

tex の equation 環境で複数行の数式を入力する(\split を使う)

\equation の中で \split を使う。 \tag を使って、自分で定義した式番号を使える。 例 \begin{equation} \begin{split} a \\ b \\ c \en …

no image

tex で文中の文字に \textcolor で色をつける方法

color パッケージを使っておき、本文中 \textcolor で色をつける。 例 \usepackage{color} \begin{document} {\bf \textcolor{red}{ …

no image

gnuplot でラベルにギリシャ文字を入力する方法

ギリシャ文字は、α・β・ζ・σ・・・などの文字のことである。gnuplot では、例えば、アルファ(α)を入力したい場合には、{/Symbol a} と入力する。 例 set xlabel “{/Sy …

no image

tex でセクションの記号(§)を入力する

セクション記号「§」は、\S で入力できる。 例 \S 1.2.3 を参照 結果 美味しんぼ(39)【電子書籍】[ 雁屋哲 ]価格:605円(税別、送料別)(2020/12/26時点)楽天で購入