Skip to content

Instantly share code, notes, and snippets.

@martisak
Last active October 3, 2021 15:00
Show Gist options
  • Save martisak/ff08cabcc70f58c5ae1a612a21f93f8d to your computer and use it in GitHub Desktop.
Save martisak/ff08cabcc70f58c5ae1a612a21f93f8d to your computer and use it in GitHub Desktop.
Macros for Sparkline post
\usepackage{booktabs}
\usepackage{sparklines}
\usepackage[labelfont=bf]{caption}
\usepackage{fontspec}
\setmainfont{Myriad Pro}
\usepackage{multirow}
%dashed line
\usepackage{array}
\usepackage{arydshln}
\setlength\dashlinedash{0.2pt}
\setlength\dashlinegap{1.5pt}
\setlength\arrayrulewidth{0.5pt}
\def\sparkrectangleh #1 #2 {%
\ifdim #1pt > #2pt
\errmessage{The left corner #1 of rectangle cannot be lower than #2}%
\fi
{\pgfmoveto{\pgforigin}\color{sparkrectanglecolor}%
\pgfrect[fill]{\pgfxy(#1, 0)}{\pgfxy(#2-#1,1)}}}%
\usepackage{array}{}
\usepackage[round-mode=places,detect-weight=true,detect-inline-weight=math]{siunitx}
\setlength\sparklinethickness{0.5pt}
\renewcommand\arraystretch{1.3}
\def\sparklineheight ex{7pt}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment