LaTex使用&Beamer模板
搞课件/题解pdf的时候用到的,记一下
软件
Texmaker
https://blog.csdn.net/m0_48256515/article/details/117856948
https://blog.csdn.net/m0_46314771/article/details/129642396
快捷键
F1:编译
ctrl+T:(多行)注释
ctrl+U:取消注释
ctrl+shift+>+多选:向右缩进
ctrl+shift+<+多选:向左缩进
语法
https://blog.csdn.net/tianzong2019/article/details/106521432
支持中文
\usepackage
\documentclass{article}
\usepackage{ctex} % 中文支持宏包
\begin{document}
这是一段中文文本。
数学公式示例:
\[
E = mc^2
\]
\end{document}
Beamer模板
https://blog.csdn.net/xovee/article/details/129689878 (翻译)
https://www.overleaf.com/learn/latex/Beamer
https://blog.csdn.net/smalosnail/article/details/120649809
模板(Beamer+Berlin主题)⭐
\documentclass[11pt]{beamer}
\usetheme{Berlin}
\usepackage[utf8]{inputenc}
\usepackage{ctex} % 中文环境
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\AtBeginSection[] % 为每个章节前添加标题并高亮
{
\begin{frame}
\frametitle{目录}
\tableofcontents[currentsection]
\end{frame}
}
% 封面设计
\title[底边标题]{标题}
\subtitle{副标题}
\author[底边作者]{作者}
\date[时间2]{时间}
%正文
\begin{document}
% 标题
\frame{\titlepage}
% % 目录
% \begin{frame}
% \frametitle{目录}
% \tableofcontents
% \end{frame}
\section{章节1标题}
\begin{frame}
\frametitle{页1标题}
页1正文1\\ % \\表示换行
页1正文2
\end{frame}
\section{章节2标题}
\begin{frame}
\frametitle{页2标题}
使用itemize做出逐项列出的效果
\begin{itemize}
\item<1-> 第一行
\item<2-> 第二行
\item<3> 第三行(不加"-",表示下一页就这行会消失)
\item<4-> 第四行
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{页3标题}
页3正文1\\
页3正文2
\end{frame}
\end{document}
加入子章节:
\subsection{章节1-子章节1}
\begin{frame}
\frametitle{子章节}
子章节正文
\end{frame}
效果:
![](https://img2024.cnblogs.com/blog/1785205/202407/1785205-20240719165157752-11788257.png)
模板 by gpt
\documentclass{beamer}
\usetheme{Berlin}
\title{Presentation Title}
\author{Author Name}
\date{\today}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\begin{frame}{Outline}
\tableofcontents
\end{frame}
\section{Introduction}
\begin{frame}{Introduction}
This is the introduction slide.
\end{frame}
\section{Main Content}
\begin{frame}{Main Content}
\begin{itemize}
\item Item 1
\item Item 2
\item Item 3
\end{itemize}
\end{frame}
\section{Conclusion}
\begin{frame}{Conclusion}
\begin{block}{Summary}
In summary, ...
\end{block}
\begin{alertblock}{Important}
Remember that ...
\end{alertblock}
\begin{exampleblock}{Example}
For example, ...
\end{exampleblock}
\end{frame}
\end{document}