Latex + overleaf(一)

本文介绍如何使用LaTeX进行中英文编辑、文章结构搭建、文献引用及数学公式编辑的方法。涵盖在线编辑工具Overleaf的使用、不同标题级别的设置、文献引用格式及数学公式的正确调用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

前言

使用overleaf在线编辑

第一部分

中英文编辑

本体—所有显示的都在document之间

\document[UTF8]{ctexart}  %中文显示
\begin{document}
Hello!中国!
\end{document}

文章结构

\section \subsection \subsubsection 不同标题

\paragraph \subparagraph

\documentclass[UTF8]{ctexart}%中文文档类型
%导言区
\title{你好,world!}
\author{musi}
\date{\today}

\begin{document}
\maketitle  % 导言区title显示
\section{你好中国}  %带标号
中国在East Asia.
\subsection{你好北京}()
北京是capital of China.
\subsubsection{你好天安门}
Hello,world!
为人民服务!
\paragraph{天安门} %
北京的中心
\subparagraph{毛主席}
天安门广场
\subsection{Hello,北京}
\paragraph{北京} is an international city.
\end{document}

效果图:
在这里插入图片描述

文献引用

关键:

  • \bibliographystyle{*} 参考文献的显示方式

  • \bibliography{*} *命名的.bib文件

    自己创建 *.bib文件,然后在百度学术或者谷歌学术等 中 引用,选择Bibtex格式,然后复制粘贴到创建的文件中。

  • \cite{*} 引用,* 为artcle第一行的内容

\documentclass[UTF8]{ctexart}%中文文档类型
\begin{document}
\section{引用范例}
这是参考文献引用:\cite{ZITOVA2003977}  %引用

第二篇引用\cite{SKEA1993269}

中文引用\cite{罗述谦1999医学图像配准技术}
%unsrt引用先后顺序plain按照字母顺序排列
\bibliographystyle{unsrt}
\bibliography{text}  %显示text.bib中的内容,bibtex格式
\end{document}

效果图:

数学公式

调用:amsmath包

\usepackage{amsmath}

编写:

  • 行内公式$...$

  • 行间公式 \[...\]

  • equation环境,自动编号

    \section{公式}  %https://www.latexlive.com/ 可以在线公式编辑
    \begin{equation}  %公式编号环境,但不能换行
    \sum_i^n i^2  \label{eq:平方和} %加标签引用 
    \end{equation}
    \begin{equation*}  %公式编号环境,带*号可以不编号
    \int x dx
    \end{equation*}
    \begin{equation}  %公式编号环境,但不能换行
    x^\frac{1}{3}
    \end{equation}
    式\eqref{eq:平方和}interesting %公式引用
    

    效果图:
    在这里插入图片描述

  • 多行公式1

    \begin{align}  %align &指定位置对齐
        x &= t + \cos t + 1 \\
        y &= 2\sin t \\
        z &= t \notag % 去除编号
    \end{align}
    

    效果图:

  • 多行公式2

    \begin{equation}
        \begin{split} %split需要嵌套在equation中,允许多行书写,但不能多列
            \cos 2x &= \cos^2 x - \sin^2 x \\
                    &= 2\cos^2 x - 1
        \end{split}
    \end{equation}
    

    效果图:

  • 多行公式3
\[
f(x)= \begin{cases}  %dfrac可以变成行间公式
\dfrac{x+1}{4},&\text{if } 0 < y < 1 \text{ and } 0 < x < 2;\\
0,&\text{otherwise}.
\end{cases}
\]

效果图:
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值