As I'm currently writing a package and started to use dtx format I wondered if there are alternative classes just using doc, so I started to use l3doc (since I use expl3 syntax). I'm pretty satisfied with it, but the following points are some kind of annoying:

  1. I'm using variable to describe variables and macro to describe macros (since function should be used in documentation not in code). How can I unify the styles of both (either with or without the bars in the margin, I'd rather like to have them)?
  2. Is it possible to transfer this look to the layout achieved with \DescribeEnv (bars too)?
  3. How should I markup Lua code, which is used by the package? Should I use \NewMacroEnvironment as the l3doc documentation states?

This question is not about:

What I actually use and am unsatisfied with (sample dtx file, I have removed package call to avoid providing .ins file):

% \iffalse meta-comment
%<package>\ProvidesExplPackage{testpack}{2017/04/15}{0.1}{Test package}
% \fi
% \begin{documentation}
% \GetFileInfo{testpack.sty}
% \title{The \texttt{testpack} package\thanks{This document corresponds to \texttt{termdoc}~\fileversion, dated~\filedate.}}
% \author{TeXnician}
% \date{\today}
% \maketitle
% \tableofcontents
% \section{User interface}
%   \DescribeMacro{\justdoit} My test \cs{justdoit}: here would be the function call
% \begin{function}{\justdoit}
%   \begin{syntax}
%   \end{syntax}
%   \meta{description}
% \end{function}
% \end{documentation}
% \begin{implementation}
% \section{Implementation}
%    \begin{macrocode}
%    \end{macrocode}
% \begin{variable}{\mytl}
%   A variable
%    \begin{macrocode}
\tl_new:N \mytl
%    \end{macrocode}
% \end{variable}
% \begin{environment}{luacode}
%    \begin{macrocode}
function justdoit()
%    \end{macrocode}
% \end{environment}
% \begin{macro}{\justdoit}
%    \begin{macrocode}
%    \end{macrocode}
% \end{macro}
% \end{implementation}
% \Finale

Update: Here's an example output:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.