Skip to content

Instantly share code, notes, and snippets.

@aoirint
Created April 23, 2017 11:26
Show Gist options
  • Save aoirint/de715a615000cb6761adf37d8fcf08f7 to your computer and use it in GitHub Desktop.
Save aoirint/de715a615000cb6761adf37d8fcf08f7 to your computer and use it in GitHub Desktop.
pLaTex サンプル
\documentclass[a4j]{jsarticle}
% コメント
\begin{document}
\section{節名はここ}
本文1
\subsection{入れ子の節1}
本文2
$ma = F$ % 本文中の数式? インライン的な
\begin{equation} % これは自動で式番号つく
m \frac{dv}{dt} = F % \frac{分子}{分母}で分数
\end{equation}
\begin{equation}
\label{EXAMPLE} % ラベル(名前)を付ける、本文中で\ref{名前}とすれば節番号とか式番号、図番号が自動で参照できる
F = \rho Vg % \rho とか \lambda (小文字) とか \Lambda(大文字) とか \kappa とか、エスケープがある
\end{equation}
% \[\]は中央寄せ(ブロック的な)の数式だけど式番号なし
\[10^3\] % 10の3乗
\[a_1\] % 数列aの1番目
式\ref{EXAMPLE}は... % 自動で式番号として「2」が入る(equation二つ目)
\subsection{入れ子の節2}
本文3
% 番号付き箇条書き
\begin{enumerate}
\item 項目1です % 1. 項目1です のようになる
\item 項目2です
\begin{quote}少し右に寄る、スタイル設定が独立\end{quote}
\end{enumerate}
% 表
\begin{center} % センタリング
\begin{tabular}{lrr} % 表(テーブル)の作成、二つ目{lrr}はn列の文字のalign(寄せ) left right right
hoge & fuga & right \\ \hline % &は列区切り、最後の\\で行を送る、\hlineは水平(h)罫線(line)
値1 & 値2 & 値3 \\
値4 & 値5 & 値6 \\ \hline % 最終行に罫線を入れるときは改行してから\hline。そうでなければ改行なしで閉じる
\end{tabular}
\end{center}
% キャプション付き表
\begin{table}[htbp] % htbp は h: 近くのおける場所 / t: ページ上部のおける場所 / b: ページ下部 / p: 専用ページ の意
\begin{center} % センタリング
\begin{tabular}{lrr}
hoge & fuga & hoga
\end{tabular}
\caption{キャプションはこれ。表1とか出る}
\label{FIG_ABC}
\end{center}
\end{table}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment