-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhacks.tex
More file actions
47 lines (37 loc) · 1.48 KB
/
hacks.tex
File metadata and controls
47 lines (37 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
\makeatletter
% fix bug in pandoc where lists are not rendered
\providecommand{\tightlist}{}
% force rendering the percent sign with nice font, not ugly Computer modern
\mathcode`\%="7025
\DeclareRobustCommand{\%}{\text{\symbol{`\%}}}
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
\makeatother
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
\newcommand\invisiblesubsection[1]{%
\refstepcounter{subsection}%
\addcontentsline{toc}{subsection}{\protect\numberline{\thesubsection}#1}%
\subsectionmark{#1}%
}
% Force [H] float placement
\floatplacement{figure}{H}
\usepackage{stackengine}
\setstackEOL{\\}
\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}
\NewDocumentCommand{\JigsawSide}{m}{
(0.5,0.5) --
(0.0,#1*0.00) .. controls (0.0,#1*0.00) and (0.4,#1*-0.04) ..
(0.4,#1*0.04) .. controls (0.4,#1*0.11) and (0.2,#1*0.26) ..
(0.5,#1*0.26) .. controls (0.8,#1*0.26) and (0.6,#1*0.11) ..
(0.6,#1*0.04) .. controls (0.6,#1*-0.04) and (1.0,#1*0.00) ..
(1.0,#1*0.00)
}
\NewDocumentCommand{\JigsawPiece}{O{white} m m m m m}{
\draw[#1,postaction={fill=white}]
\JigsawSide{#2}[rotate around={90:(0.5,0.5)}]
\JigsawSide{#3}[rotate around={180:(0.5,0.5)}]
\JigsawSide{#4}[rotate around={270:(0.5,0.5)}]
\JigsawSide{#5} -- cycle;
\node [black] at (.5,.5) {\Centerstack{#6}};
}
\NewDocumentCommand{\st}{m}{\sout{#1}}