我使用 amsthm 包将环境定义为
\documentclass[a4paper,11pt,twoside,openright,notitlepage]{book}
\pdfobjcompresslevel 0
\usepackage[a-1b]{pdfx}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{amstext}
\usepackage{amsfonts}
\usepackage{xspace}
\newtheorem{definition}{Definition}[section]
\newtheorem{example}{Example}[section]
\usepackage{thmtools}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage{colortbl}
\usepackage{theorem}
\usepackage{array,multirow,makecell}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{xspace}
\usepackage[pdftex]{graphicx}
\usepackage{indentfirst}
\usepackage{latexsym}
\usepackage{setspace}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\usepackage{makeidx}
\usepackage{pgfplotstable}
\usepackage{pgfplots}
\pgfplotsset{compat=1.15}
\usepackage{subfig}
\usepackage{eqparbox}
\usepackage{standalone}
\setcounter{tocdepth}{3}
\usepackage{adjustbox}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash }b{#1}}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash }b{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash }b{#1}}
\newcolumntype{M}[1]{>{\centering\arraybackslash }m{#1}}
\algnewcommand\algorithmicinput{\textbf{Input:}}
\algnewcommand\INPUT{\item[\algorithmicinput]}
\algnewcommand\algorithmicoutput{\textbf{Output:}}
\algnewcommand\OUTPUT{\item[\algorithmicoutput]}
\renewcommand{\algorithmicforall}{\textbf{for each}}
\algnewcommand{\LineComment}[1]{\State \(\triangleright\) #1}
\usepackage{vmargin}
\usepackage{float}
\usepackage{enumerate}
\usepackage{verbatim}
\usepackage{floatflt}
\usepackage{rotating}
\usepackage{longtable}
\usepackage{natbib}
\usepackage{url}
\bibpunct{[}{]}{;}{a}{ }{,}
\RequirePackage{ifpdf}
\ifpdf \PassOptionsToPackage{pdfa,a4paper=true,pagebackref=true}{hyperref} \fi
\RequirePackage{hyperref}
\usepackage{lmodern}
\usepackage[final]{microtype}
\usepackage{mathtools,stmaryrd}
\usepackage{tabularx}
\usepackage{tikz}
\usepackage{pdflscape}
\usepackage{bussproofs}
\usepackage{lipsum}
\usepackage{alltt}
\usepackage{listings}
\usepackage{afterpage}
\usepackage{dirtytalk}
\definecolor{Gray}{gray}{0.90}
\def\mydoubleq#1{``#1''}
\def\mysingleq#1{`#1'}
\begin{document}
\section{sect 1} ...
\section{sect 2} ...
\begin{example} ....example 1
\end{example}
\begin{example} Taking table .... example2
\end{example}
\end{document}
我怎样才能隐藏这些括号?谢谢
答案1
删除该theorem
包,因为代码中已经有另一个定理包。没有必要有 3 个定理包。
thmtools
如果您不想在文档中出现警告,也请删除。
\documentclass{book}
\usepackage{amsthm}
\newtheorem{definition}{Definition}[section]
\newtheorem{example}{Example}[section]
%\usepackage{thmtools}
%\usepackage{theorem}
\begin{document}
\section{sect 1} ...
\section{sect 2} ...
\begin{example} ....example 1
\end{example}
\begin{example} Taking table .... example2
\end{example}
\end{document}