0

I would like to remove the parentheses from the newtheorem I define. The thing is I cannot use amsthm (it collides with another package, babel, as I understand). Is there a possibility to remove these without the extra package?

Thanks.

MWE:

\documentclass{article}

\usepackage{amsthm}
%\usepackage[english,hebrew]{babel}

\newtheorem{theo}{theor}

\begin{document}
\begin{theo}[Some sentence]
1234
\end{theo}

\end{document}

This code does not compile unless I comment one of the \usepackage statements.

The parentheses in question are shown here, in the result for this MWE, when I comment out the usepackage{babel}:

enter image description here

yoki
  • 550
  • please add a complete example code that show the problem – touhami Nov 17 '15 at 06:27
  • 1
    What parentheses are you referring to? – egreg Nov 17 '15 at 08:24
  • I added a full example. I'm referring to the parentheses I get when I add a name to the theorem. The question is can I remove them without using amsthm. – yoki Nov 17 '15 at 08:37
  • 1
    Concerning the interaction between babel and amsthm you can give a look here – campa Nov 17 '15 at 09:47
  • @campa , thank you. I tried these solutions but I then I get other problems related to what babel should do (inverted order of characters, etc.). That's why I'm looking for some solution that uses the original package, theorem, that I know works in this case. – yoki Nov 17 '15 at 10:38
  • 1
    You can try with the following and see this is what you actually want: \makeatletter \def\@opargbegintheorem#1#2#3{\trivlist\item[\hskip \labelsep{\bfseries #1\ #2\ #3}]\itshape} \makeatother – Sunilkumar KS Nov 17 '15 at 11:13
  • Why do you want to remove the prentheses? That seems very unnatural. What do you want to replace them with? – Bernard Nov 17 '15 at 11:16
  • I would like to replace them with inverted parehtheses. In RTL languages the parentheses are not displayed correctly. – yoki Nov 17 '15 at 13:01
  • @SunilkumarKS , that did not do anything. Does it work with \usepackage{theorem}? – yoki Nov 17 '15 at 17:19
  • 1
    Nope! Here is my code to obtain the result:

    `\documentclass{article}

    \makeatletter \def@opargbegintheorem#1#2#3{\trivlist \item[\hskip \labelsep{\bfseries #1\ #2\ #3}]\itshape}

    \newtheorem{theo}{theor}

    \begin{document} \begin{theo}[Some sentence] 1234 \end{theo}

    \end{document}`

    – Sunilkumar KS Nov 18 '15 at 04:21
  • The weird situation I'm in requires I use theorem but not amsthm. But as I wrote in the full answer, I used your idea and got it. Thanks! – yoki Nov 18 '15 at 08:25

1 Answers1

1

Using @SunilkumarKS's response I managed to do that by locating the definition in the original sty file (thp.sty)

I just add this, which is a copy of the contents of the sty file, only without the parentheses around ##3.

\makeatletter
\gdef\th@plain{\normalfont\itshape
  \def\@begintheorem##1##2{%
        \item[\hskip\labelsep \theorem@headerfont ##1\ ##2]}%
\def\@opargbegintheorem##1##2##3{%
   \item[\hskip\labelsep \theorem@headerfont ##1\ ##2\ ##3]}}
\makeatother

Thank you!

yoki
  • 550