EasyLaTeX で論文を書く:プロジェクト作成から PDF まで

ヘルプEasyLaTeX公開日

勾配降下法を題材にした短い文書で、表題・概要・節・数式・図表・参考文献を EasyLaTeX に組み込みます。構造と操作の例なので、実際の論文では自分の研究と指定テンプレートを使います。

1. プロジェクトと主ファイルを設定する

EasyLaTeX エディターにログインし、空のプロジェクトで main.tex を作るか開きます。上部で主ファイルに選び、「エディター設定」のコンパイラーを LuaLaTeX にします。同じプロジェクトでもユーザーごとの設定なので、共同編集者もそれぞれ確認します。

ファイルツリー・ソース編集・PDF 出力の3領域があります。画像は英語 UI の例です。

EasyLaTeX のファイルツリー・ソース・出力画面

2. プリアンブルを用意する

ファイルの先頭に置きます。この部分だけではまだ完全な文書ではありません。

\documentclass[a4paper,11pt]{ltjsarticle}
\usepackage{amsmath,amssymb}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage[a4paper,margin=1in]{geometry}
\usepackage[numbers]{natbib}
\usepackage{hyperref}
\title{Gradient Descent: A Writing Example}
\author{Your Name}
\date{\today}

日本語の例には ltjsarticle を使います。大学や出版社のテンプレートでは、クラスと設定を維持してください。例のプリアンブルで全体を上書きしません。

3. 表題・概要・見出しを書く

プリアンブルの後に \begin{document} を1回書き、\maketitle と概要を続けます。最後に対応する \end{document} を1つ置きます。

\begin{abstract}
This document demonstrates the structure of a short paper on gradient descent.
It includes notation, an update equation, an illustrative comparison table,
an optional figure, and references.
\end{abstract}

同じ本文内に構成を追加します。

\section{Introduction}
\section{Mathematical Fundamentals}
\subsection{Gradient and Update Rule}
\section{Gradient Descent Variants}
\section{Learning Rate}
\section{Conclusion}

番号はクラスが管理します。以降の断片も本文内に置き、文書クラスや本文境界を繰り返さないでください。最後に結合した例があります。

4. 数式を入れる

行内は \(...\)、番号なしの別行は \[...\] を使います。番号と参照には equation・\label・\eqref を使います。

\begin{equation}
  \theta_{t+1}=\theta_t-\eta\nabla J(\theta_t)
  \label{eq:update}
\end{equation}
Equation~\eqref{eq:update} defines the update used here.

複数行は align で、& に位置を揃え、\\ で行を区切ります。

\begin{align}
J(\theta_0,\theta_1)
  &=\frac{1}{2m}\sum_{i=1}^{m}(h_{\theta}(x_i)-y_i)^2,\\
\frac{\partial J}{\partial\theta_0}
  &=\frac{1}{m}\sum_{i=1}^{m}(h_{\theta}(x_i)-y_i).
\end{align}

5. 表を入れる

table は配置とキャプション、tabular はセルを扱います。例は概念的な比較で、実測値ではありません。

\begin{table}[tbp]
\centering
\caption{Illustrative comparison of gradient estimates}
\label{tab:variants}
\begin{tabular}{lll}
\toprule
Variant & Samples per update & Typical sampling fluctuation \\
\midrule
Batch & Full dataset & No mini-batch sampling \\
Stochastic & One example & Higher \\
Mini-batch & A selected batch & Between the two \\
\bottomrule
\end{tabular}
\end{table}

セルは & で区切り、キャプションの後にラベルを置きます。\ref{tab:variants} で参照できます。

6. 画像をアップロードする

ファイルツリーから loss-curve.png をアップロードします。次の例は未登録なら枠、登録後は画像を表示します。

\begin{figure}[tbp]
\centering
\IfFileExists{loss-curve.png}{%
  \includegraphics[width=0.7\linewidth]{loss-curve.png}%
}{%
  \fbox{\rule{0pt}{30mm}\rule{0.65\linewidth}{0pt}}%
}
\caption{Loss-curve illustration; replace with your own figure}
\label{fig:loss}
\end{figure}

graphicx を使い、利用可能な行幅に合わせて大きさを指定します。パスと大文字・小文字を一致させ、枠を実際の研究図に置き換えます。

7. 参考文献を入れる

少数なら thebibliography と \cite{goodfellow2016} を使えます。.bib と外部の文献処理は不要ですが、参照更新にはプラットフォームによる繰り返し処理が必要な場合があります。

\begin{thebibliography}{9}
\bibitem{goodfellow2016} Ian Goodfellow, Yoshua Bengio, and Aaron Courville.
\emph{Deep Learning}. MIT Press, 2016.
\bibitem{bottou2012} Leon Bottou.
Stochastic Gradient Descent Tricks. In \emph{Neural Networks: Tricks of the Trade}, 2012.
\bibitem{kingma2015} Diederik P. Kingma and Jimmy Ba.
Adam: A Method for Stochastic Optimization. ICLR, 2015.
\end{thebibliography}

再利用する文献データには BibTeX と biblatexを使えます。

8. コンパイルしてダウンロードする

コンパイル時に現在の編集を先に保存します。処理後に図表・式・引用・見た目を確認します。「バグ」でエラーと「原始ログ」を確認し、必要なら「AI修復」を使います。問題の調べ方も参照できます。

ダウンロードメニューの「PDF ファイル」は閲覧・提出用、「LaTeX プロジェクト」はソースと資料用です。成功後に最終 PDF を保存します。画像は英語 UI の例です。

EasyLaTeX のソースと PDF のダウンロードメニュー

完全な main.tex

テストプロジェクトの主ファイルを次の例で置き換えます。既存の \end{document} の後には追加しません。画像がなければ枠を表示します。

\documentclass[a4paper,11pt]{ltjsarticle}
\usepackage{amsmath,amssymb}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage[a4paper,margin=1in]{geometry}
\usepackage[numbers]{natbib}
\usepackage{hyperref}
\title{Gradient Descent: A Writing Example}
\author{Your Name}
\date{\today}
\begin{document}
\maketitle
\begin{abstract}
This document demonstrates the structure of a short paper on gradient descent.
It includes notation, an update equation, an illustrative comparison table,
an optional figure, and references.
\end{abstract}
\section{Introduction}
Background is discussed in~\cite{goodfellow2016,bottou2012,kingma2015}.
\section{Mathematical Fundamentals}
Let $J$ be a differentiable objective and $\eta>0$ a step size.
\begin{equation}
  \theta_{t+1}=\theta_t-\eta\nabla J(\theta_t)
  \label{eq:update}
\end{equation}
Equation~\eqref{eq:update} defines the update used here.
\begin{align}
J(\theta_0,\theta_1)
  &=\frac{1}{2m}\sum_{i=1}^{m}(h_{\theta}(x_i)-y_i)^2,\\
\frac{\partial J}{\partial\theta_0}
  &=\frac{1}{m}\sum_{i=1}^{m}(h_{\theta}(x_i)-y_i).
\end{align}
\section{Gradient Descent Variants}
\begin{table}[tbp]
\centering
\caption{Illustrative comparison of gradient estimates}
\label{tab:variants}
\begin{tabular}{lll}
\toprule
Variant & Samples per update & Typical sampling fluctuation \\
\midrule
Batch & Full dataset & No mini-batch sampling \\
Stochastic & One example & Higher \\
Mini-batch & A selected batch & Between the two \\
\bottomrule
\end{tabular}
\end{table}
Table~\ref{tab:variants} is a qualitative illustration, not measured performance.
\section{Learning Rate}
Upload your own loss-curve image to replace the placeholder in Figure~\ref{fig:loss}.
\begin{figure}[tbp]
\centering
\IfFileExists{loss-curve.png}{%
  \includegraphics[width=0.7\linewidth]{loss-curve.png}%
}{%
  \fbox{\rule{0pt}{30mm}\rule{0.65\linewidth}{0pt}}%
}
\caption{Loss-curve illustration; replace with your own figure}
\label{fig:loss}
\end{figure}
\section{Conclusion}
Check the assumptions, results, and references for your actual paper.
\begin{thebibliography}{9}
\bibitem{goodfellow2016} Ian Goodfellow, Yoshua Bengio, and Aaron Courville.
\emph{Deep Learning}. MIT Press, 2016.
\bibitem{bottou2012} Leon Bottou.
Stochastic Gradient Descent Tricks. In \emph{Neural Networks: Tricks of the Trade}, 2012.
\bibitem{kingma2015} Diederik P. Kingma and Jimmy Ba.
Adam: A Method for Stochastic Optimization. ICLR, 2015.
\end{thebibliography}
\end{document}

説明・データ・図は自分の研究に置き換え、指定テンプレートに合わせて確認してください。

EasyLaTeX で論文を書く:プロジェクト作成から PDF まで | EasyLaTeX | EasyLaTeX