% Kale Ewasiuk (kalekje@gmail.com)
% 2023-07-22
% Copyright (C) 2021-2023 Kale Ewasiuk
%
% 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.


\documentclass[11pt,parskip=half]{scrartcl}
\setlength{\parindent}{0ex}
\newcommand{\llcmd}[1]{\leavevmode\llap{\texttt{\detokenize{#1}}}}
\newcommand{\cmd}[1]{\texttt{\detokenize{#1}}}
\newcommand{\qcmd}[1]{``\cmd{#1}''}
\usepackage{url}
\usepackage{xcolor}
\usepackage{showexpl}
\lstset{explpreset={justification=\raggedright,pos=r,wide=true}}
\setlength\ResultBoxRule{0mm}
\lstset{
	language=[LaTeX]TeX,
	basicstyle=\ttfamily\small,
	commentstyle=\ttfamily\small\color{gray},
	frame=none,
	numbers=left,
	numberstyle=\ttfamily\small\color{gray},
	prebreak=\raisebox{0ex}[0ex][0ex]{\color{gray}\ensuremath{\hookleftarrow}},
	extendedchars=true,
	breaklines=true,
	tabsize=4,
}
\addtokomafont{title}{\raggedright}
\addtokomafont{author}{\raggedright}
\addtokomafont{date}{\raggedright}
\author{Kale Ewasiuk (\url{kalekje@gmail.com})}
\usepackage[yyyymmdd]{datetime}\renewcommand{\dateseparator}{--}
\date{\today}


\RequirePackage{luacode}
\RequirePackage[pl,import]{penlight}
\title{penlight}
\subtitle{Lua libraries for use in LuaLaTeX}

\begin{document}

\maketitle

    Documentation for Penlight can be found here:\\
\mbox{\url{https://lunarmodules.github.io/Penlight}}
\\\\ This package uses version \cmd{1.13.1}

\subsection*{Importing Penlight from within LaTeX}
Loading this package runs the Lua code:  \texttt{penlight = require'penlight'}

Other options for the package are:
\vspace{1em}

\hspace*{-6ex}\begin{tabular}{lp{4.8in}}
\texttt{pl} & adds the alias \texttt{pl = penlight}\\\\
\texttt{stringx} & will import additional string functions into the string meta table via\\
                &  \texttt{require('penlight.stringx').import()}\\\\
\texttt{format} & allows the \% operator for Python-style string formatting via\\
        & \texttt{require('penlight.stringx').format\_operator()}\\\\
\texttt{func} & allows placeholder expressions eg. \texttt{\_1+1} to be used via\\
            &   \texttt{penlight.utils.import(penlight.func)}\\\\
\texttt{import} & does the above three\\
\end{tabular}


An example usage is: \cmd{\usepackage[pl,import]{penlight}}

%https://lunarmodules.github.io/Penlight/libraries/pl.func.html
%https://lunarmodules.github.io/Penlight/libraries/pl.stringx.html

\subsection*{Importing Penlight from within Lua}
Instead of using penlight.sty, you can simply:\\
\texttt{penlight = require'penlight'} ~~~ from within Lua.

\newpage
\section*{}
This package used to contain \cmd{penlightextras.lua}.
That functionality now belongs to a standalone package named \cmd{penlightplus}.

\section*{}
Disclaimer: I am not the author of the Lua Penlight library.
Penlight is Copyright \textcopyright  2009-2016 Steve Donovan, David Manura.
The distribution of Penlight used for this library is:
\url{https://github.com/lunarmodules/penlight}\\\\
The author of this library has merged all penlight sub-modules into a single file for this distribution.

\end{document}