I am Charmie

メモとログ

LaTeX

Install new beamer theme into MikTex environment

New beamer theme installation into MikTeX environment is not too difficult.Simply, you can install with 2 steps: file download&localization and update tex database. 1. File download and localizationBeamer theme .sty files have different ty…

tcp file generator for TeXnicCenter

TeXnicCenter requires a .tcp file to manage tex project. Since the contents of .tcp file is not very different, I was wondering someone would make tcp file generator. Then, I did. The following sequence of command is for windows batch file…

pdflatexとplatexの自動切り替え

プレアンブルで以下のように記述すると,texのソース中でpdflatexかplatexかの判別が出来る. \ifx\pdfoutput\undefined \usepackage{mediabb} \usepackage{graphicx} \else \usepackage[pdftex]{graphicx} %pdflatex \fi

日本語latexでpdfファイルを画像ファイルとして読み込む

日本語LaTeX(w32tex)のコマンドplatexでpdfを画像としてインクルードしたい.PDFファイルに限らず,BMP,JPEG, PNGファイルをincludegraphics コマンドで読み込む時は,バウンディングボックスの設定を指定しなければならないそうだ.指定方法は [bb=0 0 横…

styleファイルの追加

styファイルの取得 以下のどちらかの方法でstyファイルを取得する. styファイルのダウンロード webで検索してダウンロードするだけ. styファイルの生成 CTAN等からinsファイルとdtxファイルをダウンロード. 以下のコマンドでinsファイルを処理 platex ***…

BV norm

BV norm is $latex l{1}$-norm of the gradient of its argument as $latex \Vert u \Vert{BV} = \Vert \nabla u \Vert_{1}$

Algorithmic package

If you want to number the lines, just add [1] option as \begin{algorithmic}[1] ... \end{algorithmic}

Algorithm in LaTeX

With a package algorithms, you can write algorithm in LaTeX. README file says that The "algorithms" bundle provides two environments, "algorithmic" and "algorithm", which are designed to be used together but may be used separately. The "al…

Number sets in LaTeX

To write number sets such as real numbers ($latex \mathbb{R}$), we need to use additional package either amssymb or amsfonts. In preamble, just type \usepackage{amssymb} or \usepackage{amsfonts}. Then, we can use the command mathbb like \m…

Multiple integral

To write multiple integral in latex, intuitive way is to use \int several times like \begin{equation} \int\int_{S} f(x,y)dxdy \end{equation} This code provides awful spacing between neighboring integral symbols. Alternative way is to use \…

数の集合

数の集合RとかCをLatexで書く方法.以下のどちらかのパッケージをプレアンブルで読み込む\usepackage{amsfonts}\usepackage{amssymb}あとは,\mathbb{*}と記述すれば良い.N:自然数Z:整数I:無理数Q:有理数R:実数C:複素数P:素数

Table of ContentsにBibliographyの項目を追加

文書のTable of Contents (ToC)を \tableofcontents コマンドで挿入すると,デフォルトではBibliographyがToCのリスト挿入されない.また,List of FiguresやList of Tablesを,それぞれ\listoffigures コマンド,\listoftables コマンドで表示するようにし…

latexで作成したPDFにリンクを埋め込む

hyperref.styというスタイルファイルを使うと,図,表,参考文献にリンクが貼れる.また,\chapterや\sectionなどをPDFのしおり(bookmarks)に変換してくれる.以下のコマンドでOK.\usepackage{hyperref}オプションを設定する事で,文書内のリンクの細かい設…

bibtexのタイトルを強制的に大文字にする

大文字にしたい文字列を{}で囲めばいいそうだ.

bibtexにおけるアクセント記号

どこの国か知らないけど,名前にアクセント記号をつける時の注意.{}で囲む必要があるそうだ.1: Jo\~{a}oではなく2: Jo{\~a}oアクセント記号によっては1の方法でもちゃんと反映されるけど,アクセント記号を含めて全て{}で囲めば問題ない.

latexのinputとinclude

どちらもtexファイルを読み込むコマンド.修論とか本等の大規模な文書を分割したファイルで管理したい時に使うのかな.includeとinputの違いは,includeは改ページをしてから読み込む文書を追加するのに対して,inputは改ページをせずに文書を追加するぐらい…

latexで複数の表を並べて表示

subfigureパッケージに用意されているsubtableコマンドを使えばできる.ただし,subtableを参照したときの表の番号がひとつ進んでいるというバグがあるので,\addtocounter{table}{-1}と\stepcounter{table}を使って調整してあげる.\usepackage{subfigure}\…

dvioutでlandscapeのdviファイルをちゃんと表示

情報処理学会の論文誌がlandscapeなんだけど,dviファイルをdvioutで正しく表示できなくてイライラしていたけど,解決法が分かった.\documentclass[english]{ipsjpapers}\AtBeginDvi{\special{papersize=A4L}}\special{papersize=297mm,210mm}これで解決.2…

表の斜線

texで作成する表に斜線を入れたい時は,slashbox.styを使う.プレアンブルでスタイルファイルを読み込む.\usepackage{slashbox}\begin{table}[tb]\begin{center}\begin{tabular}{|c|c|}\hline\backslashbox{左下}{右上} & \\hline&\end{tabular}\end{center…

newtheorem

texのnewtheorem命令を使うには,amsthmパッケージが必要みたい.

bibtexのエントリについて

bibtexについて.Wikipediaを参考に.必須項目に関しては,bibtexのバージョンかbstファイルによって変わるのかな?inbookとincollectionの違い,inproceedingsとproceedingsの違いを知らなかった.article: 論文誌や雑誌に掲載された論文必須:author, title…

Texmakerの設定

可愛い後輩が困っていたので,Texmakerの設定をまとめてみる.正確には,Texmakerで日本語のtex文書をコンパイルした時の設定かな.前提として,あべのりさんのTeXインストーラで,C:/tex/以下に全てがインストールされているとする.LaTeX: "C:/tex/bin/pla…

TeXからWord

subfigureなど特定のパッケージを利用したTeXの文書だと,latex2rtfでは変換出来ない事が判明.latex2rtfで作成されたrtfファイルを見ると,subfigureをコールした所で処理が止まっていた.しょうがないので,texのソースから画像に関する部分を消す上記tex…

latex2rtf

原稿をwordで書かなければいけなくて,一から書くのがめんどくさいからlatex2rtfでrtfファイルを作成してから,編集しようと思っていたけど失敗に終わった.latex2rtfは,一部のスタイルファイルをサポートしていないみたいで,Warning line=3 Unknown style…

epsファイル作成

今回の目的は"グラフをepsにしたい"なわけだが,グラフの目盛りや軸の値を,自分で色々といじくりたかったので, Excelでグラフ作成(目盛りを書き足す領域には空欄を残しておく) PPTで目盛りを書き足す Openoffice Impress or Drawでepsファイル出力 という…

theoremパッケージ

theoremパッケージの英語と日本語の対応付け.試してみた所,自分で好きな日本語名を付けられそう.例) \newtheorem{thm}{特徴},\newtheorem{thm}{性質}Theorem\newtheorem{thm}{定理}Lemma\newtheorem{lem}{補題}Definition\newtheorem{def}{定義}Proposit…

argmax, argmin

argmax,argminを出力する場合,\arg \min等と記述すると,下付き文字を追加できない.そのような時は,プリアンブルで以下の記述を追加.\newcommand{\argmax}{\mathop{\rm arg~max}\limits}\newcommand{\argmin}{\mathop{\rm arg~min}\limits}これでargmax…

theoremの省略形

言葉の定義はここを参照.Theorem -> Thm. or Th.Lemma -> Lem.Corollary -> Cor.

theoremパッケージ

定理,補題,仮定などを書く時はtheoremパッケージを使うと良い.プリアンブルでパッケージのロードと設定を行う.\usepackage{theorem}\theoremstyle{plain}\newtheorem{thm}{Theorem}\newtheorem{lmm}{Lemma}\newtheorem{ass}{Assumption}本文中では\begin…

dvioutのアンインストール

dvioutのアンインストール方法(以前,思いっきりはまったので).Windowsでdvioutをアンインストールしようとして,"プログラムの追加と削除"からアンインストールしようとしても,現在インストールされているプログラムの一覧に現れない.かといって,dviout…