Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 498059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:50:28+00:00 2026-05-13T05:50:28+00:00

Given I have defined a new environment for which a counter is maintained: \newcounter{bioclipse}

  • 0

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

\newcounter{bioclipse}
\newenvironment{bioclipse}[2][]{
   \begin{shaded}\refstepcounter{bioclipse}\par\medskip\noindent%
   \textbf{Bioclipse Excursion~\thechapter-\thebioclipse #1: #2
   \vspace{0.1cm} \hrule \vspace{0.1cm}}
   \rmfamily}{\medskip \end{shaded}
}

Now, I can add a label to such an environment:

\begin{bioclipse}{Wizards: New Molecule from SMILES}
  \label{chapCompRepr:ex:fromSMILESWizard}
  Bioclipse has a \textit{New Wizard} to create a new chemical graph.
\end{bioclipse}

This outputs a text with caption and a number. Because it uses \thechapter, this number will include the chapter number too; that is, the first environment in Chapter 3, will be numbered in 3-1. In the output, that is.

However, when I refer to it with \ref{chapCompRepr:ex:fromSMILESWizard}, this number does not include the chapter number… How should I change my environment definition, or counter definition that it includes the chapter number, and resets the second number for each chapter?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T05:50:28+00:00Added an answer on May 13, 2026 at 5:50 am

    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
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have small function which will recolor pixels in a Bitmap from a given
I have a series of models for which I've defined factories. I also have
Given the following two defined routes: routes.MapRoute(name: CityCategoryPage, url: {city}-{state}/{categoryName}/__c/, defaults: new { controller
I have a multi_index iterator defined in my class. I need to give the
Given i have the type: type NewsMessage(identifier:string, headline:string) and this record: type NewsMessageParams =
Given I have a master branch and a other branch. In the other branch
Given I have two File objects I can think of the following implementation: public
given i have the following block of code (function(){ var mb = { abc:function(){
Given: I have an interface. I have only class that implements that interface. Question:
Given I have a class with two constructors: public class TestClass { ObjectOne o1;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.