#help me port MS Word thesis title to typst

72 messages · Page 1 of 1 (latest)

pliant kraken
#
#let titlepage() = {
  set block(above: 1pt, below: 1pt);
  
  v(1cm)

  v(5mm)
  align(center, text(16pt, weight: 600, "Uniwersytet Mikołaja Kopernika w Toruniu"))

  align(center, text(15pt, weight: 500, "Wydział Nauk Ekonomicznych i Zarządzania"))
  
  v(16mm)

  
  align(center, text(15pt, weight: 500, "Emilia Grzybicka"))
  align(center, text(12pt, weight: 400, "nr albumu: 314 368"))
  align(center, text(12pt, weight: 400, "kierunek: zarządzanie"))
  v(10mm)
  align(center, text(1.3em, weight: 500, "Praca licencjacka"))
  v(15mm)
  align(center, text(18pt, weight: 700, "Kreowanie marki artystycznej na przykładzie znanych zespołów muzycznych"))
  v(15mm)

  align(end, move(dx: -73pt, text(13pt, weight: 500, "Opiekun pracy dyplomowej")))
  align(end, text(13pt, weight: 500, "Dr hab. Dorota Grego-Planer, prof. UMK"))
  

  v(1fr)
  
  align(center, text(13pt, weight: 500, "Toruń 2024"))

  pagebreak()
}

current code

\/ ---- that's what it should look like according to the guidelines, but all they provided was ms word document

#

currently it lloks like this:

leaden yarrow
#

What about {set align(…); …}?

#

Also note, that that mixture of absolute & size dependent (@ text(1.3em, weight: 500, "Praca licencjacka")) lengths hinders comprehensibility and leads to unintended proportions with a changed size.

#

Furthermore, I'd recommend against move() in such case generally regarding cleanness/maintainability as well as concretely regarding the rendering outcome produced with the concrete delta.

pliant kraken
#

this is a one-time rodeo

leaden yarrow
#

?

pliant kraken
#

it's a front page for a thesis

#

so that's why I think hacks are acceptable

#

problem is allegedly this needs to be 1:1 exactly the same for everyone

#

including the thing I achieved with move

#

I don't think it follows any layout

#

or maybe it's a block...

#

ok wait I can do it with a block

leaden yarrow
pliant kraken
#

?r
` #set page(
paper: "a4",
numbering: "1",
number-align: center
)

set block(above: 1pt, below: 1pt);
set text(font: "Lato")

v(1cm)

v(5mm)
align(center, text(16pt, weight: 600, "Uniwersytet Mikołaja Kopernika w Toruniu"))

align(center, text(15pt, weight: 500, "Wydział Nauk Ekonomicznych i Zarządzania"))

v(16mm)

align(center, text(15pt, weight: 500, "Emilia Grzybicka"))
align(center, text(12pt, weight: 400, "nr albumu: 314 368"))
align(center, text(12pt, weight: 400, "kierunek: zarządzanie"))
v(10mm)
align(center, text(1.3em, weight: 500, "Praca licencjacka"))
v(15mm)
align(center, text(18pt, weight: 700, "Kreowanie marki artystycznej na przykładzie znanych zespołów muzycznych"))
v(15mm)

align(end, block(width: 50%, stack([
#text(13pt, weight: 500, "Opiekun pracy dyplomowej"),
#text(13pt, weight: 500, "Dr hab. Dorota Grego-Planer, prof. UMK")
])))

v(1fr)

align(center, text(13pt, weight: 500, "Toruń 2024"))`

leaden yarrow
#

Consider asking a concrete question / narrowing down the topic to a concrete focus when you're not up to general feedback.

pliant kraken
#

how do I make it look 1:1 the same as on the screenshot, that is the questoin

#

feedback about code style is fine but you see - the people who are gonna be grading this paper are not gonna see the code

leaden yarrow
#

The theme on here is voluntary technical support / capacity building, not ancillary work.

pliant kraken
#

oh that's what you meant

#

well so for a start help me run this bot

#

so we can communicate normally not via screenshots

#

and then the problem is line height, I'm unable to manipulate it at all it seems

#

this

  set block(above: 1pt, below: 1pt);

changes nothing

leaden yarrow
pliant kraken
#

?help render

daring elmBOT
#

?render

Render Typst code as an image.

Render the given code as an image.

Syntax: ?render [pagesize=<page size>] [theme=<theme>] <code block> [...]

Flags

  • pagesize can be preview (default), auto, or default.

  • theme can be dark (default), light, or transparent.

To be clear, the full default preamble is:

// Begin preamble
// Page size:
#set page(width: 300pt, height: auto, margin: 10pt)
// Theme:
#set page(fill: rgb(49, 51, 56))
#set text(fill: rgb(219, 222, 225))
// End preamble

To remove the preamble entirely, use pagesize=default theme=transparent.

Examples

?render `hello, world!`

?render pagesize=default theme=light ``‍`
= Heading!

And some text.

#lorem(100)
``‍`

?render `#myfunc()` I don't understand this code, can anyone help?
Parameters:
flags   (required) Flags
code    (required) Code to render
rest    (required) Extra message content
pliant kraken
#

could you screenshot me contents of your input field for a minimal bot rendering command?

leaden yarrow
pliant kraken
#

yeah but all align entries are blocks

#

so someone told me that just doing this set block line should do the trick

leaden yarrow
pliant kraken
#

?r

#set text(fill: black)
#rect(
      radius: 8pt,
      fill: rgb("#4477aa"),
      [
        #lorem(9)
      ]
    )
    #box(inset: 4pt,
    [
      - #lorem(5)
      - #lorem(8)
      - #lorem(4)
      - #lorem(9)
    ])
leaden yarrow
pliant kraken
#

?render ```
set block(above: 1pt, below: 1pt);
set text(font: "Lato")

v(1cm)

v(5mm)
align(center, text(16pt, weight: 600, "Uniwersytet Mikołaja Kopernika w Toruniu"))

align(center, text(15pt, weight: 500, "Wydział Nauk Ekonomicznych i Zarządzania"))

v(16mm)

align(center, text(15pt, weight: 500, "Emilia Grzybicka"))
align(center, text(12pt, weight: 400, "nr albumu: 314 368"))
align(center, text(12pt, weight: 400, "kierunek: zarządzanie"))
v(10mm)
align(center, text(1.3em, weight: 500, "Praca licencjacka"))
v(15mm)
align(center, text(18pt, weight: 700, "Kreowanie marki artystycznej na przykładzie znanych zespołów muzycznych"))
v(15mm)

align(end, block(width: 54%, [
#align(left, text(13pt, weight: 500, "Opiekun pracy dyplomowej\nDr hab. Dorota Grego-Planer, prof. UMK")),
]))

v(1fr)

align(center, text(13pt, weight: 500, "Toruń 2024"))

pliant kraken
#

screenshots it is

#

back to the original question - well the spacing between those lines is too big

#

it's the last thing I need to do and I can go to sleep

#
#let titlepage() = {
  set block(above: 1pt, below: 1pt);
  set text(font: "Lato")
  
  v(1cm)

  v(5mm)
  align(center, text(16pt, weight: 600, "Uniwersytet Mikołaja Kopernika w Toruniu"))

  align(center, text(15pt, weight: 500, "Wydział Nauk Ekonomicznych i Zarządzania"))
  
  v(16mm)

  
  align(center, text(15pt, weight: 500, "Emilia Grzybicka"))
  align(center, text(12pt, weight: 400, "nr albumu: 314 368"))
  align(center, text(12pt, weight: 400, "kierunek: zarządzanie"))
  v(10mm)
  align(center, text(1.3em, weight: 500, "Praca licencjacka"))
  v(15mm)
  align(center, text(18pt, weight: 700, "Kreowanie marki artystycznej na przykładzie znanych zespołów muzycznych"))
  v(15mm)

  align(end, block(width: 54%, [
    #align(left, text(13pt, weight: 500, "Opiekun pracy dyplomowej\nDr hab. Dorota Grego-Planer, prof. UMK")),
  ]))
  

  v(1fr)
  
  align(center, text(13pt, weight: 500, "Toruń 2024"))

  pagebreak()
}

leaden yarrow
pliant kraken
#

(what postfix do you use to syntax highlight typst?)

leaden yarrow
pliant kraken
#

sure

#

so do you know what could I try to manipulate the spacing between those lines?

pliant kraken
#

no, this is on topic

#

look at this thread's topic I mean - I'm trying to make 1 document look like another document

#

and this is me going in depth - the more specific issue is line spacing

leaden yarrow
#

Sure.

pliant kraken
#

I am aware that typst doesn't use line height, but there must be a way to manipulate it?

pliant kraken
#

ok I tried that

leaden yarrow
#

So p.e. #set par(leading: 0.55em).

pliant kraken
#

both that and block

#
#let titlepage() = {
  set block(above: 1pt, below: 1pt);
  set par(leading: 6pt);
  set text(font: "Lato")
  
  v(1cm)

  v(5mm)
  align(center, text(16pt, weight: 600, "Uniwersytet Mikołaja Kopernika w Toruniu"))

  align(center, text(15pt, weight: 500, "Wydział Nauk Ekonomicznych i Zarządzania"))
  
  v(16mm)

  
  align(center, text(15pt, weight: 500, "Emilia Grzybicka"))
  align(center, text(12pt, weight: 400, "nr albumu: 314 368"))
  align(center, text(12pt, weight: 400, "kierunek: zarządzanie"))
  v(10mm)
  align(center, text(1.3em, weight: 500, "Praca licencjacka"))
  v(15mm)
  align(center, text(18pt, weight: 700, "Kreowanie marki artystycznej na przykładzie znanych zespołów muzycznych"))
  v(15mm)

  align(end, block(width: 54%, [
    #align(left, text(13pt, weight: 500, "Opiekun pracy dyplomowej\nDr hab. Dorota Grego-Planer, prof. UMK")),
  ]))
  

  v(1fr)
  
  align(center, text(13pt, weight: 500, "Toruń 2024"))

  pagebreak()
}

#

as you can see I'm overriding both what you suggested and block

#

all that changes is that single line which wraps

#

but this is still wrong and doesn't move an inch

#

here's what it looks like in MS Word for reference

leaden yarrow
#

For me, block() adjusts the spacing:, as it's inter-paragraph, not intra-paragraph.

pliant kraken
#

So to make it clear, I'm not asking anyone to write it for me, but I'm asking how to do this one seemingly basic thing, I'm new to typst you see

leaden yarrow
#

Could #quick-questions message be your issue?

pliant kraken
#

oh those are links to actual messages

#

not to the channel

#

that changes everything, let me click on all of those you posted first

#

yeah this did the trick, thank you