トップページ > 日本語版トップページ > TeX トップページ > 小技集 > いろいろ

小技集(いろいろ)


\biggg など

\Bigg よりさらに大きいものがほしい場合に使います。$\bigggl(\bigggr)$ のように使ってください。TeXbook の \big などの定義を参考にしました。

\makeatletter
\newcommand{\biggg}[1]{{\hbox{$\left#1\vbox to 20.5pt{}\right.\n@space$}}}
\newcommand{\Biggg}[1]{{\hbox{$\left#1\vbox to 23.5pt{}\right.\n@space$}}}
\newcommand{\bigggg}[1]{{\hbox{$\left#1\vbox to 26.5pt{}\right.\n@space$}}}
\newcommand{\Bigggg}[1]{{\hbox{$\left#1\vbox to 29.5pt{}\right.\n@space$}}}
\newcommand{\biggggg}[1]{{\hbox{$\left#1\vbox to 32.5pt{}\right.\n@space$}}}
\newcommand{\Biggggg}[1]{{\hbox{$\left#1\vbox to 35.5pt{}\right.\n@space$}}}
\newcommand{\bigggggg}[1]{{\hbox{$\left#1\vbox to 38.5pt{}\right.\n@space$}}}
\newcommand{\Bigggggg}[1]{{\hbox{$\left#1\vbox to 41.5pt{}\right.\n@space$}}}
\makeatother
\newcommand{\bigggl}{\mathopen\biggg}
\newcommand{\bigggm}{\mathrel\biggg}
\newcommand{\bigggr}{\mathclose\biggg}
\newcommand{\Bigggl}{\mathopen\Biggg}
\newcommand{\Bigggm}{\mathrel\Biggg}
\newcommand{\Bigggr}{\mathclose\Biggg}
\newcommand{\biggggl}{\mathopen\bigggg}
\newcommand{\biggggm}{\mathrel\bigggg}
\newcommand{\biggggr}{\mathclose\bigggg}
\newcommand{\Biggggl}{\mathopen\Bigggg}
\newcommand{\Biggggm}{\mathrel\Bigggg}
\newcommand{\Biggggr}{\mathclose\Bigggg}
\newcommand{\bigggggl}{\mathopen\biggggg}
\newcommand{\bigggggm}{\mathrel\biggggg}
\newcommand{\bigggggr}{\mathclose\biggggg}
\newcommand{\Bigggggl}{\mathopen\Biggggg}
\newcommand{\Bigggggm}{\mathrel\Biggggg}
\newcommand{\Bigggggr}{\mathclose\Biggggg}
\newcommand{\biggggggl}{\mathopen\bigggggg}
\newcommand{\biggggggm}{\mathrel\bigggggg}
\newcommand{\biggggggr}{\mathclose\bigggggg}
\newcommand{\Biggggggl}{\mathopen\Bigggggg}
\newcommand{\Biggggggm}{\mathrel\Bigggggg}
\newcommand{\Biggggggr}{\mathclose\Bigggggg}

弧 $AB$ を表す際に,$\arc{AB}$ と書けば弧の記号が出るようにしたマクロです。$\arc{ABCDEF}$ などとしても問題ありません。

\usepackage{amsmath}
\usepackage{graphicx}
\newcommand{\arc}[1]{%
 \settowidth{\dimen0}{\ensuremath{#1}}%
 \divide\dimen0 by 2%
 \overset{\rotatebox{-90}{\ensuremath{\left(\rule{0pt}{\dimen0}\right.}}}{#1}%
}

長い \hookrightarrow,\twoheadrightarrow

表題のままです。$f\colon X\hooklongrightarrow Y$,$f\colon X\twoheadlongrightarrow Y$ のように使ってください。TeXbook の \longmapsto の定義を参考にしました。

\newcommand{\hooklongrightarrow}{\lhook\joinrel\longrightarrow}
\newcommand{\twoheadlongrightarrow}{\relbar\joinrel\twoheadrightarrow}

斜体中で句読点を立体にする

英語では,定理などを斜体で書く習慣がありますが,セミコロンやカッコなどの約物は立体の方がきれいだと思います。約物を立体にしたい場合は,CTAN の /fonts/cm/cmtiup/ にある cmtiup パッケージをお使いください。なお,定理などを italic ではなく slanted で書きたい場合は,CTAN の /fonts/cm/cmslup/ にある cmslup パッケージをお使いください。

制限直積の記号

\prod と \coprod をあわせたような,制限直積の記号です。$\restprod_{\lambda\in\Lambda}G_{\lambda}$ のように使ってください。

\usepackage{amsmath}
\DeclareMathOperator*{\restprod}%
 {\mathchoice{\ooalign{\ensuremath{\displaystyle\prod}\crcr\ensuremath{\displaystyle\coprod}}}%
             {\ooalign{\ensuremath{\textstyle\prod}\crcr\ensuremath{\textstyle\coprod}}}%
             {\ooalign{\ensuremath{\scriptstyle\prod}\crcr\ensuremath{\scriptstyle\coprod}}}%
             {\ooalign{\ensuremath{\scriptscriptstyle\prod}\crcr\ensuremath{\scriptscriptstyle\coprod}}}%
 }

コンパイル時刻を表示する方法

原稿作成の際に,コンパイル時刻があればバージョンが分かって便利だと思います。コンパイル時刻を表示するには以下のようにしてください。\year,\month,\day は LaTeX で用意されていますが,\hour,\minute は pLaTeX にしかありません。また,1 桁のときに頭に 0 をつけてつねに 2 桁にしたい場合は,\two@digits コマンドをご利用ください。なお,奥村晴彦さんの掲示板の 17953を参考にしました。

\the\year 年\the\month 月\the\day 日\the\hour 時\the\minute 分
\makeatletter
\the\year 年\two@digits\month 月\two@digits\day 日\two@digits\hour 時\two@digits\minute 分
\makeatother

ntheorem.sty

ntheorem.sty を使うと,証明が別行立て数式で終わるとき,証明終わりの記号を自動的に別行立て数式と同じ行に置くことができます。


斎藤新悟