Git Product home page Git Product logo

Comments (8)

josephwright avatar josephwright commented on May 27, 2024

Well yes: with \ProvidesExplFile you are auto-activing \ExplSyntaxOn. I suspect you are trying to achieve something that is non-obvious: what's the aim here?

from latex3.

Qinka avatar Qinka commented on May 27, 2024

I wrote my own template by referring to someone else's template, then the original version had a \ProvideFile in it then in my own latex 3 template, I added the \ProvideExplFile.

The original version uses \GetFileInfo to get the version and other information.

I guess I'm not using it right?

from latex3.

muzimuzhi avatar muzimuzhi commented on May 27, 2024

Moving \ProvidesExplFile behind \end{document} should work.

Also if it's a document class, you can use \ProvidesExplClass.

from latex3.

davidcarlisle avatar davidcarlisle commented on May 27, 2024

I agree that this is probably unsupported use, on the other hand doc.sty does use \obeylines in macrocode and assumes (falsely here) that that will cause line ends to be honoured.

It's almost enough just to reset endlinechar in \obeylines

\ProvidesExplFile{test.dtx}{2024/02/28}{0.1.0}{abc}
\documentclass{l3doc}
\NewCommandCopy\oldobeylines\obeylines
\renewcommand\obeylines{\endlinechar=13\relax\oldobeylines}

but there is a space coming through that I dont have time to trace this morning, so the first abcd is out of alignment

image

from latex3.

muzimuzhi avatar muzimuzhi commented on May 27, 2024

I get errors in loading supp-pdf.mkii, both with the original example in #1478 (comment) and with \obeylines patch from @davidcarlisle.

(/usr/local/texlive/2023basic/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[LoadingMPStoPDFconverter(version2006.09.02).]
\scratchcounter=\count331
! Missing number, treated as zero.
<to be read again> 
                   \relax 
l.136 ...csname newcount\endcsname \scratchcounter

from latex3.

josephwright avatar josephwright commented on May 27, 2024

\ProvidesExpl... are intended for files where expl3 syntax should be on: that's not true here as it's a document. \ProvidesFile is really for config files or similar: I wouldn't use it to 'version' a document.

from latex3.

josephwright avatar josephwright commented on May 27, 2024

@davidcarlisle You suggesting a change somewhere?

from latex3.

davidcarlisle avatar davidcarlisle commented on May 27, 2024

@josephwright not necessarily, but doc or even the latex 2e kernel could make \obeylines set \endlinechar to ^^M so that lines do actually get obeyed, if we want to support that packages in general (and \ExplSyntaxOn in particular) might locally have changed \endlinechar

from latex3.

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.