Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating labels could prepend filename (internally) to create globally unique labels #36

Open
mmcky opened this issue Oct 20, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@mmcky
Copy link
Member

mmcky commented Oct 20, 2021

Describe the problem

When adding in simple examples such as:

```{exercise}
:label: exercise-1
```

this will cause a warning to be issued if another exercise is labeled the same way in another document.

This is a pretty common pattern and the context should be handeled by the extension.

The downside is referencing would need to be documented if you want to reference an example from another document such as using <filename>:example-1 as a standard reference

Link to your repository or website

No response

Steps to reproduce

  1. build a document with the same label in two documents
  2. build and a warning will be issued such as
/Users/matthewmckay/repos-collab/continuous_time_mcs/ctmc_lectures/uc_mc_semigroups.md: WARNING: duplicate example label 'example-1', other instance in /Users/matthewmckay/repos-collab/continuous_time_mcs/ctmc_lectures/generators.md

The version of Python you're using

No response

Your operating system

No response

Versions of your packages

No response

Additional context

No response

@mmcky mmcky added the enhancement New feature or request label Oct 20, 2021
mmcky added a commit to QuantEcon/continuous_time_mcs that referenced this issue Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant