15

Does anyone know how to create numbering for Theorem/lemma/… like this one in the image below, also any idea about the font name?

enter image description here

7

Remarks

I reproduced Heiko's answer using ntheorem. There is a tricky thing about it: You can't wrap the \lettrine into the [] of the \item as one would normally do for theorems. I get the error

! Argument of \@lettrine has an extra }.

if I do this. I don't know why, maybe somebody knows (Please comment).

Implementation

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[sc]{mathpazo}
\usepackage{tgpagella}
\usepackage{microtype}
\usepackage{amsmath}
\usepackage{lettrine}
\usepackage{xcolor}
\usepackage{ntheorem}
\definecolor{theoremgray}{gray}{.5}
\makeatletter
\newtheoremstyle{mytheorem}%
    {\item[]\theorem@headerfont \lettrine[loversize=.11,findent=0.5em,nindent=0pt]{\textcolor{theoremgray}{##2}}{\textls{##1\theorem@separator}} }%
    {\item[]\theorem@headerfont \lettrine[loversize=.11,findent=0.5em,nindent=0pt]{\textcolor{theoremgray}{##2}}{\textls{##3\theorem@separator}} }
\makeatother
\theoremstyle{mytheorem}
\theoremheaderfont{\normalfont}
\theorembodyfont{\normalfont}
\theoremseparator{:}
\newtheorem{theorem}{Theorem}[subsection]
\setlength{\textwidth}{.85\textwidth}% just for reproducing the example
\begin{document}
\section{Sectiontitle}
\subsection{Subsectiontitle}
\begin{theorem}[Bezeichnungen]
    Ist $G$ eine (multiplikativ geschriebene) Gruppe, so f"uhrt man
    f"ur beliebige $g \in G$ und $M, N \subseteq G$ die Bezeichnungen
    \begin{alignat*}{4}
      &Mg &&= \{mg &&\mid m &&\in M\},\\
      &gN &&= \{gn &&\mid n &&\in N\},\\
      &MN &&= \{mn &&\mid m &&\in M, n \in N\}
    \end{alignat*}
\end{theorem}
\end{document}

Output

theorem

  • thanks for this code. I noticed a conflict with the package amsthm. for example try to use \begin{proof} something \end{proof} after adding the amsthm package. I got an error!. do you have an idea how can I fix this? – user31009 May 21 '13 at 20:29
  • 1
    Section 3.2.2 of the ntheorem user manual states, that it is incompatible with amsthm. Some of the features of amsthm are implemented in ntheorem and loading it with \usepackage[amsthm]{ntheorem} will emulate them (It will provides the environments plain, defintion, remark and proof). Conclusion: You can't use ntheorem and amsthm at once. (I would stick with ntheorem instead) – Henri Menke May 21 '13 at 20:40
21

Partial answer that addresses:

  • Dropped captital/number is solved by package lettrine. It also provides the small caps for Bezeichnungen:.

  • Color of the number (gray).

  • Alignment of the equation system (using environment alignat* of package amsmath. Just for fun I have added additional alignments for | and \in.

  • Letter spacing of the small caps text via \textls of package microtype.

  • As vertical bar \mid is used, see also question "\mid, | (vertical bar), \vert, \lvert, \rvert, \divides".

Also I have enlarged the number a bit for a better aligment with the top of the text.

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[sc]{mathpazo}
\usepackage{tgpagella}
\usepackage{microtype}
\usepackage{amsmath}
\usepackage{lettrine}
\usepackage{xcolor}
\definecolor{theoremgray}{gray}{.5}

\setlength{\textwidth}{.85\textwidth}% just for reproducing the example

\begin{document}
\lettrine[
  loversize=.11,
  findent=0.5em,
  nindent=0pt,
]{\textcolor{theoremgray}{1.1.1}}{\textls{Bezeichnungen:}}
Ist $G$ eine (multiplikativ geschriebene) Gruppe, so f"uhrt man
f"ur beliebige $g \in G$ und $M, N \subseteq G$ die Bezeichnungen
\begin{alignat*}{4}
  &Mg &&= \{mg &&\mid m &&\in M\},\\
  &gN &&= \{gn &&\mid n &&\in N\},\\
  &MN &&= \{mn &&\mid m &&\in M, n \in N\}
\end{alignat*}
\end{document}

Result

Missing:

  • Wrapping the visual markup into proper logical markup by defining a theorem style and setting up a theorem, for example.

    The answer of Henri Menke shows this using package ntheorem as example.

  • 2
    You should use \usepackage[sc]{mathpazo} for true small caps (and better kerning). – NauC May 21 '13 at 7:12
  • 2
    How can I obtain letterspacing for the small caps similar to the example picture by OP? – Henri Menke May 21 '13 at 12:15
  • 2
    @HenriMenke Thanks, missed that. Answer updated with using \textls of package microtype for letter spacing. – Heiko Oberdiek May 21 '13 at 12:19
  • 2
    alignment of the equations is not simply align* from amsmath -- the original example shows the left-hand side aligned flush left. can probably be done with alignat* but i haven't tried. – barbara beeton May 21 '13 at 14:04
  • 1
    @barbarabeeton Thanks, just for fun I have added additional alignments. – Heiko Oberdiek May 21 '13 at 14:57
3

Partial solution: the font is loaded with the package mathpazo.

enter image description here

  • 3
    Can you post the TeX code that you are using? – Heiko Oberdiek May 21 '13 at 3:07
  • @HeikoOberdiek, sorry, I deleted the file. But you just need to load the package with \usepackage{mathpazo}. – Sigur May 21 '13 at 3:11
  • Could you then please reproduce the file and upload the code? – Svend Tveskæg May 22 '13 at 15:06
  • @SvendTveskæg, do you want the code for the 3 equations? You can copy it from Heiko's answer below tex.stackexchange.com/a/115323/14757. – Sigur May 22 '13 at 17:06

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.