#Prototyping a template for my notes
31 messages ยท Page 1 of 1 (latest)
#let mathbox(opt,number, body) = {
v(15pt)
block(
radius: 5pt,
width: 100%,
stroke: 1pt,
inset: 0pt,
fill: none,
breakable: true
)[
#place(
top + left,
dx: 10pt,
dy: -10pt,
rect(
radius: 5pt,
stroke: 1pt ,
inset: 8pt,
fill: white
)[
#text( weight: "bold")[#opt #number]
]
)
#pad(
top: 2em,
left: 1em,
right: 1em,
bottom: 1em
)[
#text()[#body]
]
]
}
#let theorem(number, body) = mathbox("Theorem", number,body)
yeah its custom thats the base code and one example
Cetz for figures I assume ? Or maybe the package for plotting
actually i used desmos to plot the graphs and pulled the conic images from google
Then chucked it into excalidraw and drew over them
oh okay I see !
this looks really cool
did you redefine white to be the background color of your page?
after realising most people dont use neovim
#set page(fill: <color> )
also seems to work
@twilit prairie you seem to produce good looking document ... i sometimes struggle make something look slick and enjoyable to watch. Do you have some tricks / guidelines to follow that usually does the trick for you ?
In typst right now, I feel like it is really easy to make "ok" looking document. It needs a lot of pratice and typst knowledge to make really good looking document.
Any chance for sharing the template?
i mean im no expert but what ive found is generally keep consistent with whatever style you are going for. In my case i went black and white with rounded corners. But if you want to add colours make sure they are used deliberately.
Also make sure your content is spaced out so it doesn't look cramped on the page.
Id advise getting a sans serif font in my case is fira math
also if you cant make a design that you like, look online and get inspiration then tweak it to your liking
for example this is Giles Castels maths notes and you can see that he went with more colour and a bigger margin but it still looks uniform
soon, just making sure im happy with it myself
ill tag you here once its on github
Thanks for the answer ๐
it looks fantastic
Thanks!
@twilit prairie Definitely do a template on Typst Universe, I would love to try it for some of my note ! The show case pdf is very clear and detailed to understand all the functions you have think of !
For printing especially the template seems great (for courses for student of think like that) since you don't use any colors accent
yeah im planning to publish it after i finish my exams
thats why i did it black and white it was just a lot easier (and cheaper) to print out in black and white
Going back to this code. This looks great and I have made similar code for boxes with some title.
However I still see this issue that I cannot fix :
- having a breakable box (useful otherwise end of page are regularly empty)
- never having the title alone at the end of a page
i had this problem aswell i just ended up putting a linebreak above cos im lazy
also sorry for the late reply is was abroad
I have juste see the "sticky" parameter of the block fonction ... I think there is something to do with that ๐ค
is there a latec alternative for those callout boxes?
i dont actually know latex but i threw it into chatgpt
\documentclass{article}
\usepackage[most]{tcolorbox}
\usepackage{lipsum} % for dummy text, optional
% Define a general mathbox command
\newtcolorbox{mathbox}[3][]{
enhanced,
breakable,
colframe=black,
colback=white,
sharp corners,
boxrule=1pt,
arc=5pt,
left=1em,
right=1em,
top=2em,
bottom=1em,
title={\textbf{#2~#3}},
attach boxed title to top left={yshift=-10pt, xshift=10pt},
boxed title style={
colback=white,
colframe=black,
boxrule=1pt,
arc=5pt,
left=8pt,
right=8pt,
},
#1
}
% Define theorem as a mathbox with fixed label
\newenvironment{theorem}[2][]{
\begin{mathbox}[#1]{Theorem}{#2}
}{
\end{mathbox}
}
\begin{document}
\begin{theorem}{1}
Let $f$ be continuous on $[a,b]$. Then there exists $c \in (a,b)$ such that
\[
f'(c) = \frac{f(b)-f(a)}{b-a}.
\]
\end{theorem}
\end{document}
lmk if that works