Skip to content

Commit

Permalink
add enumext compat (#756)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbertucci47 authored Nov 13, 2024
1 parent 898e0b6 commit 1a68824
Show file tree
Hide file tree
Showing 7 changed files with 539 additions and 0 deletions.
11 changes: 11 additions & 0 deletions _data/tagging-status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3724,6 +3724,17 @@
references: [1]
updated: 2024-07-06

- name: enumext
type: package
status: compatible
included-in:
priority: 9
supported-through: [phase-III,package]
package-repository: "https://github.com/pablgonz/enumext"
issues:
tests: true
updated: 2024-11-03

- name: enumitem
type: package
status: partially-compatible
Expand Down
91 changes: 91 additions & 0 deletions tagging-status/testfiles/enumext/enumext-01.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
\DocumentMetadata
{
lang=en-US,
pdfversion=2.0,
pdfstandard=ua-2,
testphase={phase-III,math,title,table,firstaid},
%uncompress,
}
\documentclass{article}
\usepackage[top=2cm,bottom=2cm,left=1cm,right=1cm]{geometry}
\usepackage{unicode-math,hyperref,enumext}
\hypersetup
{
colorlinks = true,
pdftitle = {Test tagged PDF for enumext package},
}
\begin{document}
\section{only enumext}
Some text here

\begin{enumext}[labelwidth=1cm,labelsep=0.25cm,align=left, wrap-label=\textbf{(#1}, label=\arabic*.)]
\item This text is in the first level.\label{A}
\begin{enumext}
\item This text is in the second level.\footnote{foot note in enumext}
\begin{enumext}
\item This text is in the third level.
\begin{enumext}
\item This text is in the fourth level.\footnotemark[20]
\end{enumext}
\end{enumext}
\end{enumext}
\item[X] This text is in the first level.
\item* This text is in the first level.
\end{enumext}

Some ref here \ref{A}\footnotetext[20]{foot note in enumext [20]}

\section{only enumext*}

Some text here

\begin{enumext*}[columns=2,labelwidth=1cm,labelsep=0.25cm,align=left, wrap-label=\textbf{#1)}, label=(\arabic*.]
\item This text is in the first level.\label{B}
\item[X] This text is in the first level.\footnotemark[30]
\item* This text is in the first level.\footnote{foot note in enumext*}
\item This text is in the first level.
\end{enumext*}

Some ref here \ref{B}\footnotetext[30]{foot note in enumext* [30]}

\section{enumext nested in enumext*}

Some text here

\begin{enumext*}
\item This text is in the first level.\label{C}
\item \begin{enumext}[base-fix]
\item This text is in nested enumext.\label{D}\footnote{foot note in neseted enumext}
\item This text is in nested enumext.\footnotemark[40]
\end{enumext}
\item This text is in the first level.
\end{enumext*}

Some refs here \ref{C} and \ref{D} \footnotetext[40]{foot note in neseted enumext [40]}

\section{enumext* nested in enumext}

\begin{enumext}
\item This text is in the first level. \label{E}
\item \begin{enumext*}[label=\roman*.]
\item This text is in nested enumext*.\label{F}\footnotemark[50]
\item This text is in nested enumext*.\footnote{foot note in neseted enumext*}
\end{enumext*}
\item This text is in the first level.
\end{enumext}

Some refs here \ref{E} and \ref{F} \footnotetext[50]{foot note in neseted enumext* [50]}

\section{Custom ref}

\begin{enumext}[ref={enumext-level-\arabic*}]
\item This text is in the first level. \label{G}
\item \begin{enumext*}[label=\roman*., ref={nested-\arabic{enumXi}.\roman*}]
\item This text is in nested enumext*.\label{H}
\item This text is in nested enumext*.
\end{enumext*}
\item This text is in the first level.
\end{enumext}

Some refs here \ref{G} and \ref{H}
\end{document}
70 changes: 70 additions & 0 deletions tagging-status/testfiles/enumext/enumext-02.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
\DocumentMetadata
{
lang=en-US,
pdfversion=2.0,
pdfstandard=ua-2,
testphase={phase-III,math,title,table,firstaid},
%uncompress,
}
\documentclass{article}
\usepackage[top=2cm,bottom=2cm,left=1cm,right=1cm]{geometry}
\usepackage{unicode-math,hyperref,enumext}
\hypersetup
{
colorlinks = true,
pdftitle = {Test tagged PDF for enumext package},
}
\begin{document}
\section{enumext + multicols}
Some text here

\begin{enumext}[columns=2, labelwidth=1cm,labelsep=0.25cm,align=left, wrap-label=\textbf{(#1}, label=\arabic*.),partopsep=0.5cm]
\item This text is in the first level.
\item This text is in the first level.
\item This text is in the first level.
\item This text is in the first level.
\item[X] This text is in the first level.
\item* This text is in the first level.
\end{enumext}

Some text here

\section{enumext + minipage}

Some text here

\begin{enumext}[labelwidth=1cm,labelsep=0.25cm,align=left,partopsep=0.5cm,mini-env=0.4\linewidth]
\item This text is in the first level.
\item This text is in the first level.
\item This text is in the first level.
\item This text is in the first level.
\miniright
This text is in minipage.
\end{enumext}

\section{enumext + minipage + multicols}

Some text here

\begin{enumext}[columns=2,labelwidth=1cm,labelsep=0.25cm,align=left,partopsep=0.5cm,mini-env=0.4\linewidth]
\item This text is in the first level.
\item This text is in the first level.
\item This text is in the first level.
\item This text is in the first level.
\miniright
This text is in minipage.
\end{enumext}

Some text here

\section{enumext* + minipage}

Some text here

\begin{enumext*}[columns=2,labelwidth=1cm,labelsep=0.25cm,align=left,partopsep=0.5cm,mini-env=0.4\linewidth, mini-right = {This text is in minipage.}]
\item This text is in the first level.
\item This text is in the first level.
\item This text is in the first level.
\item This text is in the first level.
\end{enumext*}
\end{document}
61 changes: 61 additions & 0 deletions tagging-status/testfiles/enumext/enumext-03.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
% !TeX TXS-program:compile = txs:///lualatex
\DocumentMetadata
{
lang=en-US,
pdfversion=2.0,
pdfstandard=ua-2,
testphase={phase-III,math,title,table,firstaid},
%uncompress,
}
\documentclass{article}
\usepackage[top=2cm,bottom=2cm,left=1cm,right=1cm]{geometry}
\usepackage{unicode-math,graphicx,hyperref,enumext}
\hypersetup
{
colorlinks = true,
pdftitle = {Test tagged PDF for enumext package},
}
\begin{document}
\section{enumext+keyanspic}

Some text here

\begin{enumext}[save-ans=test,save-sep={ },save-ref = true]
\item Question with images.
\begin{keyanspic}[layout-sty={3,2}]
\anspic{\includegraphics[scale=0.30, alt={Un pato de color amarillo}]{example-image-duck}}
\anspic{\includegraphics[scale=0.15, alt={Una letra mayuscula A}]{example-image-a}}
\anspic*{\includegraphics[scale=0.15, alt={Una letra mayuscula B}]{example-image-b}}
\anspic{\includegraphics[scale=0.15, alt={Una letra mayuscula C}]{example-image-c}}
\anspic{\includegraphics[scale=0.15, alt={La palabra Image}]{example-image}}
\end{keyanspic}
\item Question with images.\label{dos}
\begin{keyanspic}[label-pos=above, layout-sty={3,2}]
\anspic{\includegraphics[scale=0.15, alt={Una letra mayuscula A}]{example-image-a}}
\anspic{\includegraphics[scale=0.15, alt={Una letra mayuscula B}]{example-image-b}}
\anspic{\includegraphics[scale=0.15, alt={Una letra mayuscula C}]{example-image-c}}
\anspic{\includegraphics[scale=0.15, alt={La palabra Image}]{example-image}}
\anspic*[A duck]{\includegraphics[scale=0.30, alt={Un pato de color amarillo}]{example-image-duck}}
\end{keyanspic}
\item Question with images.
\begin{keyanspic}
\anspic*[La letra A]{\includegraphics[scale=0.15, alt={Una letra mayuscula A}]{example-image-a}}
\anspic{\includegraphics[scale=0.15, alt={Una letra mayuscula B}]{example-image-b}}
\anspic{\includegraphics[scale=0.30, alt={Un pato de color amarillo}]{example-image-duck}}
\anspic{\includegraphics[scale=0.15, alt={Una letra mayuscula C}]{example-image-c}}
\anspic{\includegraphics[scale=0.15, alt={La palabra Image}]{example-image}}
\end{keyanspic}
\item Question with images.
\begin{keyanspic}[label-pos=above]
\anspic{\includegraphics[scale=0.30, alt={Un pato de color amarillo}]{example-image-duck}}
\anspic{\includegraphics[scale=0.15, alt={Una letra mayuscula A}]{example-image-a}}
\anspic*{\includegraphics[scale=0.15, alt={Una letra mayuscula B}]{example-image-b}}
\anspic{\includegraphics[scale=0.15, alt={Una letra mayuscula C}]{example-image-c}}
\anspic{\includegraphics[scale=0.15, alt={La palabra Image}]{example-image}}
\end{keyanspic}
\end{enumext}

The answer to question \ref{dos} is \getkeyans{test:2}

\printkeyans*{test}
\end{document}
59 changes: 59 additions & 0 deletions tagging-status/testfiles/enumext/enumext-04.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
% !TeX TXS-program:compile = txs:///lualatex
\listfiles
\DocumentMetadata
{
lang=en-US,
pdfversion=2.0,
pdfstandard=ua-2,
testphase={phase-III,math,title,table,firstaid},
%uncompress,
}
\documentclass{article}
\usepackage[top=2cm,bottom=2cm,left=1cm,right=1cm]{geometry}
\usepackage{unicode-math,graphicx,hyperref,enumext}
\hypersetup
{
colorlinks = true,
pdftitle = {Test tagged PDF for enumext package},
}
\begin{document}
\section{enumext + anskey + anskey*}

Some text here

\begin{enumext}[save-ans=test,save-sep={ },save-ref = true]
\item Question A. \anskey{Answer A}
\item Question B. \anskey{Answer B}
\item Question C.
\begin{anskey*}
Answer with \verb+code+ and more
\begin{verbatim}
Some code here
\end{verbatim}
And text
\end{anskey*}
\end{enumext}

The answer to question \ref{test:2} is \getkeyans{test:2}

\printkeyans*{test}

\section{enumext* + anskey + anskey*}

Some text here

\begin{enumext*}[save-ans=test-2,save-sep={ },save-ref = true]
\item Question A. \anskey{Answer A}
\item Question B. \anskey{Answer B}
\item Question C.
\begin{anskey*}
Answer with \verb+code+ and more
\begin{verbatim}
Some code here
\end{verbatim}
And text
\end{anskey*}
\end{enumext*}

\printkeyans{test-2}
\end{document}
Loading

0 comments on commit 1a68824

Please sign in to comment.