LaTeX forum ⇒ Text Formattingdefinition number in round brackets

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
mpaw
Posts: 3
Joined: Thu Nov 22, 2018 10:40 pm

definition number in round brackets

Postby mpaw » Fri Nov 23, 2018 12:01 pm

Hello.

I need a way to set definition number (from subsection) in round brackets.

I.E.:
Definition (1.1.2)


Now I use such statement:
  1. \newtheorem{df}{Definition}[subsection]
  2. \newtheorem{nt}[df]{Note}
  3. \newtheorem{st}[df]{Statement}


It generates me theorems without round brackets. How can I add them?

Thanks
Mike

rais
Posts: 179
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Sun Nov 25, 2018 1:07 pm

something along the lines of
  1. \documentclass{article}
  2. \usepackage{amsthm}
  3. \newtheoremstyle{numparens}%
  4. {}% space above
  5. {}% space below
  6. {\itshape}% body font
  7. {}% indent amount
  8. {\bfseries}% theorem head font
  9. {}% punctuation after theorem head
  10. {\newline}% space after theorem head
  11. {\thmname{#1}~(\thmnumber{#2})~\thmnote{#3}}% theorem head spec
  12.  
  13. \theoremstyle{numparens}
  14. \newtheorem{df}{Definition}[subsection]
  15.  
  16. \theoremstyle{plain}
  17. \newtheorem{nt}[df]{Note}
  18. \newtheorem{st}[df]{Statement}
  19.  
  20. \begin{document}
  21. \subsection{foo}
  22. \begin{df}[whatever]
  23. $\pi$ is constant.
  24. \end{df}
  25. some text
  26.  
  27. \begin{nt}
  28. some note
  29. \end{nt}
  30. some text
  31.  
  32. \begin{st}
  33. some statement
  34. \end{st}
  35. some text
  36. \end{document}

should do.

KR
Rainer


Return to “Text Formatting”

Who is online

Users browsing this forum: Baidu [Spider] and 12 guests