Giter VIP home page Giter VIP logo

Comments (6)

aless80 avatar aless80 commented on May 29, 2024

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.

lexnederbragt avatar lexnederbragt commented on May 29, 2024

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.

lexnederbragt avatar lexnederbragt commented on May 29, 2024

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.

aless80 avatar aless80 commented on May 29, 2024

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.

lexnederbragt avatar lexnederbragt commented on May 29, 2024

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.

lexnederbragt avatar lexnederbragt commented on May 29, 2024

Your implementation in #86 looks good to me! Thanks!

from doconce.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.