担当教員:Defago, Xavier
演習3の続きとして,もしくは別プロジェクトとして,下記の作業を行う.
When writing a technical document, it is important to keep focus on the main argument.
Side details%
\footnote{
Additional information that could be useful to some readers but is not
essential to the logic of the main argument.
}
that are not directly relevant to the main argument can be written as a footnote.%
\footnote{
In particular, a footnte can be used to satisfy the reader's curiosity, or
to add information aimed at convincing a sceptical reader.
}
\section{Introduction}
The remainder of the paper is structured as follows.
Section~\ref{sec:method} describes the method used to conduct the research.
Section~\ref{sec:resuls} reports on the data collection and experimental results.
Section~\ref{sec:discussion} restates the main findings of the study and analyzes strengths and limitations.
\section{Method} \label{sec:method}
\section{Results} \label{sec:results}
\section{Discussion} \label{sec:discussion}
演習1で,数式の相互参照があったが,sectionなどにも同じく相互参照ができます.論文やレポートは上々に改善する物であって,文章の順番など変わる可能性がある為,相互参照が便利です.
\tableofcontents
目次を入れたい場所に\tableofcontent
入れると,そこに目次が出る.
usepackage
の近くに下記の事を追加する.
\usepackage{hyperref}
\hypersetup{
colorlinks = true,
urlcolor = blue
}
そして,文書の内応に,リンクを貼りたい所に…
\href{https://ja.overleaf.com}{日本語のOverleaf}
usepackage
の場所に
\usepackage{qrcode}
\qrset{link,height=1cm}
\qrcode{https://ja.overleaf.com}
\begin{figure}
を入力すると,システムが以下の文章に変換する(もしくは自分で書く)
\begin{figure}
\centering
\includegraphics{}
\caption{Caption}
\label{fig:my_label}
\end{figure}
一時的に,\includegraphics
の1行を削除する.その代わりに,以下の1行を入力する
\qrcode[height=5cm]{https://xdefago.github.io/InfoLite/y20-2q/ex/latex/en2}
\caption{情報リテラシー第二の演習2のページのQRコード}
キャプションに図の説明を書く.その説明だけで,基本的に図を理解する事が望ましいです.
\label{fig:enshuu2-qrcode}
図表にも相互参照が有効です.付ける名前に決まりがないですが,名前の始まりを基本的に空別ができる様に,図はfig:
,表はtable:
,章はchap:
,節以下はsec:
,数式はeq:
にする.
図の入れ方はLaTeXエンジンが決めた所に入れるので,思う場所に限らないので,説明を書く所に,「図\ref{fig:enshuu2-qrcode}
…」を書くので,相互参照が必要です.「以下の図」や「上記のグラフ」などは絶対に書かない.なぜか,図は本当にそこに来るかどうか知りませんからだ.図番号よりページ番号が必要な時は\pageref{}
を使う.
画像ファイルのアップロード.
自分が作ったグラフの画像ファイルをアップロードする.ファイル方式は(pdf,png,jpg,gif)などでも大丈夫です.左側「アップロード」(upload)ボタンがあって,それにクリックすると,コンピュターからのファイルを選択して,アップロードする.最終は左側のファイルの一覧にアップロードしたファイルの名前が書いているかどうかを確認する.
これからの例には,見本としてtokyo_covid.pdfの画像ファイルを使う.
usepackage
を追加する.
\usepackage{graphicx}
\begin{figure}
を追加する.
\begin{figure}
\centering
\includegraphics{}
\caption{Caption}
\label{fig:my_label}
\end{figure}
\label{fig:tokyo:covid}
\includegraphics{tokyo_covid}
拡張子(.pdf
)を書く必要がありません.
\includegraphics[width=\textwidth]{tokyo_covid}
図の横幅をページの幅にする.書かなくても,縦幅はそれなりに変更する.
幅を0.8\textwidth
(8割りにする)や10cm
などにも書ける.
\documentclass[dvipdfmx]{jsarticle}
つまり,dvipdfmx
のオップションを追加する事が必要です.
表の基本が図と似ている.
\begin{table}
を書くと,Overleafは以下のテンプレートに変換する.
\begin{table}[]
\centering
\begin{tabular}{c|c}
& \\
&
\end{tabular}
\caption{Caption}
\label{tab:my_label}
\end{table}
まず,caption
とlabel
を\centering
の直後に移動する.和文はともかく,英文なら図のキャップションは図の下,表のキャップションは表の上が基本です.
\begin{tabular}{c | lc}
\textbf{週目} & \textbf{タイトル} & \textbf{日付} \\
\hline
1 & データ処理・可視化 & 6月25日
\\
2 & データ & 7月2日
\\
3 & プレゼンテーション & 7月9日
\\
4 & 学術論文:LaTeX basics & 7月16日
\\
\hline
\end{tabular}
{c|lc}
」は列の仕様で,3列で寄せ方が「center」「left」「center」になる.|
は1番目の列と2番目の列の間に縦線を引く.\\
」は改行.&
」は列を分ける.\hline
」は横線を引くコマンド.\textbf{}
」は文章を太文字にする.matrix
」環境が配列を書くために存在して,「tabular
」の環境と似ている.つづく…