% !TeX spellcheck = en_US

\documentclass[%
    class=scrreprt,
    USenglish,
]{se2thesis}

\listfiles % Shows used packages (with versions) in LaTeX Log

\usepackage{hyperref}
\usepackage[ngerman,main=USenglish]{babel}

\usepackage[%
    csquotes=true,%
    booktabs=true,%
    siunitx=true,%
    minted=true,%
    selnolig=true,%
    widowcontrol=false,%
    microtype=true,%
    biblatex=numeric,%
    cleveref=true,%
]{se2packages}

\author{Michael Baumgartner}
\title{Example for se2thesis with resq cref}

\begin{document}

    \frontmatter
    \maketitle

    \mainmatter

    \chapter{Some research question}

        \begin{resq}{myRQ} \label{rq:myRQ}
            Some spectacular research question \dots
        \end{resq}

        Look at \cref{ch:problem} \dots

    \chapter{problem} \label{ch:problem}

        Somewhere later in the document \dots

        \section{Current situation}

            \begin{summary}{With \backslash{}cref} \label{later}
                So the answer to \cref{rq:myRQ} is \dots \\
            \end{summary}

            Did not work, and a compiler warning says why: \\
            LaTeX: cref reference format for label type `resq' undefined.

            \begin{summary}{With \backslash{}ref}
                So the answer to RQ\ref{rq:myRQ} is \dots
            \end{summary}
            Works but, does not look to nice.

        \section{Workaround / solutions}

            With \backslash{}hyperref nicer solutions are possible.
            \begin{summary}{Option A: Using the resq number}
                So the answer to \hyperref[rq:myRQ]{Research question \theresq} is \dots
            \end{summary}

            \begin{summary}{Option A: Using the resq label}
                So the answer to \hyperref[rq:myRQ]{\emph{myRQ}} is \dots
            \end{summary}
    \end{document}
