%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \iffalse %%%%
%                                                                              %
%  Copyright (c) 2014 - Michiel Helvensteijn   (www.mhelvens.net)              %
%                                                                              %
%  https://github.com/mhelvens/latex-pkgloader                                 %
%                                                                              %
%  This work may be distributed and/or modified under the conditions           %
%  of the LaTeX Project Public License, either version 1.3 of this             %
%  license or (at your option) any later version. The latest version           %
%  of this license is in       http://www.latex-project.org/lppl.txt           %
%  and version 1.3 or later is part of all distributions of LaTeX              %
%  version 2005/12/01 or later.                                                %
%                                                                              %
%  This work has the LPPL maintenance status `author-maintained'.              %
%                                                                              %
%  The Current Maintainer of this work is Michiel Helvensteijn.                %
%                                                                              %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \fi %%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  A list of recommended rules derived from
%  <http://www.macfreek.nl/memory/LaTeX_package_conflicts>:
%
%    \begin{macrocode}
\Load {fixltx2e}  early              if loaded
\Load {fancyhdr}  before {hyperref}  if loaded
\Load {fncychap}  before {hyperref}  if loaded
\Load {float}     before {hyperref}  if loaded
\Load {hyperref}  before {algorithm} if loaded
\Load {amssymb}   before {xunicode}  if loaded
\Load {amssymb}   before {xltxtra}   if loaded
\Load {graphicx}  before {xltxtra}   if loaded
\Load {graphicx}  before {fontspec}  if loaded
\Load {caption}   before {subfig}    if loaded
\Load {amsmath}   before {wasysym}   if loaded
\Load {todonotes} before {program}   if loaded
%    \end{macrocode}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  A list of recommended rules extracted from the cleveref
%  documentation and uses of |\@ifpackageloaded| in
%  |cleveref.sty|:
%
%    \begin{macrocode}
\Load {cleveref} after   {algorithm2e,algorithmicx,
                          aliascnt,amsmath,amsthm,caption,
                          hyperref,IEEEtrantools,listings,
                          ntheorem,subfig,varioref}
                 if loaded
                 because {cleveref adds special support
                          for this package}
\Load {cleveref} before  {autonum,hypdvips}
                 if loaded
                 because {the cleveref documentation
                          explicitly says to do so}
\Load {varioref} before  {hyperref}
                 if      {varioref && hyperref && cleveref}
                 because {the cleveref documentation
                          explicitly requires varioref
                          before hyperref if all three
                          packages are loaded}
%    \end{macrocode}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  A list of recommended rules derived from
%  <http://mirrors.dotsrc.org/ctan/macros/latex/contrib/natbib/natbib.pdf>:
%
%    \begin{macrocode}
\Load {natbib}   before  {citeref}
                 if loaded
                 because {the natbib documentation
                          explicitly requires citeref to
                          be load after natbib}
%    \end{macrocode}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  A list of recommended rules derived from
%  <http://mirrors.dotsrc.org/ctan/biblio/bibtex/contrib/apacite/apacite.pdf>:
%
%    \begin{macrocode}
\Load {babel}    before  {apacite}
                 if loaded
                 because {babel's selectlanguage redefines
                          refname and bibname}
\Load {hyperref} before  {apacite}
                 if loaded
                 because {hyperref redefines citation and
                          reference list commands}
%    \end{macrocode}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  A list of recommended rules derived from
%  <http://tex.stackexchange.com/questions/64585/incompatibilities-of-cmap-with-fontenc-hyperref/64605#64605>:
%
%    \begin{macrocode}
\Load {hyperref} before  {cmap}
                 if loaded
                 because {hyperref cannot write pdf settings
                          if cmap already wrote to pdf}
%    \end{macrocode}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  A list of recommended rules derived from
%  <ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/hyperref/README.pdf>:
%
%    \begin{macrocode}
\Load {hyperref} before  {ellipsis,amsrefs,chappg,dblaccnt,
                          linguex}
                 if loaded
                 because {the hyperref documentation
                          explicitly says to do so}
\Load {hyperref} after   {multind,natbib,setspace}
                 if loaded
                 because {the hyperref documentation
                          explicitly says to do so}
%    \end{macrocode}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  A list of recommended rules derived from
%  <http://mirrors.dotsrc.org/ctan/macros/latex/contrib/glossaries/glossaries-user.pdf>,
%  <http://mirrors.dotsrc.org/ctan/macros/latex/contrib/glossaries/glossariesbegin.pdf>:
%
%    \begin{macrocode}
\Load {hyperref} before  {glossaries}
                 if loaded
                 because {otherwise terms won't be
                          clickable hyperlinks}
\Load {glossaries} after {babel,polyglossia,inputenc,
                          fontenc,doc}
                 if loaded
                 because {the glossaries documentation
                          explicitly says to do so}
%    \end{macrocode}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  A list of recommended rules derived from
%  <http://mirrors.dotsrc.org/ctan/macros/latex/contrib/oberdiek/hypcap.pdf>:
%
%    \begin{macrocode}
\Load {hyperref} before  {hypcap}
                 if loaded
                 because {hypcap redefines hyperref's
                          caption command}
%    \end{macrocode}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  A list of recommended rules derived from
%  <https://tex.stackexchange.com/questions/419218/how-to-use-selnolig-package-together-with-default-lualalatex-font#comment1049043_419218>:
%
%    \begin{macrocode}
\Load {babel} before  {selnolig}
              if loaded
              because {this was recommended by selnolig's author}
%    \end{macrocode}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  A list of recommended rules derived from
%  <https://tex.stackexchange.com/questions/64409/proper-use-of-cmap-and-mmap/64457#64457>:
%
%    \begin{macrocode}
\Load {fontenc} after   {cmap,mmap}
                if loaded
                because {otherwise some fonts may be unprocessed}
%    \end{macrocode}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  A list of recommended rules derived from
%  <https://ctan.org/pkg/listingsutf8>:
%
%    \begin{macrocode}
\Load {listingsutf8} after   {listings}
                     if loaded
                     because {it patches macros defined by listings}
%    \end{macrocode}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  A list of recommended rules derived from the cleveref code:
%
%    \begin{macrocode}
\Load {glossaries} before  {cleveref}
                   if loaded
                   because {glossaries loads amsmath, which needs to be loaded before cleveref}
%    \end{macrocode}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%  A list of recommended rules derived from the refenums
%  documentation and code:
%
%    \begin{macrocode}
\Load {refenums} after   {hyperref,cleveref,csquotes,ifthen}
                 if loaded
                 because {it prevents an options clash}
%    \end{macrocode}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
