slatex / sTeX

A semantic Extension of TeX/LaTeX
49 stars 9 forks source link

rustex should do bibtex #354

Closed kohlhase closed 1 year ago

kohlhase commented 1 year ago

It seems that in all the AI notes (and I suspect everywhere else) the references do not work.

Jazzpirate commented 1 year ago

I would be very susprised if that had anything to do with rustex. If the .bbl files are there (as generated by pdflatex), rustex should consume them exactly as tex does.

Jazzpirate commented 1 year ago

Can you expand on what you mean by "references do not work"? Do they work in pdflatex?

kohlhase commented 1 year ago

That's is what I mean (taken directly from the AI notes).

Screenshot 2022-09-20 at 15 07 45

and of course they work in pdflatex. Maybe you are not "running rustex twice"?

kohlhase commented 1 year ago

oh, and I should add the [mitchell:...] is not clickable, ...

That being said, I am not really sure what I would like to see in the HTML (and reusable-in-multiple documents) case.

Jazzpirate commented 1 year ago

No, I'm assuming you ran pdflatex first, so that the .bbl files are there ;)

There's another technicality though: If you're talking about the AI notes - they barely contain content (in the html), since it's all \inputrefs. So the missing reference isn't actually in notes.tex (or notes.bbl), but in the specific fragment that is input as HTML. I think that might be the actual issue:

does that make sense?

kohlhase commented 1 year ago

No, I'm assuming you ran pdflatex first, so that the .bbl files are there ;)

I am running nothing, ... I got this from Abhishek's new AI notes, so you generated that (and maybe forgot pdflatex).

Jazzpirate commented 1 year ago

can you tell me where precisely the snippet occurs in the notes?

(Note: the build server, which feeds stexmmt.mathhub.info with content, does 1. pdflatex 2. bibtex/biber 3. pdflatex 4. pdflatex 5. rustex 6. cleanup. So it perfectly reuses the generated files from pdflatex...)

kohlhase commented 1 year ago

the snippet is in /MathHub/MiKoMH/AI/source/logic/mod/SAT-phase-transitions.en.tex and that has a \libinput{postamble} at the end. So your explanation does not work.

Jazzpirate commented 1 year ago

Aha. Other question: Where are the bib files? ;)

Jazzpirate commented 1 year ago

I think the main issue is that you're using the kwarc bib repository which I haven't put anywhere on stexmmt.mathhub.info, so a lot of references (or maybe even all of them) should be broken. I can easily put them there, but this reveals a deeper issue, namely that gl.mathhub.info isn't really self-contained

kohlhase commented 1 year ago

Ah, that makes more sense. We should think about this carefully. We might fork the directory on gl.mathhub.info and keep it updated.

Jazzpirate commented 1 year ago

Indeed, the reference is also broken in the pdf on cortana.

In the future, the promised ideal sTeX DevOps Server should probably have a fork of the bib repo and have it be similarly extensible by others (has no one built a global bibtex library yet? :D )

kohlhase commented 1 year ago

yes please.

kohlhase commented 1 year ago

But what do we do before this paradise occurs?

Jazzpirate commented 1 year ago

probably just clone the repo on cortana and add it to BIBINPUTS...?

kohlhase commented 1 year ago

yes, that would be good. Note that MathHub/MiKoMH/lib/preamble.tex already has

\usepackage[hyperref=auto,style=alphabetic,backend=bibtex]{biblatex}
\addbibresource{kwarcpubs}
\addbibresource{extpubs}
\addbibresource{kwarccrossrefs}
\addbibresource{extcrossrefs}

That is something we can build on. We could just add the bibs into MathHub/meta/inf/lib/ via git subrepo and put that into BIBINPUTS.

Jazzpirate commented 1 year ago

that would be an alternative approach, and guarantee that MiKoMH is actually self-contained. One would just have to replace \æddbibresource by... what was it? \libaddbibresource? (Will need to check the sTeX sources again)

kohlhase commented 1 year ago

I like things to be self-contained, so let's pursue this. But I think that \libaddresource might not exist at the moment, and all the \lib* do not take MathHub/meta/inf into account (see #303)

kohlhase commented 1 year ago

should I just add the bibs into MathHub/meta/inf/lib?

Jazzpirate commented 1 year ago

I like things to be self-contained, so let's pursue this. But I think that \libaddresource might not exist at the moment, and all the \lib* do not take MathHub/meta/inf into account (see #303)

true, I'm also not a fan of "MathHub/Meta/inf" for the reasons outlined in #303 - but MiKoMH/meta-inf would work fine (and that's where all the citations are anyway)

kohlhase commented 1 year ago

there are a couple in smglom (Rudin:73 and so on) and some in mikoproblems. That's I wanted to get one level up.

Jazzpirate commented 1 year ago

Quote the documentation:

\stexcode"\addmhbibresource[Some/Archive]{some/file}" searches for a file like
      \stexcode"\mhinput" does, but calls |\addbibresource| to the result and looks for
      the file in the archive root directory directly, rather than the |source|
      directory. Typical invocations are

This unfortunately means that meta-inf is not considered in as far as it is (not) a math archive. But it means that we can have a dedicated "bibliographies" archive, or just put them in e.g. sTeX/meta-inf (which is a math archive) and in a dedicated bibs directory there

Jazzpirate commented 1 year ago

...I'd probably prefer the approach of a dedicated bibs math-archive... (as to not explode sTeX/meta-inf, since it contains the omdoc for the metatheory and those kinds of things. Probably a good idea to keep that one small-ish, since the IDE downloads it alongside MMT/urtheories when started for the first time)

kohlhase commented 1 year ago

I also dislike the sTeX/meta-inf approach. How about MathHub/meta/bibs for the dedicated bibs archive?

kohlhase commented 1 year ago

Then we could have a meta/inf/META-INF/MANIFEST.mf there, and meta/inf/source/kbibs/*.bibvia git subrepo (and maybe other general bibs over time.

kohlhase commented 1 year ago

or (alternatively) meta/inf/kbibs as a Math archive. I think I like this better.

kohlhase commented 1 year ago

and mention this in all the dependencies in the top-level MANIFEST.MF

Jazzpirate commented 1 year ago

Might as well call it kwarcbibs then - I'm not sure it makes sense to be short there, but that would work (except that gitlab will probably not allow for it, since meta/inf already exists as a repository rather than a group)

kohlhase commented 1 year ago

Ah, of course, then MathHub/meta/kwarcbibs I guess

kohlhase commented 1 year ago

done. I will now make the dependencies at least the one in MiKoMH

Jazzpirate commented 1 year ago

Then we can replace the \addbibresources in prelude by \addmhbibresource[meta/kwarcbibs]{source/kwarc.bib} and everything should work fine

kohlhase commented 1 year ago

I have added the dependency for MiKoMH/meta-inf/META-INF/MANIFEST.MF And I have adapted the MiKoMH/meta-inf/lib/preamble.texaccordingly Now you can do your magic on the server.

Jazzpirate commented 1 year ago

note that this will require restarting the buildserver, and then probably lots of fixing content errors ;)

kohlhase commented 1 year ago

I am aware. That is not a problem, we will probably do that before October 20. when I need the AI notes to look good :-)