# What Does A .dtx File Do? [duplicate]

Latex documents often come with a number of different files. What does a .dtx file usually specify? Please assume that the person reading your answer has next to no experience with using LaTeX. I don't care about the syntax used inside of a .dtx, or how to write a .dtx, I just want a short explanation of what it does.

As an example, inside of a .dtx file put out by the association of computing machinery, I found the following:

% \begin{macro}{\if@ACM@screen}
%   Whether we use screen mode
%    \begin{macrocode}
\define@boolkey+{acmart.cls}[@ACM@]{screen}[true]{%
\if@ACM@screen
\PackageInfo{\@classname}{Using screen mode}%
\else
\PackageInfo{\@classname}{Not using screen mode}%
\fi}{\PackageError{\@classname}{The option screen can be either true or
false}}
\ExecuteOptionsX{screen=false}
%    \end{macrocode}
%
% \end{macro}

EDIT:
Originally I said that a .dtx was a "configuration file," and then asked what a .dtx did. However, others have informed me that a .dtx is not a "configuration file." I have subsequently edited the question.

• My interpretation: Providing a boolean option that can be passed to a document class. Jan 6, 2019 at 16:56
• is that code fragment related to a configuration file? Nothing in the part that you posted suggests that it is? Jan 6, 2019 at 16:56
• if your question is "what is a dtx file" then it isn't a configuration file it is the documented source for the package, it contains both the package code and the documentation of that code. Jan 6, 2019 at 16:58
• Looks like defining book keys with xkeyval package syntax
– user31729
Jan 6, 2019 at 17:01