レポートのテンプレート 数学レポのテンプレ
物理のかぎしっぽ TexWiki よく使う演算記号 岐阜大学
Beamerでスライド
eps画像の挿入
ファイルの置き場所とか texclip phpでtex画像生成
> platex ***.tex > (p)xdvi ***.dvi > xdvipdfmx ***.dvi
YaTeX + emacs の場合 > C-c t j > C-c t p
追加する hoge.sty は 1. *.tex と同じところに置いておくか, 2. /usr/local/teTex/share/texmf/ptex/platex/base に入れる。 > mktexlsr hoge.sty
日本語化はいろいろ煩わしいので,teTex を使って入れるのが吉。 デフォルトのインストールフォルダは /usr/local/teTex/
$ \boldsymbol{ \phi } $![]()
$ \S 5.1 $
$ x \propto y $![]()
$ f_n \xrightarrow[x \in D]{measure} f $
$ \frac{df(t)}{dt} \Big| _{t=0} $
$ \overbrace{b^1, \cdots, b^M}^{sequence \beta} $ $ \underbrace{a_1, \cdots, a_N}_{sequence \alpha} $
$ \begin{array}{c c c c c c c} k & : & \mathcal{X} \times \mathcal{X} & \to & \mathbb{R}^N \times \mathbb{R}^N & \to & \mathbb{R} \\ & & \rotatebox[origin=c]{90}{$\in$} & & \rotatebox[origin=c]{90}{$\in$} & & \rotatebox[origin=c]{90}{$\in$} \\ & & (\xx,\xx') & \mapsto & (\mathbf{\phi(x)}, \mathbf{\phi(x')}) & \mapsto & \sum_{i=1}^N \phi_i(\xx) \phi_i(\xx') \end{array} $
参照:kernel.jpg
\usepackage{ amscd } $ \begin{CD} X = \varprojlim_{n\to\infty} A_n @> > > \mathrm{Gal} (L_\infty / K_\infty) \\ @V V V @V V V \\ A_{n+1} @> {\left(\frac{L_{n+1}/K_{n+1}}{\cdot}\right)} >> \mathrm{Gal} (L_{n+1}/K_{n+1}) \\ @V{N_{K_{n+1}/K_n}} V V @V V{\text{res}} V \\ A_n @> {\left(\frac{L_n/K_n}{\cdot}\right)} > > \mathrm{Gal} (L_n/K_n) \end{CD} $
参照:CD.png
$ g(x) = \begin{cases} 0 & \mbox{if } x \in [0,1) \\ 1 & \mbox{if } x = 2 \end{cases} $
\begin{itembox}[l]{Sigmoidal kernel} \vspace{-\baselineskip} % 数式だけのitemboxは一行下がってしまうので上げる \begin{equation} k(\xx,\xx') := \tanh(a \xx^\mathrm{T} \xx' + b) \end{equation} \end{itembox}
数式1本だと改行が入ってしまうので,\vspaceで持ち上げる。
\noindent \underline{the perceptron algorithm} \begin{itemize} \item[{\rm :-)}] hoge \item[:-(] hage
\item[$\circ$] hoge \item[$\times$] hage
\item[$\nearrow$] guaranteed to find a solution in a finite number of steps. \item[$\searrow$] hage \end{itemize}
一本目の式にはなにもなくて,二本目以降は ⇔ とか ⇒ で揃えたいとき。
\begin{eqnarray} && \hspace{-3.5zw} Ax = b \\ &\Leftrightarrow& (QR)x = b \\ &\Leftrightarrow& Rx = Q^\mathrm{T}b \\ \end{eqnarray}
\begin{pmatrix} a_{11} & \cdots & a_{1N} \\ \vdots & \ddots & \vdots \\ a_{N1} & \cdots & a_{NN} \end{pmatrix}
p () b [] B {} v,V ||
線を引いたりするには array 環境でないとだめみたい。 \left[ \begin{array}{cc:cc} 1 & 2 & 3 & 4 \\ \hdashline 2 & 4 & 6 & 8 \\ \cdashline{2-3} 10 & 12 & 14 & 16 \end{array} \right]
普通に使うとき。 \usepackage{amsthm} \newtheorem{thm}{Th.}[section] % 節で区切る。 \newtheorem{cor}[thm]{Cor.} % 定理と同じ番号を使う。 ・・・ \begin{thm}[おどろきの定理] ここに定理を書く。 \end{thm}
いろいろカスタマイズしたいときは,theorem の方をロードする。
関数解析のレポートで使った例 \usepackage{theorem} ... \theoremstyle{break} % 定理名を表示した後に改行 \newtheorem{thm}{定理}[section] \newtheorem{cor}[thm]{系} \newtheorem{ex}[thm]{例} \newtheorem{prop}[thm]{命題} \newtheorem{dfn}[thm]{定義} \newtheorem{q}{問}[section]
\sqrt[n]{a}
\usepackage{amsmath,amssymb} \DeclareMathOperator*{\argmax}{\textrm{arg max}} % プリアンブルに書くこと。
アスタリスクを付けると,上付き・下付きが \sum とかと同じように真上・真下に着く。
\setcounter{section}{6} \setcounter{equation}{3} → 式番号は (6.3) になる!
\int_{-\infty}^\infty \! \cdots \! \int_{-\infty}^\infty f(x_1, \cdots, x_n) dx_1 \cdots d_xn![]()
近似には2種類ある
\approx\sim
←こっちのが粗い近似として使い分けられる。
参考文献
\cite[(省略可)]{mrt96} ... \renewcommand{\bibname}{参考文献} % (jreportの場合)デフォルトで「関連図書」となるのを変更 \begin{thebibliography}{1} \bibitem[Murata, 1996]{mrt96} Murata,N. (1996) An Integral Representation of Functions Using Three-layered Networks and Their Approximation Bounds. Neural Networks, Vol.9, No.6, pp.947-956 \end{thebibliography}
jreportでマージンの調整
\setlength{\textwidth}{\fullwidth}が使えない! \setlength{\textwidth}{0.75\paperwidth} \setlength{\oddsidemargin}{0.0in} \setlength{\evensidemargin}{0.0in} \setlength{\textheight}{45\baselineskip} \addtolength{\textheight}{\topskip} \setlength{\voffset}{-0.2in} \setlength{\topmargin}{0pt} \setlength{\headheight}{0pt} \setlength{\headsep}{0pt}
Appendix
\appendix % これ以降は章立てが A,B,...に変わる。 \renewcommand{\appedixname}{Appendix } % デフォルトの「付録 A」から「Appendix A」に変更
図と表
基本的な図 \usepackage[dvips]{graphicx} ... \begin{figure}[htbp] \begin{center} \includegraphics[width=100mm]{fig1.eps} \end{center} \caption{タイトル} \label{fig:hoge} \end{figure}複数並べる \begin{figure}[htbp] \begin{minipage}{0.5\hsize} \begin{center} \includegraphics[width=70mm]{fig1.eps} \end{center} \caption{タイトル1} \label{fig:hoge} \end{minipage} \begin{minipage}{0.5\hsize} \begin{center} \includegraphics[width=70mm]{fig2.eps} \end{center} \caption{タイトル2} \label{fig:hage} \end{minipage} \end{figure}表 table の中に tabular を作る。表を描くのは tabular \begin{table}[h] \caption{表のタイトル}\label{tbl:test} % 上部に付ける場合 \begin{center} \begin{tabular}{|c|c|} \hline 何某 & 何某 \\ \hline\hline 何某 & 何某 \\ \hline \end{tabular} \end{center} \end{table}文章を回しこむ \section とか itemize が後に続くとダメ。\caption も上手く動かないので自分で工夫する。 \usepackage{wrapfig} ... \addtocounter{figure}{1} ←工夫その1 \begin{wrapfigure}{r}{50mm} \label{fig:model} \begin{center} \includegraphics[width=50mm]{graphical_model2.eps} \hspace{5mm}図\arabic{figure} 説明文 ←工夫その2 \end{center} \end{wrapfigure}余白の調節とか
以下は @ を使うので,makeatletter makeatother で挟む。sectionの調節 \renewcommand\section{\@startsection {section}{1}% {\z@}% {-1ex \@plus -1ex \@minus -.2ex}% ←sectionの上の行間 {1ex \@plus.2ex}% ←sectionの下の行間 {\normalfont\large\bfseries}} ←sectionの書式subsectionも同じ \renewcommand\subsection{\@startsection {subsection}{1}% {\z@}% {-1ex \@plus -1ex \@minus -.2ex}% {1ex \@plus.2ex}% {\normalfont\large\bfseries}}タイトルページに機関名とか入れたい。 \def\firstpage{[機関名]\hfill[雑誌名]} \def\ps@titlepage{% \@oddhead{\hfil\firstpage\hfil}% \let\@evenhead\@oddhead \def\@oddfoot{\hfil}% \let\@evenfoot\@oddfoot \let\@mkboth\@gobbletwo } ... \begin{document} \maketitle \thispagestyle{titlepage} ← \maketitleはpagestyle{plain}をやってくれるので,その後に置いて上書きする。長い数式を折り返す
\begin{eqnarray} P(X_{1:4} | Y_{1:4}) &=& \prod_{t=1}^4 P(X_t | X_{1:t-1}, Y_{1:t}) \\ &=& \prod_{t=1}^4 \int P(X_t, T_{t:t-1} | X_{1:t-1}, Y_{1:t}) dT_{t} dT_{t-1} \\ &=& \begin{split} \prod_{t=1}^4 \int P(X_t | T_{t:t-1}, X_{1:t-1}, Y_{1:t}) P(T_t | T_{t-1}, X_{1:t-1}, Y_{1:t}) \\ P(T_{t-1} | X_{1:t-1}, Y_{1:t}) dT_{t} dT_{t-1} \end{split} \\ &=& \prod_{t=1}^4 \int P(X_t | T_t) P(T_t | T_{t-1}, Y_{t}) P(T_{t-1} | X_{t-1}, Y_{t-1}) dT_{t} dT_{t-1} \\ &=& \prod_{t=1}^4 P(X_t | Y_t) \end{eqnarray}最終更新:2010年12月16日 18:33