npx skills add https://github.com/rhuss/cc-slidev --skill 'LaTeX Handouts'LaTeX 为演示讲义提供专业的排版功能,能够将幻灯片图像、演讲者备注和补充研究材料整合成全面的参考文档。
在生成讲义之前,请使用以下命令检查依赖项:
${CLAUDE_PLUGIN_ROOT}/scripts/check-handout-deps.sh
退出代码:
当 LaTeX 包不可用时(退出代码 2):
\usepackage{tcolorbox} 和 \usepackage{enumitem}当 Playwright 不可用时(退出代码 3):
\begin{figure}...\end{figure} 块广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
当 pdflatex 不可用时(退出代码 1):
关键点: 讲义应是全面的独立文档,而不仅仅是幻灯片的副本。
✅ 应做事项:
❌ 不应做事项:
为每张幻灯片编写:
\documentclass[11pt,a4paper]{article}
% 基本包
\usepackage[utf8]{inputenc}
\usepackage[margin=1in]{geometry}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{fancyhdr}
% 文档元数据
\title{演示标题}
\author{作者姓名}
\date{\today}
% 页眉/页脚设置
\pagestyle{fancy}
\fancyhead[L]{演示标题}
\fancyhead[R]{\thepage}
\fancyfoot[C]{}
\begin{document}
\maketitle
\tableofcontents
\newpage
% 内容部分
\section{引言}
此处内容...
\end{document}
article - 标准文档
report - 较长文档
scrartcl/scrreprt - KOMA-Script 替代方案
\usepackage{graphicx} % 包含图像
\usepackage{float} % 更好的浮动定位
% 用法
\begin{figure}[H]
\centering
\includegraphics[width=0.8\textwidth]{slide-01.pdf}
\caption{引言幻灯片}
\label{fig:intro}
\end{figure}
\usepackage[margin=1in]{geometry} % 页边距
\usepackage{multicol} % 多列
\usepackage{parskip} % 段落间距
\usepackage{setspace} % 行间距
% 多列部分
\begin{multicols}{2}
两列内容
\end{multicols}
\usepackage{hyperref}
% 配置
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=cyan,
citecolor=green
}
% 用法
\href{https://example.com}{链接文本}
\url{https://example.com}
\usepackage{listings}
\usepackage{xcolor}
% 配置
\lstset{
basicstyle=\ttfamily\small,
keywordstyle=\color{blue},
commentstyle=\color{green},
stringstyle=\color{red},
frame=single,
breaklines=true
}
% 用法
\begin{lstlisting}[language=Python]
def hello():
print("Hello, World!")
\end{lstlisting}
\usepackage[backend=biber,style=apa]{biblatex}
\addbibresource{references.bib}
% 在文档中
\cite{key}
% 在末尾
\printbibliography
严格且一致地使用语义标题级别:
\section{} - 主要文档划分(引言、演示内容、总结、附加资源)\subsection{} - 演示中的主题部分(匹配幻灯片组部分/章节)\subsubsection{} - 单个幻灯片标题(每张幻灯片都有自己的 subsubsection 标题)\paragraph{} - 幻灯片内的内容细分(概述、关键考虑因素、技术细节、延伸阅读)规则:
\section{} 跳到 \subsubsection{})\subsubsection{} 标题包含 PNG 幻灯片和说明性解释的现代讲义格式:
\section{主题名称}
\subsubsection{具体幻灯片标题(断言形式)}
\begin{figure}[H]
\centering
\fbox{\includegraphics[width=0.72\textwidth]{exports/slide-005.png}}
\caption{具体幻灯片标题}
\end{figure}
\paragraph{概述:}
本节介绍分布式系统中容器编排的核心概念。
Kubernetes 提供声明式配置管理,允许操作员指定期望状态而非命令式命令。
协调循环持续监控实际状态并进行调整以匹配声明的配置,自动提供自愈能力。
\paragraph{关键考虑因素:}
声明式方法从根本上改变了与传统命令式自动化相比的操作实践。
当配置发生漂移时,系统会自动纠正而无需人工干预。
这在手动干预变得不切实际的大规模部署中尤其有价值。
然而,这需要仔细设计资源规范并理解故障期间的协调行为。
\paragraph{技术细节:}
控制循环模式使用三个关键组件:控制器监视 API 服务器的变化,比较当前状态与期望状态,并发出命令以协调差异。
每个控制器独立运行,管理特定的资源类型。
这种分布式控制模型提供了可扩展性和容错性,因为控制器故障不会在系统中级联。
\paragraph{延伸阅读:}
\begin{itemize}
\item \href{https://kubernetes.io/docs/concepts/architecture/controller/}{Kubernetes 控制器} -
解释控制循环模式和协调的官方文档
\item \href{https://www.oreilly.com/library/view/programming-kubernetes/9781492047094/}{编程 Kubernetes} -
编写自定义控制器和操作员的深入指南
\item \href{https://speakerdeck.com/thockin/kubernetes-what-is-reconciliation}{什么是协调?} -
Tim Hockin 关于协调模式的演示
\end{itemize}
\vspace{0.5cm}
\newpage
❌ 不良讲义 - 仅复制幻灯片要点:
\subsection{幻灯片内容}
\begin{figure}[H]
\includegraphics[width=0.9\textwidth]{slide.png}
\end{figure}
\subsection{备注}
关键点:
\begin{itemize}
\item 声明式配置
\item 协调循环
\item 自愈
\end{itemize}
附加信息:
\begin{itemize}
\item 适用于大规模部署
\item 参见 Kubernetes 文档
\end{itemize}
为何这是不良做法:
每页显示多张幻灯片:
\begin{figure}[H]
\centering
\begin{minipage}{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{slide-01.pdf}
\caption{幻灯片 1}
\end{minipage}
\hfill
\begin{minipage}{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{slide-02.pdf}
\caption{幻灯片 2}
\end{minipage}
\end{figure}
内容与图像并排:
\begin{multicols}{2}
\noindent
\textbf{关键概念:}
\begin{itemize}
\item 概念 1
\item 概念 2
\end{itemize}
\columnbreak
\begin{figure}[H]
\centering
\includegraphics[width=\linewidth]{diagram.pdf}
\end{figure}
\end{multicols}
重要提示: 讲义中的所有幻灯片图像都应使用 \fbox{} 添加黑色边框,以清晰界定幻灯片边界。
将幻灯片导出为 PNG 用于讲义:
% 单张幻灯片
\includegraphics[width=0.8\textwidth]{exports/slides.pdf}
% 多页 PDF 中的特定页面
\includegraphics[page=5,width=0.8\textwidth]{exports/slides.pdf}
% 带黑色边框(讲义推荐)
\fbox{\includegraphics[width=0.72\textwidth]{slide.png}}
% 按宽度(保持宽高比)
\includegraphics[width=0.8\textwidth]{image.pdf}
% 按高度
\includegraphics[height=6cm]{image.pdf}
% 缩放因子
\includegraphics[scale=0.5]{image.pdf}
% 精确尺寸(如果比例错误会扭曲)
\includegraphics[width=10cm,height=6cm]{image.pdf}
% 居中
\begin{center}
\includegraphics[width=0.7\textwidth]{image.pdf}
\end{center}
% 在图形环境中(带标题)
\begin{figure}[htbp]
\centering
\includegraphics[width=0.7\textwidth]{image.pdf}
\caption{描述性标题}
\label{fig:label}
\end{figure}
% 位置代码:
% h - 此处
% t - 页面顶部
% b - 页面底部
% p - 单独页面
% ! - 覆盖限制
% H - 此处(需要 float 包)
\begin{titlepage}
\centering
\vspace*{2cm}
{\Huge\bfseries 演示标题\par}
\vspace{1cm}
{\Large 副标题或主题\par}
\vspace{2cm}
{\Large\itshape 作者姓名\par}
\vspace{1cm}
{\large\today\par}
\vfill
{\large 组织名称\par}
\vspace{0.5cm}
\includegraphics[width=0.3\textwidth]{logo.pdf}
\end{titlepage}
\tableofcontents
\newpage
% 深度控制(默认 3)
\setcounter{tocdepth}{2} % 显示到子节
\usepackage{fancyhdr}
\pagestyle{fancy}
% 清除默认值
\fancyhf{}
% 左侧页眉
\fancyhead[L]{演示标题}
% 右侧页眉
\fancyhead[R]{作者姓名}
% 居中页脚
\fancyfoot[C]{\thepage}
% 右侧页脚
\fancyfoot[R]{\today}
% 线宽
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\usepackage{titlesec}
% 自定义章节外观
\titleformat{\section}
{\Large\bfseries\color{blue}}
{\thesection}
{1em}
{}
% 章节周围间距
\titlespacing*{\section}{0pt}{2ex}{1ex}
\usepackage{tcolorbox}
% 简单框
\begin{tcolorbox}[colback=blue!5,colframe=blue!40!black,title=关键点]
重要信息在此
\end{tcolorbox}
% 警告框
\begin{tcolorbox}[colback=yellow!10,colframe=orange!80!black,title=注意]
需要记住的内容
\end{tcolorbox}
\begin{table}[H]
\centering
\begin{tabular}{|l|c|r|}
\hline
\textbf{表头 1} & \textbf{表头 2} & \textbf{表头 3} \\
\hline
行 1 & 数据 & 123 \\
行 2 & 更多数据 & 456 \\
\hline
\end{tabular}
\caption{表格标题}
\label{tab:example}
\end{table}
% 脚注
这很重要\footnote{脚注中的附加细节}。
% 边注
\marginpar{边注}
\newpage % 开始新页
\clearpage % 开始新页,清除浮动
\pagebreak % 分页(如可能)
\nopagebreak % 防止分页
\section{引言}
% 概述和目标
\section{主要内容}
\subsection{主题 1}
% 幻灯片 + 备注 + 上下文
\subsection{主题 2}
% 幻灯片 + 备注 + 上下文
\section{结论}
% 总结和要点
\section{附加资源}
% 参考文献、链接、延伸阅读
\section{附录}
% 额外材料、代码示例
\section{参考文献和资源}
\subsection{关键论文}
\begin{itemize}
\item Smith, J. (2023). \textit{重要论文}. 期刊名称。
\item Jones, A. (2022). \textit{另一项研究}. 会议论文集。
\end{itemize}
\subsection{在线资源}
\begin{itemize}
\item \href{https://example.com}{资源名称} - 描述
\item \href{https://tutorial.com}{教程网站} - 学习材料
\end{itemize}
\subsection{工具和软件}
\begin{itemize}
\item 工具名称 - \url{https://tool.com}
\item 库名称 - \url{https://github.com/user/repo}
\end{itemize}
pdflatex handout.tex
pdflatex handout.tex
bibtex handout
pdflatex handout.tex
pdflatex handout.tex
# 使用 latexmk(自动)
latexmk -pdf handout.tex
# 清理辅助文件
latexmk -c
确保路径正确:
% 相对于 .tex 文件
\includegraphics{./images/slide.pdf}
% 告诉 LaTeX 查找位置
\graphicspath{{./images/}{./exports/}}
图像未出现在预期位置:
% 强制在此处
\usepackage{float}
\begin{figure}[H] % 大写 H
...
\end{figure}
% 或允许更多灵活性
\begin{figure}[htbp!]
...
\end{figure}
长 URL 或代码超出边距:
% 对于 URL
\usepackage{url}
\url{https://very-long-url.com}
% 对于代码
\begin{lstlisting}[breaklines=true]
长代码在此
\end{lstlisting}
LaTeX 特殊字符需要转义:
% 这些需要反斜杠
\$ \% \& \# \_ \{ \}
% 或使用 verb
\verb|$special_chars|
% 对于代码,使用 lstlisting
必需:
\fbox{} 添加黑色边框\centering 居中幻灯片示例:
\begin{figure}[H]
\centering
\fbox{\includegraphics[width=0.72\textwidth]{exports/slide-001.png}}
\caption{描述性幻灯片标题}
\label{fig:slide1}
\end{figure}
必需:
\subsubsection{} 标题\paragraph{} 进行幻灯片内的内容细分presentation/
├── handout.tex # 主文档
├── handout.pdf # 编译输出
├── references.bib # 参考文献
├── images/ # 图表、徽标
├── slides/ # 单个幻灯片 PDF
└── exports/ # 幻灯片组导出
创建可重用的章节模板:
% template.tex
\newcommand{\slideandnotes}[4]{
\subsection{#1}
\begin{figure}[H]
\centering
\includegraphics[width=0.9\textwidth]{#2}
\caption{#3}
\end{figure}
\subsubsection{备注}
#4
\newpage
}
% 用法
\slideandnotes{主题名称}{slides/slide-05.pdf}{标题}{
备注和附加上下文在此。
}
在文档中注释版本:
% 版本 1.0 - 2024-01-15 - 初始草稿
% 版本 1.1 - 2024-01-20 - 添加第 3 节
% 版本 2.0 - 2024-01-25 - 最终修订版
% 或使用 git 信息
\usepackage{gitinfo2}
% PDF 元数据
\hypersetup{
pdftitle={演示讲义},
pdfauthor={作者姓名},
pdfsubject={主题},
pdfkeywords={关键词1, 关键词2},
pdfproducer={LaTeX},
pdfcreator={pdflatex}
}
% 图像的替代文本
\includegraphics{image.pdf}
% 在标题或周围文本中描述
\documentclass{article}
\usepackage{graphicx}
\usepackage{hyperref}
\title{讲义标题}
\author{作者}
\date{\today}
\begin{document}
\maketitle
\section{引言}
内容...
\end{document}
\section{标题} % 章节
\subsection{标题} % 子节
\textbf{粗体} % 粗体
\textit{斜体} % 斜体
\underline{文本} % 下划线
\newpage % 分页
\vspace{1cm} % 垂直间距
\hspace{1cm} % 水平间距
有关全面的 LaTeX 文档,请查阅 The LaTeX Project (https://www.latex-project.org/) 和 Overleaf 文档 (https://www.overleaf.com/learn)。
每周安装次数
–
代码仓库
GitHub 星标数
17
首次出现时间
–
安全审计
LaTeX provides professional typesetting for presentation handouts that combine slide images, presenter notes, and supplementary research into comprehensive reference documents.
Before generating handouts, check dependencies using:
${CLAUDE_PLUGIN_ROOT}/scripts/check-handout-deps.sh
Exit codes:
When LaTeX packages unavailable (exit code 2):
\usepackage{tcolorbox} and \usepackage{enumitem} in preambleWhen Playwright unavailable (exit code 3):
\begin{figure}...\end{figure} blocks for slide imagesWhen pdflatex unavailable (exit code 1):
Critical: Handouts should be comprehensive standalone documents , not just copies of slides.
✅ DO:
❌ DON'T:
For each slide, write:
Overview paragraph (2-4 sentences)
Key Considerations paragraph (2-4 sentences)
Technical Details paragraph (if applicable)
Further Reading list (3-5 URLs)
\documentclass[11pt,a4paper]{article}
% Essential packages
\usepackage[utf8]{inputenc}
\usepackage[margin=1in]{geometry}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{fancyhdr}
% Document metadata
\title{Presentation Title}
\author{Author Name}
\date{\today}
% Header/footer setup
\pagestyle{fancy}
\fancyhead[L]{Presentation Title}
\fancyhead[R]{\thepage}
\fancyfoot[C]{}
\begin{document}
\maketitle
\tableofcontents
\newpage
% Content sections
\section{Introduction}
Content here...
\end{document}
article - Standard documents
report - Longer documents
scrartcl/scrreprt - KOMA-Script alternatives
\usepackage{graphicx} % Include images
\usepackage{float} % Better float positioning
% Usage
\begin{figure}[H]
\centering
\includegraphics[width=0.8\textwidth]{slide-01.pdf}
\caption{Introduction Slide}
\label{fig:intro}
\end{figure}
\usepackage[margin=1in]{geometry} % Page margins
\usepackage{multicol} % Multiple columns
\usepackage{parskip} % Paragraph spacing
\usepackage{setspace} % Line spacing
% Multi-column sections
\begin{multicols}{2}
Content in two columns
\end{multicols}
\usepackage{hyperref}
% Configuration
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=cyan,
citecolor=green
}
% Usage
\href{https://example.com}{Link text}
\url{https://example.com}
\usepackage{listings}
\usepackage{xcolor}
% Configuration
\lstset{
basicstyle=\ttfamily\small,
keywordstyle=\color{blue},
commentstyle=\color{green},
stringstyle=\color{red},
frame=single,
breaklines=true
}
% Usage
\begin{lstlisting}[language=Python]
def hello():
print("Hello, World!")
\end{lstlisting}
\usepackage[backend=biber,style=apa]{biblatex}
\addbibresource{references.bib}
% In document
\cite{key}
% At end
\printbibliography
Use semantic heading levels rigorously and consistently:
\section{} - Major document divisions (Introduction, Presentation Content, Summary, Additional Resources)\subsection{} - Topic sections within presentation (matches slide deck sections/chapters)\subsubsection{} - Individual slide titles (each slide gets its own subsubsection heading)\paragraph{} - Content subdivisions within slides (Overview, Key Considerations, Technical Details, Further Reading)Rules:
\section{} to \subsubsection{})\subsubsection{} headingModern handout format with PNG slides and prose explanations:
\section{Topic Name}
\subsubsection{Specific Slide Title (Assertion Form)}
\begin{figure}[H]
\centering
\fbox{\includegraphics[width=0.72\textwidth]{exports/slide-005.png}}
\caption{Specific Slide Title}
\end{figure}
\paragraph{Overview:}
This section introduces the core concept of container orchestration in distributed systems.
Kubernetes provides declarative configuration management, allowing operators to specify desired
state rather than imperative commands. The reconciliation loop continuously monitors actual
state and makes adjustments to match the declared configuration, providing self-healing
capabilities automatically.
\paragraph{Key Considerations:}
The declarative approach fundamentally changes operational practices compared to traditional
imperative automation. When configuration drift occurs, the system automatically corrects it
without human intervention. This is particularly valuable in large-scale deployments where
manual intervention becomes impractical. However, it requires careful design of resource
specifications and understanding of reconciliation behavior during failures.
\paragraph{Technical Details:}
The control loop pattern uses three key components: controllers watch the API server for
changes, compare current state to desired state, and issue commands to reconcile differences.
Each controller operates independently, managing specific resource types. This distributed
control model provides scalability and fault tolerance, as controller failures don't cascade
across the system.
\paragraph{Further Reading:}
\begin{itemize}
\item \href{https://kubernetes.io/docs/concepts/architecture/controller/}{Kubernetes Controllers} -
Official documentation explaining control loop patterns and reconciliation
\item \href{https://www.oreilly.com/library/view/programming-kubernetes/9781492047094/}{Programming Kubernetes} -
In-depth guide to writing custom controllers and operators
\item \href{https://speakerdeck.com/thockin/kubernetes-what-is-reconciliation}{What is Reconciliation?} -
Tim Hockin's presentation on reconciliation patterns
\end{itemize}
\vspace{0.5cm}
\newpage
❌ Bad handout - just copies slide bullets:
\subsection{Slide Content}
\begin{figure}[H]
\includegraphics[width=0.9\textwidth]{slide.png}
\end{figure}
\subsection{Notes}
Key points:
\begin{itemize}
\item Declarative configuration
\item Reconciliation loops
\item Self-healing
\end{itemize}
Additional info:
\begin{itemize}
\item Useful for large deployments
\item See Kubernetes docs
\end{itemize}
Why this is bad:
Show multiple slides per page:
\begin{figure}[H]
\centering
\begin{minipage}{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{slide-01.pdf}
\caption{Slide 1}
\end{minipage}
\hfill
\begin{minipage}{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{slide-02.pdf}
\caption{Slide 2}
\end{minipage}
\end{figure}
Content alongside images:
\begin{multicols}{2}
\noindent
\textbf{Key Concepts:}
\begin{itemize}
\item Concept 1
\item Concept 2
\end{itemize}
\columnbreak
\begin{figure}[H]
\centering
\includegraphics[width=\linewidth]{diagram.pdf}
\end{figure}
\end{multicols}
IMPORTANT: All slide images in handouts should have black borders using \fbox{} to clearly delineate the slide boundaries.
Export slides as PNG for handouts:
% Single slide
\includegraphics[width=0.8\textwidth]{exports/slides.pdf}
% Specific page from multi-page PDF
\includegraphics[page=5,width=0.8\textwidth]{exports/slides.pdf}
% With black border (recommended for handouts)
\fbox{\includegraphics[width=0.72\textwidth]{slide.png}}
% By width (maintains aspect ratio)
\includegraphics[width=0.8\textwidth]{image.pdf}
% By height
\includegraphics[height=6cm]{image.pdf}
% Scale factor
\includegraphics[scale=0.5]{image.pdf}
% Exact dimensions (distorts if wrong ratio)
\includegraphics[width=10cm,height=6cm]{image.pdf}
% Centered
\begin{center}
\includegraphics[width=0.7\textwidth]{image.pdf}
\end{center}
% In figure environment (with caption)
\begin{figure}[htbp]
\centering
\includegraphics[width=0.7\textwidth]{image.pdf}
\caption{Descriptive caption}
\label{fig:label}
\end{figure}
% Position codes:
% h - here
% t - top of page
% b - bottom of page
% p - separate page
% ! - override restrictions
% H - HERE (requires float package)
\begin{titlepage}
\centering
\vspace*{2cm}
{\Huge\bfseries Presentation Title\par}
\vspace{1cm}
{\Large Subtitle or Topic\par}
\vspace{2cm}
{\Large\itshape Author Name\par}
\vspace{1cm}
{\large\today\par}
\vfill
{\large Organization Name\par}
\vspace{0.5cm}
\includegraphics[width=0.3\textwidth]{logo.pdf}
\end{titlepage}
\tableofcontents
\newpage
% Depth control (default 3)
\setcounter{tocdepth}{2} % Show up to subsections
\usepackage{fancyhdr}
\pagestyle{fancy}
% Clear defaults
\fancyhf{}
% Left header
\fancyhead[L]{Presentation Title}
% Right header
\fancyhead[R]{Author Name}
% Center footer
\fancyfoot[C]{\thepage}
% Right footer
\fancyfoot[R]{\today}
% Line width
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\usepackage{titlesec}
% Customize section appearance
\titleformat{\section}
{\Large\bfseries\color{blue}}
{\thesection}
{1em}
{}
% Spacing around sections
\titlespacing*{\section}{0pt}{2ex}{1ex}
\usepackage{tcolorbox}
% Simple box
\begin{tcolorbox}[colback=blue!5,colframe=blue!40!black,title=Key Point]
Important information here
\end{tcolorbox}
% Warning box
\begin{tcolorbox}[colback=yellow!10,colframe=orange!80!black,title=Note]
Something to remember
\end{tcolorbox}
\begin{table}[H]
\centering
\begin{tabular}{|l|c|r|}
\hline
\textbf{Header 1} & \textbf{Header 2} & \textbf{Header 3} \\
\hline
Row 1 & Data & 123 \\
Row 2 & More data & 456 \\
\hline
\end{tabular}
\caption{Table caption}
\label{tab:example}
\end{table}
% Footnote
This is important\footnote{Additional details in footnote}.
% Margin note
\marginpar{Side note}
\newpage % Start new page
\clearpage % Start new page, flush floats
\pagebreak % Break page (if possible)
\nopagebreak % Prevent page break
\section{Introduction}
% Overview and objectives
\section{Main Content}
\subsection{Topic 1}
% Slide + notes + context
\subsection{Topic 2}
% Slide + notes + context
\section{Conclusion}
% Summary and takeaways
\section{Additional Resources}
% References, links, further reading
\section{Appendix}
% Extra materials, code samples
\section{References and Resources}
\subsection{Key Papers}
\begin{itemize}
\item Smith, J. (2023). \textit{Important Paper}. Journal Name.
\item Jones, A. (2022). \textit{Another Study}. Conference Proceedings.
\end{itemize}
\subsection{Online Resources}
\begin{itemize}
\item \href{https://example.com}{Resource Name} - Description
\item \href{https://tutorial.com}{Tutorial Site} - Learning materials
\end{itemize}
\subsection{Tools and Software}
\begin{itemize}
\item Tool Name - \url{https://tool.com}
\item Library Name - \url{https://github.com/user/repo}
\end{itemize}
pdflatex handout.tex
pdflatex handout.tex
bibtex handout
pdflatex handout.tex
pdflatex handout.tex
# Using latexmk (automatic)
latexmk -pdf handout.tex
# Clean auxiliary files
latexmk -c
Ensure correct path:
% Relative to .tex file
\includegraphics{./images/slide.pdf}
% Tell LaTeX where to look
\graphicspath{{./images/}{./exports/}}
Images not appearing where expected:
% Force HERE
\usepackage{float}
\begin{figure}[H] % Capital H
...
\end{figure}
% Or allow more flexibility
\begin{figure}[htbp!]
...
\end{figure}
Long URLs or code breaking margins:
% For URLs
\usepackage{url}
\url{https://very-long-url.com}
% For code
\begin{lstlisting}[breaklines=true]
long code here
\end{lstlisting}
LaTeX special characters need escaping:
% These need backslash
\$ \% \& \# \_ \{ \}
% Or use verb
\verb|$special_chars|
% For code, use lstlisting
REQUIRED:
\fbox{} for black borders\centering in figure environmentExample:
\begin{figure}[H]
\centering
\fbox{\includegraphics[width=0.72\textwidth]{exports/slide-001.png}}
\caption{Descriptive Slide Title}
\label{fig:slide1}
\end{figure}
REQUIRED:
\subsubsection{} heading\paragraph{} for content subdivisions within slidespresentation/
├── handout.tex # Main document
├── handout.pdf # Compiled output
├── references.bib # Bibliography
├── images/ # Diagrams, logos
├── slides/ # Individual slide PDFs
└── exports/ # Slide deck exports
Create reusable section templates:
% template.tex
\newcommand{\slideandnotes}[4]{
\subsection{#1}
\begin{figure}[H]
\centering
\includegraphics[width=0.9\textwidth]{#2}
\caption{#3}
\end{figure}
\subsubsection{Notes}
#4
\newpage
}
% Usage
\slideandnotes{Topic Name}{slides/slide-05.pdf}{Caption}{
Notes and additional context here.
}
Comment versions in document:
% Version 1.0 - 2024-01-15 - Initial draft
% Version 1.1 - 2024-01-20 - Added section 3
% Version 2.0 - 2024-01-25 - Final revision
% Or use git info
\usepackage{gitinfo2}
% PDF metadata
\hypersetup{
pdftitle={Presentation Handout},
pdfauthor={Author Name},
pdfsubject={Topic},
pdfkeywords={keyword1, keyword2},
pdfproducer={LaTeX},
pdfcreator={pdflatex}
}
% Alt text for images
\includegraphics{image.pdf}
% Described in caption or surrounding text
\documentclass{article}
\usepackage{graphicx}
\usepackage{hyperref}
\title{Handout Title}
\author{Author}
\date{\today}
\begin{document}
\maketitle
\section{Introduction}
Content...
\end{document}
\section{Title} % Section
\subsection{Title} % Subsection
\textbf{bold} % Bold
\textit{italic} % Italic
\underline{text} % Underline
\newpage % Page break
\vspace{1cm} % Vertical space
\hspace{1cm} % Horizontal space
For comprehensive LaTeX documentation, consult The LaTeX Project (https://www.latex-project.org/) and Overleaf documentation (https://www.overleaf.com/learn).
Weekly Installs
–
Repository
GitHub Stars
17
First Seen
–
Security Audits
Claude技能创建器指南:构建模块化AI技能包,优化工作流与工具集成
5,700 周安装