2

enter image description here

Before I used Lyx, I used \declaretheoremstyle to make the bodyfont into normal in theorems. But in Lyx, I'm using Theorems(AMS) and Theorems(Numbered by Chapters) Module and cannot find a way to make the bodyfont into normal(not italic). I've tried \theoremstyle{remark} in the preamble but it didn't work.

Currently, I'm just using \textup{} in every theorems but I just wish I could handle it in a global sense. The modules I'm using seem to add following commands:

\theoremstyle{plain}
\ifx\thechapter\undefined
\newtheorem{thm}{\protect\theoremname}
\else
\newtheorem{thm}{\protect\theoremname}[chapter]
\fi

It would be greatly appreciated if I can handle this easily! Thanks.

[Added] Here's the source code of what I'm dealing with.

% Preview source code
%% LyX 2.1.3 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[oneside,english]{scrbook}
\usepackage{mathptmx}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{bm}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amssymb}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\theoremstyle{plain}
\ifx\thechapter\undefined
\newtheorem{thm}{\protect\theoremname}
\else
\newtheorem{thm}{\protect\theoremname}[chapter]
\fi
\@ifundefined{date}{}{\date{}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{indentfirst}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{thmtools}
\setlength{\parskip}{0.5mm}
\setlength{\parindent}{4.5mm}

\makeatother

\usepackage{babel}
\providecommand{\theoremname}{Theorem}
\begin{document}
\chapter{Euclidean Space}
\section{Tangent Space and Vector Field} 

\begin{thm}
\textup{Let}\end{thm}
\begin{proof}
$v_i (p)$
\end{proof}

\end{document}
  • 1
    It's always helpful if you can provide a minimal working example (a complete document that compiles). – scottkosty Mar 8 '15 at 6:30
  • Sorry, I couldn't understand what you exactly meant so I just shortened my document to demonstrate the situation. I just left all commands except the contents of the document, and I've checked it works. As I've said before, I'm using \textup{} to make the fonts not italic in theorems. – Taxxi Mar 8 '15 at 6:42
  • in the example you've provided, only \theoremstyle{plain} is used. if you don't want italic, then \theoremstyle{definition} will use the upright font and provide the same space above and below as {plain}, or \theoremstyle{remark} will be upright, with no extra space. you can't use thm for all your theorem objects if you want them to have different body styles. – barbara beeton Mar 8 '15 at 13:56
  • @barbarabeeton \theoremstyle{plain} is I think automatically generated by the Lyx module. I tried to overwrite it by \theoremstyle{remark} but it doesn't seem to work. Of course, I can define new theoremstyle but then I have to give up using the module and manually insert Tex commands, which I think has no point when using Lyx. I just gave it up and currently using TexWorks now. Dealing with modules is I think a bit too tough for a beginner :( I changed .inc file into \theoremstyle{remark} and upright font but it doesn't work for some reason. I should study more. – Taxxi Mar 9 '15 at 10:48
1

You can easily get what you want using the ntheorem package instead of amsthm. One advantage is the placement of end-of-proof symbol will be fully automatic, even for proofs ending in a display equation:

    \documentclass[oneside,english]{scrbook}
    \usepackage{mathptmx}
    \usepackage[T1]{fontenc}
    \usepackage{geometry}
    \setcounter{secnumdepth}{3}
    \setcounter{tocdepth}{3}
    \usepackage{bm}
    \usepackage{amsmath}
    %\usepackage{amsthm}
    \usepackage[thmmarks, amsmath, thref]{ntheorem}
    \usepackage{amssymb}
    \makeatletter
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
    \theoremstyle{plain}
    \theoremheaderfont{\bfseries}
    \theorembodyfont{\upshape}
    \theoremseparator{.}
    \ifx\thechapter\undefined
    \newtheorem{thm}{\protect\theoremname}
    \else
    \newtheorem{thm}{\protect\theoremname}[chapter]
    \fi
    \theoremstyle{nonumberplain}
    \theoremheaderfont{\itshape}
    \theoremsymbol{\ensuremath{\square}}
    \newtheorem{proof}{Proof}
    \@ifundefined{date}{}{\date{}}
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
    \usepackage{indentfirst}
    \usepackage{thmtools}
    \setlength{\parskip}{0.5mm}
    \setlength{\parindent}{4.5mm}

    \makeatother

    \usepackage{babel}
    \providecommand{\theoremname}{Theorem}

    \begin{document}
    \chapter{Euclidean Space}
    \section{Tangent Space and Vector Field}

    \begin{thm}
    \textup{Let}\end{thm}
    \begin{proof}Since $ \omega $ is an exact form, $ ω=\mathrm d\mkern1mu f$, we have: 
\[ \int_{\gamma}\omega = \int_{\gamma}\mathrm d\mkern1mu f = f(\gamma(b)-f(\gamma(a). \]%
    \end{proof}

    \end{document}

enter image description here

  • Thanks for your suggestion. I tried using it, but when I was importing the file into Lyx, many of the information got lost(probably my fault not handling things correctly) and not shown in the source pane. Good thing is that after importing the file with the commands you've written down, it works! I have no idea what's happening since in my source pane, I'm still using amsthm package, not ntheorem... If I have time later I'll look into ntheorem more deeply. Thanks. – Taxxi Mar 8 '15 at 12:33

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.