%%%%%% 文書様式とレイアウトの指定 −documentclass− %%%%%% \documentclass[a4j,12pt]{jarticle} %%% %%% オプション: a4paper(A4サイズで印刷) %%% a4j(A4サイズで印刷, 本文領域が広い) %%% 11pt(文字の標準サイズは11pt) %%% 12pt(文字の標準サイズは12pt) %%% twocolumn(2段組) %%% %%% クラス名: jarticle(日本語の比較的短い文書用) %%% jreport(かなり長い文書用。学位論文、マニュアル等) %%% jbook(本の体裁) %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%% ここからプリアンブル %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \title{標題} %%% 標題 \author{著者名} %%% 著者名 \date{\today} %%% 日付 \todayコマンド: 今日の年月日 %%%%%% ここまでプリアンブル %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} %%%%%% ここからドキュメント環境 %%%%%%%%%%%%%%%%%%%%%%%%%%%% \maketitle %%% 表紙の作成 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{表} \subsection{tabular環境} tabular環境は表を形成するための環境である。 \\ \begin{tabular}{lc|r} %%% tabular環境, 左寄せ, 中央揃え, 縦の区切り線, 右寄せ 1-1(左寄せ) & 1-2(中央揃え) & (右寄せ)1-3 \\ \hline 2-1 & 2-2 & 2-3 \\ 3-1 & 3-2 & 3-3 \end{tabular} \subsection{table環境} table環境を使うと、表を自動的に文中に配置してくれる。 \begin{table} %%% table環境 \begin{tabular}{lc|r} %%% tabular環境, 左寄せ, 中央揃え, 縦の区切り線, 右寄せ 1-1(左寄せ) & 1-2(中央揃え) & (右寄せ)1-3 \\ \hline 2-1 & 2-2 & 2-3 \\ 3-1 & 3-2 & 3-3 \end{tabular} \end{table} \subsection{caption} captionを付けると、表番号を自動的に振って標題を付けてくれる。 \textbackslash label\{ラベル\} でラベルを指定しておけば、文中で(\textbackslash ref\{ラベル\} により)表番号を参照できる。 \begin{table} %%% table環境 \caption{表題} \label{table} \begin{center} \begin{tabular}{lc|r} %%% tabular環境, 左寄せ, 中央揃え, 縦の区切り線, 右寄せ 1-1(左寄せ) & 1-2(中央揃え) & (右寄せ)1-3 \\ \hline 2-1 & 2-2 & 2-3 \\ 3-1 & 3-2 & 3-3 \end{tabular} \end{center} \end{table} 表\ref{table}参照のこと。 %%%%%% ここまでドキュメント環境 %%%%%%%%%%%%%%%%%%%%%%%%%%%% \end{document}