> ## Documentation Index
> Fetch the complete documentation index at: https://resources.latex-cloud-studio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a LaTeX Package

> Build reusable LaTeX packages (.sty) for custom commands and environments across multiple projects.

Create a package when custom commands are reused across multiple documents.

## Minimal Package Skeleton

```latex mypackage.sty theme={null}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mypackage}[2026/02/16 Custom macros]

\RequirePackage{xcolor}
\newcommand{\todoitem}[1]{\textcolor{red}{TODO: #1}}
\newenvironment{note}{\begin{quote}\itshape}{\end{quote}}

\endinput
```

## Use the Package

```latex use-package.tex theme={null}
\documentclass{article}
\usepackage{mypackage}

\begin{document}
\todoitem{Refine experiment section}
\begin{note}
Internal drafting note.
\end{note}
\end{document}
```

## Related Pages

* [Create a LaTeX document class](/learn/latex/advanced/create-a-document-class)
* [Package management](/learn/latex/package-management)
