[Tex/LaTex] How to change the way theorems are displayed with LyX

amsmathformattinglyxtheorems

The theorems are currently all displayed in bold, but I would like to display them in small-caps.

My question is much like this one. However, I am using LyX with an AMS style document class, and was not able to implement any of the suggestions in the aforementioned thread, namely because I could not figure out how to use them in a LyX preamble.


Thanks Herbert. I am not entirely sure what you want me to show. Do you want to see the Lyx-generated preamble itself? Or were you looking for something more specific? I suspect that the below is more than you were looking for.

Thanks for any help.

% Preview source code

%% LyX 1.6.8 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[11pt,oneside,english]{amsart}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[letterpaper]{geometry}
\geometry{verbose,tmargin=1.23in,bmargin=1.23in,lmargin=1in,rmargin=1in}
\usepackage{babel}

\usepackage{float}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{amssymb}
\usepackage[authoryear]{natbib}
\onehalfspacing
\usepackage[unicode=true, pdfusetitle,
 bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
 breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]
 {hyperref}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\numberwithin{equation}{section}
  \theoremstyle{plain}
  \newtheorem{assumption}{Assumption}
  \theoremstyle{plain}
  \newtheorem{prop}{Proposition}[section]
  \theoremstyle{definition}
  \newtheorem{defn}{Definition}[section]
  \theoremstyle{plain}
  \newtheorem{lem}{Lemma}[section]
  \theoremstyle{plain}
  \newtheorem{thm}{Theorem}[section]
  \theoremstyle{plain}
  \newtheorem*{algorithm*}{Algorithm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\makeatletter \renewenvironment{proof}[1][\proofname] {\par\pushQED{\qed}\normalfont\topsep6\p@\@plus6\p@\relax\trivlist\item[\hskip\labelsep\bfseries#1\@addpunct{.}]\ignorespaces}{\popQED\endtrivlist\@endpefalse} \makeatother

\makeatother

\begin{document}

Best Answer

For customizing the document preamble in LyX, go to the main menu:

  1. Open the menu Document
  2. Click on the menu item Settings
  3. Choose the edit field marked with LaTeX preamble and type your code therein.

So this would work, similar to the question you linked:

\newtheoremstyle{mytheoremstyle} % name
    {\topsep}                    % Space above
    {\topsep}                    % Space below
    {\itshape}                   % Body font
    {}                           % Indent amount
    {\scshape}                   % Theorem head font
    {.}                          % Punctuation after theorem head
    {.5em}                       % Space after theorem head
    {}  % Theorem head spec (can be left empty, meaning ‘normal’)
\theoremstyle{mytheoremstyle}
\newtheorem{thm}{Theorem}[section]

and also the thmtools interface to amsthm as another approach:

\usepackage{thmtools}
\declaretheoremstyle[headfont=\scshape]{mystyle}
\declaretheorem[style=mystyle]{thm}
Related Question