First off thanks for the suggestions
it’s very much appreciated and sorry for late reply. And It’s definitely a solution or cool way to do a fix for the bibliography problem.
I’m split on doing a feature request as a solution to this might clash somewhat with what I could imagine or understand are the mindsets for typst structure, referencing other files, SOLID principles, idk, etc.
My interpretation of how to describe your solution “hack”:
Create a function that adds the bibliography isolated pages, if a bibliography isn’t present already. If the document already contains the bibliography or has more than one, use the “first/last” one only.
I’ve made a new project called “with fixes” with the suggestion implemented. However I’ve changed the code to use .after
so it’s the latest time which is used as primary, as the bibliography would be at the end of a document.
Link to typst document with fixes implemented
Also I couldn’t get your second and third suggestions with std.bibliography
to work, not sure why.
Benefits thoughts
I assume you meant “don’t really see the point” here. So I’ll try and first give some examples of what I can think of use for preview.
- Imagine 5 or 100 people working on a project online simultaneously, (elementary school class fx), then it can be nice to sit in ones own little world without having to be in a separate project.
- Having a section you don’t want to add yet to the primary document but still be able to work on it in isolation.
- Not having to scroll through the main document if people add new pages or stuff is moving.
Summarized, work on stuff isolated can be nice and preview can be a simple way to do so and still be able to ref elements from current project. So I won’t necessarily have many problems myself as I’m hopefully not too far from ending my studies. But I can see it being a really nice feature for collaborative work and something I would have liked or been pleased with throughout my studies.
Figure or label references (Second problem)
You @Andrew have already come up with a cool solution for the bibliography references problem, but there still remains a problem for figure references, which might be the biggest one I guess. Don’t want to ask more of you. So best of luck to if someone tries to solve it.
If accessing either the first or second document TestRefs With Fixes or TestRefs (original link), in conclusion.typ
file there is an example that the ref doesn’t work when viewed in preview / isolated to another file. Mostly with same reason for bibliography not working without the fix, as the ref is unavailable or missing from the file.
If however there was a good solution to this then the last of my two problems would be solved.
But i guess there no matter what might be a feature request or two for these two problems.