Git Product home page Git Product logo

Comments (9)

josephwright avatar josephwright commented on May 12, 2024

The problem we have is that \GetIdInfo is doing two separate things: providing information for \ProvidesExplPackage and also for the typesetting package documentation. In contrast, the LaTeX2e macro \GetFileInfo is only ever used in typesetting documentation, and so can define \filename, etc. in a more-or-less arbitrary way. We currently need a 'user space' name for the returned information due to the way \ProvidesExplPackage works. Some possible options:

  • Hard-code this information into files rather than using \GetIdInfo (leaves us with a file date/version problem).
  • Pick some new names that will not be a problem, say \ExplFileName, etc.
  • Use an alternative to \GetIdInfo that does not use scratch macros but instead directly use the information in \ProvidesExpl(Package|Class|File), and use \GetFileInfo in the normal way for the documentation

My personal preference is the first option: there was a suggestion on LaTeX-L a while ago to drop \GetIdInfo as it is tied to CVS/SVN approaches. This is what I do, for example, with siunitx. However, that might not fly with all of the interested parties. So perhaps that last alternative is better, with something like \ProvidesExplPackageFromID (etc.), at least for the moment. It's a bit long, but it would deal with the issue quickly and without too much argument.

from latex3.

wspr avatar wspr commented on May 12, 2024

I guess the easiest option is to use \ExplFileName. I agree with Philipp's comments a while back that since \GetIdInfo is so strongly tied to CVS/SVN it's not really appropriate as a general versioning tool. Would many packages actually use \GetIdInfo besides our own? I don't think changing this is a big compatibility problem…

from latex3.

josephwright avatar josephwright commented on May 12, 2024

I'm also with Philipp on \GetIdInfo, but to kill it entirely we have to sell DCVS to all of the team. For the moment, let's go with \ExplFileName, etc., to at least solve the problem at hand! I'd also suggest we use \GetFileInfo in the documentation part of our files, so that if we do drop \GetIdInfo entirely the documentation version/date will continue to match the code!

from latex3.

wspr avatar wspr commented on May 12, 2024

Good idea. In time I guess we can think about improving \GetFileInfo but that will have to wait.

In fact, I reckon we could just use one of the other SVN-keywords packages for our needs and drop the SVN metadata when we're creating a format. It'd be nice to simplify that aspect of the package loading, and I'm sure the dedicated packages do a better job than we do with the string parsing. Hmm....

from latex3.

josephwright avatar josephwright commented on May 12, 2024

True: I'd go for the svn-multi package, as it's up to date and seems to be well-supported. We'd then only need

\svnid{$<stuff here>$}
...
\ProvidesExplPackage{\svnfilefname}{\svndate}{\svnrev}

with the only issue being \filedescription, which would have to be moved from the header. You might therefore actually only retain the revision data

\ProvidesExplPackage{<file-name>}{\svndate}{\svnrev}{<file-description>}

BTW, I've already tested \GetFileInfo, and realise that it makes it easiest to include the file description in the typeset documentation:

% \GetFileInfo{\jobname.sty}
%
% \title{^^A
%   \fileinfo
%   \thanks{This file describes v\fileversion, last revised \filedate.}^^A
% }
%
% \author{^^A
%  The \LaTeX3 Project\thanks
%    {^^A
%      E-mail:
%        \href{mailto:[email protected]}
%          {[email protected]}^^A
%    }^^A
% }
%
% \date{Released \filedate}
%
% \maketitle

from latex3.

josephwright avatar josephwright commented on May 12, 2024

I did a bit of experimenting, and for svn-multi we'd actually do something like

\RequirePackage{svn-multi}
\svnid{$Id: l3seq.dtx 0000 000-00-00 00:00:00Z joseph $}
\ProvidesExplPackage
  {l3seq}
  {\svnfileyear/\svnfilemonth/\svnfileday}
  {\svnfilerev}
  {The LaTeX3 kernel: sequences and stacks}

from latex3.

josephwright avatar josephwright commented on May 12, 2024

I should add that I think this is probably one that can be covered as part of the 'big bang' (provided that happens soon!)

from latex3.

josephwright avatar josephwright commented on May 12, 2024

It occurs to me that using svn-mutli would still leave us open to the danger that someone might do

\usepackage{svn-multi}
\svnid{$Id ... $ }
\usepackage{expl3}

and get a surprising result. So I think the best fix in the short term is to use a dedicated set of macros that will not conflict with anyone else.

from latex3.

wspr avatar wspr commented on May 12, 2024

I'm going to close this particular issue here — but we may want to go back to a formal module identification syntax that you've suggested before. Happy to either have it raised as another issue or just to keep it in the back of our minds.

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.