Comments (6)
Do we need to keep the first type of internal links using ___sec
or can we just phase them out and avoid adding another flag? Do you have any idea if they are documented and used for other purposes?
from doconce.
I fear phasing them out would lead to a lot (?) of broken links on the internet, so I think it better to enable both options. I do not know if hpl used some established standard, a quick google search seems to indicate not.
from doconce.
In thinking a bit more about this, this is maybe part of a bigger discussion, around whether to make such major changes the default, with the previous situation enabled using a flag, or optional, using a new flag...
from doconce.
I looked into this and will try to propose a solution soon. Correct me if I am wrong but it seems to me that ___sec
is used only in TOCs so we do not need to worry about consistency: if you compile a document to html you'll get a new TOC as I describe below, if you do not those ___sec
in the html file will still work. Unless maybe one is mixing new and old html files, but that sounds like bad practice to me.
___sec
is used in TOCs when a heading has no label. However, I can create a label from the heading's title as GitHub does (this seems to work fine href=re.sub('\W+', '-', title.lower()).strip('-')
. Example: a heading ### how !. to cite? ###
gives href='how-to-cite'
. When the user requires a TOC, this href
will be used in the links in the TOC and in the anchors in the headings.
from doconce.
It looks like ___sec
is used by default in all html output for all or most headings. However, it is only used to create links when a TOC is requested (I think).
Your solutions sounds fine. It looks like commas are also skipped from labels, e.g. https://docs.carpentries.org/topic_folders/governance/bylaws.html#eligibility-rights-and-termination-for-voting-members. Non-standard characters, such as the Norwegian 'Γ¦', 'ΓΈ' and 'Γ₯' are also problematic. These should maybe be replaced with 'ae', 'o' and 'a' (or 'ae', 'oe' and 'aa' as is sometimes done).
from doconce.
Your implementation in #86 looks good to me! Thanks!
from doconce.
Related Issues (20)
- Speaker notes in deck slides HOT 2
- TITLE/AUTHOR/DATE cause empty markdown cell at top of ipynb output HOT 1
- `print(type(x))` gives no output in html HOT 1
- New feature: abort on error with --execute HOT 7
- Create an answer book in ipynb HOT 5
- New feature: enable execution in a different folder HOT 7
- Figures with caption inside admonitions do not work HOT 1
- Empty markdown cells in ipynb
- Remove `Figure 1` label in html slides when no caption given HOT 4
- Github Actions on the doconce repo time out
- Create notebook cell id based on cell content
- Python 1 HOT 1
- TOC title in html and ipynb have different margins HOT 2
- Miras
- code execution for html should be skipped when py-out present
- Formatting of py-out block in html HOT 1
- Localization of doconce HOT 2
- DocOnce and Beamer document with animation HOT 1
- Compatiliblity with regex 2022.10.31 HOT 1
- Pointing to solutions for installation problems HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doconce.