Loading...
Loading...
Guide LaTeX document authoring following best practices and proper semantic markup. Use proactively when: (1) writing or editing .tex files, (2) writing or editing .nw literate programming files, (3) literate-programming skill is active and working with .nw files, (4) user mentions LaTeX, BibTeX, or document formatting, (5) reviewing LaTeX code quality. Ensures proper use of semantic environments (description vs itemize), csquotes (\enquote{} not ``...''), and cleveref (\cref{} not \S\ref{}).
npx skill4agent add dbosk/claude-skills latex-writingdescriptiondescription\begin{description}
\item[Term] Definition or explanation of the term
\item[Label] Content associated with the label
\item[Property] Description of the property
\end{description}\begin{itemize}
\item \textbf{Term:} Definition or explanation
\item \textbf{Label:} Content associated with label
\end{itemize}description\item[username] The user's login name\item[timeout] Maximum wait time in seconds\item[LaTeX] A document preparation system\item[Passes] Correct implementation...\item[Auto-save] Automatically saves every 5 minutesitemizeitemize\begin{itemize}
\item First uniform item
\item Second uniform item
\item Third uniform item
\end{itemize}enumerateenumerate\begin{enumerate}
\item First step in the process
\item Second step in the process
\item Third step in the process
\end{enumerate}description\item \textbf{SomeLabel:}\item[SomeLabel]\item \emph{SomeLabel:}\item[SomeLabel]\item SomeLabel ---\item[SomeLabel]% INCORRECT
\begin{itemize}
\item \textbf{Passes:} \verb|\documentclass{article}|
\item \textbf{Fails:} No documentclass declaration
\end{itemize}% CORRECT
\begin{description}
\item[Passes] \verb|\documentclass{article}|
\item[Fails] No documentclass declaration
\end{description}% INCORRECT
\noindent\textbf{Configuration:} Set timeout to 30 seconds.\\
\textbf{Performance:} Optimized for large datasets.% CORRECT
\begin{description}
\item[Configuration] Set timeout to 30 seconds
\item[Performance] Optimized for large datasets
\end{description}[[code]]\texttt[[code]]\texttt{...\_...}\texttt% INCORRECT - in .nw files
The \texttt{get\_submission()} method calls \texttt{\_\_getattribute\_\_}.
We store \texttt{\_original\_get\_submission} in the closure.
The \texttt{NOREFRESH\_GRADES} constant defines final grades.[[code]]% CORRECT - in .nw files
The [[get_submission()]] method calls [[__getattribute__]].
We store [[_original_get_submission]] in the closure.
The [[NOREFRESH_GRADES]] constant defines final grades.[[code]]\texttt[[code]][[get_submissions()]][[__init__]][[_includes]][[user_id]][[LazySubmission]][[Assignment]][[NOREFRESH_GRADES]][[MAX_RETRIES]][[pickle]][[Canvas]]\texttt\texttt{.py}\texttt{.nw}\texttt[[...]]mintedlistings\texttt{..._...}[[...]]\texttt{...__...}[[...]]\item[SOME\_CONSTANT behavior][[SOME_CONSTANT]]% INCORRECT
The \texttt{\_\_getstate\_\_} method excludes \texttt{\_original\_get\_submission}.
% CORRECT
The [[__getstate__]] method excludes [[_original_get_submission]].% INCORRECT
\item[NOREFRESH\_GRADES behavior] Submissions with final grades...
% CORRECT
\item[Final grade policy] Submissions with final grades (A, P, P+, complete)
are never refreshed, maintaining the [[NOREFRESH_GRADES]] policy.% INCORRECT
The decorator adds a \texttt{\_\_cache} dictionary and \texttt{\_\_all\_fetched} flag.
% CORRECT
The decorator adds a [[__cache]] dictionary and [[__all_fetched]] flag.\cref{...}\S\ref{...}\label{sec:introduction}\label{s1}\cref{sec:background}\cref{fig:diagram}\cref{tab:results}\cref{sec:intro,sec:conclusion}% INCORRECT
Section~\ref{sec:intro} shows...
\S\ref{sec:background} discusses...
Figure~\ref{fig:plot} demonstrates...
% CORRECT
\cref{sec:intro} shows...
\cref{sec:background} discusses...
\cref{fig:plot} demonstrates...\cite\citep\citet[1](Smith 2020)\enquote{...}\enquote{outer \enquote{inner} quote}\begin{displayquote}...\end{displayquote}% INCORRECT
"This is a quote"
``This is a quote''
'single quotes'% CORRECT
\enquote{This is a quote}
\enquote{outer \enquote{inner} quote}\emph{...}\textbf{...}\emph{\emph{...}}% INCORRECT
This is VERY important to understand.
We must do this NOW before moving forward.
The BENEFITS of classes are clear.% CORRECT
This is \emph{very} important to understand.
We must do this \emph{now} before moving forward.
The \emph{benefits} of classes are clear.\emph{...}sidecaption\caption\begin{figure}
\begin{sidecaption}{Clear description of image content}[fig:label]
\includegraphics[width=0.7\textwidth]{path/to/image}
\end{sidecaption}
\end{figure}\begin{table}
\begin{sidecaption}{Description of table content}[tab:label]
\begin{tabular}{lcc}
\toprule
Header1 & Header2 & Header3 \\
\midrule
Data1 & Data2 & Data3 \\
\bottomrule
\end{tabular}
\end{sidecaption}
\end{table}[fig:label]\begin{figure}
\centering
\includegraphics[width=0.7\textwidth]{path/to/image}
\caption{Description of image content}
\label{fig:label}
\end{figure}\caption\label\cref{fig:label}As shown in \cref{fig:memory-hierarchy}, secondary memory is slower but non-volatile.
The results in \cref{tab:benchmark} demonstrate...Figure~\ref{fig:label}listings\verbfigures/diagram.pdffigures\diagram.pdf[[code]]\texttt{...\_...}\textbf{Label:}\texttt{..._...}\textbf{Label:}description\ref\S\refSection~\refFigure~\ref\cref\cite"..."'...'`...`\enquote{...}figure\texttt{..._...}\texttt{...__...}[[...]]\item[FOO\_BAR behavior][[FOO_BAR]][[...]]\mode<presentation>\mode<article>\begin{frame}
\mode<presentation>{%
\begin{remark}[Key Point]
\begin{itemize}
\item Concise point 1
\item Concise point 2
\item Concise point 3
\end{itemize}
\end{remark}
}
\mode<article>{%
\begin{remark}[Key Point]
Full explanatory paragraph with detailed reasoning and context
that would overwhelm a slide but provides value in written form.
Additional paragraphs can elaborate on nuances and implications.
\end{remark}
}
\end{frame}\textbytext\textbytext\textbytext*\begin{frame}
\mode<presentation>{%
\textbytext{Left content}{Right content}
}
\mode<article>{%
\textbytext*{Left content}{Right content}
}
\end{frame}references/preamble.texdoc/preamble.tex\input{preamble}\documentclass\documentclass[a4paper,oneside]{memoir}
\input{preamble}
\title{Document Title}
\author{Author Name}
\date{\today}
\begin{document}
\frontmatter
\maketitle
\tableofcontents
\mainmatter
% Content here
\backmatter
\end{document}