\documentclass[11pt,svgnames]{article}
\usepackage{geometry,titlesec,datetime,xcolor,hologo}
\titleformat*{\section}{\bfseries\large}
\hologoFontSetup{general=\sffamily}
\usepackage[libertine,mono=false]{libertine}
\usepackage[colorlinks,urlcolor=Indigo]{hyperref}
\def\pkg#1{\textcolor{DarkGreen}{\textsf{#1}}}
\def\mode#1{\textcolor{Indigo}{\textsf{#1}}}
\def\cmd#1{\textcolor{MidnightBlue}{\texttt{\string#1}}}

\title{\bfseries The \pkg{thmlist} Package}
\author{%
    Hsia Mingyu, \href{https://www.hdu.edu.cn}{Hangzhou Dianzi University}\\
    \href{mailto:xiamyphys@gmail.com}{\ttfamily xiamyphys@gmail.com}}
\yyyymmdddate\date{\today}
\date{Version 0.1b\quad\thanks{\url{https://github.com/xiamyphys/thmlist}}\today}

\usepackage[amscounter=section,amsstyle=definition,
            mdfcounter=section,mdfstyle=mdflist]{thmlist}
\mdfsetup{skipabove=2pt,   skipbelow=2pt}
\mdfdefinestyle{mdflist}{%
    skipabove=0pt,         skipbelow=0pt,
    hidealllines=true,     leftline=true,
    linewidth=.5ex,        innerleftmargin=1.5ex,
    innerrightmargin=0pt,  innertopmargin=-1.75ex,
    innerbottommargin=0pt}
\mdflist{theorem,          lemma,         definition;
         Théorème,         Lemme,         Définition;
         DarkOliveGreen,   MidnightBlue,  MidnightBlue}
\amslist{remark,           example;
         Remarque,         Exemple;
         DarkRed,          Teal}

\begin{document}

\def\theexample{\arabic{example}}\let\theremark=\relax

\maketitle\vspace*{-4ex}

\begin{abstract}
This is the document for the \pkg{thmlist} package, which provides a simple way for adding theorem environments quickly.
\end{abstract}

\section{The purpose of this package}
This package provides a simple way for adding theorem environments quickly. Welcome to feedback bugs or ideas via email \href{mailto:xiamyphys@gmail.com}{\ttfamily xiamyphys@gmail.com} or \href{https://github.com/xiamyphys/thmlist}{GitHub}.

This package has required the \pkg{amsthm} and \pkg{mdframed} packages to create different style of theorem environments, \pkg{pgffor} to support \cmd{foreach} loop and \pkg{listofitems} to support list reading.

\section{Loading \pkg{thmlist}}
I strongly advise you to use terminal/cmd to implement the commands to update all the packages (and install this package) to the latest version or switch to portable version
\begin{verbatim}
    sudo tlmgr update --self --all
\end{verbatim}

\section{Key values of this package}
\begin{verbatim}
    \usepackage[amscounter=<counter>,amsstyle=<style>,
                mdfcounter=<counter>,mdfstyle=<style>]{thmlist}
\end{verbatim}

This package has four keys: \cmd{amscounter}, \cmd{amsstyle}, \cmd{mdfcounter}, \cmd{mdfstyle}.

The \cmd{amscounter} and the \cmd{mdfcounter} keys can set the `numberwithin' of the theorem environments with(out) the frame style respectively, and the \cmd{amsstyle} and the \cmd{mdfstyle} keys can set the style of the theorem environments with(out) the frame style respectively.

If you have not set the keys, the default values of the four keys will be applied
\begin{verbatim}
    amscounter=section,amsstyle=definition,mdfcounter=section,mdfstyle={}
\end{verbatim}

\section{Create theorem environments with(out) the framed style}

Define a style of the \pkg{mdframed} package and set the key \cmd{mdfstyle=mdflist} correspondingly.
\begin{verbatim}
    \mdfsetup{skipabove=2pt,   skipbelow=2pt}
    \mdfdefinestyle{mdflist}{%
        skipabove=0pt,         skipbelow=0pt,
        hidealllines=true,     leftline=true,
        linewidth=.5ex,        innerleftmargin=1.5ex,
        innerrightmargin=0pt,  innertopmargin=-1.75ex,
        innerbottommargin=0pt}
\end{verbatim}

You should put the counter configuration of some environments after \verb|\begin{document}|, or them will not work. Such as
\begin{verbatim}
    \def\theexample{\arabic{example}}   \let\theremark=\relax
\end{verbatim}

Then, input the name of the environments in the first line and input the corresponding title and color of the environments in the next two lines.
\begin{itemize}
    \item The \cmd{mdflist} macro can create a series of theorem environments with the frame.
    \item The \cmd{amslist} macro can create a series of theorem environments without the frame.
\end{itemize}
\begin{verbatim}
    \mdflist{theorem,          lemma,         definition;
             Théorème,         Lemme,         Définition;
             DarkOliveGreen,   MidnightBlue,  MidnightBlue}
    \amslist{remark,           example;
             Remarque,         Exemple;
             DarkRed,          Teal}
\end{verbatim}

The following is the effect of the style configuration above.

\begin{theorem}[The Théorème Environment]\leavevmode\newline
    From WikipediA: A theorem is a statement that has been proved, or can be proved.
\end{theorem}

\begin{lemma}[The Lemme Environment]\leavevmode\newline
    From WikipediA: In mathematics, informal logic and argument mapping, a lemma (pl.: lemmas or lemmata) is a generally minor, proven proposition which is used as a stepping stone to a larger result. For that reason, it is also known as a ``helping theorem'' or an ``auxiliary theorem''.
\end{lemma}

\begin{definition}[The Définition Environment]\leavevmode\newline
    From WikipediA: A definition is used to give a precise meaning to a new term, by describing a condition which unambiguously qualifies what a mathematical term is and is not.
\end{definition}

\remark{This package works fine with the \pkg{Standard Document Classes}.}

\example{From Cambridge Dictionary: The example is a way of helping someone to understand something by showing them how it is used.}

\end{document}