%% ******************************************************
%% * This work may be distributed and/or modified under *
%% * the conditions of the LaTeX Project Public License *
%% *     http://www.latex-project.org/lppl.txt          *
%% * either version 1.3c of this license or any later   *
%% * version.                                           *
%% ******************************************************
\documentclass[mtpro2,twoside,openany]{litesolution}
\usepackage[listings]{tcolorbox}
\usepackage{pmboxdraw}
\lstset{language=[LaTeX]TeX,basicstyle=\small\ttfamily,breaklines=true,columns=flexible}

\coverset{
    title            = \sffamily The \pkg{LiteSolution} Class,
    subtitle         = \sffamily\scshape Hangzhou Dianzi University,
    bioinfo          = Mingyu XIA (\mailto{xiamyphys@gmail.com})\quad|\quad Version 2.4a,
    covercolor       = DarkSeaGreen,
    coverhead        = universe,
    coverhead.rotate = 3,
    cover            = schrodinger,
    cover.pattern    = sixpointed stars
}

\begin{document}

\maketitle

\frontmatter
\tableofcontents
\mainmatter

\chapterimage{\UPFadingImage*[trim={0 {.9\paperheight} 0 0},clip]{Beautiful-realities}}

\chapter{Introduction to the \pkg{LiteSolution} Class}

\section{Preface}

This is the document for the \pkg{LiteSolution} class, which is designed for typesetting solutions of problems in exams, textbooks, etc.

Welcome to feedback bugs or ideas via email \href{mailto:xiamyphys@gmail.com}{\ttfamily xiamyphys@gmail.com} or \href{https://github.com/xiamyphys/litesolution}{GitHub}.

\subsection{Installing \pkg{LiteSolution} and loading it}

Simply download \verb|litesolution.cls| file from \href{https://github.com/xiamyphys/litesolution}{GitHub} or \href{https://ctan.org/pkg/litesolution}{CTAN} and save it under your working directory. However, I strongly suggest to use terminal to install and update all packages to the latest version

\begin{verbatim}
    sudo tlmgr update --self --all
\end{verbatim}

To learn more, please refer to \href{https://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution}{How do I update my \hologo{TeX} distribution?}

\subsection{Compatibility}

The test environments are macOS + Mac\hologo{TeX} 2024 / Overleaf / Ubuntu 22.04.2 + \hologo{TeX} Live 2024 and they all work fine for \hologo{pdfLaTeX} and \hologo{XeLaTeX} compilers. Windows and Unix platforms compatibility unknown.

\section{Global Options of this Class}

\begin{verbatim}
    \documentclass[⟨options⟩]{litesolution}
\end{verbatim}

\subsection{The \mode{answer} option}

The \mode{hideanswer} mode can hide contents in the \cmd{solution} environment and \cmd{ans} command, and make the effect of \cmd{emph} weaker.

\subsection{The \mode{math} option}

The \mode{mtpro2}, \mode{newtx} and \mode{newtxsf} modes can format the font of formulas in the document. Please check if mtpro2 font has been installed on your computer correctly before using \mode{mtpro2} mode.

\section{Derivative Works}
\begin{description}
    \item[Package \pkg{notebeamer}] provides macros for inputting slides on note papers quickly.
    \item[Package \pkg{fadingimage}] provides macros for inputting full width picture at the edges of pages quickly.
\end{description}

\chapter{Settings \& Usages of this Class}

\section{Cover Configurations}

\subsection{The cover page configurations}

\begin{verbatim}
    \coverset{
        title            = \sffamily The \pkg{LiteSolution} Class,
        subtitle         = \sffamily\scshape Hangzhou Dianzi University,
        bioinfo          = Mingyu XIA (\mailto{xiamyphys@gmail.com})\quad|\quad
                           Version 2.4a,
        covercolor       = DarkSeaGreen,
        coverhead        = universe,
        coverhead.rotate = 3,
        cover            = schrodinger,
        cover.pattern    = sixpointed stars
    }
\end{verbatim}

\subsection{The chapter head configurations}

\begin{verbatim}
    \chapterimage {⟨insert image macro⟩}
\end{verbatim}

This command can assign the format of the image at every chapters begin and you can adjust the format of the image with the \pkg{fadingimage} package.

\section{Preset Packages}

This template has preset many packages. The following packages are the common ones

\begin{table}[htbp]
    \centering\small
    \begin{tabularx}{.96\linewidth}{*{6}{X}}
        \toprule
        \pkg{amsthm}      & \pkg{amssymb}     & \pkg{bm}          &
        \pkg{booktabs}    & \pkg{cancel}      & \pkg{caption}\\
        \midrule
        \pkg{circuitikz}  & \pkg{datetime}    & \pkg{derivative}  &
        \pkg{diagbox}     & \pkg{enumitem}    & \pkg{esvect}\\
        \midrule
        \pkg{extarrows}   & \pkg{fadingimage} & \pkg{fancyhdr}    &
        \pkg{fixdif}      & \pkg{fontawesome5}& \pkg{geometry}\\
        \midrule
        \pkg{graphicx}    & \pkg{hyperref}    & \pkg{indentfirst} &
        \pkg{lipsum}      & \scriptsize\pkg{magicwatermark}       & \pkg{mathtools}\\
        \midrule
        \pkg{mhchem}      & \pkg{multicol}    & \pkg{multirow}    &
        \pkg{nicematrix}  & \pkg{notebeamer}  & \pkg{paracol}\\
        \midrule
        \pkg{pgfplots}    & \pkg{physics2}    & \pkg{qrcode}      &
        \pkg{refstyle}    & \pkg{setspace}    & \pkg{siunitx}\\
        \midrule
        \pkg{subcaption}  & \pkg{tabularx}    & \pkg{soul}        &
        \pkg{tasks}       & \pkg{ulem}        & \pkg{xcolor}\\
        \midrule
        \pkg{xeCJK}       & \pkg{xeCJKfntef}  & \pkg{xfrac}\\
        \bottomrule
    \end{tabularx}
\end{table}

\section{Preset Commands}

\subsection{The \cmd{ans} command}

\begin{verbatim}
    \ans {⟨contents⟩}
\end{verbatim}
 
This command can underline the answer, and if mode \mode{noans} is enabled the answer will be hidden.

\subsection{The \cmd{solute} command}

\begin{verbatim}
    \solute {⟨number⟩}                \solute* {⟨contents⟩}
\end{verbatim}

This command can create a fixable answer box when the mode \mode{noans} is enabled.

\subsection{The \cmd{emph} command}

\begin{verbatim}
    \emph {⟨content⟩}                 \emph* {⟨content⟩}
\end{verbatim}

\emph{The Quick Brown Fox Jumps Over the Lazy Dog: non-hideanswer mode}

\emph*{The Quick Brown Fox Jumps Over the Lazy Dog: hideanswer mode}

\subsection{Other preset commands}

\begin{verbatim}
    \def\i{\mathrm i}       \def\e{\mathrm e}       \def\T{\mathsf T}
    \let\leq\leqslant       \let\geq\geqslant       \let\vec\vv
\end{verbatim}

\section{Preset \pkg{amsthm} Environments}

\subsection{The \cmd{problem} environment}

\begin{tcblisting}{sidebyside,colback=DarkGreen!5,colframe=DarkGreen!80}
\begin{problem}[Keywords]\leavevmode
\begin{tasks}(2)
  \task Choice A  \task[\true] Choice B
  \task Choice C  \task Choice D
\end{tasks}
\end{problem}
\end{tcblisting}

\subsection{The \cmd{solution} and \cmd{note} environment}

\begin{minipage}{.48\textwidth}
\begin{tcblisting}{sidebyside,colback=MidnightBlue!5,colframe=MidnightBlue!80}
\begin{solution}
  B is correct.
\end{solution}
\end{tcblisting}
\end{minipage}
\hfill
\begin{minipage}{.48\textwidth}
\begin{tcblisting}{sidebyside,colback=DarkRed!5,colframe=DarkRed!80}
\begin{note}
  We note that.
\end{note}
\end{tcblisting}
\end{minipage}

\section*{Original Code for the Cover Head}

\setstretch{1.15}
\lstinputlisting{figure/universe.tex}

\end{document}