Colorful and organised cheatsheet template for Typst that allows you to make a overview of learning notes. Only one or few pages can cover all content about what you want to review and what you need to explore. This way make it convenient to the way of learning one technology and then getting a cheat sheet, and go on.
Usage
To build this project via the CLI, use the command
1
typst init @preview/cheat-sheet
A sample project will be created with the template format.
Configuration
cheatsheet config
This template exports the cheatsheet function using the a4 page with the following named optional arguments:
title: Title of document (Default = “”)
homepage: Homepage of author (Default = “”)
authors: Author Name (Default = “”)
write_title: Writes Title (Default = false)
title-align: Position of titles (Default = center)
title-number: Whether to numbered the title (Default = true)
title-delta: Fonts delta for title scaling (Default = 1pt)
scaling-size: Whether to scale the titles (Default = false)
font_size: Size of font (Default = 5.5pt)
line_skip: Size of line-skip (Default = 5.5pt)
x_margin: Margin on x-axis (Default = 30pt)
y_margin: Margin on y-axis (Default = 0pt)
num_columns: Number of columns (Default = 5)
column_gutter: Space between columns (Default = 4pt)
numbered_units: Numbering of units (Default = false)
cheatsheet_scaling config
In this template we add the extral parameters to adjust the page size and keep other parameters same.
page-w: The width of page (Default = auto)
page-h: The height of page (Default = auto)
concept-block
This is a bounding box with automatical colors according to top level titles that can hold any text and image.
body: Content to write (Required)
alignment: Alignment of content (Default = start)
width: Width of bounding box (Default = 100%)
fill_color: Filling color of bounding box (Default = white)
line title
This is a style placing subtitle in the middle of a colored line drawing more attention.
If you are looking for a well organized template to record your daily things but hope there hasn’t too complex language and content, One-sentence Log is just what you seek for.
It has the automatical month-related colors and well designed style of line titles. For setting up the life goals and daily ticks, we designed two styles for them with automatical numbered sequence.
We have the month titles in colored box and week content in bounding box. For daily log, we ultilized the line titles to split the content betweeen days.
Usage
Month Colors
Based on the template, we just predefined some colors which are the symbol of each month from January to December.
% for month color \newcommand{\monthcolor}[1]{% \ifcase#1 \or v3% January \or r2% February \or v2% March \or g1% April \or g2% May \or b1% June \or b3% July \or o2% August \or o1% September \or o3% October \or y2% November \or b2% December \else black% \fi }
Using the above command we can choose the month color by the month number as follows.
1
\monthcolor{3} % chosing the color of March
Year Header
For the year title we add the shadow to text and show it in the very huge style.
1 2 3 4 5 6 7 8
% for year title \newcommand{\yearheader}[1]{% \noindent\centering {\shadowtext{% \Huge\bfseries\itshape#1% }}\par \vspace{1em} }
Month Title
To emphsize the months we embed the month title in the colored box with the month specific color.
The command needs two parameters including the month color and month title. Usage is very simple as follows.
% for month title \newtcolorbox{monthtitlebox}[1]{ enhanced, colback=#1, coltext=b, boxrule=0pt, frame hidden, arc=2pt, width=\columnwidth, left=3pt, right=3pt, top=1pt, bottom=1pt, }
% --- Month title \newcommand{\monthtitle}[2]{% \begin{monthtitlebox}{#1} {\centering\textit{\textbf{\large#2}}\par} \end{monthtitlebox} \par\normalfont\normalcolor\raggedright }
Concept Box
Bounding Box is very dedicated to show some content to be focused on.
For week titles, we use the concept box to cover one week logs. The envident effect of splitting is very to distinguish different weeks for better looking.
As the month titles, the concept box also needs the week color which is same as the month color and the week color.
Command Using Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14
\begin{conceptbox}[\monthcolor{3}]{Week 1: 了解研究方向} \nc[\monthcolor{3}]{February 14} \taskitem{Y}{Read \textit{Gaussian Head Avatar: Ultra High-fidelity Head Avatar via Dynamic Gaussians};} \taskitem{Y}{Read 《三维人脸成像及重建技术综述》and summary;} \nc[\monthcolor{3}]{February 18} \taskitem{Y}{Set up data collection and processing pipeline—VHAP;}
\nc[\monthcolor{3}]{February 19} \taskitem{Y}{Read \textit{Learning a model of facial shape and expression from 4D scans} and make a summary}
\nc[\monthcolor{3}]{February 20} \taskitem{Y}{Finished configuring the experimental environments and training pipelines—GaussianAvatar;} \end{conceptbox}
% Concept Box \newtcolorbox{conceptbox}[2][]{ breakable, vfill before first=false, segmentation at break=false, size=fbox, colback=w, title=\scriptsize\textbf{#2}, left=2pt, right=2pt, top=3pt, bottom=1pt, boxrule=1pt, coltitle=b, colupper=b, pad at break=5pt, toprule at break=4pt, bottomrule at break=0.75pt, colframe=#1, enlargepage=12in, before upper*={\setlength{\baselineskip}{0.75em}\setlength{\parskip}{0em}} }
Line Title
Another classic style of titles is one single colored line with the title placed in the middle.
In the One-sentence Log we also add this style for showing the date of each day.
Just as the above, the commond also needs two parameters, line color and line titles.
In the One-sentence Log we add the todo configuration for recording the daily tasks. For optimazition and convenience, the numbered style has been designed for automation.
By means of the task number, we can bind the todo number with command of line title. When we use the line title command to start a new day, the task couter will be set to zero.
For the task tag showing the finishment or not, we add a sign in the front of task and then is the task title.
% for todo \newcounter{tasknumber} % define tasknumber \newcommand{\taskreset}{\setcounter{tasknumber}{0}} % reset tasknumber \newcommand{\taskitem}[2]{% \ifnum\value{tasknumber}>0\par\fi% if not first item, add a new line \stepcounter{tasknumber}% \noindent\textbf{\thetasknumber.}~% \ifthenelse{\equal{#1}{Y}}% {\textcolor{green!60!black}{$\checkmark$}~} {\textcolor{red}{$\times$}~}% #2 }
Goal List
However, for the goals we just want to show them but not to add any tag. And if needs, we also want to add the subgoal as the second order.
That’s a little different and need to redesign the configuration. And more specially, it needs the command \goalreset to clear the counter.