Skip to content

Commit

Permalink
Add default fancy list renderer prototypes for LaTeX
Browse files Browse the repository at this point in the history
  • Loading branch information
Witiko committed Aug 18, 2022
1 parent 11a505b commit 2e198d6
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion markdown.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -24204,22 +24204,53 @@ end
%
% \end{markdown}
% \begin{macrocode}
\ExplSyntaxOn
\@ifpackageloaded{paralist}{
\cs_new:Nn
\@@_latex_paralist_style:nn
{
\str_case:nn
{ #1 }
{
{ Decimal } { 1 }
{ LowerRoman } { i }
{ UpperRoman } { I }
{ LowerAlpha } { a }
{ UpperAlpha } { A }
}
\str_case:nn
{ #2 }
{
{ Default } { . }
{ OneParen } { ) }
{ Period } { - }
}
}
\markdownSetup{rendererPrototypes={
ulBeginTight = {\begin{compactitem}},
ulEndTight = {\end{compactitem}},
fancyOlBegin = {\begin{enumerate}[ \@@_latex_paralist_style:nn { #1 } { #2 } ]},
fancyOlEnd = {\end{enumerate}},
olBeginTight = {\begin{compactenum}},
olEndTight = {\end{compactenum}},
fancyOlBeginTight = {\begin{compactenum}[ \@@_latex_paralist_style:nn { #1 } { #2 } ]},
fancyOlEndTight = {\end{compactenum}},
dlBeginTight = {\begin{compactdesc}},
dlEndTight = {\end{compactdesc}}}}
}{
\markdownSetup{rendererPrototypes={
ulBeginTight = {\markdownRendererUlBegin},
ulEndTight = {\markdownRendererUlEnd},
fancyOlBegin = {\markdownRendererOlBegin},
fancyOlEnd = {\markdownRendererOlEnd},
olBeginTight = {\markdownRendererOlBegin},
olEndTight = {\markdownRendererOlEnd},
fancyOlBeginTight = {\markdownRendererOlBegin},
fancyOlEndTight = {\markdownRendererOlEnd},
dlBeginTight = {\markdownRendererDlBegin},
dlEndTight = {\markdownRendererDlEnd}}}}
dlEndTight = {\markdownRendererDlEnd}}}
}
\ExplSyntaxOff
\RequirePackage{amsmath,ifthen}
% \end{macrocode}
% \par
Expand Down

0 comments on commit 2e198d6

Please sign in to comment.