Latex个人手册

先附上可以在线运行的Latex编译器

以下是Latex的一些样例代码,后面的是相应的英文解释

\documentclass[a4paper,10pt,twocolumn,landscape]{article}

\begin{document}

\section{Exploring Document Class Options}
\begin{itemize}
\item a4paper , a5paper , b5paper , letterpaper , legalpaper , or
executivepaper : The output will be formatted according to this paper size,
that is, A4: 210 mm x 297 mm. letterpaper (8.5 in x 11 in) is the default.
Loading the geometry package allows more sizes.

\item 10pt , 11pt , or 12pt : The size of normal text in the document; the
default is ten points ( 10pt ). The size of headings, footnotes, indexes, and
so on, will be adjusted accordingly.

\item landscape : Switches to landscape format; width and height of the output
size will be interchanged.

\item onecolumn or twocolumn : Decides whether the pages will be one-column
(default) or two-column. It’s not supported by the letter class.

\item oneside or twoside : Formatting for printing on one side or both sides of
a page. oneside is the default, except for the book class. twoside is not
usable with the slides class and the letter class.

\item 10pt , 11pt , or 12pt : The size of normal text in the document; the
default is ten points ( 10pt ). The size of headings, footnotes, indexes, and
so on, will be adjusted accordingly.

\item landscape : Switches to landscape format; width and height of the output
size will be interchanged.

扫描二维码关注公众号,回复: 3313336 查看本文章

\item onecolumn or twocolumn : Decides whether the pages will be one-column
(default) or two-column. It’s not supported by the letter class.

\item oneside or twoside : Formatting for printing on one side or both sides of
a page. oneside is the default, except for the book class. twoside is not
usable with the slides class and the letter class.
\end{itemize}

\end{document}


\documentclass[a4paper]{article}

%% Language and font encodings
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}

%% Sets page size and margins
\usepackage[a4paper,top=3cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}

%% Useful packages
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage[colorlinks=true, allcolors=blue]{hyperref}

\title{Your Paper}
\author{You}

\begin{document}
\maketitle

\begin{abstract}Your abstract.\end{abstract}

\section{Introduction}

Your introduction goes here! Some examples of commonly used commands and features are listed below, to help you get started. If you have a question, please use the help menu (“?”) on the top bar to search for help or ask us a question.

\section{Some examples to get started}

\subsection{How to add Comments}

Comments can be added to your project by clicking on the comment icon in the toolbar above. % * [email protected] 2014-09-03T09:54:16.211Z:
%
% Here’s an example comment!
%
To reply to a comment, simply click the reply button in the lower right corner of the comment, and you can close them when you’re done.

\subsection{How to include Figures}

First you have to upload the image file from your computer using the upload link in the project menu. Then use the includegraphics command to include it in your document. Use the figure environment and the caption command to add a number and a caption to your figure. See the code for Figure ??? in this section for an example.

\begin{figure}\centering\includegraphics[width=0.3\textwidth]{frog.jpg}\caption{\label{fig:frog}This frog was uploaded via the project menu.}\end{figure}

\subsection{How to add Tables}

Use the table and tabular commands for basic tables — see Table~ ??? , for example.

\begin{table}\centering\begin{tabular}{l|r}Item & Quantity \\\hlineWidgets & 42 \\Gadgets & 13\end{tabular}\caption{\label{tab:widgets}An example table.}\end{table}

\subsection{How to write Mathematics}

\LaTeX{} is great at typesetting mathematics. Let X 1 , X 2 , , X n be a sequence of independent and identically distributed random variables with E [ X i ] = μ and Var [ X i ] = σ 2 < , 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 n ( S n μ ) converge in distribution to a normal N ( 0 , σ 2 ) .

\subsection{How to create Sections and Subsections}

Use section and subsections to organize your document. Simply use the section and subsection buttons in the toolbar to create them, and we’ll handle all the formatting and numbering automatically.

\subsection{How to add Lists}

You can make lists with automatic numbering \dots

\begin{enumerate}\item Like this,\item and like this.\end{enumerate}

\dots or bullet points \dots
\begin{itemize}\item Like this,\item and like this.\end{itemize}

\subsection{How to add Citations and a References List}

You can upload a \verb|.bib| file containing your BibTeX entries, created with JabRef; or import your \href{https://www.overleaf.com/blog/184}{Mendeley}, CiteULike or Zotero library as a \verb|.bib| file. You can then cite entries from it, like this: \cite{greenwade93}. Just remember to specify a bibliography style, as well as the filename of the \verb|.bib|.

You can find a \href{https://www.overleaf.com/help/97-how-to-include-a-bibliography-using-bibtex}{video tutorial here} to learn more about BibTeX.

We hope you find Overleaf useful, and please let us know if you have any feedback using the help menu above — or use the contact form at \url{https://www.overleaf.com/contact}!

\bibliographystyle{alpha}
\bibliography{sample}

\end{document}

猜你喜欢

转载自blog.csdn.net/weixin_41879093/article/details/82721201