% \iffalse meta-comment
% (The MIT License)
%
% Copyright (c) 2021-2024 Yegor Bugayenko
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the 'Software'), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
%
% The above copyright notice and this permission notice shall be included in all
% copies or substantial portions of the Software.
%
% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
% SOFTWARE.
% \fi

% \CheckSum{0}
%
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}

% \GetFileInfo{to-be-determined.dtx}
% \DoNotIndex{\endgroup,\begingroup,\let,\else,\fi,\newcommand,\newenvironment}

% \iffalse
%<*driver>
\ProvidesFile{to-be-determined.dtx}
%</driver>
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{to-be-determined}
%<*package>
[2024/10/11 0.3.2 Highlighting places requiring future work]
%</package>
%<*driver>
\documentclass{ltxdoc}
\usepackage[tt=false, type1=true]{libertine}
\usepackage{microtype}
\AddToHook{env/verbatim/begin}{\microtypesetup{protrusion=false}}
\usepackage{to-be-determined}
\usepackage{href-ul}
\usepackage[dtx]{docshots}
\PageIndex
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\begin{document}
	\DocInput{to-be-determined.dtx}
	\PrintChanges
	\PrintIndex
\end{document}
%</driver>
% \fi

% \title{|to-be-determined|: \LaTeX{} Package \\ for highlighting places that require more work\thanks{The sources are in GitHub at \href{https://github.com/yegor256/to-be-determined}{yegor256/to-be-determined}}}
% \author{Yegor Bugayenko \\ \texttt{yegor256@gmail.com}}
% \date{\filedate, \fileversion}
%
% \maketitle
%
% \section{Introduction}
%
% This package helps you highlight places in your articles
% and make sure the hightlighting looks nice. Install it from CTAN and then
% use like this:

% \docshotPrerequisite{../local/to-be-determined.sty}
% \begin{docshot}
% \documentclass{article}
% \pagestyle{empty}
% \usepackage{to-be-determined}
% \begin{document}
% The budget is \tbd{99.00 USD}.\par
% In math too: $a \tbd{?} b$.
% \end{document}
% \end{docshot}

% \section{Package Options}

% \DescribeMacro{hide}
% If you want to hide the content of what's inside the |\tbd| command,
% use the |hide| option of the package. They all will be replaced with
% the \tbd{TBD} placeholders.

% \DescribeMacro{off}
% If you want them to disappear entirely, use the |off| package option.

% \StopEventually{}

% \section{Implementation}
% \changes{v0.2.0}{2021/07/15}{Initial version}
% \changes{v0.3.0}{2022/10/31}{We started using "docshots" package for rendering examples.}

% First, we parse package options:
%    \begin{macrocode}
\RequirePackage{xkeyval}
\makeatletter
\newif\iftbd@hide
\DeclareOptionX{hide}{\tbd@hidetrue}
\newif\iftbd@off
\DeclareOptionX{off}{\tbd@offtrue}
\makeatother
\ProcessOptionsX\relax
%    \end{macrocode}

% Then, we include \href{https://ctan.org/pkg/xcolor}{xcolor} to use colors:
%    \begin{macrocode}
\RequirePackage{xcolor}
%    \end{macrocode}

% Then, we include \href{https://ctan.org/pkg/mathtools}{mathtools} to enable our commands in math mode:
%    \begin{macrocode}
\RequirePackage{mathtools}
%    \end{macrocode}

% Then, we include \href{https://ctan.org/pkg/soul}{soul} to use highlights:
%    \begin{macrocode}
\RequirePackage{soul}
%    \end{macrocode}

% \begin{macro}{\tbd}
% \changes{v0.3.1}{2024/10/11}{Now, it works in math mode too.}
% Finally, we define the |\tbd| command:
%    \begin{macrocode}
\makeatletter\newcommand\tbd[1]{{%
  \iftbd@off\else%
    \sethlcolor{yellow}%
    \iftbd@hide%
      \text{\hl{TBD}}%
    \else%
      \text{\hl{#1}}%
    \fi%
  \fi%
}}\makeatother
%    \end{macrocode}
% \end{macro}

% \Finale

%\clearpage
%
%\PrintChanges
%\clearpage
%\PrintIndex
