Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Source code for creating the LDMX logo with [Typst](https://typst.app/docs/).
## Set Up

#### Install `just`
`just` is used to share common recipes similar to how we use it for ldmx-sw development.
`just` is used to share common recipes similar to how we use it [for ldmx-sw development](https://ldmx-software.github.io/developing/getting-started.html#install-just).

#### Install `typst`
There are a bunch of ways to do this, so I'm just going to refer you to
Expand Down Expand Up @@ -46,11 +46,3 @@ The output is written into a file of the same name but with a different extensio
Specifically, I am using the Typst package [fletcher](https://typst.app/universe/package/fletcher/)
to create this logo as a "diagram". flecter uses [CeTZ](https://typst.app/universe/package/cetz/)
under-the-hood so that might be helpful for more fine-tuning as well.

## To Do
- [x] mimic original logo
- [x] control over colors of the different pieces (text, particles, background)
- [x] add prefix and suffix text
- [x] square page and center logo (e.g. for profile pictures)
- [x] different color DM from L and X (`dm-text-color` argument)
- [x] end electron on D (like in original?)
14 changes: 14 additions & 0 deletions logo.typ
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
/// dm-text-color: type color, default to text-color, color of the letters D and M in LDMX in logo
/// prefix: extra text to include in front of LDMX
/// suffix: extra text to be included after LDMX
/// un: for adding "un" in LunDMX above horizontal bar of the L
/// page-args: how to construct the page around the logo, default is no page
/// none or auto makes the page the same size and shape as the logo
/// "square" makes the page a square with the side length determined by the width of the logo
Expand All @@ -37,6 +38,7 @@
dm-text-color: auto,
prefix: none,
suffix: none,
un: none,
page-args: auto
) = context {

Expand Down Expand Up @@ -97,6 +99,18 @@
name: <L>,
layer: 1
),
node(
(1.07,0.4),
if type( un ) == content or un == none {
// Assume user knows what they are doing
un
} else {
text(size: 12pt, weight: "light", un )
},
shape: rect,
name: <un>,
layer: 1
),
node(
(0,0),
if prefix == none [] else if type(prefix) == str {
Expand Down
2 changes: 1 addition & 1 deletion test.typ
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#for (i, variation) in (
"bw", "bw-square", "mini-bw", "blue-on-white", "light-blue", "ldmx-sw",
"lundmx-bw", "bw", "bw-square", "mini-bw", "blue-on-white", "light-blue", "ldmx-sw",
"white-on-transparent", "umn", "ucsb", "stanford", "eg-all"
).enumerate() {
if i > 0 { pagebreak() }
Expand Down
2 changes: 2 additions & 0 deletions variations/lundmx-bw.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#import "/logo.typ": logo
#logo(un: "un")