From ce97c72c7f16040173141bb18147ae36ea77ffaf Mon Sep 17 00:00:00 2001 From: Erwan Normand Date: Tue, 27 Aug 2024 17:13:34 +0200 Subject: [PATCH] Add \convertto command --- utils/commands.tex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/commands.tex b/utils/commands.tex index a35dba0..dc512eb 100644 --- a/utils/commands.tex +++ b/utils/commands.tex @@ -209,6 +209,10 @@ %% Other \newcommand{\horizontalrule}{\par\noindent\rule{\textwidth}{0.4pt}} % Horizontal line +\makeatletter +\def\convertto#1#2{\strip@pt\dimexpr #2*65536/\number\dimexpr 1#1} % Convert units. Usage: \convertto{cm}{1pt}. From: https://tex.stackexchange.com/a/8337 +\makeatother + %% User studies \newcommand{\factor}[1]{\textsc{#1}}