TeXの備忘録です。
% Header \documentclass[a4paper,12pt]{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{theorem} \usepackage{graphicx} % package{amsthm} not used. %ページ上部にタイトル・著者名・日付を入れる \pagestyle{myheadings} \markright{{\footnotesize {Title}, {Author}, {\the\day /\the\month /\the\year} %または {\today} }} %校正用の設定 %\setlength\oddsidemargin{-0.9cm} %\setlength\evensidemargin{-0.9cm} %\setlength\topmargin{-1.3cm} %\setlength\textheight{25.6cm} %\setlength\textwidth{14.9cm} %enumiの設定 \renewcommand{\theenumi}{\roman{enumi}} \renewcommand{\labelenumi}{{\upshape(\theenumi)}} \renewcommand{\theenumii}{\alph{enumii}} \renewcommand{\labelenumii}{{\upshape(\theenumii)}} % \newtheorem \theorembodyfont{\itshape} \newtheorem{thm}{Theorem}%[section] \newtheorem{prop}[thm]{Proposition} \newtheorem{cor}[thm]{Corollary} \newtheorem{lem}[thm]{Lemma} \theorembodyfont{\upshape} \newtheorem{rem}[thm]{Remark} \newtheorem{prob}[thm]{Problem} \newtheorem{conj}[thm]{Conjecture} \newtheorem{df}[thm]{Definition} \newtheorem{ex}[thm]{Example} \newtheorem{fact}[thm]{Fact} % \newenvironment{proof} (thanks to `amsthm.sty') \makeatletter % \begin{macrocode} \DeclareRobustCommand{\qed}{% \ifmmode % if math mode, assume display: omit penalty etc. \else \leavevmode\unskip\penalty9999 \hbox{}\nobreak\hfill \fi % The hbox is to prevent a line break within the \cn{qedsymbol} if % it is defined to be something composite--- e.g., things like % \verb"(Corollary 1.2) \openbox" as are occasionally done. \quad\hbox{\qedsymbol}} % \newcommand{\openbox}{\leavevmode \hbox to.77778em{% \hfil\vrule \vbox to.675em{\hrule width.6em\vfil\hrule}% \vrule\hfil}} % \newcommand{\qedsymbol}{\openbox} % The proof environment is never numbered, and has a \cn{qed} at % the end, which makes it inconvenient to use \cn{newtheorem} for % defining it. Also authors frequently need to substitute an % alternative heading text (e.g. `Proof of Lemma 4.3') % instead of the default `Proof'. For all these reasons we define % the proof environment here instead of leaving it for authors to % define. \newenvironment{proof}[1][\proofname]{\par \normalfont \topsep6\p@\@plus6\p@ \trivlist \item[\hskip\labelsep\itshape #1\@addpunct{.}]\ignorespaces }{% \qed\endtrivlist } % Default for \cn{proofname}: \newcommand{\proofname}{Proof} % \end{macrocode} \makeatother % 数学記号 \newcommand{\C}{\mathbb{C}} \newcommand{\R}{\mathbb{R}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\N}{\mathbb{N}} \newcommand{\Q}{\mathbb{Q}} \newcommand{\CP}{\mathbb{C}\mathrm{P}} \newcommand{\RP}{\mathbb{R}\mathrm{P}} \newcommand{\SL}{\mathop{\mathrm{SL}}\nolimits} \newcommand{\PSL}{\mathop{\mathrm{PSL}}\nolimits} \newcommand{\GL}{\mathop{\mathrm{GL}}\nolimits} \newcommand{\Tr}{\mathop{\mathrm{Tr}}\nolimits} \newcommand{\id}{\mathop{\mathrm{id}}\nolimits} \newcommand{\diff}{\mathop{\mathit{diff}}\nolimits} \newcommand{\Diff}{\mathop{\mathrm{Diff}}\nolimits} % チルダ等の再定義 \renewcommand{\tilde}{\widetilde} \renewcommand{\setminus}{\smallsetminus} % 数式内での太字 \def\bol#1{{\mbox{\boldmath $#1$}}} % 参考文献の表記を変える \renewcommand{\refname}% {\begin{center}\normalsize\mdseries\scshape% {References}\end{center}} % 3次元ベクトル %\newcommand{\vect}[3]{\left(\begin{smallmatrix}#1 \\ #2 \\ #3\end{smallmatrix}\right)} % タイトル \title{TeX memo} \author{Hiroki KODAMA} \date{Jan., 2006} % 文章の開始 \begin{document} \maketitle \thispagestyle{empty} % アブストラクト \begin{abstract} \end{abstract} % 節と小節 %\part{部} %\chapter{章} \section{節} \subsection{小節} \subsubsection{小々節} %定理と証明 \begin{thm} \end{thm} \begin{proof} \end{proof} %複数行にわたる数式 \begin{equation*} \begin{split} (a+b)^2 &= a^2+2ab+b^2 \\ (x+y+z)^2 &= (x+(y+z))^2 \\ &= x^2+2x(y+z)+(y+z)^2 \end{split} \end{equation*} %図 \begin{figure}[htbp] \input{Birkhoffsection.tex} %\includegraphics[height=6cm]{Birkoffsection.eps} \caption{Birkhoff section} \label{fig:section} \end{figure} %参考文献 \begin{thebibliography}{WW} \bibitem[Al]{Al} J.~Alexander, A lemma on systems of knotted curves, Proc.\ Nat.\ Acad.\ Sci.\ U.S.A.\ 9 (1923), 93--95. \bibitem[TW]{TW} W.~Thurston and H.~Winkelnkemper, On the existence of contact forms, Proc.\ A.M.S.\ 52 (1975), 345-347. \end{thebibliography} %著者連絡先 \par\noindent{\scshape \small Graduate School of Mathematical Sciences, University of Tokyo, \\3-8-1 Komaba, Meguro-ku, Tokyo 153-9814, Japan.} \par\noindent{\ttfamily someone@somewhere.org} %文章の終了 \end{document}