Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF generation via Typst #49

Open
rikhuijzer opened this issue Apr 24, 2024 · 6 comments
Open

PDF generation via Typst #49

rikhuijzer opened this issue Apr 24, 2024 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@rikhuijzer
Copy link

rikhuijzer commented Apr 24, 2024

I have published once in The Journal of Open Source Software and remember that it wasn't very easy to get LaTeX working. I'm on an ARM MacOS system and there the docker image required at least 10 GB of RAM and the build was very slow (#30).

I'm currently working on writing my PhD thesis in typst. It has been a great experience. Compilation takes about 100ms compared to the typical multiple seconds that LaTeX takes. Also, I converted my JOSS paper to typst with little effort. Apart from a few minor things, which could often be easily solved by writing some typst code, I have gotten everything to work. Things that I can confirm that are now working, and related to openjournals, are references via BibTeX, page numbers, code examples with syntax highlighting, inclusion of images, setting alternative headers/footers, and tables. These features all work out-of-the-box. No need to install extra dependencies in typst.

Since openjournals is the most cutting edge publisher that I know, especially with regards to open source software, maybe typst could be included as an (alternative) back end for the publishing system? This could make it easier for authors to submit their papers to openjournals.

@tarleb
Copy link
Collaborator

tarleb commented Apr 25, 2024

This is currently not on the roadmap: Typst doesn't support PDF/A yet, but we consider conformance to that archiving standard a requirement.

@tarleb tarleb closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2024
@rikhuijzer
Copy link
Author

Typst 0.12 can now "emit files that comply with the PDF/A-2b profile." (source: https://typst.app/blog/2024/typst-0.12/)

@tarleb
Copy link
Collaborator

tarleb commented Oct 19, 2024

Neat! We'll need a template for Typst, or at least a layout that could be adapted. Then it'll become a real option.

Reopening

@tarleb tarleb reopened this Oct 19, 2024
@tarleb tarleb changed the title Typst PDF generation via Typst Oct 23, 2024
@tarleb tarleb added the help wanted Extra attention is needed label Oct 23, 2024
@rowanc1
Copy link

rowanc1 commented Oct 24, 2024

We are going through this for SciPy at the moment, and have switched to typst:

This is an example of @JBorrow's paper (an editor in JOSS!):

image

main (1).pdf

@tarleb
Copy link
Collaborator

tarleb commented Oct 24, 2024

Wow, that looks really nice! Is the source code available somewhere?

@rowanc1
Copy link

rowanc1 commented Oct 24, 2024

There is an example in there that is pure typst:

https://github.com/myst-templates/scipy

That is autogenerated from myst markdown though (which also does jats!).

The online article is here:

https://proceedings.scipy.org/articles/HWGA5253

Which has all sorts of nice reading features like hover previews etc.

image

Source for the paper:
https://github.com/scipy-conference/scipy_proceedings/blob/2024/papers/josh_borrow/paper.md

In the process of doing PDFs at the moment, and will likely have the full examples in that repo by the end of the week.

basically adding this to the myst.yml if you want to try it out before then:

  exports:
    - format: typst
      template: scipy
      article: main.md      

docs for mystmd are here:

https://mystmd.org/guide/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants