2

I want to change the numbering of Subhypothesis so that the subhypothesis which is after Hypothesis 1, is numbered 'Subhypothesis 1.1.

How can I do that?

My code for now is as following.

\usepackage{ntheorem} 
\theoremseparator{:} 
\newtheorem[number within=section]{hyp}{Hypothesis} 
\newtheorem {subhyp}{Subhypothesis}

Thank you

2
  • 1
    number within=hyp for the environment subhyp should work
    – user31729
    Commented Dec 9, 2017 at 13:42
  • Are subhypotheses always associated with a (main) hypothesis, or can there be "standalone" subhypotheses?
    – Mico
    Commented Dec 9, 2017 at 13:46

1 Answer 1

1

The following setup is (probably) close to what you want:

\usepackage{ntheorem}
\theoremseparator{:}
\newtheorem{hyp}{Hypothesis}[section]
\newtheorem{subhyp}{Subhypothesis}[hyp]

A full MWE (minimum working example); compile with pdflatex, lualatex, or xelatex:

\documentclass{article}

\usepackage{ntheorem}
\theoremseparator{:}
\newtheorem{hyp}{Hypothesis}[section]
\newtheorem{subhyp}{Subhypothesis}[hyp]

\begin{document}

\setcounter{section}{3}
\begin{hyp}    aaa \label{hyp:aaa} \end{hyp}    % 3.1
\begin{subhyp} bbb \label{hyp:bbb} \end{subhyp} % 3.1.1
\begin{hyp}    uuu \label{hyp:uuu} \end{hyp}    % 3.2

\refstepcounter{section}
\begin{hyp}    ccc \label{hyp:ccc} \end{hyp}    % 4.1
\begin{subhyp} ddd \label{hyp:ddd} \end{subhyp} % 4.1.1
\begin{subhyp} eee \label{hyp:eee} \end{subhyp} % 4.1.2:

\end{document}
4
  • Thank you very much. Could you also tell me how I can change the writing style of these new theorems, because the italics in which it is written right now, is sort of confusing in regards to quotes.
    – thebilly
    Commented Dec 9, 2017 at 14:05
  • @thebilly - Please clarify your formatting objectives. E.g., do you want to use upright, rather than italic, letters for both hyp and subhyp environmetns, or just for the subhypothesis enviroments?
    – Mico
    Commented Dec 9, 2017 at 14:21
  • For both hyp and subhyp environments, I want to change the font used (by default) I could use \textsf in each environment to change the font, but I'd prefer if it would be like that by default.
    – thebilly
    Commented Dec 9, 2017 at 16:33
  • @thebilly - The ntheorem package comes with an excellent, crisp user guide. Highly recommended reading, for anyone who's contemplating changing the defaults. Really! (Incidentally, you've already made one change to the default, by executing \theoremseparator{:}.) Perusing page 5 of the package's user guide, you'd find that executing \theorembodyfont{\sffamily} would achieve what you're seeking to do. Run this command before executing any \newtheorem instructions.
    – Mico
    Commented Dec 9, 2017 at 17:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .