How to define in LaTeX a new counter that includes the chapter number too?

后端 未结 1 1181
难免孤独
难免孤独 2021-01-18 09:19

Given I have defined a new environment for which a counter is maintained:

\\newcounter{bioclipse}
\\newenvironment{bioclipse}[2][]{
   \\begin{shaded}\\refst         


        
相关标签:
1条回答
  • 2021-01-18 10:11

    Insert:

    \def\thebioclipse{\thechapter-\arabic{bioclipse}}
    

    and get

    \newcounter{bioclipse}
    \def\thebioclipse{\thechapter-\arabic{bioclipse}}
    \newenvironment{bioclipse}[2][]{
       \begin{shaded}\refstepcounter{bioclipse}\par\medskip\noindent%
       \textbf{Bioclipse Excursion~\thebioclipse #1: #2
       \vspace{0.1cm} \hrule \vspace{0.1cm}}
       \rmfamily}{\medskip \end{shaded}
    }
    
    0 讨论(0)
提交回复
热议问题