2025-05-12 - Marketing Team Minutes

Marketing Team meeting 2025-05-12

Attendance

Previous Tasks

Agenda

  • Author metadata
  • Landing page PR
  • Redesign doc
  • Website
  • Newsletter
  • Branding

Minutes

  • Author metadata
    • @avocadoom is there anything else we want to add like email?
    • @djacu how about a handle?
    • @avocadoom like a discourse handle?
    • @djacu yeah we use it elsewhere on the website like for teams.
  • Landing page PR
  • Redesign doc
    • @djacu we were still waiting for who to comment? Oh right community post!
    • @idabzo I will comment that we are still waiting for feedback and will wrap up the thread in 1 week or do you think we should wrap up now?
    • @avocadoom I think people will be angry if we wrap up right now.
    • @idabzo Okay 1 more week then.
  • Website
    • @djacu any other website topics?
    • @avocadoom there was a PR I reviewed today that improved the installation commands but not much else.
  • Newsletter
    • @idabzo working on an article that captures everything in May and will publish it in June.
  • Branding
    • @djacu lots of progress this past week.
      • Big refactor to re-organize things.
        packagesFromDirectoryRecursive is amazing.
        No long need to pass individual derivations around but can use the recursive scopes.
        Removes a lot of repetition.
      • Found out that typst and typix do not produce deterministic PDF files.
      • Clearspace imagery is almost done.
    • @avocadoom can we start using the new logos on the website now?
    • @djacu give me one more week to make a better media kit

Tasks

Backlog

  • @djacu will work on the banner post
  • @djacu will gradually begin planning the Survey 2025

repo link

3 Likes

Found out that typst and typix do not produce deterministic PDF files.

Care to elaborate? I never had that issue and the Typst team made the Typst output reproducible quite a while ago.

Sure. To preface, they are effectively the same but not byte-for-byte equal. What tipped me off was seeing this message when trying to use --rebuild.

error: derivation ‘/nix/store/hfw047mh689zmhkfxqzlql7aa0cfcijk-nixos-branding-guide-0.1.0.drv’ may not be deterministic: output ‘/nix/store/32l2sg2dgls390s1ab2w739vigr9vyhj-nixos-branding-guide-0.1.0’ differs

So I reran the build with --keep-failed and compared the default output with the .check output like so.

diff <(strings guide.pdf) <(strings guide.check.pdf)

I found that the data under ExtGState was always in random order. It is a bunch of lines that look like this.

359,361d358
<       /gs3 44 0 R
<       /gs4 45 0 R
<       /gs2 43 0 R
363a361,363
>       /gs2 43 0 R
>       /gs3 44 0 R
>       /gs4 45 0 R
677d676
<       /gs0 48 0 R
679c678
<       /gs4 52 0 R
---
>       /gs0 48 0 R
680a680
>       /gs4 52 0 R
875a876
>       /gs4 59 0 R
878d878
<       /gs4 59 0 R
1111,1115d1110
<       /gs12 74 0 R
<       /gs4 66 0 R
<       /gs11 73 0 R
<       /gs0 62 0 R
<       /gs10 72 0 R

This also causes the metadata and ID field under the trailer to be different.

< " id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="xmp-writer"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"  xmlns:xmp="http://ns.adobe.com/xap/1.0/"  xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"  xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/"  xmlns:pdf="http://ns.adobe.com/pdf/1.3/" ><xmp:CreatorTool>Typst 0.13.1</xmp:CreatorTool><xmpMM:DocumentID>icpaYlmcOQasYe+o+lxrYQ==</xmpMM:DocumentID><xmpMM:InstanceID>icpaYlmcOQasYe+o+lxrYQ==</xmpMM:InstanceID><dc:format>application/pdf</dc:format><pdf:PDFVersion>1.7</pdf:PDFVersion><dc:language><rdf:Bag><rdf:li>en</rdf:li></rdf:Bag></dc:language><xmpTPg:NPages>21</xmpTPg:NPages><xmpMM:RenditionClass>proof</xmpMM:RenditionClass></rdf:Description></rdf:RDF></x:xmpmeta><?xpacket end="r"?>
---
> " id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="xmp-writer"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"  xmlns:xmp="http://ns.adobe.com/xap/1.0/"  xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"  xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/"  xmlns:pdf="http://ns.adobe.com/pdf/1.3/" ><xmp:CreatorTool>Typst 0.13.1</xmp:CreatorTool><xmpMM:DocumentID>hhjbhuevHbRxGk/XhBoigw==</xmpMM:DocumentID><xmpMM:InstanceID>hhjbhuevHbRxGk/XhBoigw==</xmpMM:InstanceID><dc:format>application/pdf</dc:format><pdf:PDFVersion>1.7</pdf:PDFVersion><dc:language><rdf:Bag><rdf:li>en</rdf:li></rdf:Bag></dc:language><xmpTPg:NPages>21</xmpTPg:NPages><xmpMM:RenditionClass>proof</xmpMM:RenditionClass></rdf:Description></rdf:RDF></x:xmpmeta><?xpacket end="r"?>
7064c7064
<   /ID [(icpaYlmcOQasYe+o+lxrYQ==) (icpaYlmcOQasYe+o+lxrYQ==)]
---
>   /ID [(hhjbhuevHbRxGk/XhBoigw==) (hhjbhuevHbRxGk/XhBoigw==)]

I used qpdf to remove the metadata, linearize the PDF, and create a new deterministic trailer ID. That almost fixed it but the trailer ID was still different. The trailer ID has two IDs. The first is created upon PDF generation and never changes. The second is initially the same as the first but updates when the PDF changes. So after my fixes, the second ID matched but the first ID was still different. I then used cpdf to initially remove the trailer ID before passing it to qpdf to perform the same aforementioned fixes and then it was deterministic.

Modifications to typix can be found in this file.

Where were added on this commit.

3 Likes

@loqusion you might be interested in the post above. Or maybe you can tell me about some really obvious option I forgot to enable. :stuck_out_tongue:

Perhaps it is an issue with the document date ?

As I’ve shown in the post above, it is not an issue with the date. I had already added the following line to the top of my typst file to prevent the creation date being included in the output PDF.

#set document(date: none)

The problem is with how graphical attributes are added to the PDF. They should and could very easily be linearized but for some reason were not.

I’ll ping the Typst team today about that.

1 Like

Could you provide a minimal Typst reproducer ?

This branch

Here is a permalink to the file

to build the guide the first time

nix build .#nixos-branding.nixos-branding-guide

to keep the output when you try to rebuild

nix build .#nixos-branding.nixos-branding-guide --rebuild --keep-failed

*Edit: It needs to be built with Nix because it pulls in images from derivations. Trying to build the typst document by itself will not work.

I’d give you files but I cannot upload anything besides image and video files to discourse.

Do you think you could provide a simpler document without images (or other resources) where the issue could be reproduced?

The issue is with imagery. I could prepare a test repository with imagery.

That would help indeed! Thank you.

Here is a test repo.

  1. nix develop to get typst.
  2. ./compare.sh to build the pdf twice and compare the outputs
  3. You should see an about similar to this, but slightly different because the order of the gsX elements is random.
 ./compare.sh 
366a367
>       /gs3 29 0 R
367a369
>       /gs2 28 0 R
370,371d371
<       /gs2 28 0 R
<       /gs3 29 0 R
732c732
< " id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="xmp-writer"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"  xmlns:xmp="http://ns.adobe.com/xap/1.0/"  xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"  xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/"  xmlns:pdf="http://ns.adobe.com/pdf/1.3/" ><xmp:CreatorTool>Typst 0.13.1</xmp:CreatorTool><xmpMM:DocumentID>CyVHA/nHWS/eH3VMhJoKZQ==</xmpMM:DocumentID><xmpMM:InstanceID>CyVHA/nHWS/eH3VMhJoKZQ==</xmpMM:InstanceID><dc:format>application/pdf</dc:format><pdf:PDFVersion>1.7</pdf:PDFVersion><dc:language><rdf:Bag><rdf:li>en</rdf:li></rdf:Bag></dc:language><xmpTPg:NPages>6</xmpTPg:NPages><xmpMM:RenditionClass>proof</xmpMM:RenditionClass></rdf:Description></rdf:RDF></x:xmpmeta><?xpacket end="r"?>
---
> " id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="xmp-writer"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"  xmlns:xmp="http://ns.adobe.com/xap/1.0/"  xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"  xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/"  xmlns:pdf="http://ns.adobe.com/pdf/1.3/" ><xmp:CreatorTool>Typst 0.13.1</xmp:CreatorTool><xmpMM:DocumentID>5wTrGohFrTk9OU2BzWw3WQ==</xmpMM:DocumentID><xmpMM:InstanceID>5wTrGohFrTk9OU2BzWw3WQ==</xmpMM:InstanceID><dc:format>application/pdf</dc:format><pdf:PDFVersion>1.7</pdf:PDFVersion><dc:language><rdf:Bag><rdf:li>en</rdf:li></rdf:Bag></dc:language><xmpTPg:NPages>6</xmpTPg:NPages><xmpMM:RenditionClass>proof</xmpMM:RenditionClass></rdf:Description></rdf:RDF></x:xmpmeta><?xpacket end="r"?>
797c797
<   /ID [(CyVHA/nHWS/eH3VMhJoKZQ==) (CyVHA/nHWS/eH3VMhJoKZQ==)]
---
>   /ID [(5wTrGohFrTk9OU2BzWw3WQ==) (5wTrGohFrTk9OU2BzWw3WQ==)]

If you comment out line 42:

  #image("./nixos-lambda-dimensioned-linear.svg")

And run the compare.sh script again, you should see no output meaning the files are the same.

I even tried reducing the main.typ file down to just this:

// Date must be set to none for deterministic builds
#set document(date: none)
#set page("a4", flipped: true)

#image("./nixos-lambda-dimensioned-linear.svg")

and it still compiles differently each time.

I’ve been told that this issue might have been fixed upstream, I will see if I can test this during the weekend. Tip: they have a flake in their repo if you feel like testing it by yourself in the meantime.

1 Like

This has certainly been fixed upstream! It even fixes some new inconsistencies I found when adding new SVG files. Thanks for investigating this @drupol. I’ll be happy to upgrade once they cut a new release.

3 Likes