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 の equation で式番号を表示しないようにする方法

\nonumber を使うと式番号を表示しないようにできる。 例 \usepackage{amsmath} \begin{document} \begin{equation} \nonumber y …

no image

tex で表を横にぶち抜きしたものを作成する方法

multicolumn を使う。 例 \begin{center} \begin{table}[] \begin{tabular}{|c|c|c|c|} \hline \multicolumn …

no image

tex で行列に罫線を入れてブロック行列を書く方法

\array の中に、\matrix を入れる。大きなゼロは、\mbox の中に \Huge 0 を書いて入力する。大きなゼロの位置を調整するために、\raisebox を使った。 例 \usepac …

no image

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

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

no image

tex で偏微分記号を入力する

偏微分記号を入力するには、\partial を使う。 分数を入力するための \frac と混ぜて使うと、偏微分係数を出力することができる。 \usepackage{amsmath} \usepacka …