![需要另一双眼睛来检查我的工作吗?科学实验室报告](https://linux22.com/image/417570/%E9%9C%80%E8%A6%81%E5%8F%A6%E4%B8%80%E5%8F%8C%E7%9C%BC%E7%9D%9B%E6%9D%A5%E6%A3%80%E6%9F%A5%E6%88%91%E7%9A%84%E5%B7%A5%E4%BD%9C%E5%90%97%EF%BC%9F%E7%A7%91%E5%AD%A6%E5%AE%9E%E9%AA%8C%E5%AE%A4%E6%8A%A5%E5%91%8A.png)
我一直在尝试复制和修改这模板添加到我自己的实验报告中。但是,当我尝试这样做时,我得到了一个错误。我该怎么做才能解决这个问题?此外,我该怎么做才能添加带有相应表格、数据分析和结果部分的数据表?我仍在学习 LaTeX 的来龙去脉,任何帮助都将不胜感激。
\documentclass[fleqn,10pt]{olplainarticle}
% Use option lineno for line numbers
\title{Example Article Title}
\author[1]{First Author}
\author[2]{Second Author}
\affil[1]{Address of first author}
\affil[2]{Address of second author}
\keywords{Keyword1, Keyword2, Keyword3}
\begin{abstract}
Please provide an abstract of no more than 300 words. Your abstract should explain the main contributions of your article, and should not contain any material that is not included in the main text.
\end{abstract}
\begin{document}
\flushbottom
\maketitle
\thispagestyle{empty}
\section*{Introduction}
Thanks for using Overleaf to write your article. Your introduction goes here! Some examples of commonly used commands and features are listed below, to help you get started.
\section*{Methods and Materials}
Guidelines can be included for standard research article sections, such as this one.
\section*{Some \LaTeX{} Examples}
\label{sec:examples}
Use section and subsection commands to organize your document. \LaTeX{} handles all the formatting and numbering automatically. Use ref and label commands for cross-references.
\subsection*{Figures and Tables}
Use the table and tabular commands for basic tables --- see Table~\ref{tab:widgets}, for example. You can upload a figure (JPEG, PNG or PDF) using the project menu. To include it in your document, use the includegraphics command as in the code for Figure~\ref{fig:view} below.
\begin{figure}[ht]
\centering
\includegraphics[width=0.7\linewidth]{frog}
\caption{An example image of a frog.}
\label{fig:view}
\end{figure}
\begin{table}[ht]
\centering
\begin{tabular}{l|r}
Item & Quantity \\\hline
Candles & 4 \\
Fork handles & ?
\end{tabular}
\caption{\label{tab:widgets}An example table.}
\end{table}
\subsection*{Citations}
LaTeX formats citations and references automatically using the bibliography records in your .bib file, which you can edit via the project menu. Use the cite command for an inline citation, like \cite{lees2010theoretical}, and the citep command for a citation in parentheses \citep{lees2010theoretical}.
\subsection*{Mathematics}
\LaTeX{} is great at typesetting mathematics. Let $X_1, X_2, \ldots, X_n$ be a sequence of independent and identically distributed random variables with $\text{E}[X_i] = \mu$ and $\text{Var}[X_i] = \sigma^2 < \infty$, and let
$$S_n = \frac{X_1 + X_2 + \cdots + X_n}{n}
= \frac{1}{n}\sum_{i}^{n} X_i$$
denote their mean. Then as $n$ approaches infinity, the random variables $\sqrt{n}(S_n - \mu)$ converge in distribution to a normal $\mathcal{N}(0, \sigma^2)$.
\subsection*{Lists}
You can make lists with automatic numbering \dots
\begin{enumerate}[noitemsep]
\item Like this,
\item and like this.
\end{enumerate}
\dots or bullet points \dots
\begin{itemize}[noitemsep]
\item Like this,
\item and like this.
\end{itemize}
\dots or with words and descriptions \dots
\begin{description}
\item[Word] Definition
\item[Concept] Explanation
\item[Idea] Text
\end{description}
\section*{Acknowledgments}
Additional information can be given in the template, such as to not include funder information in the acknowledgments section.
\bibliography{sample}
\end{document}
答案1
我不知道你的课程oldplainarticle
是什么样子的,但我猜你最大的问题是abstract
之前的环境\begin{document}
。我试图模仿所有其他命令,除了缺少引用参考的问题之外,这是在不知道你的课程的情况下对我有用的方法:
\documentclass[fleqn,10pt]{article}
% Use option lineno for line numbers
\usepackage{graphicx,enumitem}
\newcommand{\citep}[1]{(\cite{#1})}
\newcommand{\text}[1]{\mbox{#1}}
\title{Example Article Title}
\author{First Author\thanks{Address 1}, Second Author\thanks{Address 2}}
%\affil[1]{Address of first author}
%\affil[2]{Address of second author}
%\keywords{Keyword1, Keyword2, Keyword3}
\begin{document}
\begin{abstract}
Please provide an abstract of no more than 300 words. Your abstract should explain the main contributions of your article, and should not contain any material that is not included in the main text.
\end{abstract}
\flushbottom
\maketitle
\thispagestyle{empty}
\section*{Introduction}
Thanks for using Overleaf to write your article. Your introduction goes here! Some examples of commonly used commands and features are listed below, to help you get started.
\section*{Methods and Materials}
Guidelines can be included for standard research article sections, such as this one.
\section*{Some \LaTeX{} Examples}
\label{sec:examples}
Use section and subsection commands to organize your document. \LaTeX{} handles all the formatting and numbering automatically. Use ref and label commands for cross-references.
\subsection*{Figures and Tables}
Use the table and tabular commands for basic tables --- see Table~\ref{tab:widgets}, for example. You can upload a figure (JPEG, PNG or PDF) using the project menu. To include it in your document, use the includegraphics command as in the code for Figure~\ref{fig:view} below.
\begin{figure}[ht]
\centering
\includegraphics[width=0.7\linewidth]{example-image-a}
\caption{An example image of a frog.}
\label{fig:view}
\end{figure}
\begin{table}[ht]
\centering
\begin{tabular}{l|r}
Item & Quantity \\\hline
Candles & 4 \\
Fork handles & ?
\end{tabular}
\caption{\label{tab:widgets}An example table.}
\end{table}
\subsection*{Citations}
LaTeX formats citations and references automatically using the bibliography records in your .bib file, which you can edit via the project menu. Use the cite command for an inline citation, like \cite{lees2010theoretical}, and the citep command for a citation in parentheses \citep{lees2010theoretical}.
\subsection*{Mathematics}
\LaTeX{} is great at typesetting mathematics. Let $X_1, X_2, \ldots, X_n$ be a sequence of independent and identically distributed random variables with $\text{E}[X_i] = \mu$ and $\text{Var}[X_i] = \sigma^2 < \infty$, and let
$$S_n = \frac{X_1 + X_2 + \cdots + X_n}{n}
= \frac{1}{n}\sum_{i}^{n} X_i$$
denote their mean. Then as $n$ approaches infinity, the random variables $\sqrt{n}(S_n - \mu)$ converge in distribution to a normal $\mathcal{N}(0, \sigma^2)$.
\subsection*{Lists}
You can make lists with automatic numbering \dots
\begin{enumerate}[noitemsep]
\item Like this,
\item and like this.
\end{enumerate}
\dots or bullet points \dots
\begin{itemize}[noitemsep]
\item Like this,
\item and like this.
\end{itemize}
\dots or with words and descriptions \dots
\begin{description}
\item[Word] Definition
\item[Concept] Explanation
\item[Idea] Text
\end{description}
\section*{Acknowledgments}
Additional information can be given in the template, such as to not include funder information in the acknowledgments section.
\bibliography{sample}
\end{document}