文章目录
LaTex 的安装与环境配置
安装与环境配置
【LaTex】LaTex的下载与安装(超详细、超简洁)
原来用的CTeX,总出问题,现在用texlive+TexStudio组合。
这个教程非常详细,但是有一点,记得自己改环境变量。记得把CTeX的环境变量删除干净。
快捷键与定位
Texstudio使用技巧(环境配置、快捷键、源码与PDF相互定位等)
这个反向定位感觉没有Vscode的反向定位舒服,不过texstudio的界面确实比Vscode更清晰,而且texlive也比ctex好用一些。暂时就这样。
Texstudio常用快捷键(非常实用)
清华大学模板使用【视频】
清华大学本科毕业论文latex模板教程 | 不保证学会 | 不接受答疑 | 建议收藏
常用语句测试
用Latex 排版一篇中文期刊论文
对视频中的代码进行测试,本篇文章仅供自己学习使用,非常不全面非常不详细
作者在站内同样有文章并且整理的很详细:从零开始用 LaTeX 排版一篇中文期刊论文
标题,作者,中文正文,超链接
%%%%%导言区
\documentclass{article}%定义类型
\usepackage{ctex}%中文
\usepackage{hyperref}% 加入超链接
\title{一颗楸子核桃盘了8个月还不变红}
\author{雨青大爷\\又买了一对核桃版本}
\date{}
\begin{document}
\maketitle % 生成标题
下面开始是正文哦\\
hello world
引用的BILIBILI视频网址
\url{https://www.bilibili.com/video/BV147411r7a2/?spm_id_from=333.999.0.0&vd_source=3f2707f4286265e7af75f01a0ae7ebf1}
\end{document}
字体、字号、段落和编号
- 更改字体字号,比如黑体2号【标题】,楷书小4【姓名】
- ctex宏包默认首行缩进,不缩进用\noindent【】
- 居中用\begin{center} \end{center}
- 加粗\textbf
- 段落自动编号enumerate环境
%%%%%导言区
\documentclass{article}%定义类型
\usepackage{ctex}%中文
\usepackage{hyperref}% 加入超链接
\title{\heiti\zihao{2}一颗楸子核桃盘了8个月还不变红}
\author{\kaishu\zihao{-4}雨青大爷\\\songti\zihao{-5}又买了一对核桃版本}
\date{}
\begin{document}
\maketitle % 生成标题
下面开始是正文哦 下面开始是正文哦 下面开始是正文哦 下面开始是正文哦 下面开始是正文哦 下面开始是正文哦 下面开始是正文哦 下面开始是正文哦 下面开始是正文哦
\noindent 下 面开始是正文哦
\begin{center}
hello world
\end{center}
引用的\textbf{BILIBILI}视频网址
\begin{enumerate}
\item f复制1 \\
\url{https://www.bilibili.com/video/BV147411r7a2/?spm_id_from=333.999.0.0&vd_source=3f2707f4286265e7af75f01a0ae7ebf1}
\item f复制2
\item f复制3
\end{enumerate}
\end{document}
多级标题格式设置,交叉引用,文件拆分管理
\documentclass{ctexart}%定义类型
\usepackage{}%中文
\usepackage{hyperref}% 加入超链接
\title{\heiti\zihao{2}一颗楸子核桃盘了8个月还不变红}
\author{\kaishu\zihao{-4}雨青大爷\\\songti\zihao{-5}又买了一对核桃版本}
\date{}
\ctexset{section={format={\heiti \zihao{4}}},
subsection={format={\heiti \zihao{5}},beforeskip=0pt,afterskip=0pt},
subsubsection={format={\kaishu \zihao{5}},beforeskip=0pt,afterskip=0pt}}
\begin{document}
\maketitle % 生成标题
\section{一级标题}
\subsection{标题格式都是默认的}
\subsection{想要修改模式去导言区}
取消\textbackslash usepackage\{ctex\}的使用然后改成\textbackslash usepackage\{ctexart\}\\ 运行的快捷键是F6
\subsection{多级标题交叉引用} \label{多级标题}
多级标题引用\ref{多级标题}, 黑体章节引用\ref{黑体}
\section{文件拆分管理}\label{文件拆分}
\input{sb.tex}
\section{黑体5号}\label{黑体}
\subsection{黑体5号加粗}
\subsubsection{楷书5号}
\end{document}
行距,页边距,局部段落间隔,中文字体加粗,西文字体Times New Roma
\documentclass[AutoFakeBold]{ctexart}%定义类型,如果需要对中文字体进行加粗,需要[AutoFakeBold]
\usepackage[colorlinks,urlcolor=black,linkcolor=blue]{hyperref}% 加入超链接
\usepackage[left=2.5cm,right=1.97cm,top=2.5cm,bottom=2.5cm]{geometry}%定义页边距
\renewcommand{\baselinestretch}{1.25}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\ctexset{section={format={\heiti \zihao{4}\bfseries}},
subsection={format={\heiti \zihao{5} },beforeskip=0pt,afterskip=0pt},
subsubsection={format={\kaishu \zihao{5}},beforeskip=0pt,afterskip=0pt}}
\title{\heiti\zihao{2}一颗楸子核桃盘了8个月还不变红}
\author{\kaishu\zihao{-4}雨青大爷\\\songti\zihao{-5}又买了一对核桃版本}
\date{}
\begin{document}
\maketitle % 生成标题
\section{一级标题加黑版本}
\subsection{标题格式都是默认的}
如果需要中文字体加粗,需要AutoFakeBold
\subsection{想要修改模式去导言区}
取消\textbackslash usepackage\{ctex\}的使用然后改成\textbackslash usepackage\{ctexart\}\\ 运行的快捷键是F6\\ Times New Roman
\subsection{多级标题交叉引用} \label{多级标题}
多级标题引用\ref{多级标题}, 黑体章节引用\ref{黑体}
\section{文件拆分管理}\label{文件拆分}
\input{sb.tex}
\section{黑体5号}\label{黑体}
\subsection{黑体5号加粗}
\subsubsection{楷书5号}
\end{document}
参考文献
自己制作的超简单模版
雨青LaTex 第一版
\documentclass[AutoFakeBold]{ctexart}%定义类型,如果需要对中文字体进行加粗,需要[AutoFakeBold]
\usepackage[colorlinks=true,urlcolor=cyan,linkcolor=blue]{hyperref}% 加入超链接
\usepackage[left=2.5cm,right=1.97cm,top=2.5cm,bottom=2.5cm]{geometry}%定义页边距
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[super]{gbt7714}
\title{\heiti\zihao{2}你的文章}
\author{\kaishu\zihao{-4}姓名}
\date{}
\ctexset{section={format={\heiti \zihao{4}}},
subsection={format={\heiti \zihao{5}},beforeskip=0pt,afterskip=0pt},
subsubsection={format={\kaishu \zihao{5}},beforeskip=0pt,afterskip=0pt}}
\begin{document}
\maketitle % 生成标题
\begin{abstract}
你的摘要
\end{abstract}
\section{一级标题黑体四号}
\subsection{二级标题黑体5号}
段前段后间距为0磅
\subsubsection{三级标题楷书5号}
段前段后间距为0磅
\section{设置}
\subsection{公式}
\subsubsection{行间公式}
就这么引用就好了,$a+b=c$
\subsubsection{带编号公式}
有时候需要引用公式符号,就引用公式\ref{Iest}
\begin{equation}
a+b=c \label{Iest}
\end{equation}
\subsection{表格}
如表格\ref{tab:widgets}
\begin{table}
\centering
\begin{tabular}{l|r}
Item & Quantity \\\hline
Widgets & 42 \\
Gadgets & 13
\end{tabular}
\caption{\label{tab:widgets}An example table.}
\end{table}
\subsection{图片以及引用参考文献}
这里写文字以及引用图片\ref{fig:fr}
\begin{figure}[htbp]
\centering
\includegraphics[width=0.4\textwidth]{fr.png}
\caption{\label{fig:fr}兴欣战队黄金右手气功师猥琐大师海无量方锐}
\end{figure}
文献引用示例 \cite{Tadmor2012,Shen1994,CaiFuLiuWang2022}
\cite{Adams2003,Tadmor2012} and \cite{Shen1994}
\cite{ShiShi2013}
\bibliographystyle{gbt7714-numerical}
\bibliography{refs-cn}
\end{document}