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

Add cheat sheets #7

Merged
merged 13 commits into from
May 22, 2024
Merged

Add cheat sheets #7

merged 13 commits into from
May 22, 2024

Conversation

djacu
Copy link
Member

@djacu djacu commented May 10, 2024

Adds a set of cheat sheets that can be printed and distributed.
Source is LaTeX and SVG files.

4 variants are available as the cartesian product of paper size and colors.
A4 vs Letter paper
Color vs Grayscale

nix flake show
git+file:///home/nunya/dev/nixos/marketing?ref=refs/heads/add-cheat-sheet&rev=f979dfda5b730407baa516007e831dbe25e8e369
└───packages
...
    └───x86_64-linux
        ├───cheat-sheet-a4-default: package 'nixos-cheat-sheet'
        ├───cheat-sheet-a4-print: package 'nixos-cheat-sheet'
        ├───cheat-sheet-letter-default: package 'nixos-cheat-sheet'
        └───cheat-sheet-letter-print: package 'nixos-cheat-sheet'

A4 paper in color
image

Letter paper in "grayscale/bw"
image

Note: There is no official NixOS logo that is monochromatic and dark (only white) so the colored version is used. This isn't a big deal as the primary purpose of the grayscale version is to remove the background color from the boxes to save ink.

@djacu
Copy link
Member Author

djacu commented May 10, 2024

Don't Merge Yet - debugging pygments/latex bug

image
image

@djacu
Copy link
Member Author

djacu commented May 10, 2024

Don't Merge Yet - debugging pygments/latex bug

image image

Fixed

@djacu
Copy link
Member Author

djacu commented May 11, 2024

@cab404
Wanted to let you know I used the header.svg that you submitted to the artwork repo as the background for the cheat sheet. :)

@cab404
Copy link
Member

cab404 commented May 11, 2024 via email

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/official-nix-language-cheat-sheet/45244/1

@cab404
Copy link
Member

cab404 commented May 12, 2024

A really nice cheatsheet!

It would probably be nice if grid lined up with logo, and filled the page completely.

@drupol
Copy link

drupol commented May 13, 2024

Here's a quick draft of something I did in the train this morning... took me less than 30 min:

https://typst.app/project/rAN-7MckqNuneSf0955nE4

I couldn't reproduce the nice box borders, I guess it would require a bit more time to do that.

I'm pretty sure that the footprint to build this document using Typst is much smaller than with LaTeX.

@djacu
Copy link
Member Author

djacu commented May 13, 2024

Here's a quick draft of something I did in the train this morning... took me less than 30 min:

https://typst.app/project/rAN-7MckqNuneSf0955nE4

I couldn't reproduce the nice box borders, I guess it would require a bit more time to do that.

I'm pretty sure that the footprint to build this document using Typst is much smaller than with LaTeX.

This is already a fantastic start!

@roberth
Copy link
Member

roberth commented May 13, 2024

This is really nice! I have very few suggestions:

  • You could add a doc comment (/** */) and perhaps sacrifice the general multiline comment to keep the brevity.

  • In bind set arguments, maybe show that defaults are not included, e.g.

    let
      f = args@{ x, y ? true }:
          assert y; builtins.attrNames args;
    in
      f { x = 1; }   # => returns ["x"]
  • Use args@ from the formatting RFC; probably has more suggestions. Run the new nixfmt?

@roberth
Copy link
Member

roberth commented May 13, 2024

purpose of the grayscale version is to remove the background color from the boxes to save ink.

Maybe call it "print" instead of grayscale? Achieving actual full grayscale is easy in print settings; otherwise I think a colored logo is nice.

@con-f-use
Copy link

I wouldn't bind an attribute set to the symbol set in didactic material. Ppl. just learning nix might think it's some magic keyword or something.

@djacu djacu merged commit b52cc9e into main May 22, 2024
@djacu djacu deleted the add-cheat-sheet branch May 22, 2024 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants