forked from tonyelhabr/cheat-sheet-rmarkdown
-
Notifications
You must be signed in to change notification settings - Fork 5
/
setting.tex
127 lines (101 loc) · 3.15 KB
/
setting.tex
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
% inspired by https://github.com/tonyelhabr/cheat-sheet-rmarkdown/blob/master/template.tex
% adjusted by Issac Lee (https://github.com/issactoast)
% distributed by Statistics playbook (https://github.com/statisticsplaybook)
% last modified in Mar 2, 2021
\documentclass[10pt,quotespacing]{oblivoir}
% Package imports.
\usepackage{fapapersize}
\usepackage{kotex}
\usepackage{multicol}
\usepackage{calc}
\usepackage{amsmath,amsthm,amsfonts,amssymb}
\usepackage{color,graphicx,overpic}
\usepackage{hyperref}
\usepackage[utf8]{inputenc}
\usepackage{textcomp} % provide euro and other symbols
\usepackage{setspace}\singlespacing
\usepackage{tikz}
\usepackage[most]{tcolorbox}
\tcbuselibrary{skins,breakable}
$if(highlighting-macros)$
$highlighting-macros$
$endif$
$if(mainfont)$
\setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
$endif$
% 편집용지(가로), 편집용지(세로), 왼,오른,위,아래
\usefapapersize{257mm, 188mm, 5mm, 5mm, 5mm, 5mm}
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=black,
}
\pagestyle{empty}
% No section numbers.
\setcounter{secnumdepth}{0}
% Minimal paragraph indenting and spacing.
\setlength{\parindent}{0pt}
\setlength{\parskip}{0pt plus 0.5ex}
\setlength{\OuterFrameSep}{-0.1pt}
% Define colorboxes
\newcommand{\bcolorbox}{\begin{tcolorbox}[width=\linewidth, enhanced, breakable$if(boxbg)$,colback=$boxbg$$endif$$if(themecol)$,colframe=$themecol$!50!black$endif$]}
\newcommand{\ecolorbox}{\end{tcolorbox}}
% Redefine \section
\makeatletter
\preto{\@verbatim}{\topsep=0pt \partopsep=0pt}
\renewcommand{\section}{\@startsection{section}{1}{0mm}%
{1ex plus -.5ex minus -.2ex}%
{0.5\baselineskip}%
{\normalfont\scriptsize\bfseries}}
\makeatother
% Boarder line
% code steal from stack over flow
% https://tex.stackexchange.com/questions/801/what-is-the-easiest-way-to-get-borders-around-a-page-in-latex
\usepackage{pgf}
\usepackage{pgfpages}
\pgfpagesdeclarelayout{boxed}
{
\edef\pgfpageoptionborder{0pt}
}
{
\pgfpagesphysicalpageoptions
{%
logical pages=1,%
}
\pgfpageslogicalpageoptions{1}
{
border code=\pgfsetlinewidth{2pt}\pgfsetstrokecolor{black!75!$if(themecol)$$themecol$$else$black$endif$}\pgfstroke,%
border shrink=\pgfpageoptionborder,%
resized width=.95\pgfphysicalwidth,%
resized height=.95\pgfphysicalheight,%
center=\pgfpoint{.5\pgfphysicalwidth}{.5\pgfphysicalheight}%
}%
}
\pgfpagesuselayout{boxed}
\begin{document}
\textbf{$packagename$} Cheatsheet $if(editor)$ by \textbf{$editor$}$endif$
% ncol pandoc parameter
$if(ncol)$
\begin{multicols*}{$ncol$}
$else$
\begin{multicols*}{4}
$endif$
% Can play around with these as desired.
$if(colsep)$
\setlength{\columnseprule}{0.25pt}
$endif$
\setlength{\premulticols}{0.25pt}
\setlength{\postmulticols}{0.25pt}
\setlength{\multicolsep}{0.25pt}
\setlength{\columnsep}{0.25pt}
% This is the "magic" pandoc variable. (This is where your Rmarkdown document is inserted.)
%\tiny
\scriptsize
$body$
% `\end` statements to match the `\begin`s.
\end{multicols*}
% \end{tcbraster}
%
% \end{tcolorbox}
\end{document}