1

I'm using Lyx and every time I add a new theorem (or lemma) it automatically adds square brackets after the theorem:

enter image description here

How do I remove those?

EDIT: I add a theorem the same way as a regular part, section, etc. I use Article (Standard Class) document type and Theorems(AMS) module. I tried changing to different theorem module, it did not help.

EDIT: I've made a mini example, here is the whole lyx file:

#LyX 2.2 created this file. For more info see http://www.lyx.org/
\lyxformat 508
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass article
\begin_preamble
\onecolumn
\usepackage{graphics}
\usepackage{psfrag}

 \allowdisplaybreaks

\usepackage{epstopdf}
\usepackage{theorem}
\usepackage[font=small]{caption}


\newcommand*{\horzbar}{\rule[.5ex]{2.5ex}{0.5pt}}
\newcommand*{\vertbar}{\rule[-1ex]{0.5pt}{2.5ex}}
\DeclareMathOperator{\tr}{\textbf{tr}}
\end_preamble
\use_default_options false
\begin_modules
theorems-ams
eqs-within-sections
figs-within-sections
customHeadersFooters
\end_modules
\maintain_unincluded_children false
\language english
\language_package none
\inputencoding auto
\fontencoding default
\font_roman "default" "default"
\font_sans "default" "default"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize 11
\spacing single
\use_hyperref true
\pdf_bookmarks false
\pdf_bookmarksnumbered false
\pdf_bookmarksopen false
\pdf_bookmarksopenlevel 1
\pdf_breaklinks false
\pdf_pdfborder false
\pdf_colorlinks true
\pdf_backref section
\pdf_pdfusetitle true
\pdf_quoted_options "linkcolor=black,filecolor=magenta,urlcolor=cyan,citecolor=black"
\papersize legalpaper
\use_geometry true
\use_package amsmath 2
\use_package amssymb 2
\use_package cancel 0
\use_package esint 1
\use_package mathdots 0
\use_package mathtools 0
\use_package mhchem 0
\use_package stackrel 0
\use_package stmaryrd 0
\use_package undertilde 0
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date true
\justification true
\use_refstyle 0
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle headings
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header

\begin_body

\begin_layout Theorem
here is theorem
\end_layout

\end_body
\end_document
  • Welcome to TeX.SX! – Bobyandbob Sep 10 '17 at 10:01
  • You'll need to give us more information. Can you describe in detail how you add theorems? – Torbjørn T. Sep 10 '17 at 10:12
  • I add a theorem the same way as a regular part, section, etc. I use Article (Standard Class) document type and Theorems(AMS) module. I tried changing to different theorem module, it did not help. – Andrey Gurevich Sep 10 '17 at 10:26
  • 1
    I just tried that, and I don't get the brackets. Can you make a minimal example, and add that to your question? That is, make a .lyx file containing just one theorem like that, open it in a text editor (e.g. Notepad, Textedit, Gedit, Kate), and copy-paste the entire content into the question. – Torbjørn T. Sep 10 '17 at 10:36
  • You are very right, I don't know why didn't i think of doing this. I've added a code in there. – Andrey Gurevich Sep 11 '17 at 8:26
0

You have added

\usepackage{theorem}

to your preamble. Remove this line.

The Theorems (AMS) module loads the amsthm package, and the combination of the two leads to the extra brackets somehow, as they are in conflict. The author of theorem recommends to not use it anyway:

This pack­age is no longer rec­om­mended by its au­thor; he sug­gests users should use the AMS LATEX am­sthm pack­age in­stead; an­other widely-used al­ter­na­tive is nthe­o­remq. (https://www.ctan.org/pkg/theorem)


Other comments: I'd remove \onecolumn and \usepackage{graphics} from the preamble as well. Single column layout is the default, and if you add an image via the LyX interface, LyX will load the successor package graphicx anyway.

  • After removing the "\usepackage{theorem}" it now there are parentheses '()' instead of brackets '[]'. – Andrey Gurevich Sep 11 '17 at 11:09
  • @AndreyGurevich Ehm, no. Not with the example you made, at least not on my system (TeX Live 2017, LyX 2.2.3). I get the expected "Theorem 1. here is theorem" – Torbjørn T. Sep 11 '17 at 11:18

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.