2

I'm using the theoremref package. Some of my sections are numbered with letters, i.e. A, B, C, ... instead of 1, 2, 3, ...

If there is a theorem in, e.g., section A

\begin{Theorem}\thlabel{theo} \end{Theorem}

then the reference looks like the following:

\thref{theo} -> Theorem A.1

Now I would like to change the font of A from italic to normal font.


A minimal example can be view here (if anything is missing, please write, it's my first question in the forum :-) ): https://v1.overleaf.com/21643066jhqtrhnhqmwv

5

1 Answer 1

2

Use cleveref instead of theoremref: it's much easier and much better customizable.

\documentclass[reqno,12pt,a4paper]{article}

\usepackage[ngerman]{babel}   % Silbentrennung
\usepackage{url}              % für URLs und Mailadressen  
\usepackage[T1]{fontenc}      % Zeichensatzcodierung
%\usepackage[latin1]{inputenc} % Codepage für Eingabe
\usepackage{amsmath}
\usepackage{amsthm}          % Pakete
\usepackage{amsfonts}               % der
\usepackage{amssymb}                    % AMS
\usepackage{array}            % bessere Tabellendarstellung
\usepackage{graphicx}         % Grafik-Einbindung
\usepackage{extarrows}
%\usepackage{a4wide} 
\usepackage{color}
\usepackage{mathrsfs}
\usepackage{setspace}
\usepackage{multicol}
\usepackage{dsfont}
\usepackage{csquotes}
\usepackage[style=alphabetic ,maxnames=99, mincitenames=4,firstinits=true]{biblatex}

\usepackage{hyperref}
\usepackage[capitalize]{cleveref} %referenzen

\usepackage{enumitem}  %counter enumerate

\pagestyle{plain}             % Zeilennummern unten mittig, kein Header

\numberwithin{equation}{section} %nummerierung der Formeln


\newtheoremstyle{normal}   % name
{11pt}                         % Space above
{11pt}                         % Space below
{\normalfont}                            % Body font
{}                            % Indent amount 1
{\bfseries}                   % Theorem head font
{}                    % Punctuation after theorem head %\newline einsetzen
{.5em}                        % Space after theorem head 2
{}                            % Theorem head spec 
\theoremstyle{linebreak}

\theoremstyle{normal}
\newtheorem{Lemma}{Lemma} \numberwithin{Lemma}{section}
\newtheorem{Bem}[Lemma]{Bemerkung}  
\newtheorem{Def}[Lemma]{Definition}  
\newtheorem{Satz}[Lemma]{Satz}
\newtheorem{Folg}[Lemma]{Folgerung}
\newtheorem{bsp}[Lemma]{Beispiel}
\newtheorem{kor}[Lemma]{Folgerung} 
\newtheorem{Not}[Lemma]{Notation} 
\newtheorem{theo}[Lemma]{Theorem} 
\newtheorem{prob}[Lemma]{Problem} 


\renewcommand{\proofname}{Beweis}

\setcounter{tocdepth}{2} %tiefe Inhaltsverzeichnis

\addbibresource{QuelleDipl.bib}




% erst Nachname, dann Vorname
\DeclareNameAlias{default}{last-first}
% Trenner zwischen den Namen ein Semikolon
\renewcommand*{\multinamedelim}{\addsemicolon\space}
% Doppelpunkt nach dem letzten Namen
\renewcommand*{\labelnamepunct}{\addcolon\space}

\renewcommand*{\multinamedelim}{\addsemicolon\space} 
\renewcommand*{\finalnamedelim}{\addsemicolon\space}

\begin{document}

\renewcommand{\arraystretch}{1.2}
\setstretch {1.5}
\tableofcontents


\newpage
\begin{appendix}
\section{Gebrochen-lineare Transformation von Matrizen}\label{sec:appC}
\renewcommand{\theequation}{\Alph{section}.\arabic{equation}}


\begin{Lemma}\label{zusatz}
Sei $P \in  \mathbb C^{p \times p}$. Dann sind folgende Aussagen äquivalent:
\begin{enumerate}
    \item[(i)] $P$ eine ist  Orthoprojektionsmatrix 
    \item[(ii)]$P^{*}=P=P^{2}$
    \item[(iii)] $I_q-P$ ist eine Orthoprojektionsmatrix.
    \end{enumerate}
\end{Lemma}

Einen ausführlichen Beweis von \cref{zusatz} ...


\end{appendix}

\end{document}

I commented latin1 because my system uses UTF-8 and you should too. The a4wide package has been deprecated for more than a decade: use geometry instead.

As you see, you use the standard \label command and \cref instead of \thref.

enter image description here

By the way, you should set \arraystretch less than 1 with \setstretch{1.5} or matrices will come up very strange. Use

\renewcommand{\arraystretch}{0.66667}

instead.

4
  • Hey, thanks a lot for your answer (and the additional tipps).
    – 314aja
    Nov 5, 2018 at 14:23
  • cleverref is definitely better. It just leads to another problem in my paper. It works as long as I only use Lemma, as soon as I try using Not, Satz or any of the other types i get the error: 'No counter 'N' defined'. Do you know why ?
    – 314aja
    Nov 5, 2018 at 14:30
  • @314aja I haven't the issue. I added the same statement, but marked as Satz; I assigned a different label \label{zusatz+} and with \cref{zusatz+} I get “Satz 1.2”.
    – egreg
    Nov 5, 2018 at 14:35
  • I just copied my whole code into a new file, now i don' get the error either. I don't understand it, but it works :-). So thanks again for your help.
    – 314aja
    Nov 5, 2018 at 16:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.