GithubHelp home page GithubHelp logo

Allow bidi to be loaded early about bidi HOT 5 OPEN

kvafa avatar kvafa commented on August 25, 2024
Allow bidi to be loaded early

from bidi.

Comments (5)

Udi-Fogiel avatar Udi-Fogiel commented on August 25, 2024 1

It should not affect old documents, as all the current documents that use bidi have to load packages before bidi is loaded, and in that case the all the .def files will be \input'ed at the same order as they use to.

from bidi.

kvafa avatar kvafa commented on August 25, 2024

Thanks for the suggestion. This is quite tricky and it needs a lot of testing to make sure that it does not break anything since the bidi package current approach has existed for at least 2 decades and I do not want to break anything for users.

From memory, I was in the past 10 years was thinking of doing something similar; at the time, the package hopatch of Heiko Oberdiek existed and I experimented with it but from memory, it was not working in some cases (sadly, I can not remember those specific cases/examples).

Having said that, I willl look into this when I have time and will release an experimental version so people can test.

from bidi.

Udi-Fogiel avatar Udi-Fogiel commented on August 25, 2024

But my first suggestion wasn't considering catcodes:

\newcommand*\bidi@restore@catcode{}
\newcommand\bidi@isloaded[1]{
      \@ifpackageloaded{#1}%
            {\input{#1-xetex-bidi.def}}%
            {\AddToHook{package/#1/after}{
               \edef\bidi@restore@catcode{\catcode`\@=\the\catcode`\@}
               \makeatletter
               \input{#1-xetex-bidi.def}
               \bidi@restore@catcode
        }
    }
}

from bidi.

kvafa avatar kvafa commented on August 25, 2024

It should not affect old documents, as all the current documents that use bidi have to load packages before bidi is loaded, and in that case the all the .def files will be \input'ed at the same order as they use to.

It is not that simple.

from bidi.

Udi-Fogiel avatar Udi-Fogiel commented on August 25, 2024

It is not that simple.

I know you are currently very busy, but if you can elaborate a little bit more, I'll be happy to learn how could that potentially affect already existing documents.

from bidi.

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.