Skip to content

Instantly share code, notes, and snippets.

@martisak
Last active Oct 3, 2021
Embed
What would you like to do?
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