tlp/tlp.sty
Andreas Mieke 3d5bd8ee47 Initial commit
Simple LaTeX package to put TLP labels in your document.
2023-11-28 21:09:19 +01:00

25 lines
1.5 KiB
TeX
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tlp}[2023/11/27 Traffic Light Protocol (TLP) support for LaTeX documents]
\RequirePackage{xcolor}
\definecolor{tlp-c-black}{HTML}{000000}
\definecolor{tlp-c-red}{HTML}{FF2B2B}
\definecolor{tlp-c-amber}{HTML}{FFC000}
\definecolor{tlp-c-green}{HTML}{33FF00}
\definecolor{tlp-c-clear}{HTML}{FFFFFF}
\newcommand{\tlp}{\colorbox{tlp-c-black}{\textcolor{tlp-c-red}{TLP:RED}}}
\DeclareOption{red}{\renewcommand{\tlp}{\colorbox{tlp-c-black}{\textcolor{tlp-c-red}{TLP:RED}}}}
\DeclareOption{RED}{\renewcommand{\tlp}{\colorbox{tlp-c-black}{\textcolor{tlp-c-red}{TLP:RED}}}}
\DeclareOption{amber+strict}{\renewcommand{\tlp}{\colorbox{tlp-c-black}{\textcolor{tlp-c-amber}{TLP:AMBER+STRICT}}}}
\DeclareOption{AMBER+STRICT}{\renewcommand{\tlp}{\colorbox{tlp-c-black}{\textcolor{tlp-c-amber}{TLP:AMBER+STRICT}}}}
\DeclareOption{amber}{\renewcommand{\tlp}{\colorbox{tlp-c-black}{\textcolor{tlp-c-amber}{TLP:AMBER}}}}
\DeclareOption{AMBER}{\renewcommand{\tlp}{\colorbox{tlp-c-black}{\textcolor{tlp-c-amber}{TLP:AMBER}}}}
\DeclareOption{green}{\renewcommand{\tlp}{\colorbox{tlp-c-black}{\textcolor{tlp-c-green}{TLP:GREEN}}}}
\DeclareOption{GREEN}{\renewcommand{\tlp}{\colorbox{tlp-c-black}{\textcolor{tlp-c-green}{TLP:GREEN}}}}
\DeclareOption{clear}{\renewcommand{\tlp}{\colorbox{tlp-c-black}{\textcolor{tlp-c-clear}{TLP:CLEAR}}}}
\DeclareOption{CLEAR}{\renewcommand{\tlp}{\colorbox{tlp-c-black}{\textcolor{tlp-c-clear}{TLP:CLEAR}}}}
\DeclareOption*{\PackageWarning{tlp}{Unknown TLP level \CurrentOption}}
\ProcessOptions\relax