Skip to content

Instantly share code, notes, and snippets.

@fearsum-fyz
Last active November 18, 2025 07:18
Show Gist options
  • Select an option

  • Save fearsum-fyz/4cb7a79e5fef87c86eaeb147f1af4204 to your computer and use it in GitHub Desktop.

Select an option

Save fearsum-fyz/4cb7a79e5fef87c86eaeb147f1af4204 to your computer and use it in GitHub Desktop.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{fyz}[2025/09/20 v1.2 pink kawaii theme]
\RequirePackage[utf8]{inputenc}
\RequirePackage{tikz}
\RequirePackage{enumitem}
\RequirePackage{titlesec}
\RequirePackage{amsmath, amssymb, amsthm}
\RequirePackage[most]{tcolorbox}
\RequirePackage{xcolor}
\RequirePackage{xparse}
\RequirePackage{parskip}
\definecolor{bb-pink}{HTML}{FF80B5}
\definecolor{bb-rose}{HTML}{FFC2D1}
\definecolor{bb-blush}{HTML}{FFE5EC}
\definecolor{bb-lilac}{HTML}{EBD4FF}
\definecolor{bb-cream}{HTML}{FFF7FB}
\definecolor{bb-ink}{HTML}{2B1520}
\definecolor{bb-claimbg}{HTML}{B3EBF2}
\definecolor{bb-claimborder}{HTML}{0006B1}
\definecolor{bb-claimup}{HTML}{00001A}
\definecolor{bb-qed}{HTML}{FF0000}
\definecolor{bb-pagebg}{HTML}{F5C4D8}
\definecolor{bb-enum}{HTML}{FF5CA8}
\definecolor{bb-enum1}{HTML}{FFC7E1}
\definecolor{bb-enum2}{HTML}{D9C2FF}
\definecolor{bb-sparkleone}{HTML}{FFF6B7}
\definecolor{bb-sparkletwo}{HTML}{FFD6E0}
\definecolor{HeadingPink}{HTML}{FF35BF}
\definecolor{cd75d72}{RGB}{215,93,114}
\definecolor{cf29caf}{RGB}{242,156,175}
\definecolor{c77b255}{RGB}{119,178,85}
\definecolor{c553788}{RGB}{85,55,136}
\definecolor{c9266cc}{RGB}{146,102,204}
\definecolor{caa8dd8}{RGB}{170,141,216}
\definecolor{c744eaa}{RGB}{116,78,170}
\definecolor{cffc9c2}{RGB}{255,201,194}
\definecolor{cfea793}{RGB}{254,167,147}
\definecolor{c591200}{RGB}{89,18,0}
\pagecolor{bb-pagebg!31}
\renewcommand{\qedsymbol}{\textcolor{bb-qed}{\(\heartsuit\)}}
\newcommand{\bbheart}{\textcolor{bb-pink}{\(\heartsuit\)}}
\tcbset{
bb-base-style/.style={
enhanced,
breakable,
fonttitle=\bfseries\sffamily,
fontupper=\normalsize,
coltitle=bb-ink,
colback=bb-cream,
colbacktitle=bb-rose!65!white,
colframe=bb-pink!90!black,
coltext=bb-ink,
boxrule=0.8pt,
arc=3mm,
outer arc=3mm,
left=8pt,
right=8pt,
top=8pt,
bottom=10pt,
toptitle=6pt,
bottomtitle=6pt,
attach boxed title to top left={yshift*=-2mm, xshift=2mm},
boxed title style={
enhanced,
arc=2.5mm,
outer arc=2.5mm,
boxrule=0.8pt,
colframe=bb-pink!95!black,
left=8pt,
right=8pt,
top=3pt,
bottom=3pt,
drop shadow={black!10!bb-pink!30, opacity=0.25},
},
borderline west={1.6pt}{0pt}{bb-pink},
borderline west={0.8pt}{2pt}{bb-lilac},
sharp corners=downhill,
drop fuzzy shadow=bb-pink!30!black,
after skip=13pt,
}
}
\newcounter{bbproblem}
\newcounter{bbtheorem}
\newcounter{bblemma}
\newcounter{bbproposition}
\counterwithin{bbproblem}{section}
\counterwithin{bbtheorem}{section}
\counterwithin{bblemma}{section}
\counterwithin{bbproposition}{section}
\newcommand{\bbnumberwithin}[2]{%
\counterwithin{bb#1}{#2}%
}
\newcommand{\bbnumberwithinsubsection}[1]{%
\bbnumberwithin{#1}{subsection}%
}
\newcommand{\bbresetnumbering}[1]{%
\setcounter{bb#1}{0}%
}
\newcommand{\bbcontinuousnumbering}[1]{%
\counterwithout{bb#1}{section}%
\counterwithout{bb#1}{subsection}%
}
\newcommand{\bbsetcounter}[2]{%
\setcounter{bb#1}{#2}%
}
\newcommand{\bbsharedcounter}[2]{%
\counterwithout{bb#2}{section}%
\counterwithout{bb#2}{subsection}%
\let\c@bb#2\c@bb#1%
}
\newtcolorbox{problem}[2][]{%
bb-base-style,
title={\bbheart\ Problem~\refstepcounter{bbproblem}\thebbproblem:~#2},
#1
}
\newtcolorbox{theorem}[2][]{%
bb-base-style,
title={\bbheart\ Theorem~\refstepcounter{bbtheorem}\thebbtheorem:~#2},
#1
}
\newtcolorbox{lemma}[2][]{%
bb-base-style,
title={\bbheart\ Lemma~\refstepcounter{bblemma}\thebblemma:~#2},
#1
}
\newtcolorbox{proposition}[2][]{%
bb-base-style,
title={\bbheart\ Proposition~\refstepcounter{bbproposition}\thebbproposition:~#2},
#1
}
\NewTColorBox{claim}{ O{Claim} }{%
enhanced,
breakable,
colback=bb-claimbg!17,
coltext=bb-ink,
boxrule=0pt,
frame hidden,
arc=0pt,
borderline west={1.2pt}{0pt}{bb-claimborder},
left=8pt, right=6pt, top=5pt, bottom=5pt,
before skip=10pt, after skip=7pt,
fontupper=\normalfont,
before upper={\textcolor{bb-claimup}{\bfseries #1. }\ignorespaces},
}
\DeclareRobustCommand{\pinknum}[1]{%
\tikz[baseline=(n.base)]{
\node[inner sep=1.2pt,
minimum size=1.35em,
circle,
draw=bb-enum!70,
line width=0.6pt,
fill=bb-enum1!45] (n)
{\fontsize{9.5pt}{10pt}\selectfont\textcolor{bb-enum!85!black}{#1}};
}%
}
\setlist[enumerate,1]{%
label=\protect\pinknum{\arabic*},
widest=9,
labelsep=0.6em,
leftmargin=*,
align=parleft,
itemsep=0.2em, topsep=0.4em
}
\DeclareRobustCommand{\lilacnum}[1]{%
\tikz[baseline=(n.base)]{
\node[inner sep=1.1pt, minimum size=1.2em, circle,
draw=bb-enum2!70, line width=0.6pt, fill=bb-enum2!35] (n)
{\fontsize{9pt}{9.5pt}\selectfont\textcolor{black}{#1}};
}%
}
\setlist[enumerate,2]{%
label=\protect\lilacnum{\alph*},
widest=g,
labelsep=0.5em, leftmargin=1.7em, itemsep=0.15em
}
\def \globalscale {0.01575}
\DeclareRobustCommand{\tikzitemize}{%
\begin{tikzpicture}[y=1cm, x=1cm, yscale=\globalscale,xscale=\globalscale, every node/.append style={scale=\globalscale}, inner sep=0pt, outer sep=0pt]
\path[fill=cd75d72] (15.6908, 20.4334).. controls (13.137, 20.4334) and (11.3907, 19.2069) .. (10.5833, 17.15).. controls (9.776, 19.2068) and (8.0296, 20.4334) .. (5.4759, 20.4334).. controls (0.0037, 20.4334) and (-1.8204, 13.8667) .. (2.0955, 9.5163).. controls (3.4854, 7.972) and (10.2177, 1.1051) .. (10.5833, 0.7333).. controls (10.9488, 1.1051) and (17.6812, 7.972) .. (19.0711, 9.5163).. controls (22.9871, 13.8667) and (21.163, 20.4334) .. (15.6908, 20.4334);
\path[fill=cf29caf] (19.3035, 16.7307).. controls (18.6592, 18.1772) and (17.3762, 18.9739) .. (15.6907, 18.9739).. controls (13.137, 18.9739) and (11.6719, 16.4439) .. (10.5833, 14.2313).. controls (9.4947, 16.444) and (8.0296, 18.9739) .. (5.4759, 18.9739).. controls (3.7904, 18.9739) and (2.5074, 18.1772) .. (1.8631, 16.7307).. controls (1.155, 15.1405) and (1.2878, 12.5951) .. (3.1801, 10.4923).. controls (4.2169, 9.3403) and (8.4998, 5.0515) .. (10.5833, 2.9221).. controls (12.6667, 5.0515) and (16.9497, 9.3403) .. (17.9865, 10.4923).. controls (19.8792, 12.5951) and (20.0116, 15.1405) .. (19.3035, 16.7307);
\end{tikzpicture}
}
\setlist[itemize,1]{label=\protect\tikzitemize, labelsep=0.55em, leftmargin=*}
\DeclareRobustCommand{\nestedgrape}{%
\begin{tikzpicture}[y=1cm, x=1cm, yscale=\globalscale,xscale=\globalscale, every node/.append style={scale=\globalscale}, inner sep=0pt, outer sep=0pt]
\path[fill=c77b255] (5.879, 14.1111)arc(89.9824:116.7563:0.5821 and -0.5821).. controls (3.0415, 15.4611) and (1.2165, 18.5984) .. (0.6185, 20.3929)arc(161.5469:341.5469:0.5879 and -0.5879).. controls (2.2495, 19.2176) and (3.9023, 16.3454) .. (6.143, 15.2253)arc(-63.509000000000015:90.1686:0.588 and -0.588) -- cycle;
\path[fill=c553788] (11.1713, 4.1157) circle (4.1157cm);
\path[fill=c9266cc] (5.8796, 12.3472) circle (4.1157cm);
\path[fill=caa8dd8] (11.1713, 14.1111) circle (4.1157cm);
\path[fill=c744eaa] (15.875, 10.5833) circle (4.1157cm);
\path[fill=c744eaa] (5.2917, 5.8796) circle (4.1157cm);
\path[fill=c9266cc] (10.5833, 8.8194) circle (4.1157cm);
\path[fill=c9266cc] (17.0509, 4.1157) circle (4.1157cm);
\end{tikzpicture}
}
\setlist[itemize,2]{%
label=\protect\nestedgrape,
labelsep=0.5em,
leftmargin=1.8em,
itemsep=0.15em
}
\DeclareRobustCommand{\myhamster}{%
\tikz[baseline=-0.5ex,scale=0.2]{
\path[fill=cffc9c2] (4.1855, 12.4825).. controls (3.2468, 11.979) and (2.4713, 11.2105) .. (1.96, 10.2765) -- (1.96, 12.1972).. controls (1.96, 12.8218) and (2.4664, 13.3282) .. (3.091, 13.3282).. controls (3.6171, 13.3282) and (4.059, 12.969) .. (4.1855, 12.4825) -- cycle;
\path[fill=cffc9c2] (11.5866, 12.1972) -- (11.5866, 10.2765).. controls (11.0751, 11.2105) and (10.2998, 11.979) .. (9.3609, 12.4822).. controls (9.4876, 12.969) and (9.9296, 13.3282) .. (10.4557, 13.3282).. controls (11.0803, 13.3282) and (11.5866, 12.8218) .. (11.5866, 12.1972) -- cycle;
\path[fill=cfea793] (11.5866, 10.2751).. controls (14.3356, 5.0667) and (12.8026, 0.2185) .. (6.7733, 0.2185).. controls (0.744, 0.2185) and (-0.7889, 5.0667) .. (1.96, 10.2751) -- (1.96, 10.2765).. controls (2.4713, 11.2105) and (3.2468, 11.979) .. (4.1855, 12.4825).. controls (4.9563, 12.8956) and (5.8376, 13.1301) .. (6.7733, 13.1301).. controls (7.7094, 13.1301) and (8.5903, 12.8958) .. (9.3609, 12.4822).. controls (10.2998, 11.979) and (11.0751, 11.2105) .. (11.5866, 10.2765) -- (11.5866, 10.2751) -- cycle;
\path[fill=c591200] (4.9276, 9.9036) -- (3.9697, 10.0274).. controls (3.8501, 10.0429) and (3.7405, 9.9583) .. (3.725, 9.8387).. controls (3.7095, 9.719) and (3.794, 9.6095) .. (3.9137, 9.594) -- (4.6811, 9.4948) -- (4.6811, 9.1042).. controls (4.6811, 8.9836) and (4.779, 8.8857) .. (4.8996, 8.8857).. controls (5.0203, 8.8857) and (5.1181, 8.9836) .. (5.1181, 9.1042) -- (5.1181, 9.6869).. controls (5.1181, 9.7967) and (5.0366, 9.8895) .. (4.9276, 9.9036) -- cycle;
\path[fill=c591200] (9.577, 10.0273) -- (8.619, 9.9035).. controls (8.5101, 9.8895) and (8.4285, 9.7967) .. (8.4285, 9.6869) -- (8.4285, 9.1042).. controls (8.4285, 8.9835) and (8.5264, 8.8857) .. (8.647, 8.8857).. controls (8.7677, 8.8857) and (8.8655, 8.9835) .. (8.8655, 9.1042) -- (8.8655, 9.4948) -- (9.633, 9.594).. controls (9.7526, 9.6094) and (9.8371, 9.719) .. (9.8217, 9.8386).. controls (9.8062, 9.9583) and (9.6968, 10.0429) .. (9.577, 10.0273) -- cycle;
\path[fill=c591200] (13.099, 6.1373).. controls (12.9981, 7.4545) and (12.5509, 8.9028) .. (11.8052, 10.3289) -- (11.8052, 12.1971).. controls (11.8052, 12.9413) and (11.1998, 13.5467) .. (10.4557, 13.5467).. controls (9.9315, 13.5467) and (9.4638, 13.2445) .. (9.2418, 12.7868).. controls (8.4773, 13.1538) and (7.6343, 13.3487) .. (6.7733, 13.3487).. controls (5.9124, 13.3487) and (5.0694, 13.1538) .. (4.3049, 12.7869).. controls (4.0828, 13.2445) and (3.6152, 13.5467) .. (3.091, 13.5467).. controls (2.3469, 13.5467) and (1.7415, 12.9413) .. (1.7415, 12.1971) -- (1.7415, 10.3289).. controls (0.9958, 8.9028) and (0.5486, 7.4545) .. (0.4476, 6.1373).. controls (0.3446, 4.7926) and (0.6003, 3.5673) .. (1.1872, 2.5939).. controls (1.682, 1.7734) and (2.3988, 1.1338) .. (3.3176, 0.6931).. controls (4.2765, 0.2332) and (5.4391, 0.0) .. (6.7733, 0.0).. controls (8.1075, 0.0) and (9.2702, 0.2332) .. (10.229, 0.6931).. controls (11.1479, 1.1338) and (11.8647, 1.7734) .. (12.3594, 2.5939).. controls (12.9464, 3.5673) and (13.2021, 4.7926) .. (13.099, 6.1373) -- cycle(11.9852, 2.8195).. controls (11.0454, 1.2609) and (9.2431, 0.437) .. (6.7733, 0.437).. controls (4.3035, 0.437) and (2.5013, 1.2609) .. (1.5615, 2.8195).. controls (0.4468, 4.6682) and (0.6625, 7.3485) .. (2.1532, 10.1731).. controls (2.1698, 10.2045) and (2.1784, 10.2395) .. (2.1784, 10.275) -- (2.1784, 12.1971).. controls (2.1784, 12.7003) and (2.5878, 13.1097) .. (3.091, 13.1097).. controls (3.4506, 13.1097) and (3.7709, 12.8994) .. (3.9183, 12.5824).. controls (3.6112, 12.4048) and (3.3195, 12.1982) .. (3.0478, 11.9637).. controls (2.9565, 11.8848) and (2.9464, 11.7468) .. (3.0253, 11.6555).. controls (3.0685, 11.6054) and (3.1294, 11.5798) .. (3.1907, 11.5798).. controls (3.2413, 11.5798) and (3.2922, 11.5973) .. (3.3334, 11.6329).. controls (4.2883, 12.4576) and (5.51, 12.9117) .. (6.7734, 12.9117).. controls (8.0367, 12.9117) and (9.2583, 12.4576) .. (10.2132, 11.633).. controls (10.3046, 11.5541) and (10.4426, 11.5642) .. (10.5214, 11.6555).. controls (10.6003, 11.7469) and (10.5902, 11.8848) .. (10.4988, 11.9637).. controls (10.2272, 12.1983) and (9.9355, 12.4048) .. (9.6284, 12.5824).. controls (9.7758, 12.8994) and (10.096, 13.1097) .. (10.4557, 13.1097).. controls (10.9588, 13.1097) and (11.3682, 12.7003) .. (11.3682, 12.1971) -- (11.3682, 10.275).. controls (11.3682, 10.2395) and (11.3769, 10.2045) .. (11.3935, 10.1731).. controls (12.8842, 7.3485) and (13.0999, 4.6682) .. (11.9852, 2.8195) -- cycle;
\path[fill=c591200] (7.3061, 7.4572).. controls (7.1657, 7.4572) and (7.0467, 7.5496) .. (7.0065, 7.6768) -- (7.3672, 7.897).. controls (7.4702, 7.9599) and (7.5027, 8.0944) .. (7.4398, 8.1974).. controls (7.377, 8.3004) and (7.2425, 8.3329) .. (7.1395, 8.27) -- (6.7733, 8.0465) -- (6.4071, 8.27).. controls (6.304, 8.3329) and (6.1696, 8.3004) .. (6.1068, 8.1974).. controls (6.0439, 8.0944) and (6.0764, 7.9599) .. (6.1794, 7.897) -- (6.5402, 7.6768).. controls (6.4999, 7.5496) and (6.3808, 7.4572) .. (6.2406, 7.4572).. controls (6.1199, 7.4572) and (6.0221, 7.3593) .. (6.0221, 7.2387).. controls (6.0221, 7.118) and (6.1199, 7.0202) .. (6.2406, 7.0202).. controls (6.4486, 7.0202) and (6.6371, 7.1052) .. (6.7733, 7.2423).. controls (6.9094, 7.1052) and (7.098, 7.0202) .. (7.306, 7.0202).. controls (7.4267, 7.0202) and (7.5245, 7.118) .. (7.5245, 7.2387).. controls (7.5245, 7.3593) and (7.4267, 7.4572) .. (7.3061, 7.4572) -- cycle;
}
}
\newcommand{\sparkle}[2][1.0]{% #1 = scale, #2 = color
\tikz[scale=#1,baseline=-0.5ex]{
\fill[#2!80!white]
(0,0.4) -- (0.08,0.08) -- (0.4,0) -- (0.08,-0.08)
-- (0,-0.4) -- (-0.08,-0.08) -- (-0.4,0) -- (-0.08,0.08) -- cycle;
\draw[#2!80!black, line width=0.3pt]
(0,0.4) -- (0.08,0.08) -- (0.4,0) -- (0.08,-0.08)
-- (0,-0.4) -- (-0.08,-0.08) -- (-0.4,0) -- (-0.08,0.08) -- cycle;
}
}
\newcommand{\sparkleheading}[1]{%
\tikz[baseline=(title.base)]{
\node[inner sep=6pt,rounded corners=6pt,
fill=HeadingPink!60,
font=\sffamily\bfseries\Large,
text=black] (title) {#1};
\node at ([xshift=-1.2cm,yshift=0.8cm]title.north west) {\sparkle[1.0]{bb-sparkletwo}};
\node at ([xshift=1.4cm,yshift=0.9cm]title.north east) {\sparkle[0.8]{bb-sparkleone}};
\node at ([xshift=-1.0cm,yshift=-0.9cm]title.south west) {\sparkle[0.6]{bb-sparkletwo}};
\node at ([xshift=1.2cm,yshift=-0.8cm]title.south east) {\sparkle[0.9]{bb-sparkleone}};
\node at ([xshift=4.2cm,yshift=-0.6cm]title.north east) {\myhamster};
}
}
\titleformat{\section}
{\normalfont}
{}
{0pt}
{\clearpage\sparkleheading}
\titlespacing{\section}{0pt}{*2}{1.2cm}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment