From 8e94c040c1ca4cbd5bbf28cc4e7867577c31e238 Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Tue, 16 Sep 2014 18:28:22 +0200 Subject: [PATCH 01/21] fix-htmldoc-utf8 --- Utils/fix-htmldoc-utf8.py | 211 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 211 insertions(+) create mode 100755 Utils/fix-htmldoc-utf8.py diff --git a/Utils/fix-htmldoc-utf8.py b/Utils/fix-htmldoc-utf8.py new file mode 100755 index 0000000..4e26604 --- /dev/null +++ b/Utils/fix-htmldoc-utf8.py @@ -0,0 +1,211 @@ +#!/usr/bin/env python2 +# coding: utf-8 +# +# Name : fix-htmldoc-utf8 +# Summary: Program to fix UTF-8 characters that HTMLDOC has messed +# Author : Aurelio Jargas www.aurelio.net/soft +# License: BSD +# Release: April, 2008 +# +# HTMLDOC has no Unicode support, so when you try to use it in a UTF-8 file, +# all the special characters (not ASCII) will be incorrect in the resulting HTML. +# This program fixes this, restoring the original UTF-8 characters. +# +# Just use it as a filter (reads STDIN, results to STDOUT) or use the -w option +# fix the file in place. +# +# Examples: +# cat myfile.html | fix-htmldoc-utf8 > myfile-ok.html +# fix-htmldoc-utf8 myfile.html > myfile-ok.html +# fix-htmldoc-utf8 -w myfile.html +# + +import sys + +# You can add new chars to this mapping, if needed. +# The first set are the ISO-8859-1 extended chars. +# The second set are the Unicode chars I've found on my keyboard. +# +mapping = """ +¡ ¡ +¢ ¢ +£ £ +¤ ¤ +¥ Â¥ +¦ ¦ +§ § +¨ ¨ +© © +ª ª +« « +¬ ¬ +® ® +¯ ¯ +° ° +± ± +² ² +³ ³ +´ ´ +µ Âμ +¶ ¶ +· · +¸ ¸ +¹ ¹ +º º +» » +¼ ¼ +½ ½ +¾ ¾ +¿ ¿ +À Ã\x80 +Á Ã\x81 + Ã\x82 +à Ã\x83 +Ä Ã\x84 +Å Ã\x85 +Æ Ã\x86 +Ç Ã\x87 +È Ã\x88 +É Ã\x89 +Ê Ã\x8a +Ë Ã\x8b +Ì Ã\x8c +Í Ã\x8d +Î Ã\x8e +Ï Ã\x8f +Ð Ã\x90 +Ñ Ã\x91 +Ò Ã\x92 +Ó Ã\x93 +Ô Ã\x94 +Õ Ã\x95 +Ö Ã\x96 +× Ã\x97 +Ø Ã\x98 +Ù Ã\x99 +Ú Ã\x9a +Û Ã\x9b +Ü Ã\x9c +Ý Ã\x9d +Þ Ã\x9e +ß Ã\x9f +à à +á á +â â +ã ã +ä ä +å Ã¥ +æ æ +ç ç +è è +é é +ê ê +ë ë +ì ì +í í +î î +ï ï +ð ð +ñ ñ +ò ò +ó ó +ô ô +õ Ãμ +ö ö +÷ ÷ +ø ø +ù ù +ú ú +û û +ü ü +ý ý +þ þ +ÿ ÿ + +  +™ â\x84¢ +€ â\x82¬ +æ æ +Œ Å\x92 +≤ â\x89¤ +≠ â\x89  +≥ â\x89¥ +fi ï¬\x81 +fl ï¬\x82 +∞ â\x88\x9e +• â\x80¢ +⁄ â\x81\x84 +≈ â\x89\x88 +◊ â\x97\x8a +∑ â\x88\x91 +∏ â\x88\x8f +π Ï\x80 +∂ â\x88\x82 +∆ â\x88\x86 +ƒ Æ\x92 +Ω Î© +√ â\x88\x9a +∫ â\x88« +† â\x80  +‡ â\x80¡ +ı ı +› â\x80º +˚ Ë\x9a +˙ Ë\x99 +ˇ Ë\x87 +˝ Ë\x9d +˛ Ë\x9b +‘ â\x80\x98 +’ â\x80\x99 +‚ â\x80\x9a +“ â\x80\x9c +” â\x80\x9d +„ â\x80\x9e +… â\x80¦ +— â\x80\x94 +– â\x80\x93 + +CHARSET=utf-8 CHARSET=iso-8859-1 +CHARSET=utf-8 CHARSET=iso-iso-8859-1 +""" + +# Just a standard search & replace +def fixit(text): + for pair in mapping.split('\n'): + if not pair: continue + repl, patt = pair.split('\t') + text = text.replace(patt.strip(), repl.strip()) + return text + +# User wants to save the file in place or not? +write_file = False +if len(sys.argv) > 1 and sys.argv[1] == '-w': + write_file = True + sys.argv.pop(1) + +# The input files (if any) +files = sys.argv[1:] + +if files: + # Fix input files one by one + for this_file in files: + try: + # Read and fix + f = open(this_file, 'r') + fixed = fixit(f.read()) + f.close() + + # Save the file or show on STDOUT + if write_file: + f = open(this_file, 'w') + f.write(fixed) + f.close() + print "Fixed", this_file + else: + print fixed, + except: + print "Error fixing", this_file + sys.exit(1) +else: + # No input file, read from STDIN and send results to STDOUT + print fixit(sys.stdin.read()), From 028f4fae438ca6dbe81f95154ad074a9a5319b29 Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Tue, 16 Sep 2014 18:28:37 +0200 Subject: [PATCH 02/21] dwm et config.h --- bashrc | 10 +++++----- dwm/config.h | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bashrc b/bashrc index 7c593a8..9cc2ecf 100644 --- a/bashrc +++ b/bashrc @@ -128,8 +128,8 @@ alias mkae='make' alias amek='make' alias BSI2='cd ~/Documents/Studies/BSI2*/' -BSI3_PATH='/home/frank/Documents/Studies/BSI3 - 2013-2014/' -alias BSI3='cd "$BSI3_PATH"' +UNI_STUDY_PATH='/home/frank/Documents/Studies/MUSE1/' +alias BSI3='cd "$UNI_STUDY_PATH"' OCTOPUS=~/.my_utils/octopus.sh alias dual='$OCTOPUS monitor dual' @@ -287,14 +287,14 @@ function study #{{{ if [ -z $1 ]; then STUDY_PATH='' else - if [ -d "$BSI3_PATH$1" ]; then + if [ -d "$UNI_STUDY_PATH$1" ]; then STUDY_PATH="$1" else STUDY_PATH='' fi fi - builtin cd "$BSI3_PATH$STUDY_PATH" + builtin cd "$UNI_STUDY_PATH$STUDY_PATH" if [ -e calendar ]; then echo -e "$RED WORK TO DO SOON:$BLUE" calendar -A10 @@ -311,7 +311,7 @@ _StudyCompletion() cur=${COMP_WORDS[COMP_CWORD]} _STUDY_ACTUAL_DIR=`pwd` - builtin cd "$BSI3_PATH" + builtin cd "$UNI_STUDY_PATH" ALL_POSSIBLE_WORDS=(*) builtin cd "$_STUDY_ACTUAL_DIR" diff --git a/dwm/config.h b/dwm/config.h index 49136a6..08cb064 100644 --- a/dwm/config.h +++ b/dwm/config.h @@ -90,6 +90,7 @@ static const char *volup[] = {"octopus.sh", "vol", "up", NULL}; static const char *voldown[] = {"octopus.sh", "vol", "down", NULL}; static const char *volmute[] = {"octopus.sh", "vol", "mute", NULL}; static const char *lockcmd[] = {"octopus.sh", "lock", NULL}; +static const char *monoff[] = {"octopus.sh", "monitor", "off", NULL}; static const char *audioplay[] = {"octopus.sh", "audio", "toggle", NULL}; static const char *audionext[] = {"octopus.sh", "audio", "next", NULL}; static const char *audioprev[] = {"octopus.sh", "audio", "prev", NULL}; @@ -104,6 +105,7 @@ static Key keys[] = { // { MODKEY|ShiftMask, XK_t, spawn, {.v = mailcmd } }, { MODKEY|ShiftMask, XK_m, spawn, {.v = muttcmd } }, { MODKEY|ShiftMask, XK_l, spawn, {.v = lockcmd } }, + { MODKEY|ShiftMask, XK_o, spawn, {.v = monoff } }, { MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_j, focusstack, {.i = +1 } }, /* change window focus */ { MODKEY, XK_k, focusstack, {.i = -1 } }, /* idem */ From f28b3c781f82ac442365b9f0490fdeecc5b3252a Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Tue, 16 Sep 2014 18:31:02 +0200 Subject: [PATCH 03/21] renamed --- Utils/{fix-htmldoc-utf8.py => fix-htmldoc-utf8} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Utils/{fix-htmldoc-utf8.py => fix-htmldoc-utf8} (100%) diff --git a/Utils/fix-htmldoc-utf8.py b/Utils/fix-htmldoc-utf8 similarity index 100% rename from Utils/fix-htmldoc-utf8.py rename to Utils/fix-htmldoc-utf8 From 89ca2d682523d92edabe620812cc34ec23628d63 Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Tue, 23 Sep 2014 20:50:19 +0200 Subject: [PATCH 04/21] random stuff --- Utils/octopus.sh | 3 ++- bashrc | 3 +++ vim/spell/en.utf-8.add | 7 +++++++ vim/spell/fr.utf-8.add | 1 + vim/spell/fr.utf-8.add.spl | Bin 277 -> 320 bytes vim/vimrc | 1 + 6 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Utils/octopus.sh b/Utils/octopus.sh index 98d5246..4f61f64 100755 --- a/Utils/octopus.sh +++ b/Utils/octopus.sh @@ -93,6 +93,7 @@ case $1 in ;; "off") xset dpms force off + sleep 1 ;; esac $0 wallpaper @@ -177,7 +178,7 @@ case $1 in "lock") slock & - xset dpms force off + $0 monitor off ;; "print") diff --git a/bashrc b/bashrc index 9cc2ecf..90c23ca 100644 --- a/bashrc +++ b/bashrc @@ -507,6 +507,9 @@ function op "html") firefox "$1" ;; + "odt") + libreoffice "$1" + ;; *) xdg-open "$1" ;; diff --git a/vim/spell/en.utf-8.add b/vim/spell/en.utf-8.add index a17ca2e..9f76023 100644 --- a/vim/spell/en.utf-8.add +++ b/vim/spell/en.utf-8.add @@ -51,3 +51,10 @@ isfield rmfield elseif TEAP +Écologisme +écologue +éconologique +éconologiques +énergétiquement +méthanisation +hyporhéique diff --git a/vim/spell/fr.utf-8.add b/vim/spell/fr.utf-8.add index a39c55b..e1fd38b 100644 --- a/vim/spell/fr.utf-8.add +++ b/vim/spell/fr.utf-8.add @@ -18,3 +18,4 @@ EDF RDV subsection bachelor +Multidisciplinarité diff --git a/vim/spell/fr.utf-8.add.spl b/vim/spell/fr.utf-8.add.spl index dc22ece5b993c99d639e910cd8324f2fb6f180a4..282e8437a98a531f737560befaed3ac5fc586e28 100644 GIT binary patch literal 320 zcmX|7JC4FI6!bhODV7sZZH<7{N|f6mZLuwVhz*I>`N(z|%4$58QVvw8HWYyA{1tFEf25MxjjxVCJA1DusM#n+g Date: Tue, 23 Sep 2014 23:03:23 +0200 Subject: [PATCH 05/21] Bitcoin charts in status bar and some fixes --- Utils/BTC_stats.sh | 32 ++++++++++++++++++++++++++++++++ Utils/octopus.sh | 28 ++++++++++++++++++---------- dwm/config.h | 7 ++++++- xinitrc | 7 +++++-- 4 files changed, 61 insertions(+), 13 deletions(-) create mode 100755 Utils/BTC_stats.sh diff --git a/Utils/BTC_stats.sh b/Utils/BTC_stats.sh new file mode 100755 index 0000000..03ede08 --- /dev/null +++ b/Utils/BTC_stats.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +file=/dev/shm/btc_stats +fileURL=http://api.bitcoincharts.com/v1/weighted_prices.json + +function update_file { + wget --quiet $fileURL -O $file +#echo WILL_WGET +} + +if [ -e $file ]; then + #update if older than 1h + age=`stat -c %Y $file`; + now=`date +%s`; + diff=$(($now - $age)); + if [ $diff -gt 3600 ]; then + update_file & #Do not hang the result + fi; + + #Fucking ugly, but works + content=`cat $file | python -mjson.tool | grep -A3 EUR | tail -n3 | cut -d':' -f2 | cut -d'"' -f2`; + + p24h=`echo "$content" | sed -n 1p` + p7d=`echo "$content" | sed -n 3p` + p30d=`echo "$content" | sed -n 2p` + + graph=`sparklines $p30d $p7d $p24h` + echo $graph [$p24h€] #dont want sparklines newline +else + update_file & #Will surely wait for iface +fi + diff --git a/Utils/octopus.sh b/Utils/octopus.sh index 4f61f64..91608a3 100755 --- a/Utils/octopus.sh +++ b/Utils/octopus.sh @@ -34,18 +34,20 @@ case $1 in ;; "audio") + #so that '$0 refresh' will be up2date (song didn't change after) + mpc_cmd='mpc --wait' case $2 in "toggle") - mpc toggle + $mpc_cmd toggle ;; "pause") - mpc pause + $mpc_cmd pause ;; "next") - mpc next + $mpc_cmd next ;; "prev") - mpc prev + $mpc_cmd prev ;; esac $0 refresh @@ -100,26 +102,32 @@ case $1 in ;; "refresh") - DATE=`date +"%A %d, %Hh%M - %s"` + DATE=`date +"%a %e %Hh%M"` + BATT_PCT=$(acpi -b | cut -d, -f2 | cut -d" " -f2) BATT_TIME=$(acpi -b | cut -d, -f3 | cut -d" " -f2) - #BATT=$( acpi -b | sed 's/.*[charg.|], \([0-9]*\)%.*/\1/gi' ) + VOLUME=`/usr/bin/amixer get Master | grep "%" | cut -d' ' -f7 | head -n1` ## VOLUME=`amixer get Master | grep '\[' | cut -d' ' -f6` + SONG=`mpc | head -n 1 | cut -d. -f1` + maxSL=22 + if [ ${#SONG} -gt $maxSL ]; then + SONG=`echo $SONG | cut -c1-$maxSL`. + fi + BTC=`BTC_stats.sh` if [ -n `mpc | grep paused` ]; then - STAT=">" + STAT="♫" else - STAT="||" + STAT="" fi; MEMFREE=`awk '/MemFree/ {printf( "%.0f", $2 / 1024 )}' /proc/meminfo` MEMCACHED=`awk '/Cached/ {printf( "%.0f", $2 / 10240 )}' /proc/meminfo` MEMFT=`echo "$MEMFREE + $MEMCACHED" | bc` - BEAT_TIME=`beat -v` - xsetroot -name "Vol $VOLUME :: [$STAT $SONG] :: $MEMFT Mb Free :: Bat $BATT_PCT $BATT_TIME :: $DATE (@$BEAT_TIME)" || true + xsetroot -name "$VOLUME [$STAT $SONG] :: $MEMFT Mb Free :: Bat $BATT_PCT $BATT_TIME :: $BTC :: $DATE" || true $0 conf-ifaces ;; diff --git a/dwm/config.h b/dwm/config.h index 08cb064..a24f233 100644 --- a/dwm/config.h +++ b/dwm/config.h @@ -4,7 +4,12 @@ /* appearance */ //static const char font[] = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*"; //static const char font[] = "-*-dejavu sans-medium-r-*-*-14-*-*-*-*-*-*-*"; -static const char font[] = "-misc-fixed-medium-r-semicondensed--13-100-100-100-c-60-iso8859-1"; +//static const char font[] = "-misc-fixed-medium-r-semicondensed--13-100-100-100-c-60-iso8859-1"; +//static const char font[] = "-*-terminusmod-medium-r-normal-*-12-*-*-*-*-*-*-*"; +// +// +static const char font[] = "-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*"; +//static const char font[] = "-*-terminus-medium-*-*-*-14-*-*-*-*-*-iso10646-1"; static const char normbordercolor[] = "#444444"; static const char normbgcolor[] = "#222222"; static const char normfgcolor[] = "#bbbbbb"; diff --git a/xinitrc b/xinitrc index 4a6a56c..ff22305 100644 --- a/xinitrc +++ b/xinitrc @@ -33,16 +33,19 @@ if [ $? -eq 1 ]; then mpd & fi; +#The status bar while true; do $OCTOPUS refresh sleep 50 done & +#The wallpaper while true; do sleep 240 $OCTOPUS wallpaper done & +#The mouse while true; do sleep 120 $OCTOPUS init-mouse @@ -52,9 +55,9 @@ done & #xautolock -time 60 -locker "systemctl suspend" & redshift -l 46:6 || true & -#WTF is wrong with it always forgetting the playlist !? +#WTF is wrong with it always forgetting the fucking playlist !? mpc ls | mpc add -mpc random +mpc random on #ssh-agent -t 10 /home/frank/Programmation/dotfiles/dwm/dwm /home/frank/Programmation/dotfiles/dwm/dwm From 42eb493ff9af68b635d02340f69cfb5e260faa1c Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Tue, 30 Sep 2014 23:47:26 +0200 Subject: [PATCH 06/21] BTC fixes --- Utils/BTC_stats.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Utils/BTC_stats.sh b/Utils/BTC_stats.sh index 03ede08..7a44179 100755 --- a/Utils/BTC_stats.sh +++ b/Utils/BTC_stats.sh @@ -8,7 +8,7 @@ function update_file { #echo WILL_WGET } -if [ -e $file ]; then +if [ -s $file ]; then #update if older than 1h age=`stat -c %Y $file`; now=`date +%s`; @@ -20,7 +20,7 @@ if [ -e $file ]; then #Fucking ugly, but works content=`cat $file | python -mjson.tool | grep -A3 EUR | tail -n3 | cut -d':' -f2 | cut -d'"' -f2`; - p24h=`echo "$content" | sed -n 1p` + p24h=`echo "$content" | sed -n 1p | cut -d. -f1` p7d=`echo "$content" | sed -n 3p` p30d=`echo "$content" | sed -n 2p` From 6aff4a30e89eb9e0098a5adac126dbda872a8098 Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Tue, 30 Sep 2014 23:47:50 +0200 Subject: [PATCH 07/21] vim spells --- vim/spell/en.utf-8.add | 4 ++++ vim/spell/fr.utf-8.add | 1 + vim/spell/fr.utf-8.add.spl | Bin 320 -> 337 bytes 3 files changed, 5 insertions(+) diff --git a/vim/spell/en.utf-8.add b/vim/spell/en.utf-8.add index 9f76023..2fcf605 100644 --- a/vim/spell/en.utf-8.add +++ b/vim/spell/en.utf-8.add @@ -58,3 +58,7 @@ TEAP énergétiquement méthanisation hyporhéique +nommage +instancier +Cryosphère +agravant diff --git a/vim/spell/fr.utf-8.add b/vim/spell/fr.utf-8.add index e1fd38b..c118ee9 100644 --- a/vim/spell/fr.utf-8.add +++ b/vim/spell/fr.utf-8.add @@ -19,3 +19,4 @@ RDV subsection bachelor Multidisciplinarité +nommage diff --git a/vim/spell/fr.utf-8.add.spl b/vim/spell/fr.utf-8.add.spl index 282e8437a98a531f737560befaed3ac5fc586e28..5b6082972cd4681101d70de0b731a61665925c9f 100644 GIT binary patch literal 337 zcmX|7J8r`;4Ao=01}J)hOr7&70%YuxphMU0j-|v#WZ979Al-VM<{CLjkJ3B}MJ<>n z--o39@%Eku=l$~681pl&_SPM`&<`=?GdxBZRH)IwvFZV1o+4UY{_-%f;erF?L28GH zPYgwqnb*|xtVP(OD{zuk#2Onc@Ip|&7(!uA9OaSO+VV{_x3qf3K#h*fxT$jY&88hs zg=29#jk8gXQIq*VdS8f2Y~ki-YISitY4S*V)avTlRi~FOGe=Y6C2P(h``k*SmY$G) XJ1*dPbd`ehZ#`m*)&Ff?3F~tQq)$6$ literal 320 zcmX|7JC4FI6!bhODV7sZZH<7{N|f6mZLuwVhz*I>`N(z Date: Tue, 30 Sep 2014 23:48:12 +0200 Subject: [PATCH 08/21] bash inputrc color --- inputrc | 1 + 1 file changed, 1 insertion(+) diff --git a/inputrc b/inputrc index dfa512d..e29669d 100644 --- a/inputrc +++ b/inputrc @@ -2,3 +2,4 @@ #set keymap vi set completion-ignore-case on set show-all-if-ambiguous on +set colored-stats on From f07ea41f0feb2b41624e1ae3fbe714130f6ca175 Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Tue, 30 Sep 2014 23:48:26 +0200 Subject: [PATCH 09/21] urgent faster --- Utils/urgent.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Utils/urgent.sh b/Utils/urgent.sh index 9396b4d..c3bc3be 100755 --- a/Utils/urgent.sh +++ b/Utils/urgent.sh @@ -14,6 +14,6 @@ echo $INVERSE | sudo tee $LIGHT sleep .1 echo $STATE | sudo tee $LIGHT sleep .1 -echo $INVERSE | sudo tee $LIGHT -sleep .1 -echo $STATE | sudo tee $LIGHT +#echo $INVERSE | sudo tee $LIGHT +#sleep .1 +#echo $STATE | sudo tee $LIGHT From b4d748650e8a4f0dc3369b7865f3dcca331dc4bc Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Fri, 3 Oct 2014 16:28:12 +0200 Subject: [PATCH 10/21] oau --- Utils/octopus.sh | 2 +- procmailrc | 4 ++++ vim/spell/en.utf-8.add | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Utils/octopus.sh b/Utils/octopus.sh index 91608a3..43bbcf6 100755 --- a/Utils/octopus.sh +++ b/Utils/octopus.sh @@ -127,7 +127,7 @@ case $1 in MEMCACHED=`awk '/Cached/ {printf( "%.0f", $2 / 10240 )}' /proc/meminfo` MEMFT=`echo "$MEMFREE + $MEMCACHED" | bc` - xsetroot -name "$VOLUME [$STAT $SONG] :: $MEMFT Mb Free :: Bat $BATT_PCT $BATT_TIME :: $BTC :: $DATE" || true + xsetroot -name "$VOLUME [$STAT $SONG] :: Bat $BATT_PCT $BATT_TIME :: $BTC :: $DATE" || true $0 conf-ifaces ;; diff --git a/procmailrc b/procmailrc index 89bb814..f7933ee 100644 --- a/procmailrc +++ b/procmailrc @@ -76,6 +76,10 @@ VACATION="no" * ^From:.*Masterstudies.com.* $DEVNULLBOX +:0 + * ^To:.*masterstudies@vi-di.fr.* + $DEVNULLBOX + :0 * ^To:.*contact@vi-di.fr.* * ^Subject:.*VIDI.* diff --git a/vim/spell/en.utf-8.add b/vim/spell/en.utf-8.add index 2fcf605..5ae9a35 100644 --- a/vim/spell/en.utf-8.add +++ b/vim/spell/en.utf-8.add @@ -62,3 +62,4 @@ nommage instancier Cryosphère agravant +privatisables From 13c49940945a7f89d48919e5792668529410a845 Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Tue, 7 Oct 2014 22:12:22 +0200 Subject: [PATCH 11/21] scammers --- procmailrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/procmailrc b/procmailrc index f7933ee..ed08183 100644 --- a/procmailrc +++ b/procmailrc @@ -216,6 +216,16 @@ VACATION="no" * deposit $SPAMBOX +:0 B + * Dear + * illion + * lottery + * immediately + * information + * contact + * fund + $SPAMBOX + #Out texas :0 B From 41bb18bdbcfcd24dd69b55bea8e6fe715ff03b79 Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Mon, 20 Oct 2014 22:47:52 +0200 Subject: [PATCH 12/21] some sty's --- texmf/tex/latex/frank_tex/french.sty | 99 ++++++++++ texmf/tex/latex/frank_tex/mcode.sty | 283 +++++++++++++++++++++++++++ 2 files changed, 382 insertions(+) create mode 100644 texmf/tex/latex/frank_tex/french.sty create mode 100644 texmf/tex/latex/frank_tex/mcode.sty diff --git a/texmf/tex/latex/frank_tex/french.sty b/texmf/tex/latex/frank_tex/french.sty new file mode 100644 index 0000000..1d096fe --- /dev/null +++ b/texmf/tex/latex/frank_tex/french.sty @@ -0,0 +1,99 @@ +%% +%% This is file `french.sty' generated +%% on <1991/5/21> with the docstrip utility (v1.1l test). +%% +%% The original source file was `french.doc'. +%% +%% +%% Copyright (C) 1989, 1990, 1991 +%% by Johanes Braams. All rights reserved. +%% +%% IMPORTANT NOTICE: +%% +%% You are not allowed to change this file. You may however copy this file +%% to a file with a different name and then change the copy. +%% +%% You are NOT ALLOWED to distribute this file alone. You are NOT ALLOWED +%% to take money for the distribution or use of this file (or a changed +%% version) except for a nominal charge for copying etc. +%% +%% You are allowed to distribute this file under the condition that it is +%% distributed together with all files mentioned below. +%% +%% If you receive only some of these files from someone, complain! +%% +%% Error Reports in case of UNCHANGED versions to +%% +%% J. Braams +%% PTT Research, dr Neher Laboratorium +%% P.O. box 421 +%% 2260 AK Leidschendam +%% The Netherlands +%% Internet: +%% +\def\filename{french.doc} +\def\fileversion{3.0} +\def\filedate{23 april 1991} +\def\docdate{23 april 1991} +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +{\def\format{plain} +\ifx\fmtname\format + \expandafter\ifx\csname @ifundefined\endcsname\relax + \gdef\next{latexhax.sty} + \aftergroup\input\aftergroup\next + \fi +\fi} +\ifcat/@ \makeatletter\let\resetat\makeatother + \else\let\resetat\relax\fi +\@ifundefined{captionsfrench}{}{\endinput} +\wlog{Style option `French' version \fileversion\space<\filedate>} +\wlog{English documentation <\docdate>} +\ifx\undefined\babel@core@loaded\input babel.sty\fi +\def\captionsfrench{% +\gdef\refname{R\'ef\'erences}% +\gdef\abstractname{R\'esum\'e}% +\gdef\bibname{Bibliographie}% +\gdef\chaptername{Chapitre}% +\gdef\appendixname{Annexe}% +\gdef\contentsname{Table des mati\`eres}% +\gdef\listfigurename{Liste des figures}% +\gdef\listtablename{Liste des tableaux}% +\gdef\indexname{Index}% +\gdef\figurename{Figure}% +\gdef\tablename{Tableau}% +\gdef\partname{Partie}% +\gdef\enclname{P.~J.}% +\gdef\ccname{Copie \`a}% +\gdef\headtoname{A} +\gdef\headpagename{Page}}% +\def\datefrench{% +\gdef\today{\ifnum\day=1\relax 1\/$^{\rm er}$\else + \number\day\fi \space\ifcase\month\or + janvier\or f\'evrier\or mars\or avril\or mai\or juin\or + juillet\or ao\^ut\or septembre\or octobre\or novembre\or d\'ecembre\fi + \space\number\year}} +\def\extrasfrench{} +\def\noextrasfrench{} +\@ifundefined{l@french}{\adddialect\l@french0}{} +\@ifundefined{originalTeX}{\let\originalTeX\relax}{} +\setlanguage{french} +\resetat + +\endinput +%% +%% End of file `french.sty'. diff --git a/texmf/tex/latex/frank_tex/mcode.sty b/texmf/tex/latex/frank_tex/mcode.sty new file mode 100644 index 0000000..4f6112a --- /dev/null +++ b/texmf/tex/latex/frank_tex/mcode.sty @@ -0,0 +1,283 @@ +%% +%% This is file `mcode.sty' +%% +%% It is supposed to help you easily include MATLAB source code +%% into LaTeX document, but have it nicely highlighted, using +%% the great listings package. +%% +%% PLEASE NOTE that this package does nothing but save you from +%% figuring out some configurations in setting up the LISTINGS +%% package. ALL the work is done by that package! Thus, please +%% refer your questions to the listings package documentation. +%% +%% Usage: You have three ways of including your MATLAB code. As +%% environment, as inline object and directly from an external +%% file. +%% +%% 1) Environment: +%% +%% \begin{lstlisting} +%% YOUR CODE HERE +%% \end{lstlisting} +%% +%% +%% 2) Inline object: +%% +%% Bla bla \mcode{CODEFRAGMENT} bla bla. +%% +%% +%% 3) Include external file (in environment form) +%% +%% \lstinputlisting{YOUR-FILE.m} +%% +%% +%% For your convenience this package has the following options: +%% +%% - bw if you intend to print the document (highlighting done +%% via text formatting (bold, italic) and shades of gray) +%% +%% - numbered if you want line numbers +%% +%% - autolinebreaks if you want the package to automatically +%% wrap your code. This is buggy as it may well break +%% break syntax and it doesn't work well with comments. +%% You REALLY should wrap your code manually. +%% +%% - useliterate if you want some characters / relations in +%% your code to be replace with something more readable. +%% Example: ~= becomes $\neq$, >= becomes $\geq$, delta +%% becomes $\delta$ and so on. +%% +%% - framed if you want a frame around the source code blocks +%% +%% - final if you have ``gloablly'' set the draft option, the +%% listings package will not output the code at all. to +%% force it to do so anyway, load this package with the +%% final option (passes the ``final'' on to listings). +%% +%% For example, you may use \usepackage[numbered,framed]{mcode} +%% in your document preamble. +%% +%% Note: Inside code blocks you can escape to LaTeX text mode +%% using §...§. For ex. §text and some math: $x^2$§, which is +%% especially useful in comments for putting nicely typeset +%% equations etc. To get the same colour/style as in the rest +%% of the comment use \mcommentfont, i.e. §\mcommentfont $x^2$§ +%% +%% To change the font used, edit the first line in the "custo- +%% mise below" section. And feel free to edit other things as +%% well. Refer to the documentation of the listings package to +%% see what else you could do. If an extra small font is re- +%% quired, use {\fontfamily{pcr}\fontsize{3}{4.6}\selectfont} +%% in the definition of \lstbasicfont. +%% +%% Author: +%% Florian Knorn | florian@knorn.org | www.florian-knorn.com +%% +%% Version history: +%% 2.3 -- More keywords (thanks Dominik Wild!) +%% 2.2 -- Bugfix (thanks Willi Gerbig!) +%% 2.1 -- Finally automatic detection between end and end +%% 2.0 -- New options for line breaking and literate prog. +%% 1.8 -- Fixed typo in documentation regarding §...§ +%% 1.7 -- Added MATLAB block comment syntax %{ ...... %} +%% 1.6 -- Added some infos, dealing with keyword ``end'' +%% 1.5 -- Tweaked check to see wether textcomp is loaded +%% 1.4 -- Fixed misconfig (mathescape now set to false) +%% 1.3 -- Purely cosmetic (tabs replaced by spaces) +%% 1.2 -- Added \lstset{showstringspaces=false} +%% 1.1 -- Added \mcode command and [final] option +%% 1.0 -- Release + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% D O N ' T T O U C H T H I S % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\fileversion{2.3} +\def\filedate{2012/08/31} + +\typeout{-- Package: `mcode' \fileversion\space <\filedate> --} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{mcode}[\filedate\space\fileversion] + +% for bw-option +\newif\ifbw +\DeclareOption{bw}{\bwtrue} + +% numbered option +\newif\ifnumbered +\DeclareOption{numbered}{\numberedtrue} + +% final option +\newif\iffinal +\DeclareOption{final}{\finaltrue} + +% autolinebreaks option +\newif\ifautolinebreaks +\DeclareOption{autolinebreaks}{\autolinebreakstrue} + +% literate programming (replace certain characters/relations +\newif\ifuseliterate +\DeclareOption{useliterate}{\useliteratetrue} + +% framed option +\newif\ifframed +\DeclareOption{framed}{\framedtrue} + +\DeclareOption*{% default + \PackageWarning{mcode}{Unknown option `\CurrentOption' !}% +} +\ProcessOptions + +\ifbw\typeout{ - settings optimized for printing (bw formating)} +\else\typeout{ - settings optimized for display (colour formating)}\fi +\ifnumbered\typeout{ - line numbering enabled}\else\fi +\ifuseliterate\typeout{ - literate programming (character replacements) enabled}\else\fi +\ifautolinebreaks\typeout{ - automatic line breaking enabled (careful, buggy!)}\else\fi +\ifframed\typeout{ - framed listings}\else\fi + +% This command allows you to typeset syntax highlighted Matlab +% code ``inline''. The font size \small seems to look best... +\newcommand{\mcode}[1]{\lstinline[basicstyle=\lstbasicfont\small]|#1|} + +% check if color command exists +\ifx\color\undefined% + \RequirePackage{xcolor}% +\fi + +% check if listings has been loaded +\ifx\lstset\undefined% + \iffinal + \RequirePackage[final]{listings} + \else + \RequirePackage{listings} + \fi +\fi + +% Check if textcomp has been loaded (this package is needed for +% upright quotes '' (instead of typographic ones `´)... +\ifx\textquotesingle\undefined% + \RequirePackage{textcomp}% +\fi + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% C U S T O M I S E B E L O W % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% --------------------------------------------------------------------------------- +% default font +\def\lstbasicfont{\fontfamily{pcr}\selectfont\footnotesize} + +% --------------------------------------------------------------------------------- +% matlat languate definition +\lstdefinelanguage{matlabfloz}{% + alsoletter={...},% + morekeywords={% % keywords + break,case,catch,continue,elseif,else,end,% + for,function,global,if,otherwise,persistent,% + return,switch,try,while,methods,properties,% + events,classdef,...},% + comment=[l]\%, % comments + morecomment=[l]..., % comments + morecomment=[s]{\%\{}{\%\}}, % block comments + morestring=[m]' % strings +}[keywords,comments,strings]% + +% --------------------------------------------------------------------------------- +% general definitions +\lstset{% + basicstyle={\lstbasicfont}, % set font + showstringspaces=false, % do not emphasize spaces in strings + tabsize=4, % number of spaces of a TAB + mathescape=false,escapechar=§, % escape to latex with §...§ + upquote=true, % upright quotes + aboveskip={1.5\baselineskip}, % a bit of space above listings + columns=fixed % nice spacing +} + +% --------------------------------------------------------------------------------- +% define colours and styles +\ifbw % use font formating and gray 'colors' + \def\mcommentfont{\color[gray]{.75}\itshape} %comments light gray and italic + \lstset{language=matlabfloz, % use our version of highlighting + keywordstyle=\bfseries, % keywords in bold + commentstyle=\mcommentfont, % comments + stringstyle=\color[gray]{0.5} % strings darker gray + } +\else% notbw => use colors : ) + \def\mcommentfont{\color[rgb]{.133,.545,.133}} %comments in green + \lstset{language=matlabfloz, % use our version of highlighting + keywordstyle=\color[rgb]{0,0,1}, % keywords in blue + commentstyle=\mcommentfont, % comments + stringstyle=\color[rgb]{.627,.126,.941} % strings in purple + } +\fi%bw + +% --------------------------------------------------------------------------------- +% automatic line breaking --- warning, this is buggy and +% doesn't break comments correctly! +\ifautolinebreaks + \newsavebox{\lbreakdots}\sbox{\lbreakdots}{\lstbasicfont\mcommentfont...} + \lstset{breaklines=true,breakatwhitespace=true,prebreak=\usebox{\lbreakdots}} +\fi + +% --------------------------------------------------------------------------------- +% literate replacements +% the following is for replacing some matlab relations like >= or ~= +% by the corresponding LaTeX symbols, which are much easier to read ... +\ifuseliterate + \lstset{% + literate=% + {~}{{$\neg$}}1 % \neg + {<=}{{\tiny$\leq$}}1 % \leq + {>=}{{\tiny$\geq$}}1 % \geq + {~=}{{\tiny$\neq$}}1 % \neq + {delta}{{\tiny$\Delta$}}1 % \Delta + {(end)}{\lstbasicfont (end)}{5} % black ``end'' when indexing last vector element + {({ }end)}{\lstbasicfont ({ }end)}{6} + {(end{ })}{\lstbasicfont (end{ })}{6} + {({ }end{ })}{\lstbasicfont ({ }end{ })}{7} + {:end}{\lstbasicfont :end}{4} + {:{ }end}{\lstbasicfont :{ }end}{5} + {end:}{\lstbasicfont end:}{4} + {end{ }:}{\lstbasicfont end{ }:}{5} + {,end}{\lstbasicfont ,end}{4} + {,{ }end}{\lstbasicfont ,{ }end}{5} + } +\else + \lstset{% + literate=% + {(end)}{\lstbasicfont (end)}{5} % black ``end'' when indexing last vector element + {({ }end)}{\lstbasicfont ({ }end)}{6} + {(end{ })}{\lstbasicfont (end{ })}{6} + {({ }end{ })}{\lstbasicfont ({ }end{ })}{7} + {:end}{\lstbasicfont :end}{4} + {:{ }end}{\lstbasicfont :{ }end}{5} + {end:}{\lstbasicfont end:}{4} + {end{ }:}{\lstbasicfont end{ }:}{5} + {,end}{\lstbasicfont ,end}{4} + {,{ }end}{\lstbasicfont ,{ }end}{5} + } +\fi%literates + +% --------------------------------------------------------------------------------- +% line numbering +\ifnumbered% numbered option + \lstset{% + numbersep=3mm, numbers=left, numberstyle=\tiny, % number style + } +\fi + +\ifframed% framed option + \lstset{% + frame=single, % frame + } + \ifnumbered% + \lstset{% + framexleftmargin=6mm, xleftmargin=6mm % tweak margins + } + \fi +\fi + +\endinput +%% End of file `mcode.sty'. \ No newline at end of file From d497b69791752cd363144e5a96a311dfd4c2b844 Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Mon, 20 Oct 2014 22:49:18 +0200 Subject: [PATCH 13/21] vim words --- vim/spell/en.utf-8.add | 31 ------------------------------- vim/spell/fr.utf-8.add | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 31 deletions(-) diff --git a/vim/spell/en.utf-8.add b/vim/spell/en.utf-8.add index 5ae9a35..3fcc297 100644 --- a/vim/spell/en.utf-8.add +++ b/vim/spell/en.utf-8.add @@ -5,9 +5,6 @@ UTC init i printf -connectique -recontacte -m'enfin Debian keysigning NSA @@ -23,43 +20,15 @@ mutex batchs csv Battelle -superlinéaires -superlinéaire -parsé -despotiste -ventilo -l'ordi -skippé -stacktrace mouhahahhahahha mouhahahahahha circlip BrainFuck Multinôme -microcontroleurs -séquentiellement -encapsule -désinscrire -L'État -lémanique OpenStreetMap -crevard -permission/! nargout nargin isfield rmfield elseif TEAP -Écologisme -écologue -éconologique -éconologiques -énergétiquement -méthanisation -hyporhéique -nommage -instancier -Cryosphère -agravant -privatisables diff --git a/vim/spell/fr.utf-8.add b/vim/spell/fr.utf-8.add index c118ee9..3309319 100644 --- a/vim/spell/fr.utf-8.add +++ b/vim/spell/fr.utf-8.add @@ -8,6 +8,48 @@ exams proba stranger should +connectique +superlinéaires +microcontroleurs +crevard +permission/! +Écologisme +écologue +éconologique +éconologiques +énergétiquement +méthanisation +hyporhéique +nommage +instancier +Cryosphère +agravant +privatisables +Ferpècle +courantomètre +l'Environnement +conductimètre +dégraveur +journalièrement +maintenable +cryosphère +solarimère +cryosphériques +Evolène +séquentiellement +encapsule +désinscrire +L'État +lémanique +superlinéaire +parsé +despotiste +ventilo +l'ordi +skippé +stacktrace +recontacte +m'enfin to read our From 97573f4dd51adec6728153140f9175675f38313a Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Mon, 20 Oct 2014 22:51:11 +0200 Subject: [PATCH 14/21] random things --- bashrc | 3 +++ dwm/config.h | 2 +- inputrc | 3 ++- mutt/muttrc | 5 ----- vim/vimrc | 3 +++ xinitrc | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/bashrc b/bashrc index 90c23ca..fe555c1 100644 --- a/bashrc +++ b/bashrc @@ -1,6 +1,8 @@ shopt -s checkwinsize #Pour pas s'écrire dessus shopt -s histappend shopt -s autocd #No more cd xx +shopt -s cdspell #drain bramage +shopt -s dirspell ##shopt -s autocd #Like zsh PROMPT_COMMAND='history -a' @@ -114,6 +116,7 @@ alias bim='vim' alias vi='vim' alias VIM='vim' alias ivm='vim' +alias vmi='vim' alias gl='git log --graph --abbrev-commit --pretty=oneline --decorate' alias gitst='git status' diff --git a/dwm/config.h b/dwm/config.h index a24f233..40b0193 100644 --- a/dwm/config.h +++ b/dwm/config.h @@ -117,7 +117,7 @@ static Key keys[] = { { MODKEY, XK_i, incnmaster, {.i = +1 } }, { MODKEY, XK_d, incnmaster, {.i = -1 } }, { MODKEY, XK_h, setmfact, {.f = -0.05} }, /* ratio droite/gauche */ - { MODKEY, XK_m, setmfact, {.f = +0.05} }, /* idem */ + { MODKEY, XK_l, setmfact, {.f = +0.05} }, /* idem */ { MODKEY, XK_Return, zoom, {0} }, { MODKEY, XK_Tab, view, {0} }, { MODKEY|ShiftMask, XK_c, killclient, {0} }, diff --git a/inputrc b/inputrc index e29669d..c086fbc 100644 --- a/inputrc +++ b/inputrc @@ -1,5 +1,6 @@ #set editing-mode vi #set keymap vi set completion-ignore-case on -set show-all-if-ambiguous on +#set completion-map-case on +#set show-all-if-ambiguous on set colored-stats on diff --git a/mutt/muttrc b/mutt/muttrc index 35a3cbb..365af02 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -125,9 +125,4 @@ set index_format="%2C | %Z [%d] %-30.30F (%-4.4c) %s" set sleep_time=0 -#set mime_forward=yes -#set mime_forward_rest=yes -# -# -# macro attach 'V' "cat > /dev/shm/mail.html && firefox /dev/shm/mail.html && rm /dev/shm/mail.html" diff --git a/vim/vimrc b/vim/vimrc index ba08866..cb1b2f8 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -180,6 +180,8 @@ autocmd BufNewFile,BufRead *.m set ts=4 sw=4 keywordprg=~/.vim/scripts/doc.octav vmap ,w :!firefox "http://fr.wikipedia.org/wiki/" >& /dev/null vmap ,W :!firefox "http://en.wikipedia.org/wiki/" >& /dev/null vmap ,c :!firefox "http://www.leconjugueur.com/php5/index.php?v=" >& /dev/null +vmap ,d :!firefox "http://fr.wiktionary.org/wiki/" >& /dev/null +vmap ,D :!firefox "http://en.wiktionary.org/wiki/" >& /dev/null "JAVA iabbr syso System.out.println @@ -207,5 +209,6 @@ noremap! noremap "" noremap! +noremap A iSale Con "Languagetool - :LanguageToolCheck diff --git a/xinitrc b/xinitrc index ff22305..8c0d701 100644 --- a/xinitrc +++ b/xinitrc @@ -61,7 +61,7 @@ mpc random on #ssh-agent -t 10 /home/frank/Programmation/dotfiles/dwm/dwm /home/frank/Programmation/dotfiles/dwm/dwm - +bash # exec gnome-session From b6556208c1c924928f6194a966c90a0b95e22d28 Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Tue, 11 Nov 2014 18:57:48 +0100 Subject: [PATCH 15/21] Fuck you, portability --- Utils/octopus.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utils/octopus.sh b/Utils/octopus.sh index 43bbcf6..78f5f79 100755 --- a/Utils/octopus.sh +++ b/Utils/octopus.sh @@ -190,7 +190,7 @@ case $1 in ;; "print") - sudo systemctl start cups + sudo systemctl start org.cups.cupsd #fucking name changes… ;; esac From 60ed068c270f67f22ed5536f0be0242a53283e44 Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Sun, 16 Nov 2014 14:55:00 +0100 Subject: [PATCH 16/21] various shit --- TO_INSTALL | 1 + bashrc | 3 +++ install.sh | 1 + texmf/tex/latex/frank_tex/frank_tex.sty | 13 ++++++++----- vim/spell/en.utf-8.add | 8 ++++++++ vim/vimrc | 4 ++-- xbindkeysrc | 3 +++ xinitrc | 3 +++ 8 files changed, 29 insertions(+), 7 deletions(-) create mode 100644 TO_INSTALL create mode 100644 xbindkeysrc diff --git a/TO_INSTALL b/TO_INSTALL new file mode 100644 index 0000000..12a5167 --- /dev/null +++ b/TO_INSTALL @@ -0,0 +1 @@ +xbindkeysrc diff --git a/bashrc b/bashrc index fe555c1..238d21c 100644 --- a/bashrc +++ b/bashrc @@ -513,6 +513,9 @@ function op "odt") libreoffice "$1" ;; + "png"|"jpg"|"jpeg") + eog "$i" + ;; *) xdg-open "$1" ;; diff --git a/install.sh b/install.sh index ecbc382..f7a8c91 100755 --- a/install.sh +++ b/install.sh @@ -23,6 +23,7 @@ function deploy_for_desktop() { # {{{ cd ~ ln -s $WAI/xinitrc ./.xinitrc + ln -s $WAI/xbindkeysrc ./.xbindkeysrc ln -s $WAI/inputrc ./.inputrc ln -s $WAI/Xmodmap ./.Xmodmap ln -s $WAI/octaverc ./.octaverc diff --git a/texmf/tex/latex/frank_tex/frank_tex.sty b/texmf/tex/latex/frank_tex/frank_tex.sty index 10fffc3..9eb9e65 100644 --- a/texmf/tex/latex/frank_tex/frank_tex.sty +++ b/texmf/tex/latex/frank_tex/frank_tex.sty @@ -14,17 +14,20 @@ \usepackage{amsfonts} \usepackage{amssymb} +\usepackage{microtype} + \usepackage[french]{babel} -%\usepackage[Sonny]{fncychap} % Lenny, Conny ,Bjarne, Rejne, Glenn, Sonny +% Lenny, Conny ,Bjarne, Rejne, Glenn, Sonny, PetersLenny, Bjornstrup +\usepackage[Sonny]{fncychap} + %\usepackage{fancyhdr} -\usepackage{fancyhdr} -\pagestyle{fancyplain} +%\usepackage{fancyhdr} +%\pagestyle{fancyplain} -\usepackage{sistyle} -\SIthousandsep{'} %to use with \num{1337} +\usepackage{siunitx} \usepackage{indentfirst} \setlength{\parindent}{1cm} diff --git a/vim/spell/en.utf-8.add b/vim/spell/en.utf-8.add index 3fcc297..0778c9e 100644 --- a/vim/spell/en.utf-8.add +++ b/vim/spell/en.utf-8.add @@ -32,3 +32,11 @@ isfield rmfield elseif TEAP +Pfankuch +Evolène +Ferpècle +desdites +Sion +Cryosphère +hydrobiologie +piétonisation diff --git a/vim/vimrc b/vim/vimrc index cb1b2f8..18df9b1 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -160,9 +160,9 @@ inoremap ¸ /<+.\{-1,}+>c/+>/e "CF. limit of 74 for when ">>>" ;) au BufRead /dev/shm/mutt-* set tw=74 fo+=aw noautoindent -autocmd BufRead,BufNewFile *.tex set tw=80 fo+=aw autocmd BufRead,BufNewFile *.markdown set tw=80 fo+=aw -autocmd BufRead,BufNewFile *.latex set tw=80 fo+=aw +autocmd BufRead,BufNewFile *.tex set filetype=tex tw=80 fo+=aw +autocmd BufRead,BufNewFile *.latex set tw=80 fo+=aw ts=4 autocmd BufRead,BufNewFile *.lista set filetype=lisp autocmd BufRead,BufNewFile *.xml set ts=4 sw=4 autocmd BufRead,BufNewFile *.md set filetype=markdown tw=80 fo+=aw diff --git a/xbindkeysrc b/xbindkeysrc new file mode 100644 index 0000000..1fea9f4 --- /dev/null +++ b/xbindkeysrc @@ -0,0 +1,3 @@ +"synclient TouchpadOff=$(synclient -l | grep -ce TouchpadOff.*0)" + m:0x0 + c:199 + XF86TouchpadToggle diff --git a/xinitrc b/xinitrc index 8c0d701..a1382ce 100644 --- a/xinitrc +++ b/xinitrc @@ -19,6 +19,8 @@ wmname LG3D #Keyboard setup +compose key for "ŭ" (Win-b u) for esperanto setxkbmap -model pc104 -layout ch -variant fr -option compose:lwin +xbindkeysrc & + #My pinkie hurts :'( if [ -s ~/.Xmodmap ]; then @@ -59,6 +61,7 @@ redshift -l 46:6 || true & mpc ls | mpc add mpc random on + #ssh-agent -t 10 /home/frank/Programmation/dotfiles/dwm/dwm /home/frank/Programmation/dotfiles/dwm/dwm bash From 89f79533197f83bdcd1a1d48f2aeef61a184ebd4 Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Sun, 16 Nov 2014 14:55:27 +0100 Subject: [PATCH 17/21] sty's --- texmf/tex/latex/frank_tex/minipage.sty | 65 + texmf/tex/latex/frank_tex/siunitx.sty | 3583 ++++++++++++++++++++++++ 2 files changed, 3648 insertions(+) create mode 100644 texmf/tex/latex/frank_tex/minipage.sty create mode 100644 texmf/tex/latex/frank_tex/siunitx.sty diff --git a/texmf/tex/latex/frank_tex/minipage.sty b/texmf/tex/latex/frank_tex/minipage.sty new file mode 100644 index 0000000..b74368f --- /dev/null +++ b/texmf/tex/latex/frank_tex/minipage.sty @@ -0,0 +1,65 @@ +%%% ==================================================================== +%%% @LaTeX-style-file{ +%%% author = "Mario Wolczko", +%%% version = "2", +%%% date = "21 May 1992", +%%% time = "20:55:01 BST", +%%% filename = "boxedminipage.sty", +%%% email = "mario@acm.org", +%%% codetable = "ISO/ASCII", +%%% keywords = "LaTeX, minipage, framebox", +%%% supported = "no", +%%% docstring = "LaTeX document-style option which defines +%%% the boxedminipage environment -- just like minipage, but with +%%% a box around it.", +%%% } +%%% ==================================================================== +% +% This file is in the public domain +% +% The thickness of the rules around the box is controlled by +% \fboxrule, and the distance between the rules and the edges of the +% inner box is governed by \fboxsep. +% +% This code is based on Lamport's minipage code. +% +% Fixed, 7 Jun 89 by Jerry Leichter +% Leave \fboxsep worth of separation at top and bottom, not just at +% the sides! +% +\def\boxedminipage{\@ifnextchar [{\@iboxedminipage}{\@iboxedminipage[c]}} + +\def\@iboxedminipage[#1]#2{\leavevmode \@pboxswfalse + \if #1b\vbox + \else \if #1t\vtop + \else \ifmmode \vcenter + \else \@pboxswtrue $\vcenter + \fi + \fi + \fi\bgroup % start of outermost vbox/vtop/vcenter + \hsize #2 + \hrule\@height\fboxrule + \hbox\bgroup % inner hbox + \vrule\@width\fboxrule \hskip\fboxsep \vbox\bgroup % innermost vbox + \vskip\fboxsep + \advance\hsize -2\fboxrule \advance\hsize-2\fboxsep + \textwidth\hsize \columnwidth\hsize + \@parboxrestore + \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@ + \let\@footnotetext\@mpfootnotetext + \let\@listdepth\@mplistdepth \@mplistdepth\z@ + \@minipagerestore\@minipagetrue + \everypar{\global\@minipagefalse\everypar{}}} + +\def\endboxedminipage{% + \par\vskip-\lastskip + \ifvoid\@mpfootins\else + \vskip\skip\@mpfootins\footnoterule\unvbox\@mpfootins\fi + \vskip\fboxsep + \egroup % ends the innermost \vbox + \hskip\fboxsep \vrule\@width\fboxrule + \egroup % ends the \hbox + \hrule\@height\fboxrule + \egroup% ends the vbox/vtop/vcenter + \if@pboxsw $\fi} + diff --git a/texmf/tex/latex/frank_tex/siunitx.sty b/texmf/tex/latex/frank_tex/siunitx.sty new file mode 100644 index 0000000..5c97779 --- /dev/null +++ b/texmf/tex/latex/frank_tex/siunitx.sty @@ -0,0 +1,3583 @@ +%% +%% This is file `siunitx.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% siunitx.dtx (with options: `package') +%% --------------------------------------------------------------- +%% The siunitx package --- A comprehensive (SI) units package +%% Maintained by Joseph Wright +%% E-mail: joseph.wright@morningstar2.co.uk +%% Released under the LaTeX Project Public License v1.3c or later +%% See http://www.latex-project.org/lppl.txt +%% --------------------------------------------------------------- +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{siunitx} + [2009/03/29 v2.0alpha A comprehensive (SI) units package] +\begingroup + \@ifundefined{eTeXversion}{% + \PackageError{siunitx}{Not running under e-TeX}{% + This package requires e-TeX. Try compiling the document with + \MessageBreak `elatex' instead of `latex'. When using pdfTeX, try + `pdfelatex' \MessageBreak instead of `pdflatex'. + }% + \endgroup\endinput + }{% + \endgroup +} +\begingroup + \@for\@tempa:=SIunits,sistyle,siunits,SIstyle,unitsdef,fancyunits\do{% + \@ifpackageloaded{\@tempa}{% + \PackageError{siunitx}{Package `\@tempa' incompatible}{% + The \@tempa\space package and siunitx are incompatible. + \MessageBreak Use the `emulate=\@tempa' package option when + loading siunitx. + }% + }{}% + } +\endgroup +\newcommand*{\si@package@check}{% + \begingroup + \@for\@tempa:=SIunits,sistyle,siunits,SIstyle\do{ + \@ifpackageloaded{\@tempa}{% + \PackageError{siunitx}{Package `\@tempa' incompatible}{% + The \@tempa\space package and siunitx are incompatible. + \MessageBreak Use the `emulate=\@tempa' package option when + loading siunitx. + }% + }{}% + }% + \endgroup +} +\AtBeginDocument{\si@package@check} +\newcommand*{\si@catcode@restore}{} +\newcommand*{\si@catcode@set}{} +\newcommand*{\si@catcode@store}[2]{% + \edef\si@catcode@restore{% + \si@catcode@restore + \catcode#1 \the\catcode#1\relax + }% + \catcode#1 #2\relax +} +\newcommand*{\si@catcode@symbols}{% + \si@catcode@set{42}{12}% * + \si@catcode@set{43}{12}% + + \si@catcode@set{44}{12}% , + \si@catcode@set{46}{12}% . + \si@catcode@set{47}{12}% / + \si@catcode@set{58}{12}% : + \si@catcode@set{59}{12}% ; + \si@catcode@set{60}{12}% < + \si@catcode@set{61}{12}% = + \si@catcode@set{62}{12}% > +} +\let\si@catcode@set\si@catcode@store +\si@catcode@symbols +\si@catcode@set{38}{4}% & +\si@catcode@set{45}{12}% - +\si@catcode@set{94}{7}% ^ +\si@catcode@set{95}{8}% _ +\si@catcode@set{126}{13}% ~ +\renewcommand*{\si@catcode@set}[2]{% + \catcode#1 #2\relax +} +\newcommand*{\si@lccode@restore}{} +\edef\si@lccode@restore{% + \lccode38 \the\lccode38\relax % & +} +\newcommand*{\si@lccode@set}[2]{% + \lccode#1 #2\relax +} +\RequirePackage{amstext,array,etex,pgfkeys} +\newcommand*{\si@encoding@ts@one}{% + \@ifundefined{T@TS1}{% + \DeclareFontEncoding{TS1}{}{}% + \DeclareFontSubstitution{TS1}{cmr}{m}{n}% + }{}% +} +\AtBeginDocument{% + \si@encoding@ts@one +} +\newcommand*{\si@key@path}{} +\newcommand*{\si@key@error}{% + \expandafter\si@key@error@aux\pgfkeyscurrentkey\si@stop +} +\newcommand*{\si@key@error@aux}{} +\def\si@key@error@aux/siunitx/#1\si@stop{% + \si@log@error{Unknown option `#1'}{% + The option `#1' is not known to siunitx. + }% +} +\newcommand*{\si@keys@family}[1]{% + \pgfkeys{ + /siunitx/#1/.is family, + /siunitx/#1/.unknown/.code = \si@key@error + }% +} +\pgfkeys{ + /siunitx/.is family, + /siunitx/.unknown/.code = \si@key@error +} +\pgfkeys{ + /handlers/.is siunitx switch/.code = {% + \edef\si@key@path{\pgfkeyscurrentpath}% + \pgfkeys{ + \si@key@path/.is choice, + \si@key@path/.default = {true}, + \si@key@path/true/.code = {\si@bool@cs@true{si@#1@bool}}, + \si@key@path/false/.code = {\si@bool@cs@false{si@#1@bool}}, + \si@key@path/yes/.code = {\si@bool@cs@true{si@#1@bool}}, + \si@key@path/no/.code = {\si@bool@cs@false{si@#1@bool}}, + \si@key@path/on/.code = {\si@bool@cs@true{si@#1@bool}}, + \si@key@path/off/.code = {\si@bool@cs@false{si@#1@bool}}, + }% + } +} +\newcommand*{\si@false@bool}{01} +\newcommand*{\si@true@bool}{00} +\newcommand*{\si@tmp@bool}{} +\newcommand*{\si@tempa}{} +\newcommand*{\si@tempb}{} +\newcount\si@tempcnt +\newsavebox\si@tempbox +\newtoks\si@temp@toks +\newcommand*{\si@log@error}{% + \PackageError{siunitx}% +} +\newcommand*{\si@log@info}{% + \PackageInfo{siunitx}% +} +\newcommand*{\si@log@warning}{% + \PackageWarning{siunitx}% +} +\newcommand*{\si@reserveda}{} +\newcommand*{\si@reservedb}{} +\newtoks\si@reserved@toks +\newcommand*{\si@add@left@n}[2]{% + \def\si@reserveda{#2}% + \edef#1{% + \expandafter\unexpanded\expandafter{\si@reserveda}% + \expandafter\unexpanded\expandafter{#1}% + }% +} +\newcommand*{\si@add@left@o}[2]{% + \expandafter\si@add@left@n\expandafter#1\expandafter{#2}% +} +\newcommand*{\si@add@left@cs@n}[1]{% + \expandafter\si@add@left@n\csname #1\endcsname +} +\newcommand*{\si@add@left@cs@o}[1]{% + \expandafter\si@add@left@o\csname #1\endcsname +} +\newcommand*{\si@add@right@n}[2]{% + \def\si@reserveda{#2}% + \edef#1{% + \expandafter\unexpanded\expandafter{#1}% + \expandafter\unexpanded\expandafter{\si@reserveda}% + }% +} +\newcommand*{\si@add@right@o}[2]{% + \expandafter\si@add@right@n\expandafter#1\expandafter{#2}% +} +\newcommand*{\si@add@right@cs@n}[1]{% + \expandafter\si@add@right@n\csname #1\endcsname +} +\newcommand*{\si@add@right@cs@o}[1]{% + \expandafter\si@add@right@o\csname #1\endcsname +} +\newcommand*{\si@bool@false}[1]{% + \let#1\si@false@bool +} +\newcommand*{\si@bool@new}[1]{% + \newcommand*{#1}{}% + \let#1\si@false@bool +} +\newcommand*{\si@bool@true}[1]{% + \let#1\si@true@bool +} +\newcommand*{\si@bool@cs@false}[1]{% + \expandafter\si@bool@false\csname #1\endcsname +} +\newcommand*{\si@bool@cs@new}[1]{% + \expandafter\si@bool@new\csname #1\endcsname +} +\newcommand*{\si@bool@cs@true}[1]{% + \expandafter\si@bool@true\csname #1\endcsname +} +\newcommand*{\si@bool@if@F}[1]{% + \if#1% + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi +} +\newcommand*{\si@bool@if@T}[1]{% + \if#1% + \expandafter\@firstofone + \else + \expandafter\@gobble + \fi +} +\newcommand*{\si@bool@if@TF}[1]{% + \if#1% + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +\newcommand*{\si@bool@cs@if@F}[1]{% + \expandafter\si@bool@if@F\csname #1\endcsname +} +\newcommand*{\si@bool@cs@if@T}[1]{% + \expandafter\si@bool@if@T\csname #1\endcsname +} +\newcommand*{\si@bool@cs@if@TF}[1]{% + \expandafter\si@bool@if@TF\csname #1\endcsname +} +\newcommand*{\si@clear@cs}[1]{% + \si@let@cN{#1}\@empty +} +\newcommand*{\si@clear@macro}[1]{% + \let#1\@empty +} +\newcommand*{\si@count@incr@cs}[1]{% + \advance\@nameuse{#1}\@ne\relax +} +\newcommand*{\si@csname@if@F}[1]{% + \ifcsname #1\endcsname + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi +} +\newcommand*{\si@csname@if@T}[1]{% + \ifcsname #1\endcsname + \expandafter\@firstofone + \else + \expandafter\@gobble + \fi +} +\newcommand*{\si@csname@if@TF}[1]{% + \ifcsname #1\endcsname + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +\newcommand*{\si@dowhile@bool@T}[2]{% + #2% + \si@bool@if@T#1{% + \si@dowhile@bool@T#1{#2}% + }% +} +\newcommand*{\si@empty@cs@if@F}[1]{% + \expandafter\si@empty@if@F\csname #1\endcsname +} +\newcommand*{\si@empty@cs@if@T}[1]{% + \expandafter\si@empty@if@T\csname #1\endcsname +} +\newcommand*{\si@empty@cs@if@TF}[1]{% + \expandafter\si@empty@if@TF\csname #1\endcsname +} +\newcommand*{\si@empty@if@F}[1]{% + \si@meaning@eq@if@F#1\@empty +} +\newcommand*{\si@empty@if@T}[1]{% + \si@meaning@eq@if@T#1\@empty +} +\newcommand*{\si@empty@if@TF}[1]{% + \si@meaning@eq@if@TF#1\@empty +} +\newcommand*{\si@empty@tlist@if@F}[1]{% + \expandafter\ifx\expandafter\si@nil\detokenize{#1}\si@nil + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi +} +\newcommand*{\si@empty@tlist@if@T}[1]{% + \expandafter\ifx\expandafter\si@nil\detokenize{#1}\si@nil + \expandafter\@firstofone + \else + \expandafter\@gobble + \fi +} +\newcommand*{\si@empty@tlist@if@TF}[1]{% + \expandafter\ifx\expandafter\si@nil\detokenize{#1}\si@nil + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +\newcommand*{\si@empty@toks@if@F}[1]{% + \expandafter\si@empty@tlist@if@F\expandafter{\the#1}% +} +\newcommand*{\si@empty@toks@if@T}[1]{% + \expandafter\si@empty@tlist@if@T\expandafter{\the#1}% +} +\newcommand*{\si@empty@toks@if@TF}[1]{% + \expandafter\si@empty@tlist@if@TF\expandafter{\the#1}% +} +\newcommand*{\si@elt@count}[1]{% + \number\numexpr 0\si@loop@over@macro#1\si@elt@count@aux\relax +} +\newcommand*{\si@elt@count@aux}[1]{+1} +\newcommand*{\si@elt@count@cs}[1]{% + \expandafter\si@elt@count\csname #1\endcsname +} +\newcommand*{\si@expand@tlist}[2]{% + \si@clear@macro#1% + \def\si@reservedb##1{% + \si@add@right@o#1{##1}% + }% + \si@loop@over@macro@aux\si@reservedb#2\si@loop@end\si@loop@stop +} +\newcommand*{\si@expand@tlist@cs}[1]{% + \expandafter\si@expand@tlist\csname #1\endcsname +} +\newcommand*{\si@in@if@F}[2]{% + \def\si@reserveda##1#2##2\si@stop{% + \si@no@value@if@T{##2}% + }% + \expandafter\si@reserveda#1#2\si@no@value\si@stop +} +\newcommand*{\si@in@if@T}[2]{% + \def\si@reserveda##1#2##2\si@stop{% + \si@no@value@if@F{##2}% + }% + \expandafter\si@reserveda#1#2\si@no@value\si@stop +} +\newcommand*{\si@in@if@TF}[2]{% + \def\si@reserveda##1#2##2\si@stop{% + \si@no@value@if@FT{##2}% + }% + \expandafter\si@reserveda#1#2\si@no@value\si@stop +} +\newcommand*{\si@in@tlist@if@F}[2]{% + \def\si@reserveda##1#2##2\si@stop{% + \si@no@value@if@T{##2}% + }% + \si@reserveda#1#2\si@no@value\si@stop +} +\newcommand*{\si@in@tlist@if@T}[2]{% + \def\si@reserveda##1#2##2\si@stop{% + \si@no@value@if@F{##2}% + }% + \si@reserveda#1#2\si@no@value\si@stop +} +\newcommand*{\si@in@tlist@if@TF}[2]{% + \def\si@reserveda##1#2##2\si@stop{% + \si@no@value@if@FT{##2}% + }% + \si@reserveda#1#2\si@no@value\si@stop +} +\newcommand*{\si@in@cs@if@F}[1]{% + \expandafter\si@in@if@F\csname #1\endcsname +} +\newcommand*{\si@in@cs@if@T}[1]{% + \expandafter\si@in@if@T\csname #1\endcsname +} +\newcommand*{\si@in@cs@if@TF}[1]{% + \expandafter\si@in@if@TF\csname #1\endcsname +} +\newcommand*{\si@let@cc}[2]{% + \expandafter\si@let@cN\expandafter{\expandafter#1\expandafter}% + \csname #2\endcsname +} +\newcommand*{\si@let@cN}[1]{% + \expandafter\let\csname #1\endcsname +} +\newcommand*{\si@let@Nc}[2]{% + \expandafter\let\expandafter#1\csname #2\endcsname +} +\newcommand*{\si@loop@over@cs}[1]{% + \expandafter\si@loop@over@macro\csname #1\endcsname +} +\newcommand*{\si@loop@over@macro}[2]{% + \expandafter\si@loop@over@macro@aux + \expandafter#2#1\si@loop@end\si@loop@stop +} +\newcommand*{\si@loop@over@macro@aux}[2]{% + \si@loop@end@if{#2}% + #1{#2}% + \si@loop@over@macro@aux#1% +} +\newcommand*{\si@loop@end@if}[1]{% + \expandafter\ifx\si@loop@end@if@aux#1?\si@nil\si@loop@end\si@loop@end + \expandafter\si@loop@exit + \fi +} +\newcommand*{\si@loop@exec@end@if}[2]{% + \expandafter\ifx\si@loop@end@if@aux#1?\si@nil\si@loop@end\si@loop@end + \expandafter\si@loop@exit@exec + \else + \expandafter\@gobble + \fi + {#2}% +} +\newcommand*{\si@loop@end@if@aux}{} +\def\si@loop@end@if@aux#1#2\si@nil\si@loop@end{#1} +\newcommand*{\si@loop@exit}{} +\def\si@loop@exit#1\si@loop@stop{} +\newcommand*{\si@loop@exit@exec}{} +\def\si@loop@exit@exec#1#2\si@loop@stop{#1} +\newcommand*{\si@loop@end}{\si@loop@end} +\newcommand*{\si@loop@stop}{\si@loop@stop} +\newcommand*{\si@loop@over@three}[2]{% + \expandafter\si@loop@over@three@aux + \expandafter#2#1\si@loop@end\si@loop@stop +} +\newcommand*{\si@loop@over@three@aux}[4]{% + \si@loop@end@if{#2}% + #1{#2#3#4}% + \si@loop@over@three@aux#1% +} +\newcommand*{\si@loop@over@three@cs}[1]{% + \expandafter\si@loop@over@three\csname #1\endcsname +} +\newcommand*{\si@meaning@eq@if@F}[2]{% + \ifx#1#2% + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi +} +\newcommand*{\si@meaning@eq@if@T}[2]{% + \ifx#1#2% + \expandafter\@firstofone + \else + \expandafter\@gobble + \fi +} +\newcommand*{\si@meaning@eq@if@TF}[2]{% + \ifx#1#2% + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +\newcommand*{\si@meaning@eq@cs@if@F}[2]{% + \expandafter\si@meaning@eq@if@F\csname #1\expandafter\endcsname + \csname #2\endcsname +} +\newcommand*{\si@meaning@eq@cs@if@T}[2]{% + \expandafter\si@meaning@eq@if@T\csname #1\expandafter\endcsname + \csname #2\endcsname +} +\newcommand*{\si@meaning@eq@cs@if@TF}[2]{% + \expandafter\si@meaning@eq@if@TF\csname #1\expandafter\endcsname + \csname #2\endcsname +} +\newcommand*{\si@mode@maths@display@if@T}{% + \ifmmode + \ifinner + \expandafter\expandafter\expandafter\@gobble + \else + \expandafter\expandafter\expandafter\@firstofone + \fi + \else + \expandafter\@gobble + \fi +} +\newcommand*{\si@mode@maths@inline@if@T}{% + \ifmmode + \ifinner + \expandafter\expandafter\expandafter\@firstofone + \else + \expandafter\expandafter\expandafter\@gobble + \fi + \else + \expandafter\@gobble + \fi +} +\newcommand*{\si@mode@maths@if@F}{% + \ifmmode + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi +} +\newcommand*{\si@mode@maths@if@TF}{% + \ifmmode + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +\newcommand*{\si@edef@c}[1]{% + \expandafter\edef\csname #1\endcsname +} +\newcommand*{\si@newcommand}{% + \@ifstar{% + \let\l@ngrel@x\protected + \si@newcommand@aux@i + }{% + \def\l@ngrel@x{\protected\long}% + \si@newcommand@aux@i + }% +} +\newcommand*{\si@newcommand@aux@i}[1]{% + \@testopt{\si@newcommand@aux@ii#1}0% +} +\newcommand*{\si@newcommand@aux@ii}{} +\def\si@newcommand@aux@ii#1[#2]{% + \@ifnextchar[{% + \si@newcommand@aux@iii#1[#2]% + }{% + \@argdef#1[#2]% + }%] +} +\newcommand*{\si@newcommand@aux@iii}{} +\def\si@newcommand@aux@iii#1[#2][#3]#4{% + \@ifdefinable#1{% + \expandafter\protected\expandafter\def\expandafter#1\expandafter{% + \expandafter\@testopt\csname\string#1\endcsname{#3}% + }% + \expandafter\@yargdef\csname\string#1\endcsname\tw@{#2}{#4}% + }% +} +\newcommand*{\si@nil}{\si@nil} +\newcommand*{\si@stop}{\si@stop} +\newcommand*{\si@no@value}{\si@no@value} +\newcommand*{\si@no@value@if@F}[1]{% + \if\si@no@value@if@aux@i{#1}% + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi +} +\newcommand*{\si@no@value@if@FT}[1]{% + \if\si@no@value@if@aux@i{#1}% + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi +} +\newcommand*{\si@no@value@if@T}[1]{% + \if\si@no@value@if@aux@i{#1}% + \expandafter\@firstofone + \else + \expandafter\@gobble + \fi +} +\newcommand*{\si@no@value@if@TF}[1]{% + \if\si@no@value@if@aux@i{#1}% + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +\newcommand*{\si@no@value@if@aux@i}[1]{% + \if\expandafter\si@no@value@if@aux@ii\expandafter + {\string\si@no@value\space}{\detokenize{#1}}% + \si@true@bool + \else + \si@false@bool + \fi +} +\newcommand*{\si@no@value@if@aux@ii}[1]{% + \if\number\si@no@value@if@aux@iii{}{}#1\relax +} +\newcommand*{\si@no@value@if@aux@iii}[3]{% + \if#3\relax + \expandafter\si@no@value@if@aux@iv + \fi + \si@no@value@if@aux@iii{\if#3#1}{#2\fi}% +} +\newcommand*{\si@no@value@if@aux@iv}{} +\def\si@no@value@if@aux@iv\si@no@value@if@aux@iii#1#2#3{% + #1#3\relax'#213 + \si@true@bool + \else + \si@false@bool + \fi +} +\newcommand*{\si@num@if@F}[1]{% + \ifnum#1\relax + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi +} +\newcommand*{\si@num@if@T}[1]{% + \ifnum#1\relax + \expandafter\@firstofone + \else + \expandafter\@gobble + \fi +} +\newcommand*{\si@num@if@TF}[1]{% + \ifnum#1\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} +\newcommand*{\si@replace@all@in}[3]{% + \si@reserved@toks{}% + \def\si@tempa##1#2##2\si@stop{% + \si@no@value@if@TF{##2}{% + \si@replace@all@in@aux{##1}% + }{% + \si@replace@all@in@aux{##1#3}% + \si@tempa\@empty##2\si@stop + }% + }% + \@firstofone{\expandafter\si@tempa\expandafter\@empty}% + #1#2\si@no@value\si@stop + \edef#1{\the\si@reserved@toks}% +} +\newcommand*{\si@replace@all@in@aux}[1]{% + \si@reserved@toks\expandafter\expandafter\expandafter{% + \expandafter\the\expandafter\si@reserved@toks#1% + }% +} +\newcommand*{\si@replace@all@in@cs}[1]{% + \expandafter\si@replace@all@in\csname #1\endcsname +} +\newcommand*{\si@reverse@macro}[1]{% + \edef#1{% + \expandafter\si@reverse@tlist\expandafter{#1}% + }% +} +\newcommand*{\si@reverse@cs}[1]{% + \expandafter\si@reverse@macro\csname #1\endcsname +} +\newcommand*{\si@reverse@tlist}[1]{% + \si@reverse@tlist@aux{}#1\si@loop@end\si@loop@stop +} +\newcommand*{\si@reverse@tlist@aux}[2]{% + \si@loop@exec@end@if{#2}{#1}% + \si@reverse@tlist@aux{#2#1}% +} +\newcommand*{\si@stop@if@F}[1]{% + \si@meaning@eq@if@F#1\si@stop +} +\newcommand*{\si@stop@if@T}[1]{% + \si@meaning@eq@if@T#1\si@stop +} +\newcommand*{\si@stop@if@TF}[1]{% + \si@meaning@eq@if@TF#1\si@stop +} +\newcommand*{\si@whiledo@num@T}[2]{% + \si@num@if@T{#1}{% + #2\si@whiledo@num@T{#1}{#2}% + }% +} +\newcommand*{\si@whiledo@empty@F}[2]{% + \si@empty@if@F#1{% + #2\si@whiledo@empty@F#1{#2}% + }% +} +\newcommand*{\si@whiledo@empty@T}[2]{% + \si@empty@if@T#1{% + #2\si@whiledo@empty@T#1{#2}% + }% +} +\newcommand*{\si@whiledo@empty@cs@F}[2]{% + \si@empty@cs@if@F{#1}{% + #2\si@whiledo@empty@cs@F{#1}{#2}% + }% +} +\newcommand*{\si@whiledo@empty@cs@T}[2]{% + \si@empty@cs@if@T{#1}{% + #2\si@whiledo@empty@cs@T{#1}{#2}% + }% +} +\newcommand*{\si@font@fam@mathsf}{} +\newcommand*{\si@font@fam@mathtt}{} +\newcommand*{\si@font@fam@detect@maths}[1]{% + \begingroup + \setbox\@tempboxa\hbox{% + \ensuremath{% + \csname math#1\endcsname{% + \expandafter\global\expandafter\chardef + \csname si@font@fam@math#1\endcsname\fam\relax + }% + }% + }% + \endgroup +} +\g@addto@macro{\document}{% + \si@font@fam@detect@maths{sf}% + \si@font@fam@detect@maths{tt}% +} +\newcommand*{\si@font@fam@sfdefault}{} +\newcommand*{\si@font@fam@ttfamily}{} +\newcommand*{\si@font@fam@detect@text}[1]{% + \si@edef@c{si@font@fam@#1default}{\@nameuse{#1default}}% +} +\AtBeginDocument{% + \si@font@fam@detect@text{sf}% + \si@font@fam@detect@text{tt}% +} +\si@bool@new\si@font@det@b@bool +\si@bool@new\si@font@det@family@bool +\si@bool@new\si@font@det@maths@display@bool +\si@bool@new\si@font@det@maths@inline@bool +\si@bool@new\si@font@det@it@bool +\si@bool@new\si@font@det@mode@bool +\si@keys@family{font/detect} +\pgfkeys{ + /siunitx/font/detect, + all/.style = { + /siunitx/font/detect/bold = true, + /siunitx/font/detect/family = true, + /siunitx/font/detect/italic = true, + /siunitx/font/detect/mode = true + }, + bold/.is siunitx switch = {font@det@b}, + display math/.is siunitx switch = {font@det@maths@display}, + display maths/.is siunitx switch = {font@det@maths@display}, + family/.is siunitx switch = {font@det@family}, + inline bold/.is choice, + inline bold/.cd, + maths/.code = {\si@bool@true\si@font@det@maths@inline@bool}, + math/.code = {\si@bool@true\si@font@det@maths@inline@bool}, + text/.code = {\si@bool@false\si@font@det@maths@inline@bool}, + /siunitx/font/detect, + italic/.is siunitx switch = {font@det@it}, + mode/.is siunitx switch = {font@det@mode}, + none/.style = { + /siunitx/font/detect/bold = false, + /siunitx/font/detect/family = false, + /siunitx/font/detect/italic = false, + /siunitx/font/detect/mode = false + }, + bold = false, + display maths = true, + inline bold = text, + italic = false, + mode = false +} +\si@bool@new\si@font@set@bool +\newcommand*{\si@font@set@bold}{} +\newcommand*{\si@font@set@family}{} +\newcommand*{\si@font@set@italic}{} +\si@bool@new\si@font@set@text@bool +\newcommand*{\si@font@det@set}{% + \si@bool@if@F\si@font@set@bool{% + \si@font@det@init + \si@bool@if@T\si@font@det@b@bool{% + \si@font@det@bold + }% + \si@bool@if@T\si@font@det@family@bool{% + \si@font@det@family + }% + \si@bool@if@T\si@font@det@it@bool{% + \si@font@det@italic + }% + \si@bool@if@T\si@font@det@mode@bool{% + \si@font@det@mode + }% + }% +} +\newcommand*{\si@font@det@init}{% + \si@bool@true\si@font@set@bool + \def\si@font@set@bold{\unboldmath\mdseries}% + \def\si@font@set@family{rm}% + \si@bool@false\si@font@set@text@bool + \def\si@font@set@italic{\upshape}% +} +\newcommand*{\si@font@det@bold}{% + \si@mode@maths@display@if@T{% + \si@bool@if@TF\si@font@det@maths@display@bool{% + \si@font@det@bold@maths + }{% + \si@font@det@bold@text + }% + }% + \si@mode@maths@inline@if@T{% + \si@bool@if@TF\si@font@det@maths@inline@bool{% + \si@font@det@bold@maths + }{% + \si@font@det@bold@text + }% + }% + \si@mode@maths@if@F{% + \si@font@det@bold@text + }% +} +\newcommand*{\si@font@det@bold@maths}{% + \def\si@tempa{bold}% + \si@meaning@eq@if@T\si@tempa\math@version{% + \def\si@font@set@bold{\boldmath\bfseries}% + }% +} +\newcommand*{\si@font@det@bold@text}{% + \def\si@tempa{b}% + \edef\si@tempb{\expandafter\@car\f@series\@nil}% + \si@meaning@eq@if@T\si@tempa\si@tempb{% + \def\si@font@set@bold{\boldmath\bfseries}% + }% +} +\newcommand*{\si@font@det@family}{% + \si@font@det@fam@text + \si@bool@if@T\si@font@det@maths@display@bool{% + \si@mode@maths@display@if@T{% + \si@font@det@fam@maths + }% + }% +} +\newcommand*{\si@font@det@fam@maths}{% + \def\si@font@set@family{rm}% + \si@num@if@TF{\the\fam=\si@font@fam@mathsf}{% + \def\si@font@set@family{sf}% + }{% + \si@num@if@T{\the\fam=\si@font@fam@mathtt}{% + \def\si@font@set@family{tt}% + }% + }% +} +\newcommand*{\si@font@det@fam@text}{% + \si@meaning@eq@if@T\f@family\si@font@fam@sfdefault{% + \def\si@font@set@family{sf}% + }% + \si@meaning@eq@if@T\f@family\si@font@fam@ttdefault{% + \def\si@font@set@family{tt}% + }% +} +\newcommand*{\si@font@det@italic}{% + \def\si@tempa{it}% + \si@meaning@eq@if@T\si@tempa\f@shape{% + \def\si@font@set@italic{\itshape}% + }% +} +\newcommand*{\si@font@det@mode}{% + \si@mode@maths@if@F{% + \si@bool@true\si@font@set@text@bool + }% +} +\newcommand*{\si@font@unit@maths@rm}{} +\newcommand*{\si@font@unit@maths@sf}{} +\newcommand*{\si@font@unit@maths@tt}{} +\newcommand*{\si@font@unit@text@rm}{} +\newcommand*{\si@font@unit@text@sf}{} +\newcommand*{\si@font@unit@text@tt}{} +\newcommand*{\si@font@num@maths@rm}{} +\newcommand*{\si@font@num@maths@sf}{} +\newcommand*{\si@font@num@maths@tt}{} +\newcommand*{\si@font@num@text@rm}{} +\newcommand*{\si@font@num@text@sf}{} +\newcommand*{\si@font@num@text@tt}{} +\si@bool@new\si@font@unit@textmode@bool +\si@bool@new\si@font@num@textmode@bool +\si@keys@family{font} +\si@keys@family{font/units} +\si@keys@family{font/numbers} +\pgfkeys{ + /siunitx/font, + maths rm/.style = { + /siunitx/font/units/maths rm = #1, + /siunitx/font/numbers/maths rm = #1 + }, + maths sf/.style = { + /siunitx/font/units/maths sf = #1, + /siunitx/font/numbers/maths sf = #1 + }, + maths tt/.style = { + /siunitx/font/units/maths tt = #1, + /siunitx/font/numbers/maths tt = #1 + }, + maths rm/.style = { + /siunitx/font/units/maths rm = #1, + /siunitx/font/numbers/maths rm = #1 + }, + maths sf/.style = { + /siunitx/font/units/maths sf = #1, + /siunitx/font/numbers/maths sf = #1 + }, + maths tt/.style = { + /siunitx/font/units/maths tt = #1, + /siunitx/font/numbers/maths tt = #1 + }, + mode/.is choice, + mode/.cd, + maths/.style = { + /siunitx/font/units/mode = maths, + /siunitx/font/numbers/mode = maths + }, + math/.style = { + /siunitx/font/units/mode = maths, + /siunitx/font/numbers/mode = maths + }, + text/.style = { + /siunitx/font/units/mode = text, + /siunitx/font/numbers/mode = text + }, + /siunitx/font, + text rm/.style = { + /siunitx/font/units/text rm = #1, + /siunitx/font/numbers/text rm = #1 + }, + text sf/.style = { + /siunitx/font/units/text sf = #1, + /siunitx/font/numbers/text sf = #1 + }, + text tt/.style = { + /siunitx/font/units/text tt = #1, + /siunitx/font/numbers/text tt = #1 + }, + /siunitx/font/units, + maths rm/.store in = {\si@font@unit@maths@rm}, + maths sf/.store in = {\si@font@unit@maths@sf}, + maths tt/.store in = {\si@font@unit@maths@tt}, + maths rm/.store in = {\si@font@unit@maths@rm}, + maths sf/.store in = {\si@font@unit@maths@sf}, + maths tt/.store in = {\si@font@unit@maths@tt}, + mode/.is choice, + mode/.cd, + maths/.code = {\si@bool@false\si@font@unit@textmode@bool}, + math/.code = {\si@bool@false\si@font@unit@textmode@bool}, + text/.code = {\si@bool@true\si@font@unit@textmode@bool}, + /siunitx/font/units, + text rm/.store in = {\si@font@unit@text@rm}, + text sf/.store in = {\si@font@unit@text@sf}, + text tt/.store in = {\si@font@unit@text@tt}, + /siunitx/font/numbers, + maths rm/.store in = {\si@font@num@maths@rm}, + maths sf/.store in = {\si@font@num@maths@sf}, + maths tt/.store in = {\si@font@num@maths@tt}, + maths rm/.store in = {\si@font@num@maths@rm}, + maths sf/.store in = {\si@font@num@maths@sf}, + maths tt/.store in = {\si@font@num@maths@tt}, + mode/.is choice, + mode/.cd, + maths/.code = {\si@bool@false\si@font@num@textmode@bool}, + math/.code = {\si@bool@false\si@font@num@textmode@bool}, + text/.code = {\si@bool@true\si@font@num@textmode@bool}, + /siunitx/font/numbers, + text rm/.store in = {\si@font@num@text@rm}, + text sf/.store in = {\si@font@num@text@sf}, + text tt/.store in = {\si@font@num@text@tt}, + /siunitx/font, + maths rm = \mathrm, + maths sf = \mathsf, + maths tt = \mathtt, + mode = maths, + text rm = \rmfamily, + text sf = \sffamily, + text tt = \ttfamily +} +\newcommand*{\si@print@type}{} +\newcommand*{\si@print}[2]{% + \begingroup + \def\si@print@type{#1}% + \si@bool@if@F\si@font@set@bool{% + \si@font@det@set + }% + \si@bool@if@F\si@font@det@mode@bool{% + \si@bool@cs@if@TF{si@font@#1@textmode@bool}{% + \si@bool@true\si@font@set@text@bool + }{% + \si@bool@false\si@font@set@text@bool + }% + }% + \si@print@codes + \text{\si@print@print{#2}}% + \endgroup + \check@mathfonts +} +\newcommand*{\si@print@num}{% + \si@print{num}% +} +\newcommand*{\si@print@num@o}[1]{% + \expandafter\si@print@num\expandafter{#1}% +} +\newcommand*{\si@print@unit}{% + \si@print{unit}% +} +\newcommand*{\si@print@unit@o}[1]{% + \expandafter\si@print@unit\expandafter{#1}% +} +\si@catcode@set{45}{13}% - +\si@catcode@set{94}{13}% ^ +\si@catcode@set{95}{13}% _ +\newcommand*{\si@print@codes}{% + \si@catcode@symbols + \si@catcode@set{94}{13}% ^ + \si@catcode@set{95}{13}% _ + \everyeof{\noexpand}% + \endlinechar\m@ne\relax + \si@bool@if@TF\si@font@set@text@bool{% + \si@catcode@set{45}{13}% - + \let-\si@print@minus + \let_\si@print@sb + \let^\si@print@sp + \let\textsubscript\si@print@sb + \let\textsuperscript\si@print@sp + }{% + \si@catcode@set{45}{12}% - + \let_\sb + \let^\sp + \let\textsubscript\sb + \let\textsuperscript\sp + }% +} +\si@catcode@set{45}{12}% - +\si@catcode@set{94}{7}% ^ +\si@catcode@set{95}{8}% _ +\newcommand*{\si@print@maths}[1]{% + \ensuremath{% + \@nameuse{si@font@\si@print@type @maths@\si@font@set@family}{#1}% + }% +} +\newcommand*{\si@print@text}[1]{#1} +\newcommand*{\si@print@print}[1]{% + \si@font@set@bold + \si@font@set@italic + \@nameuse{si@font@\si@print@type @text@\si@font@set@family}% + \si@bool@if@TF\si@font@set@text@bool{% + \si@print@text{\scantokens{#1}}% + }{% + \si@print@maths{\scantokens{#1}}% + }% +} +\newcommand*{\si@print@minus}{% + \text{\si@print@minus@symbol}% +} +\DeclareTextSymbolDefault{\si@print@minus@symbol}{TS1} +\DeclareTextSymbol{\si@print@minus@symbol}{TS1}{61} +\newcommand*{\si@print@sb}[1]{% + \ensuremath{_{\text{#1}}}% +} +\newcommand*{\si@print@sp}[1]{% + \ensuremath{^{\text{#1}}}% +} +\newcommand*{\si@num@pre@product}{} +\newcommand*{\si@num@pre@quotient}{} +\newcommand*{\si@num@pre@tokens}{} +\si@keys@family{numbers/input} +\pgfkeys{ + /siunitx/numbers/input, + product/.store in = {\si@num@pre@product}, + quotient/.store in = {\si@num@pre@quotient}, + protect tokens/.store in = {\si@num@pre@tokens}, + product = x, + quotient = /, + protect tokens = \mp\pi\pm +} +\newcommand*{\si@num@pre@arg}{} +\newcommand*{\si@num@pre@arg@den}{} +\newcommand*{\si@num@pre@arg@held}{} +\newcommand*{\si@num@pre@arg@num}{} +\si@bool@new\si@num@pre@error@bool +\newcommand*{\si@num@pre@process}[1]{% + \si@num@pre@init + \begingroup + \si@num@pre@protect@tokens + \protected@edef\@tempa{#1}% + \expandafter\endgroup\expandafter + \def\expandafter\si@num@pre@arg\expandafter{\@tempa}% + \si@num@pre@sep@prod + \si@num@pre@sep@quot +} +\newcommand*{\si@num@pre@error}{% + \si@bool@true\si@num@pre@error@bool + \si@log@error +} +\newcommand*{\si@num@pre@init}{% + \si@clear@macro\si@num@pre@arg + \si@clear@macro\si@num@pre@arg@den + \si@clear@macro\si@num@pre@arg@held + \si@clear@macro\si@num@pre@arg@num + \si@bool@false\si@num@pre@error@bool +} +\newcommand*{\si@num@pre@protect@tokens}{% + \si@loop@over@macro\si@num@pre@tokens\si@num@pre@protect@tokens@aux +} +\newcommand*{\si@num@pre@protect@tokens@aux}[1]{% + \let#1\relax +} +\newcommand*{\si@num@pre@sep@prod}{% + \si@loop@over@macro\si@num@pre@product\si@num@pre@sep@prod@aux +} +\newcommand*{\si@num@pre@sep@prod@aux}[1]{% + \si@in@if@T\si@num@pre@arg{#1}{% + \def\si@tempa##1#1##2\si@stop{% + \def\si@num@pre@arg{##1}% + \def\si@num@pre@arg@held{##2}% + }% + \expandafter\si@tempa\si@num@pre@arg\si@stop + \si@empty@if@T\si@num@pre@arg{% + \si@num@pre@error{Misplaced product token}{% + A number cannot begin with a product token. + }% + }% + \si@empty@if@T\si@num@pre@arg@held{% + \si@num@pre@error{Misplaced product token}{% + A number cannot end with a product token. + }% + }% + \si@loop@exit + }% +} +\newcommand*{\si@num@pre@sep@quot}{% + \si@loop@over@macro\si@num@pre@quotient\si@num@pre@sep@quot@aux +} +\newcommand*{\si@num@pre@sep@quot@aux}[1]{% + \si@in@if@T\si@num@pre@arg{#1}{% + \def\si@tempa##1#1##2\si@stop{% + \def\si@num@pre@arg@num{##1}% + \def\si@num@pre@arg@den{##2}% + }% + \expandafter\si@tempa\si@num@pre@arg\si@stop + \si@empty@if@T\si@num@pre@arg@num{% + \si@num@pre@error{Misplaced quotient token}{% + A number cannot begin with a quotient token. + }% + }% + \si@empty@if@T\si@num@pre@arg@den{% + \si@num@pre@error{Misplaced quotient token}{% + A number cannot end with a quotient token. + }% + }% + \si@in@if@T\si@num@pre@arg@den{#1}{% + \si@num@pre@error{Duplicate quotient token}{% + Only one quotient token can appear in a single number. + }% + }% + \si@loop@exit + }% +} +\newcommand*{\si@num@in@uncert@close}{} +\newcommand*{\si@num@in@complex}{} +\newcommand*{\si@num@in@decimal}{} +\newcommand*{\si@num@in@digits}{} +\newcommand*{\si@num@in@exponent}{} +\newcommand*{\si@num@in@signs}{} +\newcommand*{\si@num@in@symbols}{} +\pgfkeys{ + /siunitx/numbers/input, + close uncertainty/.store in = {\si@num@in@uncert@close}, + complex roots/.store in = {\si@num@in@complex}, + decimal markers/.store in = {\si@num@in@decimal}, + digits/.store in = {\si@num@in@digits}, + exponent markers/.store in = {\si@num@in@exponent}, + ignore/.store in = {\si@num@in@ignore}, + open uncertainty/.store in = {\si@num@in@uncert@open}, + signs/.store in = {\si@num@in@signs}, + symbols/.store in = {\si@num@in@symbols}, %( + close uncertainty = ), + complex roots = ij, + decimal markers = {.,}, + digits = 0123456789, + exponent markers = dDeE, + ignore = {}, + open uncertainty = (, %) + signs = +-\mp\pm, + symbols = \pi +} +\newcommand*{\si@num@in@mant}{} +\newcommand*{\si@num@in@mant@sign}{} +\newcommand*{\si@num@in@mant@int}{} +\newcommand*{\si@num@in@mant@dec}{} +\newcommand*{\si@num@in@mant@uncert}{} +\newcommand*{\si@num@in@mant@uncert@int}{} +\newcommand*{\si@num@in@mant@uncert@dec}{} +\newcommand*{\si@num@in@mant@comp}{} +\newcommand*{\si@num@in@mant@comp@sign}{} +\newcommand*{\si@num@in@mant@comp@int}{} +\newcommand*{\si@num@in@mant@comp@dec}{} +\newcommand*{\si@num@in@mant@comp@uncert}{} +\newcommand*{\si@num@in@mant@comp@uncert@int}{} +\newcommand*{\si@num@in@mant@comp@uncert@dec}{} +\newcommand*{\si@num@in@exp}{} +\newcommand*{\si@num@in@exp@sign}{} +\newcommand*{\si@num@in@exp@int}{} +\newcommand*{\si@num@in@exp@dec}{} +\newcommand*{\si@num@in@exp@uncert}{} +\newcommand*{\si@num@in@exp@uncert@int}{} +\newcommand*{\si@num@in@exp@uncert@dec}{} +\newcommand*{\si@num@in@exp@comp}{} +\newcommand*{\si@num@in@exp@comp@sign}{} +\newcommand*{\si@num@in@exp@comp@int}{} +\newcommand*{\si@num@in@exp@comp@dec}{} +\newcommand*{\si@num@in@exp@comp@uncert}{} +\newcommand*{\si@num@in@exp@comp@uncert@int}{} +\newcommand*{\si@num@in@exp@comp@uncert@dec}{} +\si@bool@new\si@num@in@mant@bool +\si@bool@new\si@num@in@mant@dec@bool +\si@bool@new\si@num@in@mant@uncert@dec@bool +\si@bool@new\si@num@in@mant@comp@bool +\si@bool@new\si@num@in@mant@comp@dec@bool +\si@bool@new\si@num@in@mant@comp@uncert@dec@bool +\si@bool@new\si@num@in@exp@bool +\si@bool@new\si@num@in@exp@dec@bool +\si@bool@new\si@num@in@exp@uncert@dec@bool +\si@bool@new\si@num@in@exp@comp@bool +\si@bool@new\si@num@in@exp@comp@dec@bool +\si@bool@new\si@num@in@exp@comp@uncert@dec@bool +\si@bool@new\si@num@in@symbols@bool +\newcommand*{\si@num@in@arg}{} +\si@bool@new\si@num@in@error@bool +\newcommand*{\si@num@in@parse}[1]{% + \si@num@in@init + \si@num@in@rescan{#1}% + \si@empty@if@TF\si@num@in@arg{% + \si@bool@true\si@num@in@error@bool + }{% + \si@num@in@arg@loop + \si@num@in@try{\si@num@in@separate}% + \si@num@in@try{\si@num@in@finalise}% + }% +} +\newcommand*{\si@num@in@parse@o}[1]{% + \expandafter\si@num@in@parse\expandafter{#1}% +} +\newcommand*{\si@num@in@add}[1]{% + \si@add@right@cs@n{si@num@in@#1}% +} +\newcommand*{\si@num@in@arg@loop}{% + \si@expand@tlist\si@tempa{% + \si@num@in@signs + \si@num@in@ignore + \si@num@in@digits + \si@num@in@decimal + \si@num@in@exponent + \si@num@in@complex + \si@num@in@symbols + \si@num@in@uncert@open + \si@num@in@uncert@close + }% + \si@clear@macro\si@tempb + \si@loop@over@macro\si@num@in@arg\si@num@in@arg@loop@aux + \si@num@in@try{\let\si@num@in@arg\si@tempb}% +} +\newcommand*{\si@num@in@arg@loop@aux}[1]{% + \si@in@if@F\si@tempa{#1}{% + \si@num@in@throw{Invalid token `#1' in numerical input}{% + Only the tokens: \MessageBreak + \si@tempa \MessageBreak + are valid for numerical input. + }% + \si@loop@exit + }% + \si@in@if@F\si@num@in@ignore{#1}{% + \si@add@right@n\si@tempb{#1}% + }% + \si@in@if@T\si@num@in@symbols{#1}{% + \si@bool@true\si@num@in@symbols@bool + }% +} +\newcommand*{\si@num@in@finalise}{% + \si@num@in@final@check + \si@num@in@try{\si@num@in@final@tidy}% +} +\newcommand*{\si@num@in@final@check}{% + \si@bool@true\si@num@in@mant@bool + \si@empty@if@T\si@num@in@mant@dec{% + \si@empty@if@T\si@num@in@mant@int{% + \si@bool@false\si@num@in@mant@bool + \si@empty@if@F\si@num@in@mant@uncert{% + \si@num@in@throw{Uncertainty but no number}{% + The mantissa contains only an uncertainty. + }% + }% + }% + }% + \si@bool@if@T\si@num@in@mant@comp@bool{% + \si@empty@if@T\si@num@in@mant@comp@dec{% + \si@empty@if@T\si@num@in@mant@comp@int{% + \si@empty@if@F\si@num@in@mant@comp@uncert{% + \si@num@in@throw{Uncertainty but no number}{% + The complex mantissa contains only an uncertainty. + }% + }% + }% + }% + }% + \si@bool@true\si@num@in@exp@bool + \si@empty@if@T\si@num@in@exp@dec{% + \si@empty@if@T\si@num@in@exp@int{% + \si@bool@false\si@num@in@exp@bool + \si@empty@if@F\si@num@in@exp@uncert{% + \si@num@in@throw{Uncertainty but no number}{% + The exponent contains only an uncertainty. + }% + }% + \si@empty@if@F\si@num@in@exp@sign{% + \si@num@in@throw{Sign but no exponent}{% + The exponent contains only a sign. + }% + }% + }% + }% + \si@bool@if@T\si@num@in@exp@comp@bool{% + \si@empty@if@T\si@num@in@exp@comp@dec{% + \si@empty@if@T\si@num@in@exp@comp@int{% + \si@empty@if@F\si@num@in@exp@comp@uncert{% + \si@num@in@throw{Uncertainty but no number}{% + The complex exponent contains only an uncertainty. + }% + }% + }% + }% + }% + \si@bool@if@F\si@num@in@mant@bool{% + \si@bool@if@F\si@num@in@mant@comp@bool{% + \si@bool@if@F\si@num@in@exp@bool{% + \si@bool@if@F\si@num@in@exp@comp@bool{% + \si@num@in@throw{Empty numerical argument}{% + The given `number' contains no information. + }% + }% + }% + }% + }% +} +\newcommand*{\si@num@in@final@tidy}{% + \si@num@in@final@tidy@aux{mant}% + \si@num@in@final@tidy@aux{exp}% +} +\newcommand*{\si@num@in@final@tidy@aux}[1]{% + \si@num@in@remove@zeros{#1}% + \si@num@in@remove@zeros{#1@comp}% + \si@num@in@zero@sign{#1}% +} +\newcommand*{\si@num@in@init}{% + \si@bool@false\si@num@in@error@bool + \si@bool@false\si@num@in@symbols@bool + \si@loop@over@macro\si@num@in@init@names\si@num@in@init@aux + \si@bool@false\si@num@in@mant@bool + \si@bool@false\si@num@in@mant@dec@bool + \si@bool@false\si@num@in@mant@uncert@dec@bool + \si@bool@false\si@num@in@mant@comp@bool + \si@bool@false\si@num@in@mant@comp@dec@bool + \si@bool@false\si@num@in@mant@comp@uncert@dec@bool + \si@bool@false\si@num@in@exp@bool + \si@bool@false\si@num@in@exp@dec@bool + \si@bool@false\si@num@in@exp@uncert@dec@bool + \si@bool@false\si@num@in@exp@comp@bool + \si@bool@false\si@num@in@exp@comp@dec@bool + \si@bool@false\si@num@in@exp@comp@uncert@dec@bool +} +\newcommand*{\si@num@in@init@aux}[1]{% + \si@clear@cs{si@num@in@#1}% +} +\newcommand*{\si@num@in@init@names}{% + {mant}% + {mant@sign}% + {mant@int}% + {mant@dec}% + {mant@uncert}% + {mant@uncert@int}% + {mant@uncert@dec}% + {mant@comp}% + {mant@comp@sign}% + {mant@comp@int}% + {mant@comp@dec}% + {mant@comp@uncert}% + {mant@comp@uncert@int}% + {mant@comp@uncert@dec}% + {exp}% + {exp@sign}% + {exp@int}% + {exp@dec}% + {exp@uncert}% + {exp@uncert@int}% + {exp@uncert@dec}% + {exp@comp}% + {exp@comp@sign}% + {exp@comp@int}% + {exp@comp@dec}% + {exp@comp@uncert}% + {exp@comp@uncert@int}% + {exp@comp@uncert@dec}% +} +\newcommand*{\si@num@in@protect@tokens}{} +\let\si@num@in@protect@tokens\si@num@pre@protect@tokens +\newcommand*{\si@num@in@remove@zeros}[1]{% + \si@in@cs@if@T{si@num@in@#1@int}{0}{% + \def\si@tempa##10##2\si@stop{% + \si@empty@tlist@if@TF{##1}{% + \si@in@tlist@if@TF{##2}{0}{% + \si@tempa##2\si@stop + }{% + \@namedef{si@num@in@#1@int}{##2}% + }% + }{% + \@namedef{si@num@in@#1@int}{##10##2}% + }% + }% + \si@let@Nc\si@tempb{si@num@in@#1@int}% + \expandafter\si@tempa\si@tempb\si@stop + \si@empty@cs@if@T{si@num@in@#1@int}{% + \@namedef{si@num@in@#1@int}{0}% + }% + }% +} +\newcommand*{\si@num@in@rescan}[1]{% + \begingroup + \si@catcode@symbols + \si@catcode@set{9}{9}% tab ignored + \si@catcode@set{32}{9}% space ignored + \si@catcode@set{126}{9}% tilde ignored + \everyeof{\noexpand}% + \si@clear@macro{\,}% + \si@num@in@protect@tokens + \protected@edef\@tempa{\scantokens{#1}}% + \expandafter\endgroup\expandafter + \def\expandafter\si@num@in@arg\expandafter{\@tempa}% +} +\newcommand*{\si@num@in@separate}{% + \si@num@in@try{\si@num@in@sep@exp}% + \si@num@in@separate@aux{mant}% + \si@num@in@separate@aux{exp}% +} +\newcommand*{\si@num@in@separate@aux}[1]{% + \si@num@in@try{\si@num@in@sep@sign{#1}}% + \si@num@in@try{\si@num@in@sep@comp{#1}}% + \si@num@in@try{\si@num@in@sep@dec{#1}}% + \si@num@in@try{\si@num@in@sep@dec@comp{#1}}% + \si@num@in@try{\si@num@in@sep@uncert{#1}}% + \si@num@in@try{\si@num@in@sep@uncert{#1@comp}}% +} +\newcommand*{\si@num@in@sep@comp}[1]{% + \si@empty@cs@if@F{si@num@in@#1}{% + \si@empty@if@F\si@num@in@complex{% + \si@let@Nc\si@tempa{si@num@in@#1}% + \si@bool@false\si@tmp@bool + \si@loop@over@macro\si@num@in@complex\si@num@in@sep@comp@aux@i + \si@num@in@try{\si@num@in@sep@comp@aux@ii{#1}}% + \si@num@in@try{\si@num@in@sep@comp@aux@iii{#1}}% + }% + }% +} +\newcommand*{\si@num@in@sep@comp@aux@i}[1]{% + \def\si@tempb##1#1##2##3\si@stop{% + \si@no@value@if@F{##2}{% + \si@no@value@if@TF{##3}{% + \si@bool@true\si@tmp@bool + \def\si@tempa{##1}% + \si@loop@exit + }{% + \si@num@in@throw{Misplaced complex root}{% + The complex root token `#1' can only come at \MessageBreak + the end of a number. + }% + \si@loop@exit + }% + }% + }% + \expandafter\si@tempb\si@tempa#1\si@no@value\si@stop +} +\newcommand*{\si@num@in@sep@comp@aux@ii}[1]{% + \si@let@cN{si@num@in@#1@comp@bool}\si@tmp@bool + \si@let@cN{si@num@in@#1}\si@tempa + \si@bool@if@T\si@tmp@bool{% + \si@empty@if@F\si@tempa{% + \def\si@tempb##1{% + \si@in@if@TF\si@num@in@signs{##1}{% + \si@bool@if@TF\si@tmp@bool{% + \si@num@in@throw{Duplicate sign found}{% + Only a single sign can be given \MessageBreak + in the complex part of a number. + }% + \si@loop@exit + }{% + \si@num@in@add{#1@comp@sign}{##1}% + \si@bool@true\si@tmp@bool + }% + }{% + \si@bool@if@TF\si@tmp@bool{% + \si@num@in@add{#1@comp}{##1}% + }{% + \si@num@in@add{#1}{##1}% + }% + }% + }% + \si@bool@false\si@tmp@bool + \si@clear@cs{si@num@in@#1}% + \si@loop@over@macro\si@tempa\si@tempb + }% + }% +} +\newcommand*{\si@num@in@sep@comp@aux@iii}[1]{% + \si@bool@cs@if@TF{si@num@in@#1@comp@bool}{% + \si@bool@if@F\si@tmp@bool{% + \si@let@cc{si@num@in@#1@comp@sign}{si@num@in@#1@sign}% + \si@clear@cs{si@num@in@#1@sign}% + \si@let@cc{si@num@in@#1@comp}{si@num@in@#1}% + \si@clear@cs{si@num@in@#1}% + }% + }{% + \expandafter\si@loop@over@macro\csname si@num@in@#1\endcsname + \si@num@in@sep@aux@iv + }% +} +\newcommand*{\si@num@in@sep@aux@iv}[1]{% + \si@in@if@T\si@num@in@signs{#1}{% + \si@num@in@throw{Duplicate sign found}{% + Only a single sign can be given \MessageBreak + in the real part of a number. + }% + \si@loop@exit + }% +} +\newcommand*{\si@num@in@sep@dec}[1]{% + \si@empty@cs@if@F{si@num@in@#1}{% + \si@num@in@sep@dec@aux@i{#1}% + }% +} +\newcommand*{\si@num@in@sep@dec@comp}[1]{% + \si@bool@cs@if@T{si@num@in@#1@comp@bool}{% + \si@empty@cs@if@TF{si@num@in@#1@comp}{% + \si@let@cc{si@num@in@#1@comp@int}{si@num@in@#1@comp}% + \si@let@cN{si@num@in@#1@comp}% + }{% + \si@num@in@sep@dec@aux@i{#1@comp}% + }% + }% +} +\newcommand*{\si@num@in@sep@dec@aux@i}[1]{% + \si@let@Nc\si@tempa{si@num@in@#1}% + \si@clear@macro\si@tempb + \si@bool@false\si@tmp@bool + \si@clear@cs{si@num@in@#1}% + \si@loop@over@macro\si@num@in@decimal\si@num@in@sep@dec@aux@ii + \si@num@in@try{\si@let@cN{si@num@in@#1@int}\si@tempa}% + \si@num@in@try{\si@let@cN{si@num@in@#1@dec}\si@tempb}% + \si@num@in@try{\si@let@cN{si@num@in@#1@dec@bool}\si@tmp@bool}% +} +\newcommand*{\si@num@in@sep@dec@aux@ii}[1]{% + \si@in@if@T\si@tempa{#1}{% + \si@bool@true\si@tmp@bool + \def\si@tempb##1#1##2\si@stop{% + \def\si@tempa{##1}% + \def\si@tempb{##2}% + }% + \expandafter\si@tempb\si@tempa\si@stop + \si@in@if@T\si@tempb{#1}{% + \si@num@in@throw{Duplicate decimal token found}{% + Only a single decimal marker token can be given \MessageBreak + in numerical input. + }% + }% + \si@loop@exit + }% +} +\newcommand*{\si@num@in@sep@exp}{% + \let\si@num@in@mant\si@num@in@arg + \si@loop@over@macro\si@num@in@exponent\si@num@in@sep@exp@aux +} +\newcommand*{\si@num@in@sep@exp@aux}[1]{% + \si@in@if@T\si@num@in@arg{#1}{% + \def\si@tempa##1#1##2\si@stop{% + \def\si@num@in@mant{##1}% + \def\si@num@in@exp{##2}% + }% + \expandafter\si@tempa\si@num@in@arg\si@stop + \si@in@if@T\si@num@in@exp{#1}{% + \si@num@in@throw{Duplicate exponent token found}{% + Only a single exponent marker token can be given \MessageBreak + in numerical input. + }% + }% + \si@loop@exit + }% +} +\newcommand*{\si@num@in@sep@sign}[1]{% + \si@empty@cs@if@F{si@num@in@#1}{% + \si@replace@all@in@cs{si@num@in@#1}{-+}{\mp}% + \si@replace@all@in@cs{si@num@in@#1}{+-}{\pm}% + \expandafter\expandafter\expandafter\si@num@in@sep@sign@aux + \csname si@num@in@#1\endcsname\si@stop{#1}% + }% +} +\newcommand*{\si@num@in@sep@sign@aux}{} +\def\si@num@in@sep@sign@aux#1#2\si@stop#3{% + \si@in@if@TF\si@num@in@signs{#1}{% + \@namedef{si@num@in@#3@sign}{#1}% + \@namedef{si@num@in@#3}{#2}% + }{% + \@namedef{si@num@in@#3}{#1#2}% + }% +} +\newcommand*{\si@num@in@sep@uncert}[1]{% + \si@empty@cs@if@TF{si@num@in@#1@dec}{% + \si@empty@cs@if@F{si@num@in@#1@int}{% + \si@num@in@sep@uncert@aux@i{#1}{int}% + }% + }{% + \si@num@in@sep@uncert@aux@i{#1}{dec}% + \si@num@in@sep@uncert@check@int{#1}% + }% +} +\newcommand*{\si@num@in@sep@uncert@aux@i}[2]{% + \si@let@Nc\si@tempa{si@num@in@#1@#2}% + \si@loop@over@macro\si@num@in@uncert@close\si@num@in@sep@uncert@aux@ii + \si@num@in@try{\si@num@in@sep@uncert@aux@iii{#1}{#2}}% +} +\newcommand*{\si@num@in@sep@uncert@aux@ii}[1]{% + \def\si@tempb##1#1##2##3\si@stop{% + \si@no@value@if@F{##2}{% + \si@no@value@if@TF{##3}{% + \si@bool@true\si@tmp@bool + \def\si@tempa{##1}% + \si@loop@exit + }{% + \si@num@in@throw{Misplaced closing uncertainty token}{% + The closing uncertainty token `#1' can only \MessageBreak + come at the end of a number. + }% + \si@loop@exit + }% + }% + }% + \si@bool@false\si@tmp@bool + \expandafter\si@tempb\si@tempa#1\si@no@value\si@stop + \si@bool@if@T\si@tmp@bool{% + \si@loop@exit + }% +} +\newcommand*{\si@num@in@sep@uncert@aux@iii}[2]{% + \si@bool@if@TF\si@tmp@bool{% + \si@bool@false\si@tmp@bool + \si@loop@over@macro\si@num@in@uncert@open + \si@num@in@sep@uncert@aux@iv + \si@num@in@try{\si@num@in@sep@uncert@aux@v{#1}{#2}}% + }{% + \si@loop@over@macro\si@num@in@uncert@open + \si@num@in@sep@uncert@aux@vi + }% +} +\newcommand*{\si@num@in@sep@uncert@aux@iv}[1]{% + \si@in@if@T\si@tempa{#1}{% + \si@bool@true\si@tmp@bool + \def\si@tempb##1#1##2\si@stop{% + \def\si@tempa{##1}% + \def\si@tempb{##2}% + }% + \expandafter\si@tempb\si@tempa\si@stop + \si@in@if@T\si@tempb{#1}{% + \si@num@in@throw{Duplicate opening uncertainty token found}{% + Only a single opening uncertainty token can be \MessageBreak + given in numerical input. + }% + }% + \si@loop@exit + }% +} +\newcommand*{\si@num@in@sep@uncert@aux@v}[2]{% + \si@bool@if@TF\si@tmp@bool{% + \si@let@cN{si@num@in@#1@#2}\si@tempa + \si@let@cN{si@num@in@#1@uncert}\si@tempb + \si@empty@if@T\si@tempb{% + \si@num@in@throw{Empty uncertainty given}{% + The number given contains an empty uncertainty. + }% + }% + }{% + \si@num@in@throw{% + Closing uncertainty token without matching opening% + }{% + The final token of a the number is a closing \MessageBreak + uncertainty token, but no opening token was found \MessageBreak + in this part of the number. + }% + }% +} +\newcommand*{\si@num@in@sep@uncert@aux@vi}[1]{% + \si@in@if@T\si@tempa{#1}{% + \si@num@in@throw{% + Opening uncertainty token without matching closing% + }{% + The opening uncertainty token `#1' was found with no \MessageBreak + matching closing token. + }% + \si@loop@exit + }% +} +\newcommand*{\si@num@in@sep@uncert@check@int}[1]{% + \def\si@num@in@sep@uncert@check@int@aux##1{% + \si@in@cs@if@T{si@num@in@#1@int}{##1}{% + \si@num@in@throw{Uncertainty in integer part}{% + The opening uncertainty token `##1' was found in the + \MessageBreak integer part of the input, but a decimal part + was also given. + }% + \si@loop@exit + }% + }% + \si@loop@over@macro\si@num@in@uncert@open + \si@num@in@sep@uncert@check@int@aux + \si@loop@over@macro\si@num@in@uncert@close + \si@num@in@sep@uncert@check@int@aux +} +\newcommand*{\si@num@in@throw}{% + \si@bool@true\si@num@in@error@bool + \si@log@error +} +\newcommand*{\si@num@in@try}{% + \si@bool@if@F\si@num@in@error@bool +} +\newcommand*{\si@num@in@zero@sign}[1]{% + \si@bool@cs@if@TF{si@num@in@#1@bool}{% + \si@num@in@zero@sign@aux@i{#1}% + }{% + \si@num@in@zero@sign@aux@i{#1@comp}% + }% +} +\newcommand*{\si@num@in@zero@sign@aux@i}[1]{% + \si@empty@cs@if@TF{si@num@in@#1@int}{% + \si@num@in@zero@sign@aux@ii{#1}% + }{% + \def\si@tempa{0}% + \si@meaning@eq@cs@if@T{si@tempa}{si@num@in@#1@int}{% + \si@num@in@zero@sign@aux@ii{#1}% + }% + }% +} +\newcommand*{\si@num@in@zero@sign@aux@ii}[1]{% + \si@empty@cs@if@TF{si@num@in@#1@dec}{% + \si@clear@cs{si@num@in@#1@sign}% + }{% + \def\si@tempa{0}% + \def\si@tempb##1{% + \si@in@if@F\si@tempa{##1}{% + \si@bool@false\si@tmp@bool + }% + }% + \si@bool@true\si@tmp@bool + \si@loop@over@cs{si@num@in@#1@dec}\si@tempb + \si@bool@if@T\si@tmp@bool{% + \si@clear@cs{si@num@in@#1@sign}% + }% + }% +} +\newcommand*{\si@num@post@sign@token}{} +\si@bool@new\si@num@post@plus@bool +\si@bool@new\si@num@post@rnd@figures@bool +\si@bool@new\si@num@post@rnd@places@bool +\si@bool@new\si@num@post@sign@bool +\si@bool@new\si@num@post@zero@dec@bool +\si@bool@new\si@num@post@zero@exp@bool +\si@bool@new\si@num@post@zero@int@bool +\newcount\si@num@post@figures +\newcount\si@num@post@places +\newcommand*{\si@num@post@dec}{} +\newcommand*{\si@num@post@int}{} +\si@bool@new\si@num@post@carry@bool +\si@bool@new\si@num@post@sig@bool +\newcommand*{\si@num@post@rnd@tens}{} +\newcount\si@num@post@rnd@cnt +\newcount\si@num@post@dec@cnt +\newcount\si@num@post@uncert@cnt +\newcommand*{\si@num@post@rnd@check}[2]{% + \@nameuse{si@num@post@#1}#2\relax + \expandafter\ifnum\csname si@num@post@#1\endcsname<\z@\relax + \si@log@error{Invalid input for rounding digits}{% + The input for option 'numbers/process/round #1' \MessageBreak + must be a positive integer. + }% + \fi +} +\si@keys@family{numbers/process} +\pgfkeys{ + /siunitx/numbers/process, + add zero decimal/.is siunitx switch = {num@post@zero@dec}, + add zero integer/.is siunitx switch = {num@post@zero@int}, + explicit sign/.store in = {\si@num@post@sign@token}, + include explicit sign/.is siunitx switch = {num@post@sign}, + retain explicit plus/.is siunitx switch = {num@post@plus}, + retain zero exponent/.is siunitx switch = {num@post@zero@exp}, + round mode/.is choice, + round mode/.cd, + figures/.code = {% + \si@bool@true\si@num@post@rnd@figures@bool + \si@bool@false\si@num@post@rnd@places@bool + }, + off/.code = {% + \si@bool@false\si@num@post@rnd@figures@bool + \si@bool@false\si@num@post@rnd@places@bool + }, + places/.code = {% + \si@bool@false\si@num@post@rnd@figures@bool + \si@bool@true\si@num@post@rnd@places@bool + }, + /siunitx/numbers/process, + round figures/.code = {\si@num@post@rnd@check{figures}{#1}}, + round places/.code = {\si@num@post@rnd@check{places}{#1}}, + add zero decimal = true, + add zero integer = true, + explicit sign = +, + include explicit sign = false, + retain explicit plus = false, + retain zero exponent = false, + round mode = off, + round figures = 2, + round places = 2 +} +\newcommand*{\si@num@post@process}{% + \si@num@post@sign + \si@num@post@zero@fill + \si@num@post@exponent + \si@bool@if@F\si@num@in@symbols@bool{% + \si@num@post@round + \si@bool@if@F\si@num@post@rnd@figures@bool{% + \si@bool@if@F\si@num@post@rnd@places@bool{% + \si@num@post@uncert + }% + }% + }% +} +\newcommand*{\si@num@post@add@sign}[1]{% + \si@bool@cs@if@TF{si@num@in@#1@bool}{% + \si@num@post@add@sign@aux{#1}% + }{% + \si@bool@cs@if@T{si@num@in@#1@comp@bool}{% + \si@num@post@add@sign@aux{#1@comp}% + }% + }% +} +\newcommand*{\si@num@post@add@sign@aux}[1]{% + \si@empty@cs@if@T{si@num@in@#1@sign}{% + \@namedef{si@num@in@#1@sign}{\si@num@post@sign@token}% + }% +} +\newcommand*{\si@num@post@exponent}{% + \si@bool@if@F\si@num@post@zero@exp@bool{% + \si@expand@tlist\si@tempa{% + \si@num@in@exp@int + \si@num@in@exp@dec + \si@num@in@exp@comp@int + \si@num@in@exp@comp@dec + }% + \si@in@if@T\si@tempa{0}{% + \def\si@tempb##10000##2\si@stop{% + \si@empty@tlist@if@T{##1}{% + \def\si@num@in@exp@int{}% + \def\si@num@in@exp@dec{}% + \def\si@num@in@exp@comp@int{}% + \def\si@num@in@exp@comp@dec{}% + \si@bool@false\si@num@in@exp@bool + \si@bool@false\si@num@in@exp@comp@bool + }% + }% + \expandafter\si@tempb\si@tempa0000\si@stop + }% + }% +} +\newcommand*{\si@num@post@plus}[1]{% + \si@bool@cs@if@TF{si@num@in@#1@bool}{% + \si@num@post@plus@aux{#1}% + }{% + \si@bool@cs@if@T{si@num@in@#1@comp@bool}{% + \si@num@post@plus@aux{#1@comp}% + }% + }% +} +\newcommand*{\si@num@post@plus@aux}[1]{% + \def\si@tempa{+}% + \si@meaning@eq@cs@if@T{si@num@in@#1@sign}{si@tempa}{% + \si@clear@cs{si@num@in@#1@sign}% + }% +} +\newcommand*{\si@num@post@sign}{% + \si@bool@if@F\si@num@post@plus@bool{% + \si@num@post@plus{mant}% + \si@num@post@plus{exp}% + }% + \si@bool@if@T\si@num@post@sign@bool{% + \si@num@post@add@sign{mant}% + \si@num@post@add@sign{exp}% + }% +} +\newcommand*{\si@num@post@round}{% + \si@num@post@round@aux{figures}% + \si@num@post@round@aux{places}% +} +\newcommand*{\si@num@post@round@aux}[1]{% + \si@bool@cs@if@T{si@num@post@rnd@#1@bool}{% + \@nameuse{si@num@post@rnd@#1}{mant}% + \@nameuse{si@num@post@rnd@#1}{mant@comp}% + \@nameuse{si@num@post@rnd@#1}{exp}% + \@nameuse{si@num@post@rnd@#1}{exp@comp}% + }% +} +\newcommand*{\si@num@post@rnd@dec}[1]{% + \si@num@if@F{\si@num@post@rnd@cnt>\@ne}{% + \si@tempcnt\expandafter\@car\si@num@post@dec\@nil\relax + \si@bool@if@T\si@num@post@carry@bool{% + \advance\si@tempcnt\@ne\relax + }% + \si@bool@false\si@num@post@carry@bool + \si@num@if@TF{\si@num@post@rnd@cnt=\@ne}{% + \si@num@if@T{\si@tempcnt>4}{% + \si@bool@true\si@num@post@carry@bool + }% + }{% + \si@num@if@T{\si@tempcnt=10}{% + \si@bool@true\si@num@post@carry@bool + \si@tempcnt\z@\relax + }% + \si@edef@c{si@num@in@#1@dec}{% + \the\si@tempcnt + \@nameuse{si@num@in@#1@dec}% + }% + }% + }% + \advance\si@num@post@rnd@cnt\m@ne\relax + \edef\si@num@post@dec{\expandafter\@cdr\si@num@post@dec\@nil}% +} +\newcommand*{\si@num@post@rnd@figures}[1]{% + \si@num@post@rnd@cnt\z@\relax + \si@bool@false\si@num@post@sig@bool + \si@clear@macro\si@num@post@dec + \si@clear@macro\si@num@post@int + \si@whiledo@empty@cs@F{si@num@in@#1@int}{% + \si@num@post@rnd@figures@aux@i{#1}{int}% + }% + \si@whiledo@empty@cs@F{si@num@in@#1@dec}{% + \si@num@post@rnd@figures@aux@i{#1}{dec}% + }% + \si@bool@if@TF\si@num@post@sig@bool{% + \si@num@if@TF{\si@num@post@rnd@cnt>\si@num@post@figures}{% + \si@num@post@rnd@figures@aux@ii{#1}% + }{% + \si@num@post@rnd@figures@aux@iii{#1}% + }% + }{% + \@namedef{si@num@in@#1@int}{0}% + \si@clear@cs{si@num@in@#1@dec}% + \si@bool@cs@false{si@num@in@#1@dec@bool}% + }% +} +\newcommand*{\si@num@post@rnd@figures@aux@i}[2]{% + \si@tempcnt\expandafter\expandafter\expandafter\@car + \csname si@num@in@#1@#2\endcsname\@nil\relax + \si@edef@c{si@num@post@#2}{% + \the\si@tempcnt + \@nameuse{si@num@post@#2}% + }% + \si@bool@if@F\si@num@post@sig@bool{% + \si@num@if@F{\si@tempcnt=\z@}{% + \si@bool@true\si@num@post@sig@bool + }% + }% + \si@bool@if@T\si@num@post@sig@bool{% + \advance\si@num@post@rnd@cnt\@ne\relax + }% + \si@edef@c{si@num@in@#1@#2}{% + \expandafter\expandafter\expandafter\@cdr + \csname si@num@in@#1@#2\endcsname\@nil + }% +} +\newcommand*{\si@num@post@rnd@figures@aux@ii}[1]{% + \advance\si@num@post@rnd@cnt-\si@num@post@figures\relax + \si@whiledo@empty@F\si@num@post@dec{% + \si@num@post@rnd@dec{#1}% + }% + \si@whiledo@empty@F\si@num@post@int{% + \si@num@post@rnd@figures@int{#1} + }% + \si@bool@if@T\si@num@post@carry@bool{% + \si@edef@c{si@num@in@#1@int}{% + 1% + \@nameuse{si@num@in@#1@int}% + }% + \si@empty@cs@if@F{si@num@in@#1@dec}{% + \si@reverse@cs{si@num@in@#1@dec}% + \si@edef@c{si@num@in@#1@dec}{% + \expandafter\expandafter\expandafter\@cdr + \csname si@num@in@#1@dec\endcsname\@nil + }% + \si@reverse@cs{si@num@in@#1@dec}% + }% + }% +} +\newcommand*{\si@num@post@rnd@figures@aux@iii}[1]{% + \advance\si@num@post@rnd@cnt-\si@num@post@figures\relax + \si@num@post@rnd@cnt-\si@num@post@rnd@cnt\relax + \si@reverse@macro\si@num@post@dec + \si@reverse@macro\si@num@post@int + \si@let@cN{si@num@in@#1@dec}\si@num@post@dec + \si@let@cN{si@num@in@#1@int}\si@num@post@int + \si@num@post@rnd@pad{#1}% +} +\newcommand*{\si@num@post@rnd@figures@int}[1]{% + \si@num@if@T{\si@num@post@rnd@cnt>\z@}{% + \si@edef@c{si@num@in@#1@int}{% + 0% + \@nameuse{si@num@in@#1@int}% + }% + }% + \si@num@if@F{\si@num@post@rnd@cnt>\@ne}{% + \si@tempcnt\expandafter\@car\si@num@post@int\@nil\relax + \si@bool@if@T\si@num@post@carry@bool{% + \advance\si@tempcnt\@ne\relax + }% + \si@bool@false\si@num@post@carry@bool + \si@num@if@TF{\si@num@post@rnd@cnt=\@ne}{% + \si@num@if@T{\si@tempcnt>4}{% + \si@bool@true\si@num@post@carry@bool + }% + }{% + \si@num@if@T{\si@tempcnt=10}{% + \si@bool@true\si@num@post@carry@bool + \si@tempcnt\z@\relax + }% + \si@edef@c{si@num@in@#1@int}{% + \the\si@tempcnt + \@nameuse{si@num@in@#1@int}% + }% + }% + }% + \advance\si@num@post@rnd@cnt\m@ne\relax + \edef\si@num@post@int{\expandafter\@cdr\si@num@post@int\@nil}% +} +\newcommand*{\si@num@post@rnd@pad}[1]{% + \si@whiledo@num@T{\si@num@post@rnd@cnt>\z@}{% + \si@edef@c{si@num@in@#1@dec}{% + \@nameuse{si@num@in@#1@dec}% + 0% + }% + \advance\si@num@post@rnd@cnt\m@ne\relax + }% +} +\newcommand*{\si@num@post@rnd@places}[1]{% + \si@num@if@TF{\si@num@post@places=\z@}{% + \si@clear@cs{si@num@in@#1@dec}% + \si@bool@cs@false{si@num@in@#1@dec@bool}% + }{% + \si@num@post@rnd@places@aux@i{#1}% + }% +} +\newcommand*{\si@num@post@rnd@places@aux@i}[1]{% + \si@empty@cs@if@T{si@num@in@#1@dec}{% + \@namedef{si@num@in@#1@dec}{0}% + }% + \si@num@post@rnd@cnt\si@elt@count@cs{si@num@in@#1@dec}\relax + \expandafter\expandafter\expandafter\ifnum + \csname si@num@in@#1@dec\endcsname=\z@\relax + \si@num@post@rnd@cnt\si@num@post@places\relax + \si@clear@cs{si@num@in@#1@dec}% + \expandafter\si@num@post@rnd@pad + \else + \expandafter\si@num@post@rnd@places@aux@ii + \fi + {#1}% +} +\newcommand*{\si@num@post@rnd@places@aux@ii}[1]{% + \advance\si@num@post@rnd@cnt-\si@num@post@places\relax + \si@num@if@TF{\si@num@post@rnd@cnt<\z@}{% + \si@num@post@rnd@cnt-\si@num@post@rnd@cnt\relax + \si@num@post@rnd@pad{#1}% + }{% + \si@num@post@rnd@places@init{#1}% + \si@num@post@rnd@places@aux@iii{#1}% + }% +} +\newcommand*{\si@num@post@rnd@places@aux@iii}[1]{% + \si@empty@if@TF\si@num@post@dec{% + \si@whiledo@empty@F\si@num@post@int{% + \si@num@post@rnd@places@int{#1}% + }% + \si@bool@if@T\si@num@post@carry@bool{% + \si@edef@c{si@num@in@#1@int}{% + 1% + \@nameuse{si@num@in@#1@int}% + }% + }% + }{% + \si@num@post@rnd@dec{#1}% + \si@num@post@rnd@places@aux@iii{#1}% + }% +} +\newcommand*{\si@num@post@rnd@places@int}[1]{% + \si@tempcnt\expandafter\@car\si@num@post@int\@nil\relax + \edef\si@num@post@int{\expandafter\@cdr\si@num@post@int\@nil}% + \si@bool@if@T\si@num@post@carry@bool{% + \advance\si@tempcnt\@ne\relax + }% + \si@bool@false\si@num@post@carry@bool + \si@num@if@T{\si@tempcnt=10}{% + \si@bool@true\si@num@post@carry@bool + \si@tempcnt\z@\relax + }% + \si@edef@c{si@num@in@#1@int}{% + \the\si@tempcnt + \@nameuse{si@num@in@#1@int}% + }% +} +\newcommand*{\si@num@post@rnd@places@init}[1]{% + \si@let@Nc\si@num@post@dec{si@num@in@#1@dec}% + \si@let@Nc\si@num@post@int{si@num@in@#1@int}% + \si@reverse@macro\si@num@post@dec + \si@reverse@macro\si@num@post@int + \si@clear@cs{si@num@in@#1@dec}% + \si@clear@cs{si@num@in@#1@int}% + \si@bool@false\si@num@post@carry@bool +} +\newcommand*{\si@num@post@zero@fill}{% + \si@bool@if@T\si@num@post@zero@int@bool{% + \si@num@post@zero@fill@aux{mant}{int}% + \si@num@post@zero@fill@aux{mant@comp}{int}% + \si@num@post@zero@fill@aux{exp}{int}% + \si@num@post@zero@fill@aux{exp@comp}{int}% + }% + \si@bool@if@T\si@num@post@zero@dec@bool{% + \si@num@post@zero@fill@aux{mant}{dec}% + \si@num@post@zero@fill@aux{mant@comp}{dec}% + \si@num@post@zero@fill@aux{exp}{dec}% + \si@num@post@zero@fill@aux{exp@comp}{dec}% + }% +} +\newcommand*{\si@num@post@zero@fill@aux}[2]{% + \si@bool@cs@if@T{si@num@in@#1@dec@bool}{% + \si@empty@cs@if@T{si@num@in@#1@#2}{% + \@namedef{si@num@in@#1@#2}{0}% + }% + }% +} +\newcommand*{\si@num@post@uncert}{% + \si@num@post@uncert@aux@i{mant}% + \si@num@post@uncert@aux@i{exp}% +} +\newcommand*{\si@num@post@uncert@aux@i}[1]{% + \si@num@post@uncert@aux@ii{#1}% + \si@num@post@uncert@aux@ii{#1@comp}% +} +\newcommand*{\si@num@post@uncert@aux@ii}[1]{% + \si@bool@cs@if@TF{si@num@in@#1@dec@bool}{% + \si@num@post@uncert@dec{#1}% + }{% + \si@num@post@uncert@int{#1}% + }% +} +\newcommand*{\si@num@post@uncert@dec}[1]{% + \si@empty@cs@if@F{si@num@in@#1@uncert}{% + \si@bool@cs@true{si@num@in@#1@uncert@dec@bool}% + \si@num@post@dec@cnt\si@elt@count@cs{si@num@in@#1@dec}\relax + \si@num@post@uncert@cnt\si@elt@count@cs{si@num@in@#1@uncert}\relax + \si@num@if@TF{\si@num@post@uncert@cnt>\si@num@post@dec@cnt}{% + \si@num@post@uncert@dec@aux@i{#1}% + }{% + \si@num@post@uncert@dec@aux@ii{#1}% + }% + }% +} +\newcommand*{\si@num@post@uncert@dec@aux@i}[1]{% + \def\si@tempa##1{% + \si@num@if@TF{\si@num@post@uncert@cnt>\si@num@post@dec@cnt}{% + \si@add@right@cs@n{si@num@in@#1@uncert@int}{##1}% + }{% + \si@add@right@cs@n{si@num@in@#1@uncert@dec}{##1}% + }% + \advance\si@num@post@uncert@cnt\m@ne\relax + }% + \si@loop@over@cs{si@num@in@#1@uncert}\si@tempa +} +\newcommand*{\si@num@post@uncert@dec@aux@ii}[1]{% + \def\si@tempa{% + \si@add@right@cs@n{si@num@in@#1@uncert@dec}{0}% + \advance\si@num@post@uncert@cnt\@ne\relax + }% + \si@whiledo@num@T{\si@num@post@uncert@cnt<\si@num@post@dec@cnt}{% + \si@tempa + }% + \def\si@tempa##1{% + \si@add@right@cs@o{si@num@in@#1@uncert@dec}{##1}% + }% + \expandafter\si@tempa\expandafter + {\csname si@num@in@#1@uncert\endcsname}% + \si@bool@if@T\si@num@post@zero@int@bool{% + \@namedef{si@num@in@#1@uncert@int}{0}% + }% +} +\newcommand*{\si@num@post@uncert@int}[1]{% + \si@let@cc{si@num@in@#1@uncert@int}{si@num@in@#1@uncert}% +} +\newcommand*{\si@num@out@bracket@close}{} +\newcommand*{\si@num@out@bracket@open}{} +\newcommand*{\si@num@out@complex@root}{} +\newcommand*{\si@num@out@decimal}{} +\newcommand*{\si@num@out@exp@base}{} +\newcommand*{\si@num@out@exp@prod}{} +\newcommand*{\si@num@out@group@sep}{} +\newcommand*{\si@num@out@uncert@close}{} +\newcommand*{\si@num@out@uncert@open}{} +\newcommand*{\si@num@out@uncert@space}{} +\si@bool@new\si@num@out@bracket@use@bool +\si@bool@new\si@num@out@group@digits@bool +\si@bool@new\si@num@out@group@four@bool +\si@bool@new\si@num@out@tight@bool +\si@bool@new\si@num@out@uncert@sep@bool +\newcommand*{\si@num@out@mant}{} +\newcommand*{\si@num@out@mant@sign}{} +\newcommand*{\si@num@out@mant@int}{} +\newcommand*{\si@num@out@mant@dec}{} +\newcommand*{\si@num@out@mant@uncert}{} +\newcommand*{\si@num@out@mant@uncert@dec}{} +\newcommand*{\si@num@out@mant@uncert@int}{} +\newcommand*{\si@num@out@mant@comp}{} +\newcommand*{\si@num@out@mant@comp@sign}{} +\newcommand*{\si@num@out@mant@comp@int}{} +\newcommand*{\si@num@out@mant@comp@dec}{} +\newcommand*{\si@num@out@mant@comp@uncert}{} +\newcommand*{\si@num@out@mant@comp@uncert@dec}{} +\newcommand*{\si@num@out@mant@comp@uncert@int}{} +\newcommand*{\si@num@out@exp}{} +\newcommand*{\si@num@out@exp@sign}{} +\newcommand*{\si@num@out@exp@int}{} +\newcommand*{\si@num@out@exp@dec}{} +\newcommand*{\si@num@out@exp@uncert}{} +\newcommand*{\si@num@out@exp@uncert@dec}{} +\newcommand*{\si@num@out@exp@uncert@int}{} +\newcommand*{\si@num@out@exp@comp}{} +\newcommand*{\si@num@out@exp@comp@sign}{} +\newcommand*{\si@num@out@exp@comp@int}{} +\newcommand*{\si@num@out@exp@comp@dec}{} +\newcommand*{\si@num@out@exp@comp@uncert}{} +\newcommand*{\si@num@out@exp@comp@uncert@dec}{} +\newcommand*{\si@num@out@exp@comp@uncert@int}{} +\newcommand*{\si@num@out@result}{} +\si@bool@new\si@num@out@mant@parts@bool +\si@bool@new\si@num@out@mant@comp@parts@bool +\si@bool@new\si@num@out@exp@parts@bool +\si@bool@new\si@num@out@exp@comp@parts@bool +\si@bool@new\si@num@out@mant@comp@bool +\si@bool@new\si@num@out@exp@comp@bool +\si@bool@new\si@num@out@mant@bool +\si@keys@family{numbers/output} +\pgfkeys{ + /siunitx/numbers/output, + close bracket/.store in = {\si@num@out@bracket@close}, + close uncertainty/.store in = {\si@num@out@uncert@close}, + complex root/.store in = {\si@num@out@complex@root}, + decimal marker/.store in = {\si@num@out@decimal}, + exponent base/.store in = {\si@num@out@exp@base}, + exponent product/.store in = {\si@num@out@exp@prod}, + group digits/.is siunitx switch = {num@out@group@digits}, + group four digits/.is siunitx switch = {num@out@group@four}, + group separator/.store in = {\si@num@out@group@sep}, + open bracket/.store in = {\si@num@out@bracket@open}, + open uncertainty/.store in = {\si@num@out@uncert@open}, + separate uncertainty/.is siunitx switch = {num@out@uncert@sep}, + tight spacing/.is siunitx switch = {num@out@tight}, + uncertainty space/.store in = {\si@num@out@uncert@space}, + use brackets/.is siunitx switch = {num@out@bracket@use}, %( + close bracket = ),% ( + close uncertainty = ), + complex root = i, + decimal marker = ., + exponent base = 10, + exponent product = \times, + group digits = true, + group four digits = false, + group separator = {\,}, + open bracket = (, %) + open uncertainty = (, %) + separate uncertainty = false, + tight spacing = false, + use brackets = true, + uncertainty space = {}, +} +\newcommand*{\si@num@out@process}{% + \si@num@out@init + \si@num@out@core + \si@num@out@complex + \si@empty@if@F\si@num@out@mant{% + \si@bool@true\si@num@out@mant@bool + }% + \si@num@out@sign{mant}% + \si@num@out@sign{exp}% + \si@num@out@exponent +} +\newcommand*{\si@num@out@add}[1]{% + \si@add@right@cs@n{si@num@out@#1}% +} +\newcommand*{\si@num@out@add@C}[2]{% + \expandafter\si@num@out@add@C@aux\expandafter + {\csname si@num@out@#2\endcsname}{#1}% +} +\newcommand*{\si@num@out@add@C@aux}[2]{% + \si@add@right@cs@o{si@num@out@#2}{#1}% +} +\newcommand*{\si@num@out@add@maths}[2]{% + \si@empty@if@F#2{% + \expandafter\si@num@out@add@maths@aux\expandafter{#2}{#1}% + }% +} +\newcommand*{\si@num@out@add@maths@aux}[2]{% + \si@num@out@add{#2}{\ensuremath{#1}}% +} +\newcommand*{\si@num@out@add@pm}[1]{% + \si@bool@if@TF\si@num@out@tight@bool{% + \si@num@out@add@maths{#1}{{\pm}}% + }{% + \def\si@tempa{\pm}% + \si@num@out@add@maths{#1}{\si@tempa}% + }% +} +\newcommand*{\si@num@out@bracket@comp}[1]{% + \si@bool@cs@if@T{si@num@out@#1@comp@bool}{% + \si@bool@cs@false{si@num@out@#1@parts@bool}% + \si@bool@cs@false{si@num@out@#1@comp@parts@bool}% + }% + \si@num@out@brackets@aux@i{#1}{comp}% +} +\newcommand*{\si@num@out@bracket@parts}[1]{% + \si@num@out@brackets@aux@i{#1}{parts}% +} +\newcommand*{\si@num@out@brackets@aux@i}[2]{% + \si@empty@cs@if@F{si@num@out@#1}{% + \si@bool@if@T\si@num@out@bracket@use@bool{% + \si@bool@cs@if@T{si@num@out@#1@#2@bool}{% + \si@num@out@bracket@aux@ii{#1}% + \si@bool@cs@false{si@num@out@#1@#2@bool}% + }% + }% + }% +} +\newcommand*{\si@num@out@bracket@aux@ii}[1]{% + \si@add@left@cs@o{si@num@out@#1}\si@num@out@bracket@open + \si@add@right@cs@o{si@num@out@#1}\si@num@out@bracket@close +} +\newcommand*{\si@num@out@complex}{% + \si@num@out@complex@aux{mant}% + \si@num@out@complex@aux{exp}% +} +\newcommand*{\si@num@out@complex@aux}[1]{% + \si@num@out@bracket@parts{#1@comp}% + \si@bool@cs@if@T{si@num@in@#1@comp@bool}{% + \si@num@out@add@maths{#1@comp}{\si@num@out@complex@root}% + \si@num@out@bracket@parts{#1}% + \si@empty@cs@if@F{si@num@out@#1}{% + \si@num@out@sign{#1@comp}% + \si@bool@cs@true{si@num@out@#1@comp@bool}% + }% + }% + \si@num@out@add@C{#1}{#1@comp}% +} +\newcommand*{\si@num@out@copy}[1]{% + \expandafter\si@num@out@copy@aux\csname si@num@in@#1\endcsname{#1}% +} +\newcommand*{\si@num@out@copy@aux}[2]{% + \si@add@right@cs@o{si@num@out@#2}{#1}% +} +\newcommand*{\si@num@out@copy@maths}[1]{% + \expandafter\si@num@out@copy@maths@aux + \csname si@num@in@#1\endcsname{#1}% +} +\newcommand*{\si@num@out@copy@maths@aux}[2]{% + \si@num@out@add@maths{#2}#1% +} +\newcommand*{\si@num@out@core}{% + \si@num@out@core@aux@i{mant}% + \si@num@out@core@aux@i{exp}% +} +\newcommand*{\si@num@out@core@aux@i}[1]{% + \si@num@out@core@aux@ii{#1}% + \si@num@out@core@aux@ii{#1@comp}% +} +\newcommand*{\si@num@out@core@aux@ii}[1]{% + \si@bool@cs@if@T{si@num@in@#1@bool}{% + \si@num@out@group@digits{#1}% + \si@empty@cs@if@F{si@num@in@#1@uncert}{% + \si@num@out@uncert{#1}% + }% + }% +} +\newcommand*{\si@num@out@exponent}{% + \si@bool@if@T\si@num@out@mant@bool{% + \si@empty@cs@if@F{si@num@out@exp}{% + \si@num@out@bracket@comp{mant}% + \si@num@out@bracket@parts{mant}% + }% + }% + \si@num@out@add@C{result}{mant}% + \si@bool@if@T\si@num@out@mant@bool{% + \si@empty@cs@if@F{si@num@out@exp}{% + \si@bool@if@TF\si@num@out@tight@bool{% + \expandafter\def\expandafter\si@tempa\expandafter + {\expandafter{\si@num@out@exp@prod}}% + \si@num@out@add@maths{result}\si@tempa + }{% + \si@num@out@add@maths{result}{\si@num@out@exp@prod}% + }% + }% + }% + \si@empty@cs@if@F{si@num@out@exp}{% + \si@num@out@add@C{result}{exp@base}% + \edef\si@num@out@exp{% + ^{\expandafter\unexpanded\expandafter{\si@num@out@exp}}% + }% + \si@num@out@add@C{result}{exp}% + }% +} +\newcommand*{\si@num@out@group@digits}[1]{% + \si@num@out@copy{#1@dec}% + \si@num@out@copy{#1@int}% + \si@bool@if@T\si@num@out@group@digits@bool{% + \si@bool@if@F\si@num@in@symbols@bool{% + \si@num@out@group@digits@aux@i{#1}{dec}% + \si@num@out@group@digits@aux@i{#1}{int}% + }% + }% + \si@num@out@add@C{#1}{#1@int}% + \si@bool@cs@if@T{si@num@in@#1@dec@bool}{% + \si@num@out@add@maths{#1}{\si@num@out@decimal}% + \si@num@out@add@C{#1}{#1@dec}% + }% +} +\newcommand*{\si@num@out@group@digits@aux@i}[2]{% + \si@empty@cs@if@F{si@num@in@#1@#2}{% + \si@bool@if@TF\si@num@out@group@four@bool{% + \si@num@out@group@digits@aux@ii{#1}{#2}% + }{% + \si@num@out@group@five@if@T{si@num@in@#1@#2}{% + \si@num@out@group@digits@aux@ii{#1}{#2}% + }% + }% + }% +} +\newcommand*{\si@num@out@group@digits@aux@ii}[2]{% + \si@clear@cs{si@num@out@#1@#2}% + \@nameuse{si@num@out@group@#2}{#1}% +} +\newcommand*{\si@num@out@group@dec}[1]{% + \def\si@num@out@group@dec@aux##1##2##3##4{% + \si@empty@tlist@if@TF{##2}{% + \si@num@out@add{#1@dec}{##1}% + }{% + \si@empty@tlist@if@TF{##3}{% + \si@num@out@add{#1@dec}{##1##2}% + }{% + \si@num@out@add{#1@dec}{##1##2##3}% + \si@empty@tlist@if@F{##4}{% + \si@num@out@add@maths{#1@dec}{\si@num@out@group@sep}% + \si@num@out@group@dec@aux##4% + }% + }% + }% + }% + \expandafter\expandafter\expandafter\si@num@out@group@dec@aux + \csname si@num@in@#1@dec\endcsname{}{}{}% +} +\newcommand*{\si@num@out@group@dec@aux}{} +\newcommand*{\si@num@out@group@five@if@T}[1]{% + \expandafter\expandafter\expandafter\si@num@out@group@five@if@aux + \csname #1\endcsname\@empty\@empty\@empty\@empty\si@stop +} +\newcommand*{\si@num@out@group@five@if@aux}{} +\def\si@num@out@group@five@if@aux#1#2#3#4#5\si@stop{% + \edef\si@tempa{#5}% + \si@empty@if@F\si@tempa +} +\newcommand*{\si@num@out@group@int}[1]{% + \def\si@num@out@group@int@aux@iii##1##2##3##4{% + \si@num@out@add{#1@int}{##1##2##3}% + \si@stop@if@F{##4}{% + \si@num@out@add@maths{#1@int}{\si@num@out@group@sep}% + \si@num@out@group@int@aux@iii##4% + }% + }% + \expandafter\si@num@out@group@int@aux@i + \csname si@num@in@#1@int\endcsname +} +\newcommand*{\si@num@out@group@int@aux@i}[1]{% + \expandafter\si@num@out@group@int@aux@ii\expandafter + {\expandafter}#1{}{}{}% +} +\newcommand*{\si@num@out@group@int@aux@ii}[4]{% + \si@empty@tlist@if@TF{#2}{% + \si@num@out@group@int@aux@iii#1\si@stop + }{% + \si@empty@tlist@if@TF{#3}{% + \si@num@out@group@int@aux@iii{}{}#1#2\si@stop + }{% + \si@empty@tlist@if@TF{#4}{% + \si@num@out@group@int@aux@iii{}#1#2#3\si@stop + }{% + \si@num@out@group@int@aux@ii{#1#2#3#4}% + }% + }% + }% +} +\newcommand*{\si@num@out@group@int@aux@iii}{} +\newcommand*{\si@num@out@init}{% + \si@loop@over@macro\si@num@in@init@names\si@num@out@init@aux + \si@clear@macro\si@num@out@result + \si@bool@false\si@num@out@mant@parts@bool + \si@bool@false\si@num@out@mant@comp@parts@bool + \si@bool@false\si@num@out@exp@parts@bool + \si@bool@false\si@num@out@exp@comp@parts@bool + \si@bool@false\si@num@out@mant@comp@bool + \si@bool@false\si@num@out@exp@comp@bool + \si@bool@false\si@num@out@mant@bool +} +\newcommand*{\si@num@out@init@aux}[1]{% + \si@clear@cs{si@num@out@#1}% +} +\newcommand*{\si@num@out@sign}[1]{% + \si@bool@if@TF\si@num@out@tight@bool{% + \si@let@Nc\si@tempa{si@num@in@#1@sign}% + \expandafter\def\expandafter\si@tempa\expandafter + {\expandafter{\si@tempa}}% + \si@num@out@add@maths{#1@sign}\si@tempa + }{% + \si@num@out@copy@maths{#1@sign}% + }% + \si@num@out@sign@aux@i{#1}% +} +\newcommand*{\si@num@out@sign@aux@i}[1]{% + \expandafter\si@num@out@sign@aux@ii + \csname si@num@out@#1@sign\endcsname{si@num@out@#1}% +} +\newcommand*{\si@num@out@sign@aux@ii}[2]{% + \si@add@left@cs@o{#2}{#1}% +} +\newcommand*{\si@num@out@uncert}[1]{% + \si@bool@if@TF\si@num@out@uncert@sep@bool{% + \si@bool@cs@true{si@num@out@#1@parts@bool}% + \si@num@out@group@digits{#1@uncert}% + \si@num@out@add@pm{#1}% + \si@num@out@add@C{#1}{#1@uncert}% + }{% + \si@num@out@add@maths{#1@uncert}{\si@num@out@uncert@open}% + \si@num@out@copy{#1@uncert}% + \si@num@out@add@maths{#1@uncert}{\si@num@out@uncert@close}% + \si@num@out@add@maths{#1}{\si@num@out@uncert@space}% + \si@num@out@add@C{#1}{#1@uncert}% + }% +} +\newcommand*{\si@num@print}{% + \si@print@num@o{\si@num@out@result}% \opt +} +\newcommand*{\si@tab@rewrite@check@cellspace}{% + \@ifpackageloaded{cellspace}{% + \si@log@info{Changing cellspace column letter to C}% + \newcolumntype{C}[1]{>{\bcolumn##1\@nil}##1<{\ecolumn}}% + \def\si@tempa##1\NC@do S##2\si@stop{% + \NC@list{##1##2}% + }% + \expandafter\si@tempa\the\NC@list\si@stop + \let\NC@find@S\@undefined + }{}% +} +\AtBeginDocument{\si@tab@rewrite@check@cellspace} +\newcommand*{\si@tab@rewrite@create}[1]{% + \edef\si@tempa{\noexpand\NC@do #1\the\NC@list}% + \newcolumntype{#1}{}% + \NC@list\expandafter{\si@tempa}% + \expandafter\renewcommand\expandafter*\expandafter{% + \csname NC@rewrite@#1\endcsname + }[1][]{% + \edef\si@tempa{% + \the\@temptokena + >{\noexpand\si@tab@collect@begin[\unexpanded{##1}]{#1}}% + c% + <{\noexpand\si@tab@print@out}% + }% + \@temptokena\expandafter{\si@tempa}% + \NC@find + }% +} +\AtBeginDocument{% + \si@tab@rewrite@create{S}% + \si@tab@rewrite@create{s}% +} +\newcommand*{\si@tab@collect@after}{} +\newcommand*{\si@tab@collect@before}{} +\newcommand*{\si@tab@collect@body}{} +\newcommand*{\si@tab@collect@num}{} +\si@bool@new\si@tab@collect@after@bool +\si@bool@new\si@tab@collect@before@bool +\newcommand*{\si@tab@collect@begin}[2][]{% + \begingroup + \sisetup{#1}% + \def\si@tab@collect@body{}% + \@nameuse{si@tab@collect@begin@#2}% + \si@tab@collect@get +} +\newcommand*{\si@tab@collect@begin@s}{% + \si@bool@false\si@tab@collect@before@bool + \let\si@tab@collect@token\si@tab@collect@token@s + \let\si@tab@print@out\si@tab@print@out@s + \def\si@tab@collect@braced##1{% + \si@add@right@n\si@tab@collect@body{{##1}}% + \si@tab@collect@next + }% +} +\newcommand*{\si@tab@collect@begin@S}{% + \def\si@tab@collect@after{}% + \def\si@tab@collect@before{}% + \si@bool@true\si@tab@collect@before@bool + \let\si@tab@collect@token\si@tab@collect@token@S + \let\si@tab@print@out\si@tab@print@out@S + \si@expand@tlist\si@tab@collect@num{% + \si@num@in@ignore + \si@num@in@signs + \si@num@in@digits + \si@num@in@decimal + \si@num@in@exponent + \si@num@in@complex + \si@num@in@symbols + \si@num@in@uncert@open + \si@num@in@uncert@close + }% + \def\si@tab@collect@braced##1{% + \si@bool@if@TF\si@tab@collect@before@bool{% + \si@add@right@n\si@tab@collect@before{##1}% + }{% + \si@bool@false\si@tab@collect@before@bool + \si@bool@true\si@tab@collect@after@bool + \si@add@right@n\si@tab@collect@after{##1}% + }% + \si@tab@collect@next + }% +} +\newcommand*{\si@tab@collect@braced}{} +\newcommand*{\si@tab@collect@expand}[1]{% + \edef\si@tempa{% + \expandafter\si@tab@collect@expand@aux@i\meaning#1:->\si@stop + }% + \si@meaning@eq@if@TF\si@tempa\si@tab@collect@expand@aux@ii{% + \si@tab@collect@before + \def\si@tab@collect@before{}% + \expandafter\def\expandafter\si@tab@collect@next\expandafter{% + \expandafter\si@tab@collect@get#1% + }% + }{% + \si@bool@if@TF\si@tab@collect@before@bool{% + \si@add@right@n\si@tab@collect@before{#1}% + }{% + \si@bool@true\si@tab@collect@after@bool + \si@bool@false\si@tab@collect@before@bool + \si@add@right@n\si@tab@collect@after{#1}% + }% + }% +} +\newcommand*{\si@tab@collect@expand@aux@i}{} +\def\si@tab@collect@expand@aux@i#1:->#2\si@stop{#1} +\newcommand*{\si@tab@collect@expand@aux@ii}{} +\edef\si@tab@collect@expand@aux@ii{% + \expandafter\si@tab@collect@expand@aux@i\meaning + \si@tab@collect@expand@aux@ii:->\si@stop +}% +\newcommand*{\si@tab@collect@get}{% + \let\si@tab@collect@next\si@tab@collect@get + \futurelet\si@tempa\si@tab@collect@get@aux +} +\newcommand*{\si@tab@collect@get@aux}{% + \si@meaning@eq@if@TF\si@tempa\bgroup{% + \si@tab@collect@braced + }{% + \si@tab@collect@unbraced + }% +} +\newcommand*{\si@tab@collect@newline}{% + \si@tab@print@out + \tabularnewline +} +\newcommand*{\si@tab@collect@next}{} +\newcommand*{\si@tab@collect@token}{} +\newcommand*{\si@tab@collect@token@s}[1]{% + \si@add@right@n\si@tab@collect@body{#1}% +} +\newcommand*{\si@tab@collect@token@S}[1]{% + \si@bool@if@TF\si@tab@collect@after@bool{% + \si@add@right@n\si@tab@collect@after{#1}% + }{% + \si@in@if@TF\si@tab@collect@num{#1}{% + \si@bool@false\si@tab@collect@before@bool + \si@add@right@n\si@tab@collect@body{#1}% + }{% + \si@tab@collect@expand{#1}% + }% + }% +} +\newcommand*{\si@tab@collect@unbraced}[1]{% + \si@meaning@eq@if@F{#1}\ignorespaces{% + \si@meaning@eq@if@F{#1}\unskip{% + \si@tab@collect@unbraced@aux{#1}% + }% + }% + \si@tab@collect@next +} +\newcommand*{\si@tab@collect@unbraced@aux}[1]{% + \def\si@tempa##1{% + \si@meaning@eq@if@T{#1}##1{% + \let\si@tab@collect@next##1% + }% + }% + \si@tempa\csname + \si@tempa\end + \si@tempa\endtabular + \si@tempa\si@tab@print@out + \si@tempa\relax + \si@meaning@eq@if@T\si@tab@collect@next\si@tab@collect@get{% + \si@meaning@eq@if@TF{#1}\tabularnewline{% + \let\si@tab@collect@next\si@tab@collect@newline + }{% + \si@tab@collect@token{#1}% + }% + }% +} +\si@keys@family{tables} +\pgfkeys{ + /siunitx/tables, + align exponents/.is siunitx switch = {}, + align uncertainties/.is siunitx switch = {}, + number position/.is choice, + number position/.cd, + center/.code = {}, + centre/.code = {}, + decimal centred/.code = {}, + decimal centered/.code = {}, + left/.code = {}, + right/.code = {}, + /siunitx/tables, + number format/.code = {}, + position/.is choice, + position/.cd, + center/.style = { + /siunitx/tables/number position = center, + /siunitx/tables/text position = center, + /siunitx/tables/unit position = center, + }, + centre/.style = { + /siunitx/tables/number position = centre, + /siunitx/tables/text position = centre, + /siunitx/tables/unit position = centre, + }, + left/.style = { + /siunitx/tables/number position = left, + /siunitx/tables/text position = left, + /siunitx/tables/unit position = left, + }, + right/.style = { + /siunitx/tables/number position = right, + /siunitx/tables/text position = right, + /siunitx/tables/unit position = right, + }, + /siunitx/tables, + text position/.is choice, + text position/.cd, + center/.code = {}, + centre/.code = {}, + none/.code = {}, + left/.code = {}, + right/.code = {}, + /siunitx/tables, + unit position/.is choice, + unit position/.cd, + center/.code = {}, + centre/.code = {}, + none/.code = {}, + left/.code = {}, + right/.code = {}, + /siunitx/tables, + number position = centre, + text position = centre, + unit position = centre +} +\newcommand*{\si@tab@print@out}{} +\newcommand*{\si@tab@print@out@s}{% + \si@tab@collect@body + \endgroup +} +\newcommand*{\si@tab@print@out@S}{% + \si@tab@collect@before + \si@tab@collect@body + \si@tab@collect@after + \endgroup +} +\newcommand*{\si@unit@def@list}{} +\newcommand*{\si@unit@def@prefix@list}{} +\newcommand*{\si@unit@def@power@list}{} +\newcommand*{\si@unit@def@qual@list}{} +\newcommand*{\si@unit@def@unit@list}{} +\newcommand*{\si@unit@def@list@combine}{% + \si@expand@tlist\si@unit@def@list{% + \si@unit@def@power@list + \si@unit@def@prefix@list + \si@unit@def@qual@list + \si@unit@def@unit@list + }% + \si@add@right@n\si@unit@def@list{% + \per + \raiseto + \tothe + }% +} +\AtBeginDocument{\si@unit@def@list@combine} +\newcommand*{\si@unit@def@power}[2]{% + \si@add@right@n\si@unit@def@power@list{#1}% + \@namedef{si@unit@literal@\string#1}##1{##1\textsuperscript{#2}}% + \@namedef{si@unit@macro@\string#1}{% + \def\si@unit@parse@power@last{#2}% + }% +} +\newcommand*{\si@unit@def@power@post}[2]{% + \si@add@right@n\si@unit@def@power@list{#1}% + \@namedef{si@unit@literal@\string#1}{\textsuperscript{#2}}% + \@namedef{si@unit@macro@\string#1}{% + \def\si@unit@parse@power@current{#2}% + \si@unit@parse@store{power}{null}% + }% +} +\newcommand*{\si@unit@def@prefix}[3]{% + \si@add@right@n\si@unit@def@prefix@list{#1}% + \@namedef{si@unit@literal@\string#1}{#2}% + \@namedef{si@unit@number@\string#1}{#3}% + \@namedef{si@unit@macro@\string#1}{% + \si@unit@parse@store{prefix}{#2}% + }% +} +\newcommand*{\si@unit@def@prefix@binary}[1]{% + \si@unit@def@prefix{#1}% +} +\newcommand*{\si@unit@def@qual}[2]{% + \si@add@right@n\si@unit@def@qual@list{#1}% + \@namedef{si@unit@literal@\string#1}{\text{ }(#2)}% + \@namedef{si@unit@macro@\string#1}{% + \si@unit@parse@store{qual}{#2}% + }% +} +\newcommand*{\si@unit@def@unit}[3]{% + \si@add@right@n\si@unit@def@unit@list{#1}% + \si@empty@tlist@if@TF{#2}{% + \si@let@cN{si@unit@options@\string#1}\@undefined + }{% + \@namedef{si@unit@options@\string#1}{#2}% + }% + \@namedef{si@unit@literal@\string#1}{#3}% + \@namedef{si@unit@macro@\string#1}{% + \si@csname@if@TF{si@unit@macro@\expandafter\string\@car#3\@nil}{% + #3% + }{% + \si@unit@parse@store{unit}{#3}% + }% + }% +} +\si@bool@new\si@unit@create@body@bool +\si@bool@new\si@unit@create@opt@bool +\si@bool@new\si@unit@create@overwrite@bool +\si@bool@new\si@unit@create@prespace@bool +\si@bool@new\si@unit@create@xspace@bool +\si@keys@family{units/creation} +\pgfkeys{ + /siunitx/units/creation, + add leading space/.is siunitx switch = {unit@create@prespace}, + allow in body/.is siunitx switch = {unit@create@body}, + allow optional argument/.is siunitx switch = {unit@create@opt}, + overwrite macros/.is siunitx switch = {unit@create@overwrite}, + use xspace/.is siunitx switch = {unit@create@xspace}, + add leading space = false, + allow in body = false, + allow optional argument = false, + overwrite macros = false, + use xspace = false +} +\newcommand*{\si@unit@create@body}{% + \si@bool@if@T\si@unit@create@body@bool{% + \si@unit@create@macros + }% +} +\AtBeginDocument{\si@unit@create@body} +\newcommand*{\si@unit@create@macros}{% + \si@bool@if@T\si@unit@create@xspace@bool{% + \RequirePackage{xspace}% + }% + \si@bool@if@T\si@unit@create@overwrite@bool{% + \si@loop@over@macro\si@unit@def@list\si@unit@create@undefine + }% + \si@bool@if@TF\si@unit@create@opt@bool{% + \si@loop@over@macro\si@unit@def@list\si@unit@create@optional + }{% + \si@loop@over@macro\si@unit@def@list\si@unit@create@plain + }% +} +\newcommand*{\si@unit@create@optional}[1]{% + \ifdefined#1\else + \edef\si@tempa{% + \unexpanded{\si@newcommand*{#1}[1][]}{% + \si@bool@if@T\si@unit@create@prespace@bool{% + \unexpanded{\si@empty@tlist@if@T{##1}}{% + \unexpanded{\ensuremath{\si@unit@out@unit@sep}}% + }% + }% + \unexpanded{\SI{##1}{#1}}% + \si@bool@if@T\si@unit@create@xspace@bool{% + \noexpand\xspace + }% + }% + }% + \expandafter\si@tempa + \fi +} +\newcommand*{\si@unit@create@plain}[1]{% + \ifdefined#1\else + \edef\si@tempa{% + \unexpanded{\si@newcommand*{#1}}{% + \si@bool@if@T\si@unit@create@prespace@bool{% + \unexpanded{\ensuremath{\si@unit@out@unit@sep}}% + }% + \unexpanded{\si{#1}}% + \si@bool@if@T\si@unit@create@xspace@bool{% + \noexpand\xspace + }% + }% + }% + \expandafter\si@tempa + \fi +} +\newcommand*{\si@unit@create@undefine}[1]{% + \let#1\@undefined +} +\@namedef{si@unit@literal@\string\per}{/} +\@namedef{si@unit@macro@\string\per}{% + \si@bool@true\si@unit@parse@per@last@bool + \def\si@unit@parse@power@last{1}% +} +\@namedef{si@unit@literal@\string\raiseto}#1#2{ + #2\textsuperscript{#1}% +} +\@namedef{si@unit@macro@\string\raiseto}#1{% + \def\si@unit@parse@power@last{#1}% +} +\@namedef{si@unit@literal@\string\tothe}#1{% + \textsuperscript{#1}% +} +\@namedef{si@unit@macro@\string\tothe}#1{% + \def\si@unit@parse@power@current{#1}% + \si@unit@parse@store{power}{null}% +} +\newcommand*{\si@unit@in@parse}[1]{% + \si@empty@tlist@if@F{#1}{% + \si@unit@in@process@if@TF{#1}{% + \si@unit@parse@unit{#1}% + }{% + \si@bool@if@TF\si@unit@out@lit@allow@bool{% + \si@unit@out@literal{#1}% + }{% + \si@log@error{Literal units disabled}{% + You gave the literal input `#1' for a unit\MessageBreak + but literal unit output is disabled. + }% + }% + }% + }% +} +\newcommand*{\si@unit@in@process@if@TF}[1]{% + \begingroup + \si@loop@over@macro\si@unit@def@list\si@unit@in@process@aux + \let\raiseto\@gobble + \let\tothe\@gobble + \protected@edef\@tempa{#1}% + \expandafter\endgroup + \expandafter\def\expandafter\si@tempa\expandafter{\@tempa}% + \si@empty@if@TF\si@tempa +} +\newcommand*{\si@unit@in@process@aux}[1]{% + \si@clear@macro#1% +} +\newcommand*{\si@unit@parse@block}{} +\newcommand*{\si@unit@parse@block@den}{} +\newcount\si@unit@parse@block@cnt +\newcount\si@unit@parse@block@den@cnt +\si@bool@new\si@unit@parse@per@current@bool +\si@bool@new\si@unit@parse@per@last@bool +\newcommand*{\si@unit@parse@power@current}{} +\newcommand*{\si@unit@parse@power@last}{} +\si@bool@new\si@unit@parse@qual@sub@bool +\newcommand*{\si@unit@parse@queue}{} +\newcommand*{\si@unit@parse@queue@den}{} +\newcommand*{\si@unit@parse@sep}{} +\si@bool@new\si@unit@parse@sticky@bool +\newcommand*{\si@unit@parse@type@last}{} +\newcommand*{\si@unit@parse@type@last@den}{} +\newcommand*{\si@unit@parse@type@prefix}{prefix} +\newcommand*{\si@unit@parse@type@power}{power} +\newcommand*{\si@unit@parse@type@qual}{qual} +\newcommand*{\si@unit@parse@type@unit}{unit} +\si@bool@new\si@unit@parse@fraction@bool +\newcommand*{\si@unit@parse@qual@format}{} +\si@keys@family{units/output} +\pgfkeys{ + /siunitx/units/output, + print as fraction/.is siunitx switch = {unit@parse@fraction}, + qualifier format/.is choice, + qualifier format/.cd, + brackets/.code = {% + \def\si@unit@parse@qual@format##1{(##1)}% + \si@bool@false\si@unit@parse@qual@sub@bool + }, + space/.code = {% + \def\si@unit@parse@qual@format##1{\text{ }##1}% + \si@bool@false\si@unit@parse@qual@sub@bool + }, + subscript/.code = {% + \def\si@unit@parse@qual@format##1{_{##1}}% + \si@bool@true\si@unit@parse@qual@sub@bool + }, + /siunitx/units/output, + sticky per/.is siunitx switch = {unit@parse@sticky}, + print as fraction = false, + qualifier format = subscript, + sticky per = false, +} +\newcommand*{\si@unit@parse@unit}[1]{% + \si@unit@parse@init + \si@unit@parse@options{#1}% + \si@unit@out@sep@print + #1% + \si@unit@parse@store@unit{stop}% + \si@print@unit@o{\si@unit@parse@queue}% TEMP +} +\newcommand*{\si@unit@parse@block@new}[1]{% + \si@empty@if@F\si@unit@parse@power@current{% + \si@unit@parse@store@power{null}% + }% + \si@unit@parse@block@trans + \let\si@unit@parse@per@current@bool\si@unit@parse@per@last@bool + \let\si@unit@parse@power@current\si@unit@parse@power@last + \si@clear@macro\si@unit@parse@power@last + \si@bool@if@TF\si@unit@parse@sticky@bool{% + \si@bool@if@T\si@unit@parse@per@last@bool{% + \def\si@unit@parse@power@last{1}% + }% + }{% + \si@bool@false\si@unit@parse@per@last@bool + }% + \@namedef{si@unit@parse@block\si@unit@parse@queue@use}{#1}% +} +\newcommand*{\si@unit@parse@block@trans}{% + \si@empty@cs@if@F{si@unit@parse@queue\si@unit@parse@queue@use}{% + \si@add@right@cs@o{si@unit@parse@queue\si@unit@parse@queue@use}{% + \si@unit@parse@sep + }% + }% + \expandafter\si@unit@parse@block@add@aux\expandafter{% + \csname si@unit@parse@block\si@unit@parse@queue@use\endcsname + }% +} +\newcommand*{\si@unit@parse@block@add@aux}[1]{% + \si@add@right@cs@o{si@unit@parse@queue\si@unit@parse@queue@use}{#1}% +} +\newcommand*{\si@unit@parse@bracket}[1]{% + \si@bool@if@T\si@unit@out@bracket@use@bool{% + \si@add@left@cs@o{si@unit@parse@#1}\si@unit@out@bracket@open + \si@add@right@cs@o{si@unit@parse@#1}\si@unit@out@bracket@close + }% +} +\newcommand*{\si@unit@parse@init}{% + \si@loop@over@macro\si@unit@def@list\si@unit@parse@init@aux + \si@clear@macro\si@unit@parse@current + \si@clear@macro\si@unit@parse@current@den + \si@clear@macro\si@unit@parse@power@current + \si@clear@macro\si@unit@parse@power@last + \si@clear@macro\si@unit@parse@queue + \si@clear@macro\si@unit@parse@queue@den + \def\si@unit@parse@type@last{start}% + \def\si@unit@parse@type@last@den{start}% + \expandafter\def\expandafter\si@unit@parse@sep\expandafter{% + \expandafter\ensuremath\expandafter{\si@unit@out@unit@sep}% + }% + \si@unit@parse@block@cnt\z@\relax + \si@unit@parse@block@den@cnt\z@\relax + \si@bool@false\si@unit@parse@per@last@bool + \si@bool@false\si@unit@parse@per@current@bool +} +\newcommand*{\si@unit@parse@init@aux}[1]{% + \si@let@Nc#1{si@unit@macro@\string#1}% +} +\newcommand*{\si@unit@parse@last@if@F}[1]{% + \si@meaning@eq@cs@if@F + {si@unit@parse@type@last\si@unit@parse@queue@use}% + {si@unit@parse@type@#1}% +} +\newcommand*{\si@unit@parse@last@if@T}[1]{% + \si@meaning@eq@cs@if@T + {si@unit@parse@type@last\si@unit@parse@queue@use}% + {si@unit@parse@type@#1}% +} +\newcommand*{\si@unit@parse@last@if@TF}[1]{% + \si@meaning@eq@cs@if@TF + {si@unit@parse@type@last\si@unit@parse@queue@use}% + {si@unit@parse@type@#1}% +} +\newcommand*{\si@unit@parse@options}[1]{% + \si@csname@if@T{si@unit@options@\expandafter\string\@car#1\@nil}{% + \edef\si@tempa{% + \expandafter\expandafter\expandafter\unexpanded + \expandafter\expandafter\expandafter{% + \csname si@unit@options@\expandafter\string\@car#1\@nil + \endcsname + },% + \expandafter\unexpanded\expandafter{\si@unit@internal@opts}% + }% + \expandafter\sisetup\expandafter{\si@tempa}% + }% +} +\newcommand*{\si@unit@parse@queue@use}{% + \si@bool@if@T\si@unit@parse@fraction@bool{% + \si@bool@if@T\si@unit@parse@per@current@bool{@den}% + }% +} +\newcommand*{\si@unit@parse@store}[2]{% + \@nameuse{si@unit@parse@store@#1}{#2}% +} +\newcommand*{\si@unit@parse@store@add@n}[1]{% + \si@add@right@cs@n{si@unit@parse@block\si@unit@parse@queue@use}{#1}% +} +\newcommand*{\si@unit@parse@store@add@o}[1]{% + \si@add@right@cs@o{si@unit@parse@block\si@unit@parse@queue@use}{#1}% +} +\newcommand*{\si@unit@parse@store@power}[1]{% + \si@unit@parse@last@if@T{qual}{% + \si@bool@if@F\si@unit@parse@qual@sub@bool{% + \si@unit@parse@bracket{block\si@unit@parse@queue@use}% + }% + \si@unit@parse@store@power@aux + }% + \si@unit@parse@last@if@T{unit}{% + \si@unit@parse@store@power@aux + }% + \si@clear@macro\si@unit@parse@power@current +} +\newcommand*{\si@unit@parse@store@power@aux}{% + \si@unit@parse@store@type{power}% + \si@bool@if@T\si@unit@parse@per@current@bool{% + \si@bool@if@F\si@unit@parse@fraction@bool{% + \si@unit@parse@store@power@inv + }% + }% + \def\si@tempa{1}% + \si@meaning@eq@if@F\si@unit@parse@power@current\si@tempa{% + \si@unit@parse@store@add@o{% + \expandafter^\expandafter{\si@unit@parse@power@current}% + }% + }% +} +\newcommand*{\si@unit@parse@store@power@inv}{% + \si@in@if@TF\si@unit@parse@power@current{-}{% + \def\si@tempa##1-##2\si@stop{% + \def\si@unit@parse@power@current{##2}% + }% + }{% + \si@add@left@n\si@unit@parse@power@current{-}% + }% +} +\newcommand*{\si@unit@parse@store@prefix}[1]{% + \si@unit@parse@last@if@F{prefix}{% + \si@unit@parse@store@type{prefix}% + \si@unit@parse@block@new{#1}% + }% +} +\newcommand*{\si@unit@parse@store@qual}[1]{% + \si@unit@parse@last@if@T{unit}{% + \si@unit@parse@store@add@o{\si@unit@parse@qual@format{#1}}% + \si@unit@parse@store@type{qual}% + }% +} +\newcommand*{\si@unit@parse@store@type}[1]{% + \si@let@cc{si@unit@parse@type@last\si@unit@parse@queue@use}% + {si@unit@parse@type@#1}% +} +\newcommand*{\si@unit@parse@store@unit}[1]{% + \si@count@incr@cs{si@unit@parse@block\si@unit@parse@queue@use @cnt}% + \si@unit@parse@last@if@TF{prefix}{% + \si@unit@parse@store@type{unit}% + \si@unit@parse@store@add@n{#1}% + }{% + \si@unit@parse@store@type{unit}% + \si@unit@parse@block@new{#1}% + }% +} +\newcommand*{\si@unit@out@literal@unit}{} +\newcommand*{\si@unit@out@bracket@close}{} +\newcommand*{\si@unit@out@bracket@open}{} +\si@bool@new\si@unit@out@bracket@use@bool +\si@bool@new\si@unit@out@break@bool +\si@bool@new\si@unit@out@lit@allow@bool +\newcommand*{\si@unit@out@num@sep}{} +\newcommand*{\si@unit@out@unit@sep}{} +\newcommand*{\si@unit@out@unit@space}{} +\pgfkeys{ + /siunitx/units/output, + allow literal units/.is siunitx switch = {unit@out@lit@allow}, + allow number-unit breaks/.is siunitx switch = {unit@out@break}, + close bracket/.store in = \si@unit@out@bracket@close, + inter-unit separator/.store in = \si@unit@out@unit@sep, + inter-unit space/.store in = \si@unit@out@unit@space, + number-unit separator/.store in = \si@unit@out@num@sep, + open bracket/.store in = \si@unit@out@bracket@open, + use brackets/.is siunitx switch = {unit@out@bracket@use}, %( + allow literal units = true, + allow number-unit breaks = false, + close bracket = ), + inter-unit separator = \,, + inter-unit space = \,, + number-unit separator = \,, + open bracket = (, % + use brackets = true +} +\newcommand*{\si@unit@out@literal}[1]{% + \si@loop@over@macro\si@unit@def@list\si@unit@out@literal@aux + \si@unit@out@literal@print{#1}% +} +\newcommand*{\si@unit@out@literal@aux}[1]{% + \si@let@Nc#1{si@unit@literal@\string#1}% +} +\si@catcode@set{46}{13}% . +\si@catcode@set{38}{13}% & +\newcommand*{\si@unit@out@literal@print}[1]{% + \def\si@unit@out@literal@unit{#1}% + \si@unit@out@replace@fullstops\si@unit@out@literal@unit + \si@unit@out@replace@tildes\si@unit@out@literal@unit + \begingroup + \si@catcode@set{38}{13}% & + \si@catcode@set{126}{13}% ~ + \let.\si@unit@out@unit@sep + \let&\si@unit@out@unit@space + \protected@edef\si@unit@out@literal@unit{\si@unit@out@literal@unit}% + \si@print@unit@o{\si@unit@out@literal@unit}% + \endgroup +} +\si@catcode@set{46}{12}% . +\si@lccode@set{38}{46}% & -> . +\lowercase{% + \newcommand*{\si@unit@out@replace@fullstops}[1]{% + \si@replace@all@in#1{.}{&}% + } +} +\si@lccode@set{38}{0}% & -> & +\newcommand*{\si@unit@out@replace@tildes}[1]{% + \si@replace@all@in#1{~}{&}% +} +\si@catcode@set{38}{4}% & +\newcommand*{\si@unit@out@sep@print}{% + \ensuremath{% + \si@bool@if@TF\si@unit@out@break@bool{% + \allowbreak + }{% + \nobreak + }% + \si@unit@out@num@sep + }% +} +\si@bool@new\si@symbol@redefine@bool + +\si@keys@family{symbols} +\pgfkeys{ + /siunitx/symbols, + redefine symbols/.is siunitx switch = {symbol@redefine}, + redefine symbols = true +} +\newcommand*{\si@symbol@redefine}{% + \si@bool@if@T\si@symbol@redefine@bool{% + \@ifpackageloaded{textcomp}{% + \sisetup{ + symbols/maths/degree = \text{\textdegree}, + symbols/text/degree = \textdegree + }% + \@ifpackageloaded{mathptmx}{}{% + \sisetup{ + symbols/text/micro = \textmu, + symbols/text/ohm = \textomega + }% + }% + \def\si@tempa{OT1}% + \si@meaning@eq@if@T\si@tempa\encodingdefault{% + \sisetup{ + symbols/maths/angstrom = \text{\capitalring{A}}, + symbols/text/angstrom = \capitalring{A} + }% + }% + }{}% + \@ifpackageloaded{upgreek}{% + \sisetup{ + symbols/maths/ohm = \Upomega + } + }{}% + }% +} +\AtBeginDocument{\si@symbol@redefine} +\newcommand*{\si@symbol@maths@angstrom}{} +\newcommand*{\si@symbol@maths@arcminute}{} +\newcommand*{\si@symbol@maths@arcsecond}{} +\newcommand*{\si@symbol@maths@celsius}{} +\newcommand*{\si@symbol@maths@degree}{} +\newcommand*{\si@symbol@maths@micro}{} +\newcommand*{\si@symbol@maths@ohm}{} +%%\begin{macro}{\si@symbol@text@angstrom} +\newcommand*{\si@symbol@text@angstrom}{} +\newcommand*{\si@symbol@text@arcminute}{} +\newcommand*{\si@symbol@text@arcsecond}{} +\newcommand*{\si@symbol@text@celsius}{} +\newcommand*{\si@symbol@text@degree}{} +\newcommand*{\si@symbol@text@micro}{} +\newcommand*{\si@symbol@text@ohm}{} +\si@keys@family{symbols/maths} +\pgfkeys{ + /siunitx/symbols/maths, + angstrom/.store in = \si@symbol@maths@angstrom, + arcminute/.store in = \si@symbol@maths@arcminute, + arcsecond/.store in = \si@symbol@maths@arcsecond, + celsius/.store in = \si@symbol@maths@celsius, + degree/.store in = \si@symbol@maths@degree, + micro/.store in = \si@symbol@maths@micro, + ohm/.store in = \si@symbol@maths@ohm, + angstrom = \text{\AA}, + arcminute = {}^{\prime}, + arcsecond = {}^{\prime\prime}, + celsius = {}^{\circ}\kern-\scriptspace C, + degree = {}^{\circ}, + micro = \si@symbol@maths@mu, + ohm = \text{\ensuremath{\Omega}} +} +\si@keys@family{symbols/math} +\pgfkeys{ + /siunitx/symbols/math, + angstrom/.store in = \si@symbol@maths@angstrom, + arcminute/.store in = \si@symbol@maths@arcminute, + arcsecond/.store in = \si@symbol@maths@arcsecond, + celsius/.store in = \si@symbol@maths@celsius, + degree/.store in = \si@symbol@maths@degree, + micro/.store in = \si@symbol@maths@micro, + ohm/.store in = \si@symbol@maths@ohm, +} +\si@keys@family{symbols/text} +\pgfkeys{ + /siunitx/symbols/text, + angstrom/.store in = \si@symbol@text@angstrom, + arcminute/.store in = \si@symbol@text@arcminute, + arcsecond/.store in = \si@symbol@text@arcsecond, + celsius/.store in = \si@symbol@text@celsius, + degree/.store in = \si@symbol@text@degree, + micro/.store in = \si@symbol@text@micro, + ohm/.store in = \si@symbol@text@ohm, + angstrom = \AA, + arcminute = \ensuremath{{}^{\prime}}, + arcsecond = \ensuremath{{}^{\prime\prime}}, + celsius = \ensuremath{{}^{\circ}}\kern-\scriptspace C, + degree = \ensuremath{{}^{\circ}}, + micro = \si@symbol@text@mu, + ohm = \ensuremath{\Omega} +} +\newcommand*{\si@symbol@new}[1]{% + \expandafter\si@newcommand\expandafter*\expandafter{% + \csname SIUnitSymbol#1\endcsname + }{% + \si@mode@maths@if@TF{% + \lowercase{\@nameuse{si@symbol@maths@#1}}% + }{% + \lowercase{\@nameuse{si@symbol@text@#1}}% + }% + }% +} +\si@symbol@new{Angstrom} +\si@symbol@new{Arcminute} +\si@symbol@new{Arcsecond} +\si@symbol@new{Celsius} +\si@symbol@new{Degree} +\si@symbol@new{Micro} +\si@symbol@new{Ohm} +\DeclareFontEncoding{TS1}{}{} +\DeclareFontSubstitution{TS1}{cmr}{m}{n} +\DeclareTextSymbol{\si@symbol@text@mu}{TS1}{181} +\DeclareTextSymbolDefault{\si@symbol@text@mu}{TS1} +\newcommand*{\si@symbol@check@upgreek}{% + \@ifpackageloaded{upgreek}{% + \let\si@symbol@maths@mu\upmu + }{% + \DeclareFontFamily{OML}{eur}{\skewchar\font127}% + \DeclareFontShape{OML}{eur}{m}{n}% + {<-6> eurm5 <6-8> eurm7 <8-> eurm10}{}% + \DeclareSymbolFont{si@symbol}{OML}{eur}{m}{n}% + \DeclareMathSymbol{\si@symbol@maths@mu}{\mathord}{si@symbol}{22}% + }% +} +\AtBeginDocument{\si@symbol@check@upgreek} +\newcommand*{\DeclareSIPower}{% + \@ifstar{% + \si@unit@def@power@post + }{% + \si@unit@def@power + }% +} +\newcommand*{\DeclareSIPrefix}{% + \@ifstar{% + \si@unit@def@prefix@binary + }{% + \si@unit@def@prefix + }% +} +\newcommand*{\DeclareSIQualifier}{% + \si@unit@def@qual +} +\newcommand*{\DeclareSIUnit}[2][]{% + \si@unit@def@unit{#2}{#1}% +} +\@onlypreamble\DeclareSIPower +\@onlypreamble\DeclareSIPrefix +\@onlypreamble\DeclareSIQualifier +\@onlypreamble\DeclareSIUnit +\si@newcommand*{\sisetup}[1]{% + \pgfqkeys{/siunitx}{#1}% +} +\si@newcommand*{\num}[2][]{% + \begingroup + \sisetup{#1}% + \si@num@internal{#2}% + \endgroup +} +\newcommand*{\si@num@internal}[1]{% + \si@num@pre@process{#1}% + \si@bool@if@F\si@num@pre@error@bool{% + \si@num@in@parse@o{\si@num@pre@arg}% + \si@bool@if@F\si@num@in@error@bool{% + \si@num@post@process + \si@num@out@process + \si@num@print + }% + }% +} +\si@newcommand*{\SI}[2][]{% + \begingroup + \def\si@tempa{{#1}{#2}}% + \si@unit@internal@i +} +\newcommand*{\si@unit@internal@i}[2][]{% + \expandafter\si@unit@internal@ii\si@tempa{#1}{#2}% +} +\newcommand*{\si@unit@internal@ii}[4]{% TEMP + \sisetup{#1}% + \def\si@unit@internal@opts{#1}% + \si@unit@in@parse{#3}% + \si@num@internal{#2}% + \si@bool@if@F\si@num@in@error@bool{% + \si@empty@tlist@if@T{#4}{% + \let\si@unit@out@sep@print\relax + }% + }% + \si@unit@in@parse{#4}% + \endgroup +} +\newcommand*{\si@unit@internal@opts}{} +\si@newcommand*{\si}[2][]{% + \begingroup + \sisetup{#1}% + \si@unit@in@parse{#2}% + \endgroup +} +\DeclareSIUnit{\kilogram}{\kilo\gram} +\DeclareSIUnit{\metre}{m} +\DeclareSIUnit{\meter}{\metre} +\DeclareSIUnit{\mole}{mol} +\DeclareSIUnit{\second}{s} +\DeclareSIUnit{\ampere}{A} +\DeclareSIUnit{\kelvin}{K} +\DeclareSIUnit{\candela}{cd} +\DeclareSIUnit{\gram}{g} +\DeclareSIPrefix{\yocto}{y}{-24} +\DeclareSIPrefix{\zepto}{z}{-21} +\DeclareSIPrefix{\atto}{a}{-18} +\DeclareSIPrefix{\femto}{f}{-15} +\DeclareSIPrefix{\pico}{p}{-12} +\DeclareSIPrefix{\nano}{n}{-9} +\DeclareSIPrefix{\micro}{\SIUnitSymbolMicro}{-6} +\DeclareSIPrefix{\milli}{m}{-3} +\DeclareSIPrefix{\centi}{c}{-2} +\DeclareSIPrefix{\deci}{d}{-1} +\DeclareSIPrefix{\deca}{da}{1} +\DeclareSIPrefix{\deka}{da}{1} +\DeclareSIPrefix{\hecto}{h}{2} +\DeclareSIPrefix{\kilo}{k}{3} +\DeclareSIPrefix{\mega}{M}{6} +\DeclareSIPrefix{\giga}{G}{9} +\DeclareSIPrefix{\tera}{T}{12} +\DeclareSIPrefix{\peta}{P}{15} +\DeclareSIPrefix{\exa}{E}{18} +\DeclareSIPrefix{\zetta}{Z}{21} +\DeclareSIPrefix{\yotta}{Y}{24} +\DeclareSIUnit{\becquerel}{Bq} +\DeclareSIUnit{\celsius}{\SIUnitSymbolCelsius} +\DeclareSIUnit{\coulomb}{C} +\DeclareSIUnit{\farad}{F} +\DeclareSIUnit{\gray}{Gy} +\DeclareSIUnit{\hertz}{Hz} +\DeclareSIUnit{\henry}{H} +\DeclareSIUnit{\joule}{J} +\DeclareSIUnit{\katal}{kat} +\DeclareSIUnit{\lumen}{lm} +\DeclareSIUnit{\lux}{lx} +\DeclareSIUnit{\newton}{N} +\DeclareSIUnit{\ohm}{\SIUnitSymbolOhm} +\DeclareSIUnit{\pascal}{Pa} +\DeclareSIUnit{\radian}{rad} +\DeclareSIUnit{\siemens}{S} +\DeclareSIUnit{\sievert}{Sv} +\DeclareSIUnit{\steradian}{sr} +\DeclareSIUnit{\tesla}{T} +\DeclareSIUnit{\volt}{V} +\DeclareSIUnit{\watt}{W} +\DeclareSIUnit{\weber}{Wb} +\DeclareSIUnit[units/output/number-unit separator={}] + {\arcmin}{\arcminute} +\DeclareSIUnit[units/output/number-unit separator={}] + {\arcminute}{\SIUnitSymbolArcminute} +\DeclareSIUnit[units/output/number-unit separator={}] + {\arcsecond}{\SIUnitSymbolArcsecond} +\DeclareSIUnit{\day}{d} +\DeclareSIUnit[units/output/number-unit separator={}] + {\degree}{\SIUnitSymbolDegree} +\DeclareSIUnit{\hectare}{ha} +\DeclareSIUnit{\hour}{h} +\DeclareSIUnit{\litre}{l} +\DeclareSIUnit{\liter}{L} +\DeclareSIUnit{\minute}{min} +\DeclareSIUnit{\percent}{\char37} +\DeclareSIUnit{\tonne}{t} +\DeclareSIUnit{\astronomicalunit}{ua} +\DeclareSIUnit{\atomicmassunit}{u} +\DeclareSIUnit{\electronvolt}{eV} +\DeclareSIUnit{\dalton}{Da} +\DeclareSIUnit{\clight}{\text{\ensuremath{c_{0}}}} +\DeclareSIUnit{\electronmass}{\text{\ensuremath{m_{\text{e}}}}} +\DeclareSIUnit{\planckbar}{\text{\ensuremath{\hbar}}} +\DeclareSIUnit{\elementarycharge}{\text{\ensuremath{e}}} +\DeclareSIUnit{\bohr}{\text{\ensuremath{a_{0}}}} +\DeclareSIUnit{\hartree}{\text{\ensuremath{E_{\textup{h}}}}} +\DeclareSIUnit{\angstrom}{\SIUnitSymbolAngstrom} +\DeclareSIUnit{\bar}{bar} +\DeclareSIUnit{\barn}{b} +\DeclareSIUnit{\bel}{B} +\DeclareSIUnit{\decibel}{\deci\bel} +\DeclareSIUnit{\knot}{kn} +\DeclareSIUnit{\mmHg}{mmHg} +\DeclareSIUnit{\nauticalmile}{M} +\DeclareSIUnit{\neper}{Np} +\DeclareSIPower{\square}{2} +\DeclareSIPower*{\squared}{2} +\DeclareSIPower{\cubic}{3} +\DeclareSIPower*{\cubed}{3} +\si@catcode@restore +\si@lccode@restore +%% +%% Copyright (C) 2008-2009 by +%% Joseph Wright +%% +%% It may be distributed and/or modified under the conditions of +%% the LaTeX Project Public License (LPPL), either version 1.3c of +%% this license or (at your option) any later version. The latest +%% version of this license is in the file: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% This work is "maintained" (as per LPPL maintenance status) by +%% Joseph Wright. +%% +%% This work consists of the file siunitx.dtx +%% and the derived files siunitx.pdf, +%% siunitx.sty and +%% siunitx.ins. +%% +%% +%% End of file `siunitx.sty'. From cd10a213014160b0e1e612bc0953320f77ca9ade Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Fri, 2 Jan 2015 13:37:34 +0100 Subject: [PATCH 18/21] random --- Utils/ftpfct.sh | 2 +- bashrc | 1 + mailcap | 2 +- texmf/tex/latex/frank_tex/frank_tex.sty | 2 +- texmf/tex/latex/frank_tex/siunitx.sty | 3583 ----------------------- vim/spell/en.utf-8.add | 3 + vim/spell/fr.utf-8.add | 9 + vim/spell/fr.utf-8.add.spl | Bin 337 -> 1177 bytes vim/vimrc | 2 + 9 files changed, 18 insertions(+), 3586 deletions(-) delete mode 100644 texmf/tex/latex/frank_tex/siunitx.sty diff --git a/Utils/ftpfct.sh b/Utils/ftpfct.sh index 0aa0c64..6c81b29 100755 --- a/Utils/ftpfct.sh +++ b/Utils/ftpfct.sh @@ -43,7 +43,7 @@ while true; do echo "lt 56" REFRESH=5 elif [ $TEMP -lt 66 ]; then - set_fan 2 + set_fan 3 echo "lt 66" REFRESH=4 elif [ $TEMP -lt 70 ]; then diff --git a/bashrc b/bashrc index 238d21c..281ec67 100644 --- a/bashrc +++ b/bashrc @@ -128,6 +128,7 @@ alias push='git push' alias makew='make' alias mkae='make' +alias mak='make' alias amek='make' alias BSI2='cd ~/Documents/Studies/BSI2*/' diff --git a/mailcap b/mailcap index 472c0f8..1e5f11b 100644 --- a/mailcap +++ b/mailcap @@ -1,4 +1,4 @@ -image/*; feh %s +image/*; eog %s #text/html; lynx -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput text/html; firefox %s audio/*; vlc %s diff --git a/texmf/tex/latex/frank_tex/frank_tex.sty b/texmf/tex/latex/frank_tex/frank_tex.sty index 9eb9e65..63d023d 100644 --- a/texmf/tex/latex/frank_tex/frank_tex.sty +++ b/texmf/tex/latex/frank_tex/frank_tex.sty @@ -20,7 +20,7 @@ % Lenny, Conny ,Bjarne, Rejne, Glenn, Sonny, PetersLenny, Bjornstrup -\usepackage[Sonny]{fncychap} +\usepackage[Lenny]{fncychap} %\usepackage{fancyhdr} diff --git a/texmf/tex/latex/frank_tex/siunitx.sty b/texmf/tex/latex/frank_tex/siunitx.sty deleted file mode 100644 index 5c97779..0000000 --- a/texmf/tex/latex/frank_tex/siunitx.sty +++ /dev/null @@ -1,3583 +0,0 @@ -%% -%% This is file `siunitx.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% siunitx.dtx (with options: `package') -%% --------------------------------------------------------------- -%% The siunitx package --- A comprehensive (SI) units package -%% Maintained by Joseph Wright -%% E-mail: joseph.wright@morningstar2.co.uk -%% Released under the LaTeX Project Public License v1.3c or later -%% See http://www.latex-project.org/lppl.txt -%% --------------------------------------------------------------- -%% -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{siunitx} - [2009/03/29 v2.0alpha A comprehensive (SI) units package] -\begingroup - \@ifundefined{eTeXversion}{% - \PackageError{siunitx}{Not running under e-TeX}{% - This package requires e-TeX. Try compiling the document with - \MessageBreak `elatex' instead of `latex'. When using pdfTeX, try - `pdfelatex' \MessageBreak instead of `pdflatex'. - }% - \endgroup\endinput - }{% - \endgroup -} -\begingroup - \@for\@tempa:=SIunits,sistyle,siunits,SIstyle,unitsdef,fancyunits\do{% - \@ifpackageloaded{\@tempa}{% - \PackageError{siunitx}{Package `\@tempa' incompatible}{% - The \@tempa\space package and siunitx are incompatible. - \MessageBreak Use the `emulate=\@tempa' package option when - loading siunitx. - }% - }{}% - } -\endgroup -\newcommand*{\si@package@check}{% - \begingroup - \@for\@tempa:=SIunits,sistyle,siunits,SIstyle\do{ - \@ifpackageloaded{\@tempa}{% - \PackageError{siunitx}{Package `\@tempa' incompatible}{% - The \@tempa\space package and siunitx are incompatible. - \MessageBreak Use the `emulate=\@tempa' package option when - loading siunitx. - }% - }{}% - }% - \endgroup -} -\AtBeginDocument{\si@package@check} -\newcommand*{\si@catcode@restore}{} -\newcommand*{\si@catcode@set}{} -\newcommand*{\si@catcode@store}[2]{% - \edef\si@catcode@restore{% - \si@catcode@restore - \catcode#1 \the\catcode#1\relax - }% - \catcode#1 #2\relax -} -\newcommand*{\si@catcode@symbols}{% - \si@catcode@set{42}{12}% * - \si@catcode@set{43}{12}% + - \si@catcode@set{44}{12}% , - \si@catcode@set{46}{12}% . - \si@catcode@set{47}{12}% / - \si@catcode@set{58}{12}% : - \si@catcode@set{59}{12}% ; - \si@catcode@set{60}{12}% < - \si@catcode@set{61}{12}% = - \si@catcode@set{62}{12}% > -} -\let\si@catcode@set\si@catcode@store -\si@catcode@symbols -\si@catcode@set{38}{4}% & -\si@catcode@set{45}{12}% - -\si@catcode@set{94}{7}% ^ -\si@catcode@set{95}{8}% _ -\si@catcode@set{126}{13}% ~ -\renewcommand*{\si@catcode@set}[2]{% - \catcode#1 #2\relax -} -\newcommand*{\si@lccode@restore}{} -\edef\si@lccode@restore{% - \lccode38 \the\lccode38\relax % & -} -\newcommand*{\si@lccode@set}[2]{% - \lccode#1 #2\relax -} -\RequirePackage{amstext,array,etex,pgfkeys} -\newcommand*{\si@encoding@ts@one}{% - \@ifundefined{T@TS1}{% - \DeclareFontEncoding{TS1}{}{}% - \DeclareFontSubstitution{TS1}{cmr}{m}{n}% - }{}% -} -\AtBeginDocument{% - \si@encoding@ts@one -} -\newcommand*{\si@key@path}{} -\newcommand*{\si@key@error}{% - \expandafter\si@key@error@aux\pgfkeyscurrentkey\si@stop -} -\newcommand*{\si@key@error@aux}{} -\def\si@key@error@aux/siunitx/#1\si@stop{% - \si@log@error{Unknown option `#1'}{% - The option `#1' is not known to siunitx. - }% -} -\newcommand*{\si@keys@family}[1]{% - \pgfkeys{ - /siunitx/#1/.is family, - /siunitx/#1/.unknown/.code = \si@key@error - }% -} -\pgfkeys{ - /siunitx/.is family, - /siunitx/.unknown/.code = \si@key@error -} -\pgfkeys{ - /handlers/.is siunitx switch/.code = {% - \edef\si@key@path{\pgfkeyscurrentpath}% - \pgfkeys{ - \si@key@path/.is choice, - \si@key@path/.default = {true}, - \si@key@path/true/.code = {\si@bool@cs@true{si@#1@bool}}, - \si@key@path/false/.code = {\si@bool@cs@false{si@#1@bool}}, - \si@key@path/yes/.code = {\si@bool@cs@true{si@#1@bool}}, - \si@key@path/no/.code = {\si@bool@cs@false{si@#1@bool}}, - \si@key@path/on/.code = {\si@bool@cs@true{si@#1@bool}}, - \si@key@path/off/.code = {\si@bool@cs@false{si@#1@bool}}, - }% - } -} -\newcommand*{\si@false@bool}{01} -\newcommand*{\si@true@bool}{00} -\newcommand*{\si@tmp@bool}{} -\newcommand*{\si@tempa}{} -\newcommand*{\si@tempb}{} -\newcount\si@tempcnt -\newsavebox\si@tempbox -\newtoks\si@temp@toks -\newcommand*{\si@log@error}{% - \PackageError{siunitx}% -} -\newcommand*{\si@log@info}{% - \PackageInfo{siunitx}% -} -\newcommand*{\si@log@warning}{% - \PackageWarning{siunitx}% -} -\newcommand*{\si@reserveda}{} -\newcommand*{\si@reservedb}{} -\newtoks\si@reserved@toks -\newcommand*{\si@add@left@n}[2]{% - \def\si@reserveda{#2}% - \edef#1{% - \expandafter\unexpanded\expandafter{\si@reserveda}% - \expandafter\unexpanded\expandafter{#1}% - }% -} -\newcommand*{\si@add@left@o}[2]{% - \expandafter\si@add@left@n\expandafter#1\expandafter{#2}% -} -\newcommand*{\si@add@left@cs@n}[1]{% - \expandafter\si@add@left@n\csname #1\endcsname -} -\newcommand*{\si@add@left@cs@o}[1]{% - \expandafter\si@add@left@o\csname #1\endcsname -} -\newcommand*{\si@add@right@n}[2]{% - \def\si@reserveda{#2}% - \edef#1{% - \expandafter\unexpanded\expandafter{#1}% - \expandafter\unexpanded\expandafter{\si@reserveda}% - }% -} -\newcommand*{\si@add@right@o}[2]{% - \expandafter\si@add@right@n\expandafter#1\expandafter{#2}% -} -\newcommand*{\si@add@right@cs@n}[1]{% - \expandafter\si@add@right@n\csname #1\endcsname -} -\newcommand*{\si@add@right@cs@o}[1]{% - \expandafter\si@add@right@o\csname #1\endcsname -} -\newcommand*{\si@bool@false}[1]{% - \let#1\si@false@bool -} -\newcommand*{\si@bool@new}[1]{% - \newcommand*{#1}{}% - \let#1\si@false@bool -} -\newcommand*{\si@bool@true}[1]{% - \let#1\si@true@bool -} -\newcommand*{\si@bool@cs@false}[1]{% - \expandafter\si@bool@false\csname #1\endcsname -} -\newcommand*{\si@bool@cs@new}[1]{% - \expandafter\si@bool@new\csname #1\endcsname -} -\newcommand*{\si@bool@cs@true}[1]{% - \expandafter\si@bool@true\csname #1\endcsname -} -\newcommand*{\si@bool@if@F}[1]{% - \if#1% - \expandafter\@gobble - \else - \expandafter\@firstofone - \fi -} -\newcommand*{\si@bool@if@T}[1]{% - \if#1% - \expandafter\@firstofone - \else - \expandafter\@gobble - \fi -} -\newcommand*{\si@bool@if@TF}[1]{% - \if#1% - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi -} -\newcommand*{\si@bool@cs@if@F}[1]{% - \expandafter\si@bool@if@F\csname #1\endcsname -} -\newcommand*{\si@bool@cs@if@T}[1]{% - \expandafter\si@bool@if@T\csname #1\endcsname -} -\newcommand*{\si@bool@cs@if@TF}[1]{% - \expandafter\si@bool@if@TF\csname #1\endcsname -} -\newcommand*{\si@clear@cs}[1]{% - \si@let@cN{#1}\@empty -} -\newcommand*{\si@clear@macro}[1]{% - \let#1\@empty -} -\newcommand*{\si@count@incr@cs}[1]{% - \advance\@nameuse{#1}\@ne\relax -} -\newcommand*{\si@csname@if@F}[1]{% - \ifcsname #1\endcsname - \expandafter\@gobble - \else - \expandafter\@firstofone - \fi -} -\newcommand*{\si@csname@if@T}[1]{% - \ifcsname #1\endcsname - \expandafter\@firstofone - \else - \expandafter\@gobble - \fi -} -\newcommand*{\si@csname@if@TF}[1]{% - \ifcsname #1\endcsname - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi -} -\newcommand*{\si@dowhile@bool@T}[2]{% - #2% - \si@bool@if@T#1{% - \si@dowhile@bool@T#1{#2}% - }% -} -\newcommand*{\si@empty@cs@if@F}[1]{% - \expandafter\si@empty@if@F\csname #1\endcsname -} -\newcommand*{\si@empty@cs@if@T}[1]{% - \expandafter\si@empty@if@T\csname #1\endcsname -} -\newcommand*{\si@empty@cs@if@TF}[1]{% - \expandafter\si@empty@if@TF\csname #1\endcsname -} -\newcommand*{\si@empty@if@F}[1]{% - \si@meaning@eq@if@F#1\@empty -} -\newcommand*{\si@empty@if@T}[1]{% - \si@meaning@eq@if@T#1\@empty -} -\newcommand*{\si@empty@if@TF}[1]{% - \si@meaning@eq@if@TF#1\@empty -} -\newcommand*{\si@empty@tlist@if@F}[1]{% - \expandafter\ifx\expandafter\si@nil\detokenize{#1}\si@nil - \expandafter\@gobble - \else - \expandafter\@firstofone - \fi -} -\newcommand*{\si@empty@tlist@if@T}[1]{% - \expandafter\ifx\expandafter\si@nil\detokenize{#1}\si@nil - \expandafter\@firstofone - \else - \expandafter\@gobble - \fi -} -\newcommand*{\si@empty@tlist@if@TF}[1]{% - \expandafter\ifx\expandafter\si@nil\detokenize{#1}\si@nil - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi -} -\newcommand*{\si@empty@toks@if@F}[1]{% - \expandafter\si@empty@tlist@if@F\expandafter{\the#1}% -} -\newcommand*{\si@empty@toks@if@T}[1]{% - \expandafter\si@empty@tlist@if@T\expandafter{\the#1}% -} -\newcommand*{\si@empty@toks@if@TF}[1]{% - \expandafter\si@empty@tlist@if@TF\expandafter{\the#1}% -} -\newcommand*{\si@elt@count}[1]{% - \number\numexpr 0\si@loop@over@macro#1\si@elt@count@aux\relax -} -\newcommand*{\si@elt@count@aux}[1]{+1} -\newcommand*{\si@elt@count@cs}[1]{% - \expandafter\si@elt@count\csname #1\endcsname -} -\newcommand*{\si@expand@tlist}[2]{% - \si@clear@macro#1% - \def\si@reservedb##1{% - \si@add@right@o#1{##1}% - }% - \si@loop@over@macro@aux\si@reservedb#2\si@loop@end\si@loop@stop -} -\newcommand*{\si@expand@tlist@cs}[1]{% - \expandafter\si@expand@tlist\csname #1\endcsname -} -\newcommand*{\si@in@if@F}[2]{% - \def\si@reserveda##1#2##2\si@stop{% - \si@no@value@if@T{##2}% - }% - \expandafter\si@reserveda#1#2\si@no@value\si@stop -} -\newcommand*{\si@in@if@T}[2]{% - \def\si@reserveda##1#2##2\si@stop{% - \si@no@value@if@F{##2}% - }% - \expandafter\si@reserveda#1#2\si@no@value\si@stop -} -\newcommand*{\si@in@if@TF}[2]{% - \def\si@reserveda##1#2##2\si@stop{% - \si@no@value@if@FT{##2}% - }% - \expandafter\si@reserveda#1#2\si@no@value\si@stop -} -\newcommand*{\si@in@tlist@if@F}[2]{% - \def\si@reserveda##1#2##2\si@stop{% - \si@no@value@if@T{##2}% - }% - \si@reserveda#1#2\si@no@value\si@stop -} -\newcommand*{\si@in@tlist@if@T}[2]{% - \def\si@reserveda##1#2##2\si@stop{% - \si@no@value@if@F{##2}% - }% - \si@reserveda#1#2\si@no@value\si@stop -} -\newcommand*{\si@in@tlist@if@TF}[2]{% - \def\si@reserveda##1#2##2\si@stop{% - \si@no@value@if@FT{##2}% - }% - \si@reserveda#1#2\si@no@value\si@stop -} -\newcommand*{\si@in@cs@if@F}[1]{% - \expandafter\si@in@if@F\csname #1\endcsname -} -\newcommand*{\si@in@cs@if@T}[1]{% - \expandafter\si@in@if@T\csname #1\endcsname -} -\newcommand*{\si@in@cs@if@TF}[1]{% - \expandafter\si@in@if@TF\csname #1\endcsname -} -\newcommand*{\si@let@cc}[2]{% - \expandafter\si@let@cN\expandafter{\expandafter#1\expandafter}% - \csname #2\endcsname -} -\newcommand*{\si@let@cN}[1]{% - \expandafter\let\csname #1\endcsname -} -\newcommand*{\si@let@Nc}[2]{% - \expandafter\let\expandafter#1\csname #2\endcsname -} -\newcommand*{\si@loop@over@cs}[1]{% - \expandafter\si@loop@over@macro\csname #1\endcsname -} -\newcommand*{\si@loop@over@macro}[2]{% - \expandafter\si@loop@over@macro@aux - \expandafter#2#1\si@loop@end\si@loop@stop -} -\newcommand*{\si@loop@over@macro@aux}[2]{% - \si@loop@end@if{#2}% - #1{#2}% - \si@loop@over@macro@aux#1% -} -\newcommand*{\si@loop@end@if}[1]{% - \expandafter\ifx\si@loop@end@if@aux#1?\si@nil\si@loop@end\si@loop@end - \expandafter\si@loop@exit - \fi -} -\newcommand*{\si@loop@exec@end@if}[2]{% - \expandafter\ifx\si@loop@end@if@aux#1?\si@nil\si@loop@end\si@loop@end - \expandafter\si@loop@exit@exec - \else - \expandafter\@gobble - \fi - {#2}% -} -\newcommand*{\si@loop@end@if@aux}{} -\def\si@loop@end@if@aux#1#2\si@nil\si@loop@end{#1} -\newcommand*{\si@loop@exit}{} -\def\si@loop@exit#1\si@loop@stop{} -\newcommand*{\si@loop@exit@exec}{} -\def\si@loop@exit@exec#1#2\si@loop@stop{#1} -\newcommand*{\si@loop@end}{\si@loop@end} -\newcommand*{\si@loop@stop}{\si@loop@stop} -\newcommand*{\si@loop@over@three}[2]{% - \expandafter\si@loop@over@three@aux - \expandafter#2#1\si@loop@end\si@loop@stop -} -\newcommand*{\si@loop@over@three@aux}[4]{% - \si@loop@end@if{#2}% - #1{#2#3#4}% - \si@loop@over@three@aux#1% -} -\newcommand*{\si@loop@over@three@cs}[1]{% - \expandafter\si@loop@over@three\csname #1\endcsname -} -\newcommand*{\si@meaning@eq@if@F}[2]{% - \ifx#1#2% - \expandafter\@gobble - \else - \expandafter\@firstofone - \fi -} -\newcommand*{\si@meaning@eq@if@T}[2]{% - \ifx#1#2% - \expandafter\@firstofone - \else - \expandafter\@gobble - \fi -} -\newcommand*{\si@meaning@eq@if@TF}[2]{% - \ifx#1#2% - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi -} -\newcommand*{\si@meaning@eq@cs@if@F}[2]{% - \expandafter\si@meaning@eq@if@F\csname #1\expandafter\endcsname - \csname #2\endcsname -} -\newcommand*{\si@meaning@eq@cs@if@T}[2]{% - \expandafter\si@meaning@eq@if@T\csname #1\expandafter\endcsname - \csname #2\endcsname -} -\newcommand*{\si@meaning@eq@cs@if@TF}[2]{% - \expandafter\si@meaning@eq@if@TF\csname #1\expandafter\endcsname - \csname #2\endcsname -} -\newcommand*{\si@mode@maths@display@if@T}{% - \ifmmode - \ifinner - \expandafter\expandafter\expandafter\@gobble - \else - \expandafter\expandafter\expandafter\@firstofone - \fi - \else - \expandafter\@gobble - \fi -} -\newcommand*{\si@mode@maths@inline@if@T}{% - \ifmmode - \ifinner - \expandafter\expandafter\expandafter\@firstofone - \else - \expandafter\expandafter\expandafter\@gobble - \fi - \else - \expandafter\@gobble - \fi -} -\newcommand*{\si@mode@maths@if@F}{% - \ifmmode - \expandafter\@gobble - \else - \expandafter\@firstofone - \fi -} -\newcommand*{\si@mode@maths@if@TF}{% - \ifmmode - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi -} -\newcommand*{\si@edef@c}[1]{% - \expandafter\edef\csname #1\endcsname -} -\newcommand*{\si@newcommand}{% - \@ifstar{% - \let\l@ngrel@x\protected - \si@newcommand@aux@i - }{% - \def\l@ngrel@x{\protected\long}% - \si@newcommand@aux@i - }% -} -\newcommand*{\si@newcommand@aux@i}[1]{% - \@testopt{\si@newcommand@aux@ii#1}0% -} -\newcommand*{\si@newcommand@aux@ii}{} -\def\si@newcommand@aux@ii#1[#2]{% - \@ifnextchar[{% - \si@newcommand@aux@iii#1[#2]% - }{% - \@argdef#1[#2]% - }%] -} -\newcommand*{\si@newcommand@aux@iii}{} -\def\si@newcommand@aux@iii#1[#2][#3]#4{% - \@ifdefinable#1{% - \expandafter\protected\expandafter\def\expandafter#1\expandafter{% - \expandafter\@testopt\csname\string#1\endcsname{#3}% - }% - \expandafter\@yargdef\csname\string#1\endcsname\tw@{#2}{#4}% - }% -} -\newcommand*{\si@nil}{\si@nil} -\newcommand*{\si@stop}{\si@stop} -\newcommand*{\si@no@value}{\si@no@value} -\newcommand*{\si@no@value@if@F}[1]{% - \if\si@no@value@if@aux@i{#1}% - \expandafter\@gobble - \else - \expandafter\@firstofone - \fi -} -\newcommand*{\si@no@value@if@FT}[1]{% - \if\si@no@value@if@aux@i{#1}% - \expandafter\@secondoftwo - \else - \expandafter\@firstoftwo - \fi -} -\newcommand*{\si@no@value@if@T}[1]{% - \if\si@no@value@if@aux@i{#1}% - \expandafter\@firstofone - \else - \expandafter\@gobble - \fi -} -\newcommand*{\si@no@value@if@TF}[1]{% - \if\si@no@value@if@aux@i{#1}% - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi -} -\newcommand*{\si@no@value@if@aux@i}[1]{% - \if\expandafter\si@no@value@if@aux@ii\expandafter - {\string\si@no@value\space}{\detokenize{#1}}% - \si@true@bool - \else - \si@false@bool - \fi -} -\newcommand*{\si@no@value@if@aux@ii}[1]{% - \if\number\si@no@value@if@aux@iii{}{}#1\relax -} -\newcommand*{\si@no@value@if@aux@iii}[3]{% - \if#3\relax - \expandafter\si@no@value@if@aux@iv - \fi - \si@no@value@if@aux@iii{\if#3#1}{#2\fi}% -} -\newcommand*{\si@no@value@if@aux@iv}{} -\def\si@no@value@if@aux@iv\si@no@value@if@aux@iii#1#2#3{% - #1#3\relax'#213 - \si@true@bool - \else - \si@false@bool - \fi -} -\newcommand*{\si@num@if@F}[1]{% - \ifnum#1\relax - \expandafter\@gobble - \else - \expandafter\@firstofone - \fi -} -\newcommand*{\si@num@if@T}[1]{% - \ifnum#1\relax - \expandafter\@firstofone - \else - \expandafter\@gobble - \fi -} -\newcommand*{\si@num@if@TF}[1]{% - \ifnum#1\relax - \expandafter\@firstoftwo - \else - \expandafter\@secondoftwo - \fi -} -\newcommand*{\si@replace@all@in}[3]{% - \si@reserved@toks{}% - \def\si@tempa##1#2##2\si@stop{% - \si@no@value@if@TF{##2}{% - \si@replace@all@in@aux{##1}% - }{% - \si@replace@all@in@aux{##1#3}% - \si@tempa\@empty##2\si@stop - }% - }% - \@firstofone{\expandafter\si@tempa\expandafter\@empty}% - #1#2\si@no@value\si@stop - \edef#1{\the\si@reserved@toks}% -} -\newcommand*{\si@replace@all@in@aux}[1]{% - \si@reserved@toks\expandafter\expandafter\expandafter{% - \expandafter\the\expandafter\si@reserved@toks#1% - }% -} -\newcommand*{\si@replace@all@in@cs}[1]{% - \expandafter\si@replace@all@in\csname #1\endcsname -} -\newcommand*{\si@reverse@macro}[1]{% - \edef#1{% - \expandafter\si@reverse@tlist\expandafter{#1}% - }% -} -\newcommand*{\si@reverse@cs}[1]{% - \expandafter\si@reverse@macro\csname #1\endcsname -} -\newcommand*{\si@reverse@tlist}[1]{% - \si@reverse@tlist@aux{}#1\si@loop@end\si@loop@stop -} -\newcommand*{\si@reverse@tlist@aux}[2]{% - \si@loop@exec@end@if{#2}{#1}% - \si@reverse@tlist@aux{#2#1}% -} -\newcommand*{\si@stop@if@F}[1]{% - \si@meaning@eq@if@F#1\si@stop -} -\newcommand*{\si@stop@if@T}[1]{% - \si@meaning@eq@if@T#1\si@stop -} -\newcommand*{\si@stop@if@TF}[1]{% - \si@meaning@eq@if@TF#1\si@stop -} -\newcommand*{\si@whiledo@num@T}[2]{% - \si@num@if@T{#1}{% - #2\si@whiledo@num@T{#1}{#2}% - }% -} -\newcommand*{\si@whiledo@empty@F}[2]{% - \si@empty@if@F#1{% - #2\si@whiledo@empty@F#1{#2}% - }% -} -\newcommand*{\si@whiledo@empty@T}[2]{% - \si@empty@if@T#1{% - #2\si@whiledo@empty@T#1{#2}% - }% -} -\newcommand*{\si@whiledo@empty@cs@F}[2]{% - \si@empty@cs@if@F{#1}{% - #2\si@whiledo@empty@cs@F{#1}{#2}% - }% -} -\newcommand*{\si@whiledo@empty@cs@T}[2]{% - \si@empty@cs@if@T{#1}{% - #2\si@whiledo@empty@cs@T{#1}{#2}% - }% -} -\newcommand*{\si@font@fam@mathsf}{} -\newcommand*{\si@font@fam@mathtt}{} -\newcommand*{\si@font@fam@detect@maths}[1]{% - \begingroup - \setbox\@tempboxa\hbox{% - \ensuremath{% - \csname math#1\endcsname{% - \expandafter\global\expandafter\chardef - \csname si@font@fam@math#1\endcsname\fam\relax - }% - }% - }% - \endgroup -} -\g@addto@macro{\document}{% - \si@font@fam@detect@maths{sf}% - \si@font@fam@detect@maths{tt}% -} -\newcommand*{\si@font@fam@sfdefault}{} -\newcommand*{\si@font@fam@ttfamily}{} -\newcommand*{\si@font@fam@detect@text}[1]{% - \si@edef@c{si@font@fam@#1default}{\@nameuse{#1default}}% -} -\AtBeginDocument{% - \si@font@fam@detect@text{sf}% - \si@font@fam@detect@text{tt}% -} -\si@bool@new\si@font@det@b@bool -\si@bool@new\si@font@det@family@bool -\si@bool@new\si@font@det@maths@display@bool -\si@bool@new\si@font@det@maths@inline@bool -\si@bool@new\si@font@det@it@bool -\si@bool@new\si@font@det@mode@bool -\si@keys@family{font/detect} -\pgfkeys{ - /siunitx/font/detect, - all/.style = { - /siunitx/font/detect/bold = true, - /siunitx/font/detect/family = true, - /siunitx/font/detect/italic = true, - /siunitx/font/detect/mode = true - }, - bold/.is siunitx switch = {font@det@b}, - display math/.is siunitx switch = {font@det@maths@display}, - display maths/.is siunitx switch = {font@det@maths@display}, - family/.is siunitx switch = {font@det@family}, - inline bold/.is choice, - inline bold/.cd, - maths/.code = {\si@bool@true\si@font@det@maths@inline@bool}, - math/.code = {\si@bool@true\si@font@det@maths@inline@bool}, - text/.code = {\si@bool@false\si@font@det@maths@inline@bool}, - /siunitx/font/detect, - italic/.is siunitx switch = {font@det@it}, - mode/.is siunitx switch = {font@det@mode}, - none/.style = { - /siunitx/font/detect/bold = false, - /siunitx/font/detect/family = false, - /siunitx/font/detect/italic = false, - /siunitx/font/detect/mode = false - }, - bold = false, - display maths = true, - inline bold = text, - italic = false, - mode = false -} -\si@bool@new\si@font@set@bool -\newcommand*{\si@font@set@bold}{} -\newcommand*{\si@font@set@family}{} -\newcommand*{\si@font@set@italic}{} -\si@bool@new\si@font@set@text@bool -\newcommand*{\si@font@det@set}{% - \si@bool@if@F\si@font@set@bool{% - \si@font@det@init - \si@bool@if@T\si@font@det@b@bool{% - \si@font@det@bold - }% - \si@bool@if@T\si@font@det@family@bool{% - \si@font@det@family - }% - \si@bool@if@T\si@font@det@it@bool{% - \si@font@det@italic - }% - \si@bool@if@T\si@font@det@mode@bool{% - \si@font@det@mode - }% - }% -} -\newcommand*{\si@font@det@init}{% - \si@bool@true\si@font@set@bool - \def\si@font@set@bold{\unboldmath\mdseries}% - \def\si@font@set@family{rm}% - \si@bool@false\si@font@set@text@bool - \def\si@font@set@italic{\upshape}% -} -\newcommand*{\si@font@det@bold}{% - \si@mode@maths@display@if@T{% - \si@bool@if@TF\si@font@det@maths@display@bool{% - \si@font@det@bold@maths - }{% - \si@font@det@bold@text - }% - }% - \si@mode@maths@inline@if@T{% - \si@bool@if@TF\si@font@det@maths@inline@bool{% - \si@font@det@bold@maths - }{% - \si@font@det@bold@text - }% - }% - \si@mode@maths@if@F{% - \si@font@det@bold@text - }% -} -\newcommand*{\si@font@det@bold@maths}{% - \def\si@tempa{bold}% - \si@meaning@eq@if@T\si@tempa\math@version{% - \def\si@font@set@bold{\boldmath\bfseries}% - }% -} -\newcommand*{\si@font@det@bold@text}{% - \def\si@tempa{b}% - \edef\si@tempb{\expandafter\@car\f@series\@nil}% - \si@meaning@eq@if@T\si@tempa\si@tempb{% - \def\si@font@set@bold{\boldmath\bfseries}% - }% -} -\newcommand*{\si@font@det@family}{% - \si@font@det@fam@text - \si@bool@if@T\si@font@det@maths@display@bool{% - \si@mode@maths@display@if@T{% - \si@font@det@fam@maths - }% - }% -} -\newcommand*{\si@font@det@fam@maths}{% - \def\si@font@set@family{rm}% - \si@num@if@TF{\the\fam=\si@font@fam@mathsf}{% - \def\si@font@set@family{sf}% - }{% - \si@num@if@T{\the\fam=\si@font@fam@mathtt}{% - \def\si@font@set@family{tt}% - }% - }% -} -\newcommand*{\si@font@det@fam@text}{% - \si@meaning@eq@if@T\f@family\si@font@fam@sfdefault{% - \def\si@font@set@family{sf}% - }% - \si@meaning@eq@if@T\f@family\si@font@fam@ttdefault{% - \def\si@font@set@family{tt}% - }% -} -\newcommand*{\si@font@det@italic}{% - \def\si@tempa{it}% - \si@meaning@eq@if@T\si@tempa\f@shape{% - \def\si@font@set@italic{\itshape}% - }% -} -\newcommand*{\si@font@det@mode}{% - \si@mode@maths@if@F{% - \si@bool@true\si@font@set@text@bool - }% -} -\newcommand*{\si@font@unit@maths@rm}{} -\newcommand*{\si@font@unit@maths@sf}{} -\newcommand*{\si@font@unit@maths@tt}{} -\newcommand*{\si@font@unit@text@rm}{} -\newcommand*{\si@font@unit@text@sf}{} -\newcommand*{\si@font@unit@text@tt}{} -\newcommand*{\si@font@num@maths@rm}{} -\newcommand*{\si@font@num@maths@sf}{} -\newcommand*{\si@font@num@maths@tt}{} -\newcommand*{\si@font@num@text@rm}{} -\newcommand*{\si@font@num@text@sf}{} -\newcommand*{\si@font@num@text@tt}{} -\si@bool@new\si@font@unit@textmode@bool -\si@bool@new\si@font@num@textmode@bool -\si@keys@family{font} -\si@keys@family{font/units} -\si@keys@family{font/numbers} -\pgfkeys{ - /siunitx/font, - maths rm/.style = { - /siunitx/font/units/maths rm = #1, - /siunitx/font/numbers/maths rm = #1 - }, - maths sf/.style = { - /siunitx/font/units/maths sf = #1, - /siunitx/font/numbers/maths sf = #1 - }, - maths tt/.style = { - /siunitx/font/units/maths tt = #1, - /siunitx/font/numbers/maths tt = #1 - }, - maths rm/.style = { - /siunitx/font/units/maths rm = #1, - /siunitx/font/numbers/maths rm = #1 - }, - maths sf/.style = { - /siunitx/font/units/maths sf = #1, - /siunitx/font/numbers/maths sf = #1 - }, - maths tt/.style = { - /siunitx/font/units/maths tt = #1, - /siunitx/font/numbers/maths tt = #1 - }, - mode/.is choice, - mode/.cd, - maths/.style = { - /siunitx/font/units/mode = maths, - /siunitx/font/numbers/mode = maths - }, - math/.style = { - /siunitx/font/units/mode = maths, - /siunitx/font/numbers/mode = maths - }, - text/.style = { - /siunitx/font/units/mode = text, - /siunitx/font/numbers/mode = text - }, - /siunitx/font, - text rm/.style = { - /siunitx/font/units/text rm = #1, - /siunitx/font/numbers/text rm = #1 - }, - text sf/.style = { - /siunitx/font/units/text sf = #1, - /siunitx/font/numbers/text sf = #1 - }, - text tt/.style = { - /siunitx/font/units/text tt = #1, - /siunitx/font/numbers/text tt = #1 - }, - /siunitx/font/units, - maths rm/.store in = {\si@font@unit@maths@rm}, - maths sf/.store in = {\si@font@unit@maths@sf}, - maths tt/.store in = {\si@font@unit@maths@tt}, - maths rm/.store in = {\si@font@unit@maths@rm}, - maths sf/.store in = {\si@font@unit@maths@sf}, - maths tt/.store in = {\si@font@unit@maths@tt}, - mode/.is choice, - mode/.cd, - maths/.code = {\si@bool@false\si@font@unit@textmode@bool}, - math/.code = {\si@bool@false\si@font@unit@textmode@bool}, - text/.code = {\si@bool@true\si@font@unit@textmode@bool}, - /siunitx/font/units, - text rm/.store in = {\si@font@unit@text@rm}, - text sf/.store in = {\si@font@unit@text@sf}, - text tt/.store in = {\si@font@unit@text@tt}, - /siunitx/font/numbers, - maths rm/.store in = {\si@font@num@maths@rm}, - maths sf/.store in = {\si@font@num@maths@sf}, - maths tt/.store in = {\si@font@num@maths@tt}, - maths rm/.store in = {\si@font@num@maths@rm}, - maths sf/.store in = {\si@font@num@maths@sf}, - maths tt/.store in = {\si@font@num@maths@tt}, - mode/.is choice, - mode/.cd, - maths/.code = {\si@bool@false\si@font@num@textmode@bool}, - math/.code = {\si@bool@false\si@font@num@textmode@bool}, - text/.code = {\si@bool@true\si@font@num@textmode@bool}, - /siunitx/font/numbers, - text rm/.store in = {\si@font@num@text@rm}, - text sf/.store in = {\si@font@num@text@sf}, - text tt/.store in = {\si@font@num@text@tt}, - /siunitx/font, - maths rm = \mathrm, - maths sf = \mathsf, - maths tt = \mathtt, - mode = maths, - text rm = \rmfamily, - text sf = \sffamily, - text tt = \ttfamily -} -\newcommand*{\si@print@type}{} -\newcommand*{\si@print}[2]{% - \begingroup - \def\si@print@type{#1}% - \si@bool@if@F\si@font@set@bool{% - \si@font@det@set - }% - \si@bool@if@F\si@font@det@mode@bool{% - \si@bool@cs@if@TF{si@font@#1@textmode@bool}{% - \si@bool@true\si@font@set@text@bool - }{% - \si@bool@false\si@font@set@text@bool - }% - }% - \si@print@codes - \text{\si@print@print{#2}}% - \endgroup - \check@mathfonts -} -\newcommand*{\si@print@num}{% - \si@print{num}% -} -\newcommand*{\si@print@num@o}[1]{% - \expandafter\si@print@num\expandafter{#1}% -} -\newcommand*{\si@print@unit}{% - \si@print{unit}% -} -\newcommand*{\si@print@unit@o}[1]{% - \expandafter\si@print@unit\expandafter{#1}% -} -\si@catcode@set{45}{13}% - -\si@catcode@set{94}{13}% ^ -\si@catcode@set{95}{13}% _ -\newcommand*{\si@print@codes}{% - \si@catcode@symbols - \si@catcode@set{94}{13}% ^ - \si@catcode@set{95}{13}% _ - \everyeof{\noexpand}% - \endlinechar\m@ne\relax - \si@bool@if@TF\si@font@set@text@bool{% - \si@catcode@set{45}{13}% - - \let-\si@print@minus - \let_\si@print@sb - \let^\si@print@sp - \let\textsubscript\si@print@sb - \let\textsuperscript\si@print@sp - }{% - \si@catcode@set{45}{12}% - - \let_\sb - \let^\sp - \let\textsubscript\sb - \let\textsuperscript\sp - }% -} -\si@catcode@set{45}{12}% - -\si@catcode@set{94}{7}% ^ -\si@catcode@set{95}{8}% _ -\newcommand*{\si@print@maths}[1]{% - \ensuremath{% - \@nameuse{si@font@\si@print@type @maths@\si@font@set@family}{#1}% - }% -} -\newcommand*{\si@print@text}[1]{#1} -\newcommand*{\si@print@print}[1]{% - \si@font@set@bold - \si@font@set@italic - \@nameuse{si@font@\si@print@type @text@\si@font@set@family}% - \si@bool@if@TF\si@font@set@text@bool{% - \si@print@text{\scantokens{#1}}% - }{% - \si@print@maths{\scantokens{#1}}% - }% -} -\newcommand*{\si@print@minus}{% - \text{\si@print@minus@symbol}% -} -\DeclareTextSymbolDefault{\si@print@minus@symbol}{TS1} -\DeclareTextSymbol{\si@print@minus@symbol}{TS1}{61} -\newcommand*{\si@print@sb}[1]{% - \ensuremath{_{\text{#1}}}% -} -\newcommand*{\si@print@sp}[1]{% - \ensuremath{^{\text{#1}}}% -} -\newcommand*{\si@num@pre@product}{} -\newcommand*{\si@num@pre@quotient}{} -\newcommand*{\si@num@pre@tokens}{} -\si@keys@family{numbers/input} -\pgfkeys{ - /siunitx/numbers/input, - product/.store in = {\si@num@pre@product}, - quotient/.store in = {\si@num@pre@quotient}, - protect tokens/.store in = {\si@num@pre@tokens}, - product = x, - quotient = /, - protect tokens = \mp\pi\pm -} -\newcommand*{\si@num@pre@arg}{} -\newcommand*{\si@num@pre@arg@den}{} -\newcommand*{\si@num@pre@arg@held}{} -\newcommand*{\si@num@pre@arg@num}{} -\si@bool@new\si@num@pre@error@bool -\newcommand*{\si@num@pre@process}[1]{% - \si@num@pre@init - \begingroup - \si@num@pre@protect@tokens - \protected@edef\@tempa{#1}% - \expandafter\endgroup\expandafter - \def\expandafter\si@num@pre@arg\expandafter{\@tempa}% - \si@num@pre@sep@prod - \si@num@pre@sep@quot -} -\newcommand*{\si@num@pre@error}{% - \si@bool@true\si@num@pre@error@bool - \si@log@error -} -\newcommand*{\si@num@pre@init}{% - \si@clear@macro\si@num@pre@arg - \si@clear@macro\si@num@pre@arg@den - \si@clear@macro\si@num@pre@arg@held - \si@clear@macro\si@num@pre@arg@num - \si@bool@false\si@num@pre@error@bool -} -\newcommand*{\si@num@pre@protect@tokens}{% - \si@loop@over@macro\si@num@pre@tokens\si@num@pre@protect@tokens@aux -} -\newcommand*{\si@num@pre@protect@tokens@aux}[1]{% - \let#1\relax -} -\newcommand*{\si@num@pre@sep@prod}{% - \si@loop@over@macro\si@num@pre@product\si@num@pre@sep@prod@aux -} -\newcommand*{\si@num@pre@sep@prod@aux}[1]{% - \si@in@if@T\si@num@pre@arg{#1}{% - \def\si@tempa##1#1##2\si@stop{% - \def\si@num@pre@arg{##1}% - \def\si@num@pre@arg@held{##2}% - }% - \expandafter\si@tempa\si@num@pre@arg\si@stop - \si@empty@if@T\si@num@pre@arg{% - \si@num@pre@error{Misplaced product token}{% - A number cannot begin with a product token. - }% - }% - \si@empty@if@T\si@num@pre@arg@held{% - \si@num@pre@error{Misplaced product token}{% - A number cannot end with a product token. - }% - }% - \si@loop@exit - }% -} -\newcommand*{\si@num@pre@sep@quot}{% - \si@loop@over@macro\si@num@pre@quotient\si@num@pre@sep@quot@aux -} -\newcommand*{\si@num@pre@sep@quot@aux}[1]{% - \si@in@if@T\si@num@pre@arg{#1}{% - \def\si@tempa##1#1##2\si@stop{% - \def\si@num@pre@arg@num{##1}% - \def\si@num@pre@arg@den{##2}% - }% - \expandafter\si@tempa\si@num@pre@arg\si@stop - \si@empty@if@T\si@num@pre@arg@num{% - \si@num@pre@error{Misplaced quotient token}{% - A number cannot begin with a quotient token. - }% - }% - \si@empty@if@T\si@num@pre@arg@den{% - \si@num@pre@error{Misplaced quotient token}{% - A number cannot end with a quotient token. - }% - }% - \si@in@if@T\si@num@pre@arg@den{#1}{% - \si@num@pre@error{Duplicate quotient token}{% - Only one quotient token can appear in a single number. - }% - }% - \si@loop@exit - }% -} -\newcommand*{\si@num@in@uncert@close}{} -\newcommand*{\si@num@in@complex}{} -\newcommand*{\si@num@in@decimal}{} -\newcommand*{\si@num@in@digits}{} -\newcommand*{\si@num@in@exponent}{} -\newcommand*{\si@num@in@signs}{} -\newcommand*{\si@num@in@symbols}{} -\pgfkeys{ - /siunitx/numbers/input, - close uncertainty/.store in = {\si@num@in@uncert@close}, - complex roots/.store in = {\si@num@in@complex}, - decimal markers/.store in = {\si@num@in@decimal}, - digits/.store in = {\si@num@in@digits}, - exponent markers/.store in = {\si@num@in@exponent}, - ignore/.store in = {\si@num@in@ignore}, - open uncertainty/.store in = {\si@num@in@uncert@open}, - signs/.store in = {\si@num@in@signs}, - symbols/.store in = {\si@num@in@symbols}, %( - close uncertainty = ), - complex roots = ij, - decimal markers = {.,}, - digits = 0123456789, - exponent markers = dDeE, - ignore = {}, - open uncertainty = (, %) - signs = +-\mp\pm, - symbols = \pi -} -\newcommand*{\si@num@in@mant}{} -\newcommand*{\si@num@in@mant@sign}{} -\newcommand*{\si@num@in@mant@int}{} -\newcommand*{\si@num@in@mant@dec}{} -\newcommand*{\si@num@in@mant@uncert}{} -\newcommand*{\si@num@in@mant@uncert@int}{} -\newcommand*{\si@num@in@mant@uncert@dec}{} -\newcommand*{\si@num@in@mant@comp}{} -\newcommand*{\si@num@in@mant@comp@sign}{} -\newcommand*{\si@num@in@mant@comp@int}{} -\newcommand*{\si@num@in@mant@comp@dec}{} -\newcommand*{\si@num@in@mant@comp@uncert}{} -\newcommand*{\si@num@in@mant@comp@uncert@int}{} -\newcommand*{\si@num@in@mant@comp@uncert@dec}{} -\newcommand*{\si@num@in@exp}{} -\newcommand*{\si@num@in@exp@sign}{} -\newcommand*{\si@num@in@exp@int}{} -\newcommand*{\si@num@in@exp@dec}{} -\newcommand*{\si@num@in@exp@uncert}{} -\newcommand*{\si@num@in@exp@uncert@int}{} -\newcommand*{\si@num@in@exp@uncert@dec}{} -\newcommand*{\si@num@in@exp@comp}{} -\newcommand*{\si@num@in@exp@comp@sign}{} -\newcommand*{\si@num@in@exp@comp@int}{} -\newcommand*{\si@num@in@exp@comp@dec}{} -\newcommand*{\si@num@in@exp@comp@uncert}{} -\newcommand*{\si@num@in@exp@comp@uncert@int}{} -\newcommand*{\si@num@in@exp@comp@uncert@dec}{} -\si@bool@new\si@num@in@mant@bool -\si@bool@new\si@num@in@mant@dec@bool -\si@bool@new\si@num@in@mant@uncert@dec@bool -\si@bool@new\si@num@in@mant@comp@bool -\si@bool@new\si@num@in@mant@comp@dec@bool -\si@bool@new\si@num@in@mant@comp@uncert@dec@bool -\si@bool@new\si@num@in@exp@bool -\si@bool@new\si@num@in@exp@dec@bool -\si@bool@new\si@num@in@exp@uncert@dec@bool -\si@bool@new\si@num@in@exp@comp@bool -\si@bool@new\si@num@in@exp@comp@dec@bool -\si@bool@new\si@num@in@exp@comp@uncert@dec@bool -\si@bool@new\si@num@in@symbols@bool -\newcommand*{\si@num@in@arg}{} -\si@bool@new\si@num@in@error@bool -\newcommand*{\si@num@in@parse}[1]{% - \si@num@in@init - \si@num@in@rescan{#1}% - \si@empty@if@TF\si@num@in@arg{% - \si@bool@true\si@num@in@error@bool - }{% - \si@num@in@arg@loop - \si@num@in@try{\si@num@in@separate}% - \si@num@in@try{\si@num@in@finalise}% - }% -} -\newcommand*{\si@num@in@parse@o}[1]{% - \expandafter\si@num@in@parse\expandafter{#1}% -} -\newcommand*{\si@num@in@add}[1]{% - \si@add@right@cs@n{si@num@in@#1}% -} -\newcommand*{\si@num@in@arg@loop}{% - \si@expand@tlist\si@tempa{% - \si@num@in@signs - \si@num@in@ignore - \si@num@in@digits - \si@num@in@decimal - \si@num@in@exponent - \si@num@in@complex - \si@num@in@symbols - \si@num@in@uncert@open - \si@num@in@uncert@close - }% - \si@clear@macro\si@tempb - \si@loop@over@macro\si@num@in@arg\si@num@in@arg@loop@aux - \si@num@in@try{\let\si@num@in@arg\si@tempb}% -} -\newcommand*{\si@num@in@arg@loop@aux}[1]{% - \si@in@if@F\si@tempa{#1}{% - \si@num@in@throw{Invalid token `#1' in numerical input}{% - Only the tokens: \MessageBreak - \si@tempa \MessageBreak - are valid for numerical input. - }% - \si@loop@exit - }% - \si@in@if@F\si@num@in@ignore{#1}{% - \si@add@right@n\si@tempb{#1}% - }% - \si@in@if@T\si@num@in@symbols{#1}{% - \si@bool@true\si@num@in@symbols@bool - }% -} -\newcommand*{\si@num@in@finalise}{% - \si@num@in@final@check - \si@num@in@try{\si@num@in@final@tidy}% -} -\newcommand*{\si@num@in@final@check}{% - \si@bool@true\si@num@in@mant@bool - \si@empty@if@T\si@num@in@mant@dec{% - \si@empty@if@T\si@num@in@mant@int{% - \si@bool@false\si@num@in@mant@bool - \si@empty@if@F\si@num@in@mant@uncert{% - \si@num@in@throw{Uncertainty but no number}{% - The mantissa contains only an uncertainty. - }% - }% - }% - }% - \si@bool@if@T\si@num@in@mant@comp@bool{% - \si@empty@if@T\si@num@in@mant@comp@dec{% - \si@empty@if@T\si@num@in@mant@comp@int{% - \si@empty@if@F\si@num@in@mant@comp@uncert{% - \si@num@in@throw{Uncertainty but no number}{% - The complex mantissa contains only an uncertainty. - }% - }% - }% - }% - }% - \si@bool@true\si@num@in@exp@bool - \si@empty@if@T\si@num@in@exp@dec{% - \si@empty@if@T\si@num@in@exp@int{% - \si@bool@false\si@num@in@exp@bool - \si@empty@if@F\si@num@in@exp@uncert{% - \si@num@in@throw{Uncertainty but no number}{% - The exponent contains only an uncertainty. - }% - }% - \si@empty@if@F\si@num@in@exp@sign{% - \si@num@in@throw{Sign but no exponent}{% - The exponent contains only a sign. - }% - }% - }% - }% - \si@bool@if@T\si@num@in@exp@comp@bool{% - \si@empty@if@T\si@num@in@exp@comp@dec{% - \si@empty@if@T\si@num@in@exp@comp@int{% - \si@empty@if@F\si@num@in@exp@comp@uncert{% - \si@num@in@throw{Uncertainty but no number}{% - The complex exponent contains only an uncertainty. - }% - }% - }% - }% - }% - \si@bool@if@F\si@num@in@mant@bool{% - \si@bool@if@F\si@num@in@mant@comp@bool{% - \si@bool@if@F\si@num@in@exp@bool{% - \si@bool@if@F\si@num@in@exp@comp@bool{% - \si@num@in@throw{Empty numerical argument}{% - The given `number' contains no information. - }% - }% - }% - }% - }% -} -\newcommand*{\si@num@in@final@tidy}{% - \si@num@in@final@tidy@aux{mant}% - \si@num@in@final@tidy@aux{exp}% -} -\newcommand*{\si@num@in@final@tidy@aux}[1]{% - \si@num@in@remove@zeros{#1}% - \si@num@in@remove@zeros{#1@comp}% - \si@num@in@zero@sign{#1}% -} -\newcommand*{\si@num@in@init}{% - \si@bool@false\si@num@in@error@bool - \si@bool@false\si@num@in@symbols@bool - \si@loop@over@macro\si@num@in@init@names\si@num@in@init@aux - \si@bool@false\si@num@in@mant@bool - \si@bool@false\si@num@in@mant@dec@bool - \si@bool@false\si@num@in@mant@uncert@dec@bool - \si@bool@false\si@num@in@mant@comp@bool - \si@bool@false\si@num@in@mant@comp@dec@bool - \si@bool@false\si@num@in@mant@comp@uncert@dec@bool - \si@bool@false\si@num@in@exp@bool - \si@bool@false\si@num@in@exp@dec@bool - \si@bool@false\si@num@in@exp@uncert@dec@bool - \si@bool@false\si@num@in@exp@comp@bool - \si@bool@false\si@num@in@exp@comp@dec@bool - \si@bool@false\si@num@in@exp@comp@uncert@dec@bool -} -\newcommand*{\si@num@in@init@aux}[1]{% - \si@clear@cs{si@num@in@#1}% -} -\newcommand*{\si@num@in@init@names}{% - {mant}% - {mant@sign}% - {mant@int}% - {mant@dec}% - {mant@uncert}% - {mant@uncert@int}% - {mant@uncert@dec}% - {mant@comp}% - {mant@comp@sign}% - {mant@comp@int}% - {mant@comp@dec}% - {mant@comp@uncert}% - {mant@comp@uncert@int}% - {mant@comp@uncert@dec}% - {exp}% - {exp@sign}% - {exp@int}% - {exp@dec}% - {exp@uncert}% - {exp@uncert@int}% - {exp@uncert@dec}% - {exp@comp}% - {exp@comp@sign}% - {exp@comp@int}% - {exp@comp@dec}% - {exp@comp@uncert}% - {exp@comp@uncert@int}% - {exp@comp@uncert@dec}% -} -\newcommand*{\si@num@in@protect@tokens}{} -\let\si@num@in@protect@tokens\si@num@pre@protect@tokens -\newcommand*{\si@num@in@remove@zeros}[1]{% - \si@in@cs@if@T{si@num@in@#1@int}{0}{% - \def\si@tempa##10##2\si@stop{% - \si@empty@tlist@if@TF{##1}{% - \si@in@tlist@if@TF{##2}{0}{% - \si@tempa##2\si@stop - }{% - \@namedef{si@num@in@#1@int}{##2}% - }% - }{% - \@namedef{si@num@in@#1@int}{##10##2}% - }% - }% - \si@let@Nc\si@tempb{si@num@in@#1@int}% - \expandafter\si@tempa\si@tempb\si@stop - \si@empty@cs@if@T{si@num@in@#1@int}{% - \@namedef{si@num@in@#1@int}{0}% - }% - }% -} -\newcommand*{\si@num@in@rescan}[1]{% - \begingroup - \si@catcode@symbols - \si@catcode@set{9}{9}% tab ignored - \si@catcode@set{32}{9}% space ignored - \si@catcode@set{126}{9}% tilde ignored - \everyeof{\noexpand}% - \si@clear@macro{\,}% - \si@num@in@protect@tokens - \protected@edef\@tempa{\scantokens{#1}}% - \expandafter\endgroup\expandafter - \def\expandafter\si@num@in@arg\expandafter{\@tempa}% -} -\newcommand*{\si@num@in@separate}{% - \si@num@in@try{\si@num@in@sep@exp}% - \si@num@in@separate@aux{mant}% - \si@num@in@separate@aux{exp}% -} -\newcommand*{\si@num@in@separate@aux}[1]{% - \si@num@in@try{\si@num@in@sep@sign{#1}}% - \si@num@in@try{\si@num@in@sep@comp{#1}}% - \si@num@in@try{\si@num@in@sep@dec{#1}}% - \si@num@in@try{\si@num@in@sep@dec@comp{#1}}% - \si@num@in@try{\si@num@in@sep@uncert{#1}}% - \si@num@in@try{\si@num@in@sep@uncert{#1@comp}}% -} -\newcommand*{\si@num@in@sep@comp}[1]{% - \si@empty@cs@if@F{si@num@in@#1}{% - \si@empty@if@F\si@num@in@complex{% - \si@let@Nc\si@tempa{si@num@in@#1}% - \si@bool@false\si@tmp@bool - \si@loop@over@macro\si@num@in@complex\si@num@in@sep@comp@aux@i - \si@num@in@try{\si@num@in@sep@comp@aux@ii{#1}}% - \si@num@in@try{\si@num@in@sep@comp@aux@iii{#1}}% - }% - }% -} -\newcommand*{\si@num@in@sep@comp@aux@i}[1]{% - \def\si@tempb##1#1##2##3\si@stop{% - \si@no@value@if@F{##2}{% - \si@no@value@if@TF{##3}{% - \si@bool@true\si@tmp@bool - \def\si@tempa{##1}% - \si@loop@exit - }{% - \si@num@in@throw{Misplaced complex root}{% - The complex root token `#1' can only come at \MessageBreak - the end of a number. - }% - \si@loop@exit - }% - }% - }% - \expandafter\si@tempb\si@tempa#1\si@no@value\si@stop -} -\newcommand*{\si@num@in@sep@comp@aux@ii}[1]{% - \si@let@cN{si@num@in@#1@comp@bool}\si@tmp@bool - \si@let@cN{si@num@in@#1}\si@tempa - \si@bool@if@T\si@tmp@bool{% - \si@empty@if@F\si@tempa{% - \def\si@tempb##1{% - \si@in@if@TF\si@num@in@signs{##1}{% - \si@bool@if@TF\si@tmp@bool{% - \si@num@in@throw{Duplicate sign found}{% - Only a single sign can be given \MessageBreak - in the complex part of a number. - }% - \si@loop@exit - }{% - \si@num@in@add{#1@comp@sign}{##1}% - \si@bool@true\si@tmp@bool - }% - }{% - \si@bool@if@TF\si@tmp@bool{% - \si@num@in@add{#1@comp}{##1}% - }{% - \si@num@in@add{#1}{##1}% - }% - }% - }% - \si@bool@false\si@tmp@bool - \si@clear@cs{si@num@in@#1}% - \si@loop@over@macro\si@tempa\si@tempb - }% - }% -} -\newcommand*{\si@num@in@sep@comp@aux@iii}[1]{% - \si@bool@cs@if@TF{si@num@in@#1@comp@bool}{% - \si@bool@if@F\si@tmp@bool{% - \si@let@cc{si@num@in@#1@comp@sign}{si@num@in@#1@sign}% - \si@clear@cs{si@num@in@#1@sign}% - \si@let@cc{si@num@in@#1@comp}{si@num@in@#1}% - \si@clear@cs{si@num@in@#1}% - }% - }{% - \expandafter\si@loop@over@macro\csname si@num@in@#1\endcsname - \si@num@in@sep@aux@iv - }% -} -\newcommand*{\si@num@in@sep@aux@iv}[1]{% - \si@in@if@T\si@num@in@signs{#1}{% - \si@num@in@throw{Duplicate sign found}{% - Only a single sign can be given \MessageBreak - in the real part of a number. - }% - \si@loop@exit - }% -} -\newcommand*{\si@num@in@sep@dec}[1]{% - \si@empty@cs@if@F{si@num@in@#1}{% - \si@num@in@sep@dec@aux@i{#1}% - }% -} -\newcommand*{\si@num@in@sep@dec@comp}[1]{% - \si@bool@cs@if@T{si@num@in@#1@comp@bool}{% - \si@empty@cs@if@TF{si@num@in@#1@comp}{% - \si@let@cc{si@num@in@#1@comp@int}{si@num@in@#1@comp}% - \si@let@cN{si@num@in@#1@comp}% - }{% - \si@num@in@sep@dec@aux@i{#1@comp}% - }% - }% -} -\newcommand*{\si@num@in@sep@dec@aux@i}[1]{% - \si@let@Nc\si@tempa{si@num@in@#1}% - \si@clear@macro\si@tempb - \si@bool@false\si@tmp@bool - \si@clear@cs{si@num@in@#1}% - \si@loop@over@macro\si@num@in@decimal\si@num@in@sep@dec@aux@ii - \si@num@in@try{\si@let@cN{si@num@in@#1@int}\si@tempa}% - \si@num@in@try{\si@let@cN{si@num@in@#1@dec}\si@tempb}% - \si@num@in@try{\si@let@cN{si@num@in@#1@dec@bool}\si@tmp@bool}% -} -\newcommand*{\si@num@in@sep@dec@aux@ii}[1]{% - \si@in@if@T\si@tempa{#1}{% - \si@bool@true\si@tmp@bool - \def\si@tempb##1#1##2\si@stop{% - \def\si@tempa{##1}% - \def\si@tempb{##2}% - }% - \expandafter\si@tempb\si@tempa\si@stop - \si@in@if@T\si@tempb{#1}{% - \si@num@in@throw{Duplicate decimal token found}{% - Only a single decimal marker token can be given \MessageBreak - in numerical input. - }% - }% - \si@loop@exit - }% -} -\newcommand*{\si@num@in@sep@exp}{% - \let\si@num@in@mant\si@num@in@arg - \si@loop@over@macro\si@num@in@exponent\si@num@in@sep@exp@aux -} -\newcommand*{\si@num@in@sep@exp@aux}[1]{% - \si@in@if@T\si@num@in@arg{#1}{% - \def\si@tempa##1#1##2\si@stop{% - \def\si@num@in@mant{##1}% - \def\si@num@in@exp{##2}% - }% - \expandafter\si@tempa\si@num@in@arg\si@stop - \si@in@if@T\si@num@in@exp{#1}{% - \si@num@in@throw{Duplicate exponent token found}{% - Only a single exponent marker token can be given \MessageBreak - in numerical input. - }% - }% - \si@loop@exit - }% -} -\newcommand*{\si@num@in@sep@sign}[1]{% - \si@empty@cs@if@F{si@num@in@#1}{% - \si@replace@all@in@cs{si@num@in@#1}{-+}{\mp}% - \si@replace@all@in@cs{si@num@in@#1}{+-}{\pm}% - \expandafter\expandafter\expandafter\si@num@in@sep@sign@aux - \csname si@num@in@#1\endcsname\si@stop{#1}% - }% -} -\newcommand*{\si@num@in@sep@sign@aux}{} -\def\si@num@in@sep@sign@aux#1#2\si@stop#3{% - \si@in@if@TF\si@num@in@signs{#1}{% - \@namedef{si@num@in@#3@sign}{#1}% - \@namedef{si@num@in@#3}{#2}% - }{% - \@namedef{si@num@in@#3}{#1#2}% - }% -} -\newcommand*{\si@num@in@sep@uncert}[1]{% - \si@empty@cs@if@TF{si@num@in@#1@dec}{% - \si@empty@cs@if@F{si@num@in@#1@int}{% - \si@num@in@sep@uncert@aux@i{#1}{int}% - }% - }{% - \si@num@in@sep@uncert@aux@i{#1}{dec}% - \si@num@in@sep@uncert@check@int{#1}% - }% -} -\newcommand*{\si@num@in@sep@uncert@aux@i}[2]{% - \si@let@Nc\si@tempa{si@num@in@#1@#2}% - \si@loop@over@macro\si@num@in@uncert@close\si@num@in@sep@uncert@aux@ii - \si@num@in@try{\si@num@in@sep@uncert@aux@iii{#1}{#2}}% -} -\newcommand*{\si@num@in@sep@uncert@aux@ii}[1]{% - \def\si@tempb##1#1##2##3\si@stop{% - \si@no@value@if@F{##2}{% - \si@no@value@if@TF{##3}{% - \si@bool@true\si@tmp@bool - \def\si@tempa{##1}% - \si@loop@exit - }{% - \si@num@in@throw{Misplaced closing uncertainty token}{% - The closing uncertainty token `#1' can only \MessageBreak - come at the end of a number. - }% - \si@loop@exit - }% - }% - }% - \si@bool@false\si@tmp@bool - \expandafter\si@tempb\si@tempa#1\si@no@value\si@stop - \si@bool@if@T\si@tmp@bool{% - \si@loop@exit - }% -} -\newcommand*{\si@num@in@sep@uncert@aux@iii}[2]{% - \si@bool@if@TF\si@tmp@bool{% - \si@bool@false\si@tmp@bool - \si@loop@over@macro\si@num@in@uncert@open - \si@num@in@sep@uncert@aux@iv - \si@num@in@try{\si@num@in@sep@uncert@aux@v{#1}{#2}}% - }{% - \si@loop@over@macro\si@num@in@uncert@open - \si@num@in@sep@uncert@aux@vi - }% -} -\newcommand*{\si@num@in@sep@uncert@aux@iv}[1]{% - \si@in@if@T\si@tempa{#1}{% - \si@bool@true\si@tmp@bool - \def\si@tempb##1#1##2\si@stop{% - \def\si@tempa{##1}% - \def\si@tempb{##2}% - }% - \expandafter\si@tempb\si@tempa\si@stop - \si@in@if@T\si@tempb{#1}{% - \si@num@in@throw{Duplicate opening uncertainty token found}{% - Only a single opening uncertainty token can be \MessageBreak - given in numerical input. - }% - }% - \si@loop@exit - }% -} -\newcommand*{\si@num@in@sep@uncert@aux@v}[2]{% - \si@bool@if@TF\si@tmp@bool{% - \si@let@cN{si@num@in@#1@#2}\si@tempa - \si@let@cN{si@num@in@#1@uncert}\si@tempb - \si@empty@if@T\si@tempb{% - \si@num@in@throw{Empty uncertainty given}{% - The number given contains an empty uncertainty. - }% - }% - }{% - \si@num@in@throw{% - Closing uncertainty token without matching opening% - }{% - The final token of a the number is a closing \MessageBreak - uncertainty token, but no opening token was found \MessageBreak - in this part of the number. - }% - }% -} -\newcommand*{\si@num@in@sep@uncert@aux@vi}[1]{% - \si@in@if@T\si@tempa{#1}{% - \si@num@in@throw{% - Opening uncertainty token without matching closing% - }{% - The opening uncertainty token `#1' was found with no \MessageBreak - matching closing token. - }% - \si@loop@exit - }% -} -\newcommand*{\si@num@in@sep@uncert@check@int}[1]{% - \def\si@num@in@sep@uncert@check@int@aux##1{% - \si@in@cs@if@T{si@num@in@#1@int}{##1}{% - \si@num@in@throw{Uncertainty in integer part}{% - The opening uncertainty token `##1' was found in the - \MessageBreak integer part of the input, but a decimal part - was also given. - }% - \si@loop@exit - }% - }% - \si@loop@over@macro\si@num@in@uncert@open - \si@num@in@sep@uncert@check@int@aux - \si@loop@over@macro\si@num@in@uncert@close - \si@num@in@sep@uncert@check@int@aux -} -\newcommand*{\si@num@in@throw}{% - \si@bool@true\si@num@in@error@bool - \si@log@error -} -\newcommand*{\si@num@in@try}{% - \si@bool@if@F\si@num@in@error@bool -} -\newcommand*{\si@num@in@zero@sign}[1]{% - \si@bool@cs@if@TF{si@num@in@#1@bool}{% - \si@num@in@zero@sign@aux@i{#1}% - }{% - \si@num@in@zero@sign@aux@i{#1@comp}% - }% -} -\newcommand*{\si@num@in@zero@sign@aux@i}[1]{% - \si@empty@cs@if@TF{si@num@in@#1@int}{% - \si@num@in@zero@sign@aux@ii{#1}% - }{% - \def\si@tempa{0}% - \si@meaning@eq@cs@if@T{si@tempa}{si@num@in@#1@int}{% - \si@num@in@zero@sign@aux@ii{#1}% - }% - }% -} -\newcommand*{\si@num@in@zero@sign@aux@ii}[1]{% - \si@empty@cs@if@TF{si@num@in@#1@dec}{% - \si@clear@cs{si@num@in@#1@sign}% - }{% - \def\si@tempa{0}% - \def\si@tempb##1{% - \si@in@if@F\si@tempa{##1}{% - \si@bool@false\si@tmp@bool - }% - }% - \si@bool@true\si@tmp@bool - \si@loop@over@cs{si@num@in@#1@dec}\si@tempb - \si@bool@if@T\si@tmp@bool{% - \si@clear@cs{si@num@in@#1@sign}% - }% - }% -} -\newcommand*{\si@num@post@sign@token}{} -\si@bool@new\si@num@post@plus@bool -\si@bool@new\si@num@post@rnd@figures@bool -\si@bool@new\si@num@post@rnd@places@bool -\si@bool@new\si@num@post@sign@bool -\si@bool@new\si@num@post@zero@dec@bool -\si@bool@new\si@num@post@zero@exp@bool -\si@bool@new\si@num@post@zero@int@bool -\newcount\si@num@post@figures -\newcount\si@num@post@places -\newcommand*{\si@num@post@dec}{} -\newcommand*{\si@num@post@int}{} -\si@bool@new\si@num@post@carry@bool -\si@bool@new\si@num@post@sig@bool -\newcommand*{\si@num@post@rnd@tens}{} -\newcount\si@num@post@rnd@cnt -\newcount\si@num@post@dec@cnt -\newcount\si@num@post@uncert@cnt -\newcommand*{\si@num@post@rnd@check}[2]{% - \@nameuse{si@num@post@#1}#2\relax - \expandafter\ifnum\csname si@num@post@#1\endcsname<\z@\relax - \si@log@error{Invalid input for rounding digits}{% - The input for option 'numbers/process/round #1' \MessageBreak - must be a positive integer. - }% - \fi -} -\si@keys@family{numbers/process} -\pgfkeys{ - /siunitx/numbers/process, - add zero decimal/.is siunitx switch = {num@post@zero@dec}, - add zero integer/.is siunitx switch = {num@post@zero@int}, - explicit sign/.store in = {\si@num@post@sign@token}, - include explicit sign/.is siunitx switch = {num@post@sign}, - retain explicit plus/.is siunitx switch = {num@post@plus}, - retain zero exponent/.is siunitx switch = {num@post@zero@exp}, - round mode/.is choice, - round mode/.cd, - figures/.code = {% - \si@bool@true\si@num@post@rnd@figures@bool - \si@bool@false\si@num@post@rnd@places@bool - }, - off/.code = {% - \si@bool@false\si@num@post@rnd@figures@bool - \si@bool@false\si@num@post@rnd@places@bool - }, - places/.code = {% - \si@bool@false\si@num@post@rnd@figures@bool - \si@bool@true\si@num@post@rnd@places@bool - }, - /siunitx/numbers/process, - round figures/.code = {\si@num@post@rnd@check{figures}{#1}}, - round places/.code = {\si@num@post@rnd@check{places}{#1}}, - add zero decimal = true, - add zero integer = true, - explicit sign = +, - include explicit sign = false, - retain explicit plus = false, - retain zero exponent = false, - round mode = off, - round figures = 2, - round places = 2 -} -\newcommand*{\si@num@post@process}{% - \si@num@post@sign - \si@num@post@zero@fill - \si@num@post@exponent - \si@bool@if@F\si@num@in@symbols@bool{% - \si@num@post@round - \si@bool@if@F\si@num@post@rnd@figures@bool{% - \si@bool@if@F\si@num@post@rnd@places@bool{% - \si@num@post@uncert - }% - }% - }% -} -\newcommand*{\si@num@post@add@sign}[1]{% - \si@bool@cs@if@TF{si@num@in@#1@bool}{% - \si@num@post@add@sign@aux{#1}% - }{% - \si@bool@cs@if@T{si@num@in@#1@comp@bool}{% - \si@num@post@add@sign@aux{#1@comp}% - }% - }% -} -\newcommand*{\si@num@post@add@sign@aux}[1]{% - \si@empty@cs@if@T{si@num@in@#1@sign}{% - \@namedef{si@num@in@#1@sign}{\si@num@post@sign@token}% - }% -} -\newcommand*{\si@num@post@exponent}{% - \si@bool@if@F\si@num@post@zero@exp@bool{% - \si@expand@tlist\si@tempa{% - \si@num@in@exp@int - \si@num@in@exp@dec - \si@num@in@exp@comp@int - \si@num@in@exp@comp@dec - }% - \si@in@if@T\si@tempa{0}{% - \def\si@tempb##10000##2\si@stop{% - \si@empty@tlist@if@T{##1}{% - \def\si@num@in@exp@int{}% - \def\si@num@in@exp@dec{}% - \def\si@num@in@exp@comp@int{}% - \def\si@num@in@exp@comp@dec{}% - \si@bool@false\si@num@in@exp@bool - \si@bool@false\si@num@in@exp@comp@bool - }% - }% - \expandafter\si@tempb\si@tempa0000\si@stop - }% - }% -} -\newcommand*{\si@num@post@plus}[1]{% - \si@bool@cs@if@TF{si@num@in@#1@bool}{% - \si@num@post@plus@aux{#1}% - }{% - \si@bool@cs@if@T{si@num@in@#1@comp@bool}{% - \si@num@post@plus@aux{#1@comp}% - }% - }% -} -\newcommand*{\si@num@post@plus@aux}[1]{% - \def\si@tempa{+}% - \si@meaning@eq@cs@if@T{si@num@in@#1@sign}{si@tempa}{% - \si@clear@cs{si@num@in@#1@sign}% - }% -} -\newcommand*{\si@num@post@sign}{% - \si@bool@if@F\si@num@post@plus@bool{% - \si@num@post@plus{mant}% - \si@num@post@plus{exp}% - }% - \si@bool@if@T\si@num@post@sign@bool{% - \si@num@post@add@sign{mant}% - \si@num@post@add@sign{exp}% - }% -} -\newcommand*{\si@num@post@round}{% - \si@num@post@round@aux{figures}% - \si@num@post@round@aux{places}% -} -\newcommand*{\si@num@post@round@aux}[1]{% - \si@bool@cs@if@T{si@num@post@rnd@#1@bool}{% - \@nameuse{si@num@post@rnd@#1}{mant}% - \@nameuse{si@num@post@rnd@#1}{mant@comp}% - \@nameuse{si@num@post@rnd@#1}{exp}% - \@nameuse{si@num@post@rnd@#1}{exp@comp}% - }% -} -\newcommand*{\si@num@post@rnd@dec}[1]{% - \si@num@if@F{\si@num@post@rnd@cnt>\@ne}{% - \si@tempcnt\expandafter\@car\si@num@post@dec\@nil\relax - \si@bool@if@T\si@num@post@carry@bool{% - \advance\si@tempcnt\@ne\relax - }% - \si@bool@false\si@num@post@carry@bool - \si@num@if@TF{\si@num@post@rnd@cnt=\@ne}{% - \si@num@if@T{\si@tempcnt>4}{% - \si@bool@true\si@num@post@carry@bool - }% - }{% - \si@num@if@T{\si@tempcnt=10}{% - \si@bool@true\si@num@post@carry@bool - \si@tempcnt\z@\relax - }% - \si@edef@c{si@num@in@#1@dec}{% - \the\si@tempcnt - \@nameuse{si@num@in@#1@dec}% - }% - }% - }% - \advance\si@num@post@rnd@cnt\m@ne\relax - \edef\si@num@post@dec{\expandafter\@cdr\si@num@post@dec\@nil}% -} -\newcommand*{\si@num@post@rnd@figures}[1]{% - \si@num@post@rnd@cnt\z@\relax - \si@bool@false\si@num@post@sig@bool - \si@clear@macro\si@num@post@dec - \si@clear@macro\si@num@post@int - \si@whiledo@empty@cs@F{si@num@in@#1@int}{% - \si@num@post@rnd@figures@aux@i{#1}{int}% - }% - \si@whiledo@empty@cs@F{si@num@in@#1@dec}{% - \si@num@post@rnd@figures@aux@i{#1}{dec}% - }% - \si@bool@if@TF\si@num@post@sig@bool{% - \si@num@if@TF{\si@num@post@rnd@cnt>\si@num@post@figures}{% - \si@num@post@rnd@figures@aux@ii{#1}% - }{% - \si@num@post@rnd@figures@aux@iii{#1}% - }% - }{% - \@namedef{si@num@in@#1@int}{0}% - \si@clear@cs{si@num@in@#1@dec}% - \si@bool@cs@false{si@num@in@#1@dec@bool}% - }% -} -\newcommand*{\si@num@post@rnd@figures@aux@i}[2]{% - \si@tempcnt\expandafter\expandafter\expandafter\@car - \csname si@num@in@#1@#2\endcsname\@nil\relax - \si@edef@c{si@num@post@#2}{% - \the\si@tempcnt - \@nameuse{si@num@post@#2}% - }% - \si@bool@if@F\si@num@post@sig@bool{% - \si@num@if@F{\si@tempcnt=\z@}{% - \si@bool@true\si@num@post@sig@bool - }% - }% - \si@bool@if@T\si@num@post@sig@bool{% - \advance\si@num@post@rnd@cnt\@ne\relax - }% - \si@edef@c{si@num@in@#1@#2}{% - \expandafter\expandafter\expandafter\@cdr - \csname si@num@in@#1@#2\endcsname\@nil - }% -} -\newcommand*{\si@num@post@rnd@figures@aux@ii}[1]{% - \advance\si@num@post@rnd@cnt-\si@num@post@figures\relax - \si@whiledo@empty@F\si@num@post@dec{% - \si@num@post@rnd@dec{#1}% - }% - \si@whiledo@empty@F\si@num@post@int{% - \si@num@post@rnd@figures@int{#1} - }% - \si@bool@if@T\si@num@post@carry@bool{% - \si@edef@c{si@num@in@#1@int}{% - 1% - \@nameuse{si@num@in@#1@int}% - }% - \si@empty@cs@if@F{si@num@in@#1@dec}{% - \si@reverse@cs{si@num@in@#1@dec}% - \si@edef@c{si@num@in@#1@dec}{% - \expandafter\expandafter\expandafter\@cdr - \csname si@num@in@#1@dec\endcsname\@nil - }% - \si@reverse@cs{si@num@in@#1@dec}% - }% - }% -} -\newcommand*{\si@num@post@rnd@figures@aux@iii}[1]{% - \advance\si@num@post@rnd@cnt-\si@num@post@figures\relax - \si@num@post@rnd@cnt-\si@num@post@rnd@cnt\relax - \si@reverse@macro\si@num@post@dec - \si@reverse@macro\si@num@post@int - \si@let@cN{si@num@in@#1@dec}\si@num@post@dec - \si@let@cN{si@num@in@#1@int}\si@num@post@int - \si@num@post@rnd@pad{#1}% -} -\newcommand*{\si@num@post@rnd@figures@int}[1]{% - \si@num@if@T{\si@num@post@rnd@cnt>\z@}{% - \si@edef@c{si@num@in@#1@int}{% - 0% - \@nameuse{si@num@in@#1@int}% - }% - }% - \si@num@if@F{\si@num@post@rnd@cnt>\@ne}{% - \si@tempcnt\expandafter\@car\si@num@post@int\@nil\relax - \si@bool@if@T\si@num@post@carry@bool{% - \advance\si@tempcnt\@ne\relax - }% - \si@bool@false\si@num@post@carry@bool - \si@num@if@TF{\si@num@post@rnd@cnt=\@ne}{% - \si@num@if@T{\si@tempcnt>4}{% - \si@bool@true\si@num@post@carry@bool - }% - }{% - \si@num@if@T{\si@tempcnt=10}{% - \si@bool@true\si@num@post@carry@bool - \si@tempcnt\z@\relax - }% - \si@edef@c{si@num@in@#1@int}{% - \the\si@tempcnt - \@nameuse{si@num@in@#1@int}% - }% - }% - }% - \advance\si@num@post@rnd@cnt\m@ne\relax - \edef\si@num@post@int{\expandafter\@cdr\si@num@post@int\@nil}% -} -\newcommand*{\si@num@post@rnd@pad}[1]{% - \si@whiledo@num@T{\si@num@post@rnd@cnt>\z@}{% - \si@edef@c{si@num@in@#1@dec}{% - \@nameuse{si@num@in@#1@dec}% - 0% - }% - \advance\si@num@post@rnd@cnt\m@ne\relax - }% -} -\newcommand*{\si@num@post@rnd@places}[1]{% - \si@num@if@TF{\si@num@post@places=\z@}{% - \si@clear@cs{si@num@in@#1@dec}% - \si@bool@cs@false{si@num@in@#1@dec@bool}% - }{% - \si@num@post@rnd@places@aux@i{#1}% - }% -} -\newcommand*{\si@num@post@rnd@places@aux@i}[1]{% - \si@empty@cs@if@T{si@num@in@#1@dec}{% - \@namedef{si@num@in@#1@dec}{0}% - }% - \si@num@post@rnd@cnt\si@elt@count@cs{si@num@in@#1@dec}\relax - \expandafter\expandafter\expandafter\ifnum - \csname si@num@in@#1@dec\endcsname=\z@\relax - \si@num@post@rnd@cnt\si@num@post@places\relax - \si@clear@cs{si@num@in@#1@dec}% - \expandafter\si@num@post@rnd@pad - \else - \expandafter\si@num@post@rnd@places@aux@ii - \fi - {#1}% -} -\newcommand*{\si@num@post@rnd@places@aux@ii}[1]{% - \advance\si@num@post@rnd@cnt-\si@num@post@places\relax - \si@num@if@TF{\si@num@post@rnd@cnt<\z@}{% - \si@num@post@rnd@cnt-\si@num@post@rnd@cnt\relax - \si@num@post@rnd@pad{#1}% - }{% - \si@num@post@rnd@places@init{#1}% - \si@num@post@rnd@places@aux@iii{#1}% - }% -} -\newcommand*{\si@num@post@rnd@places@aux@iii}[1]{% - \si@empty@if@TF\si@num@post@dec{% - \si@whiledo@empty@F\si@num@post@int{% - \si@num@post@rnd@places@int{#1}% - }% - \si@bool@if@T\si@num@post@carry@bool{% - \si@edef@c{si@num@in@#1@int}{% - 1% - \@nameuse{si@num@in@#1@int}% - }% - }% - }{% - \si@num@post@rnd@dec{#1}% - \si@num@post@rnd@places@aux@iii{#1}% - }% -} -\newcommand*{\si@num@post@rnd@places@int}[1]{% - \si@tempcnt\expandafter\@car\si@num@post@int\@nil\relax - \edef\si@num@post@int{\expandafter\@cdr\si@num@post@int\@nil}% - \si@bool@if@T\si@num@post@carry@bool{% - \advance\si@tempcnt\@ne\relax - }% - \si@bool@false\si@num@post@carry@bool - \si@num@if@T{\si@tempcnt=10}{% - \si@bool@true\si@num@post@carry@bool - \si@tempcnt\z@\relax - }% - \si@edef@c{si@num@in@#1@int}{% - \the\si@tempcnt - \@nameuse{si@num@in@#1@int}% - }% -} -\newcommand*{\si@num@post@rnd@places@init}[1]{% - \si@let@Nc\si@num@post@dec{si@num@in@#1@dec}% - \si@let@Nc\si@num@post@int{si@num@in@#1@int}% - \si@reverse@macro\si@num@post@dec - \si@reverse@macro\si@num@post@int - \si@clear@cs{si@num@in@#1@dec}% - \si@clear@cs{si@num@in@#1@int}% - \si@bool@false\si@num@post@carry@bool -} -\newcommand*{\si@num@post@zero@fill}{% - \si@bool@if@T\si@num@post@zero@int@bool{% - \si@num@post@zero@fill@aux{mant}{int}% - \si@num@post@zero@fill@aux{mant@comp}{int}% - \si@num@post@zero@fill@aux{exp}{int}% - \si@num@post@zero@fill@aux{exp@comp}{int}% - }% - \si@bool@if@T\si@num@post@zero@dec@bool{% - \si@num@post@zero@fill@aux{mant}{dec}% - \si@num@post@zero@fill@aux{mant@comp}{dec}% - \si@num@post@zero@fill@aux{exp}{dec}% - \si@num@post@zero@fill@aux{exp@comp}{dec}% - }% -} -\newcommand*{\si@num@post@zero@fill@aux}[2]{% - \si@bool@cs@if@T{si@num@in@#1@dec@bool}{% - \si@empty@cs@if@T{si@num@in@#1@#2}{% - \@namedef{si@num@in@#1@#2}{0}% - }% - }% -} -\newcommand*{\si@num@post@uncert}{% - \si@num@post@uncert@aux@i{mant}% - \si@num@post@uncert@aux@i{exp}% -} -\newcommand*{\si@num@post@uncert@aux@i}[1]{% - \si@num@post@uncert@aux@ii{#1}% - \si@num@post@uncert@aux@ii{#1@comp}% -} -\newcommand*{\si@num@post@uncert@aux@ii}[1]{% - \si@bool@cs@if@TF{si@num@in@#1@dec@bool}{% - \si@num@post@uncert@dec{#1}% - }{% - \si@num@post@uncert@int{#1}% - }% -} -\newcommand*{\si@num@post@uncert@dec}[1]{% - \si@empty@cs@if@F{si@num@in@#1@uncert}{% - \si@bool@cs@true{si@num@in@#1@uncert@dec@bool}% - \si@num@post@dec@cnt\si@elt@count@cs{si@num@in@#1@dec}\relax - \si@num@post@uncert@cnt\si@elt@count@cs{si@num@in@#1@uncert}\relax - \si@num@if@TF{\si@num@post@uncert@cnt>\si@num@post@dec@cnt}{% - \si@num@post@uncert@dec@aux@i{#1}% - }{% - \si@num@post@uncert@dec@aux@ii{#1}% - }% - }% -} -\newcommand*{\si@num@post@uncert@dec@aux@i}[1]{% - \def\si@tempa##1{% - \si@num@if@TF{\si@num@post@uncert@cnt>\si@num@post@dec@cnt}{% - \si@add@right@cs@n{si@num@in@#1@uncert@int}{##1}% - }{% - \si@add@right@cs@n{si@num@in@#1@uncert@dec}{##1}% - }% - \advance\si@num@post@uncert@cnt\m@ne\relax - }% - \si@loop@over@cs{si@num@in@#1@uncert}\si@tempa -} -\newcommand*{\si@num@post@uncert@dec@aux@ii}[1]{% - \def\si@tempa{% - \si@add@right@cs@n{si@num@in@#1@uncert@dec}{0}% - \advance\si@num@post@uncert@cnt\@ne\relax - }% - \si@whiledo@num@T{\si@num@post@uncert@cnt<\si@num@post@dec@cnt}{% - \si@tempa - }% - \def\si@tempa##1{% - \si@add@right@cs@o{si@num@in@#1@uncert@dec}{##1}% - }% - \expandafter\si@tempa\expandafter - {\csname si@num@in@#1@uncert\endcsname}% - \si@bool@if@T\si@num@post@zero@int@bool{% - \@namedef{si@num@in@#1@uncert@int}{0}% - }% -} -\newcommand*{\si@num@post@uncert@int}[1]{% - \si@let@cc{si@num@in@#1@uncert@int}{si@num@in@#1@uncert}% -} -\newcommand*{\si@num@out@bracket@close}{} -\newcommand*{\si@num@out@bracket@open}{} -\newcommand*{\si@num@out@complex@root}{} -\newcommand*{\si@num@out@decimal}{} -\newcommand*{\si@num@out@exp@base}{} -\newcommand*{\si@num@out@exp@prod}{} -\newcommand*{\si@num@out@group@sep}{} -\newcommand*{\si@num@out@uncert@close}{} -\newcommand*{\si@num@out@uncert@open}{} -\newcommand*{\si@num@out@uncert@space}{} -\si@bool@new\si@num@out@bracket@use@bool -\si@bool@new\si@num@out@group@digits@bool -\si@bool@new\si@num@out@group@four@bool -\si@bool@new\si@num@out@tight@bool -\si@bool@new\si@num@out@uncert@sep@bool -\newcommand*{\si@num@out@mant}{} -\newcommand*{\si@num@out@mant@sign}{} -\newcommand*{\si@num@out@mant@int}{} -\newcommand*{\si@num@out@mant@dec}{} -\newcommand*{\si@num@out@mant@uncert}{} -\newcommand*{\si@num@out@mant@uncert@dec}{} -\newcommand*{\si@num@out@mant@uncert@int}{} -\newcommand*{\si@num@out@mant@comp}{} -\newcommand*{\si@num@out@mant@comp@sign}{} -\newcommand*{\si@num@out@mant@comp@int}{} -\newcommand*{\si@num@out@mant@comp@dec}{} -\newcommand*{\si@num@out@mant@comp@uncert}{} -\newcommand*{\si@num@out@mant@comp@uncert@dec}{} -\newcommand*{\si@num@out@mant@comp@uncert@int}{} -\newcommand*{\si@num@out@exp}{} -\newcommand*{\si@num@out@exp@sign}{} -\newcommand*{\si@num@out@exp@int}{} -\newcommand*{\si@num@out@exp@dec}{} -\newcommand*{\si@num@out@exp@uncert}{} -\newcommand*{\si@num@out@exp@uncert@dec}{} -\newcommand*{\si@num@out@exp@uncert@int}{} -\newcommand*{\si@num@out@exp@comp}{} -\newcommand*{\si@num@out@exp@comp@sign}{} -\newcommand*{\si@num@out@exp@comp@int}{} -\newcommand*{\si@num@out@exp@comp@dec}{} -\newcommand*{\si@num@out@exp@comp@uncert}{} -\newcommand*{\si@num@out@exp@comp@uncert@dec}{} -\newcommand*{\si@num@out@exp@comp@uncert@int}{} -\newcommand*{\si@num@out@result}{} -\si@bool@new\si@num@out@mant@parts@bool -\si@bool@new\si@num@out@mant@comp@parts@bool -\si@bool@new\si@num@out@exp@parts@bool -\si@bool@new\si@num@out@exp@comp@parts@bool -\si@bool@new\si@num@out@mant@comp@bool -\si@bool@new\si@num@out@exp@comp@bool -\si@bool@new\si@num@out@mant@bool -\si@keys@family{numbers/output} -\pgfkeys{ - /siunitx/numbers/output, - close bracket/.store in = {\si@num@out@bracket@close}, - close uncertainty/.store in = {\si@num@out@uncert@close}, - complex root/.store in = {\si@num@out@complex@root}, - decimal marker/.store in = {\si@num@out@decimal}, - exponent base/.store in = {\si@num@out@exp@base}, - exponent product/.store in = {\si@num@out@exp@prod}, - group digits/.is siunitx switch = {num@out@group@digits}, - group four digits/.is siunitx switch = {num@out@group@four}, - group separator/.store in = {\si@num@out@group@sep}, - open bracket/.store in = {\si@num@out@bracket@open}, - open uncertainty/.store in = {\si@num@out@uncert@open}, - separate uncertainty/.is siunitx switch = {num@out@uncert@sep}, - tight spacing/.is siunitx switch = {num@out@tight}, - uncertainty space/.store in = {\si@num@out@uncert@space}, - use brackets/.is siunitx switch = {num@out@bracket@use}, %( - close bracket = ),% ( - close uncertainty = ), - complex root = i, - decimal marker = ., - exponent base = 10, - exponent product = \times, - group digits = true, - group four digits = false, - group separator = {\,}, - open bracket = (, %) - open uncertainty = (, %) - separate uncertainty = false, - tight spacing = false, - use brackets = true, - uncertainty space = {}, -} -\newcommand*{\si@num@out@process}{% - \si@num@out@init - \si@num@out@core - \si@num@out@complex - \si@empty@if@F\si@num@out@mant{% - \si@bool@true\si@num@out@mant@bool - }% - \si@num@out@sign{mant}% - \si@num@out@sign{exp}% - \si@num@out@exponent -} -\newcommand*{\si@num@out@add}[1]{% - \si@add@right@cs@n{si@num@out@#1}% -} -\newcommand*{\si@num@out@add@C}[2]{% - \expandafter\si@num@out@add@C@aux\expandafter - {\csname si@num@out@#2\endcsname}{#1}% -} -\newcommand*{\si@num@out@add@C@aux}[2]{% - \si@add@right@cs@o{si@num@out@#2}{#1}% -} -\newcommand*{\si@num@out@add@maths}[2]{% - \si@empty@if@F#2{% - \expandafter\si@num@out@add@maths@aux\expandafter{#2}{#1}% - }% -} -\newcommand*{\si@num@out@add@maths@aux}[2]{% - \si@num@out@add{#2}{\ensuremath{#1}}% -} -\newcommand*{\si@num@out@add@pm}[1]{% - \si@bool@if@TF\si@num@out@tight@bool{% - \si@num@out@add@maths{#1}{{\pm}}% - }{% - \def\si@tempa{\pm}% - \si@num@out@add@maths{#1}{\si@tempa}% - }% -} -\newcommand*{\si@num@out@bracket@comp}[1]{% - \si@bool@cs@if@T{si@num@out@#1@comp@bool}{% - \si@bool@cs@false{si@num@out@#1@parts@bool}% - \si@bool@cs@false{si@num@out@#1@comp@parts@bool}% - }% - \si@num@out@brackets@aux@i{#1}{comp}% -} -\newcommand*{\si@num@out@bracket@parts}[1]{% - \si@num@out@brackets@aux@i{#1}{parts}% -} -\newcommand*{\si@num@out@brackets@aux@i}[2]{% - \si@empty@cs@if@F{si@num@out@#1}{% - \si@bool@if@T\si@num@out@bracket@use@bool{% - \si@bool@cs@if@T{si@num@out@#1@#2@bool}{% - \si@num@out@bracket@aux@ii{#1}% - \si@bool@cs@false{si@num@out@#1@#2@bool}% - }% - }% - }% -} -\newcommand*{\si@num@out@bracket@aux@ii}[1]{% - \si@add@left@cs@o{si@num@out@#1}\si@num@out@bracket@open - \si@add@right@cs@o{si@num@out@#1}\si@num@out@bracket@close -} -\newcommand*{\si@num@out@complex}{% - \si@num@out@complex@aux{mant}% - \si@num@out@complex@aux{exp}% -} -\newcommand*{\si@num@out@complex@aux}[1]{% - \si@num@out@bracket@parts{#1@comp}% - \si@bool@cs@if@T{si@num@in@#1@comp@bool}{% - \si@num@out@add@maths{#1@comp}{\si@num@out@complex@root}% - \si@num@out@bracket@parts{#1}% - \si@empty@cs@if@F{si@num@out@#1}{% - \si@num@out@sign{#1@comp}% - \si@bool@cs@true{si@num@out@#1@comp@bool}% - }% - }% - \si@num@out@add@C{#1}{#1@comp}% -} -\newcommand*{\si@num@out@copy}[1]{% - \expandafter\si@num@out@copy@aux\csname si@num@in@#1\endcsname{#1}% -} -\newcommand*{\si@num@out@copy@aux}[2]{% - \si@add@right@cs@o{si@num@out@#2}{#1}% -} -\newcommand*{\si@num@out@copy@maths}[1]{% - \expandafter\si@num@out@copy@maths@aux - \csname si@num@in@#1\endcsname{#1}% -} -\newcommand*{\si@num@out@copy@maths@aux}[2]{% - \si@num@out@add@maths{#2}#1% -} -\newcommand*{\si@num@out@core}{% - \si@num@out@core@aux@i{mant}% - \si@num@out@core@aux@i{exp}% -} -\newcommand*{\si@num@out@core@aux@i}[1]{% - \si@num@out@core@aux@ii{#1}% - \si@num@out@core@aux@ii{#1@comp}% -} -\newcommand*{\si@num@out@core@aux@ii}[1]{% - \si@bool@cs@if@T{si@num@in@#1@bool}{% - \si@num@out@group@digits{#1}% - \si@empty@cs@if@F{si@num@in@#1@uncert}{% - \si@num@out@uncert{#1}% - }% - }% -} -\newcommand*{\si@num@out@exponent}{% - \si@bool@if@T\si@num@out@mant@bool{% - \si@empty@cs@if@F{si@num@out@exp}{% - \si@num@out@bracket@comp{mant}% - \si@num@out@bracket@parts{mant}% - }% - }% - \si@num@out@add@C{result}{mant}% - \si@bool@if@T\si@num@out@mant@bool{% - \si@empty@cs@if@F{si@num@out@exp}{% - \si@bool@if@TF\si@num@out@tight@bool{% - \expandafter\def\expandafter\si@tempa\expandafter - {\expandafter{\si@num@out@exp@prod}}% - \si@num@out@add@maths{result}\si@tempa - }{% - \si@num@out@add@maths{result}{\si@num@out@exp@prod}% - }% - }% - }% - \si@empty@cs@if@F{si@num@out@exp}{% - \si@num@out@add@C{result}{exp@base}% - \edef\si@num@out@exp{% - ^{\expandafter\unexpanded\expandafter{\si@num@out@exp}}% - }% - \si@num@out@add@C{result}{exp}% - }% -} -\newcommand*{\si@num@out@group@digits}[1]{% - \si@num@out@copy{#1@dec}% - \si@num@out@copy{#1@int}% - \si@bool@if@T\si@num@out@group@digits@bool{% - \si@bool@if@F\si@num@in@symbols@bool{% - \si@num@out@group@digits@aux@i{#1}{dec}% - \si@num@out@group@digits@aux@i{#1}{int}% - }% - }% - \si@num@out@add@C{#1}{#1@int}% - \si@bool@cs@if@T{si@num@in@#1@dec@bool}{% - \si@num@out@add@maths{#1}{\si@num@out@decimal}% - \si@num@out@add@C{#1}{#1@dec}% - }% -} -\newcommand*{\si@num@out@group@digits@aux@i}[2]{% - \si@empty@cs@if@F{si@num@in@#1@#2}{% - \si@bool@if@TF\si@num@out@group@four@bool{% - \si@num@out@group@digits@aux@ii{#1}{#2}% - }{% - \si@num@out@group@five@if@T{si@num@in@#1@#2}{% - \si@num@out@group@digits@aux@ii{#1}{#2}% - }% - }% - }% -} -\newcommand*{\si@num@out@group@digits@aux@ii}[2]{% - \si@clear@cs{si@num@out@#1@#2}% - \@nameuse{si@num@out@group@#2}{#1}% -} -\newcommand*{\si@num@out@group@dec}[1]{% - \def\si@num@out@group@dec@aux##1##2##3##4{% - \si@empty@tlist@if@TF{##2}{% - \si@num@out@add{#1@dec}{##1}% - }{% - \si@empty@tlist@if@TF{##3}{% - \si@num@out@add{#1@dec}{##1##2}% - }{% - \si@num@out@add{#1@dec}{##1##2##3}% - \si@empty@tlist@if@F{##4}{% - \si@num@out@add@maths{#1@dec}{\si@num@out@group@sep}% - \si@num@out@group@dec@aux##4% - }% - }% - }% - }% - \expandafter\expandafter\expandafter\si@num@out@group@dec@aux - \csname si@num@in@#1@dec\endcsname{}{}{}% -} -\newcommand*{\si@num@out@group@dec@aux}{} -\newcommand*{\si@num@out@group@five@if@T}[1]{% - \expandafter\expandafter\expandafter\si@num@out@group@five@if@aux - \csname #1\endcsname\@empty\@empty\@empty\@empty\si@stop -} -\newcommand*{\si@num@out@group@five@if@aux}{} -\def\si@num@out@group@five@if@aux#1#2#3#4#5\si@stop{% - \edef\si@tempa{#5}% - \si@empty@if@F\si@tempa -} -\newcommand*{\si@num@out@group@int}[1]{% - \def\si@num@out@group@int@aux@iii##1##2##3##4{% - \si@num@out@add{#1@int}{##1##2##3}% - \si@stop@if@F{##4}{% - \si@num@out@add@maths{#1@int}{\si@num@out@group@sep}% - \si@num@out@group@int@aux@iii##4% - }% - }% - \expandafter\si@num@out@group@int@aux@i - \csname si@num@in@#1@int\endcsname -} -\newcommand*{\si@num@out@group@int@aux@i}[1]{% - \expandafter\si@num@out@group@int@aux@ii\expandafter - {\expandafter}#1{}{}{}% -} -\newcommand*{\si@num@out@group@int@aux@ii}[4]{% - \si@empty@tlist@if@TF{#2}{% - \si@num@out@group@int@aux@iii#1\si@stop - }{% - \si@empty@tlist@if@TF{#3}{% - \si@num@out@group@int@aux@iii{}{}#1#2\si@stop - }{% - \si@empty@tlist@if@TF{#4}{% - \si@num@out@group@int@aux@iii{}#1#2#3\si@stop - }{% - \si@num@out@group@int@aux@ii{#1#2#3#4}% - }% - }% - }% -} -\newcommand*{\si@num@out@group@int@aux@iii}{} -\newcommand*{\si@num@out@init}{% - \si@loop@over@macro\si@num@in@init@names\si@num@out@init@aux - \si@clear@macro\si@num@out@result - \si@bool@false\si@num@out@mant@parts@bool - \si@bool@false\si@num@out@mant@comp@parts@bool - \si@bool@false\si@num@out@exp@parts@bool - \si@bool@false\si@num@out@exp@comp@parts@bool - \si@bool@false\si@num@out@mant@comp@bool - \si@bool@false\si@num@out@exp@comp@bool - \si@bool@false\si@num@out@mant@bool -} -\newcommand*{\si@num@out@init@aux}[1]{% - \si@clear@cs{si@num@out@#1}% -} -\newcommand*{\si@num@out@sign}[1]{% - \si@bool@if@TF\si@num@out@tight@bool{% - \si@let@Nc\si@tempa{si@num@in@#1@sign}% - \expandafter\def\expandafter\si@tempa\expandafter - {\expandafter{\si@tempa}}% - \si@num@out@add@maths{#1@sign}\si@tempa - }{% - \si@num@out@copy@maths{#1@sign}% - }% - \si@num@out@sign@aux@i{#1}% -} -\newcommand*{\si@num@out@sign@aux@i}[1]{% - \expandafter\si@num@out@sign@aux@ii - \csname si@num@out@#1@sign\endcsname{si@num@out@#1}% -} -\newcommand*{\si@num@out@sign@aux@ii}[2]{% - \si@add@left@cs@o{#2}{#1}% -} -\newcommand*{\si@num@out@uncert}[1]{% - \si@bool@if@TF\si@num@out@uncert@sep@bool{% - \si@bool@cs@true{si@num@out@#1@parts@bool}% - \si@num@out@group@digits{#1@uncert}% - \si@num@out@add@pm{#1}% - \si@num@out@add@C{#1}{#1@uncert}% - }{% - \si@num@out@add@maths{#1@uncert}{\si@num@out@uncert@open}% - \si@num@out@copy{#1@uncert}% - \si@num@out@add@maths{#1@uncert}{\si@num@out@uncert@close}% - \si@num@out@add@maths{#1}{\si@num@out@uncert@space}% - \si@num@out@add@C{#1}{#1@uncert}% - }% -} -\newcommand*{\si@num@print}{% - \si@print@num@o{\si@num@out@result}% \opt -} -\newcommand*{\si@tab@rewrite@check@cellspace}{% - \@ifpackageloaded{cellspace}{% - \si@log@info{Changing cellspace column letter to C}% - \newcolumntype{C}[1]{>{\bcolumn##1\@nil}##1<{\ecolumn}}% - \def\si@tempa##1\NC@do S##2\si@stop{% - \NC@list{##1##2}% - }% - \expandafter\si@tempa\the\NC@list\si@stop - \let\NC@find@S\@undefined - }{}% -} -\AtBeginDocument{\si@tab@rewrite@check@cellspace} -\newcommand*{\si@tab@rewrite@create}[1]{% - \edef\si@tempa{\noexpand\NC@do #1\the\NC@list}% - \newcolumntype{#1}{}% - \NC@list\expandafter{\si@tempa}% - \expandafter\renewcommand\expandafter*\expandafter{% - \csname NC@rewrite@#1\endcsname - }[1][]{% - \edef\si@tempa{% - \the\@temptokena - >{\noexpand\si@tab@collect@begin[\unexpanded{##1}]{#1}}% - c% - <{\noexpand\si@tab@print@out}% - }% - \@temptokena\expandafter{\si@tempa}% - \NC@find - }% -} -\AtBeginDocument{% - \si@tab@rewrite@create{S}% - \si@tab@rewrite@create{s}% -} -\newcommand*{\si@tab@collect@after}{} -\newcommand*{\si@tab@collect@before}{} -\newcommand*{\si@tab@collect@body}{} -\newcommand*{\si@tab@collect@num}{} -\si@bool@new\si@tab@collect@after@bool -\si@bool@new\si@tab@collect@before@bool -\newcommand*{\si@tab@collect@begin}[2][]{% - \begingroup - \sisetup{#1}% - \def\si@tab@collect@body{}% - \@nameuse{si@tab@collect@begin@#2}% - \si@tab@collect@get -} -\newcommand*{\si@tab@collect@begin@s}{% - \si@bool@false\si@tab@collect@before@bool - \let\si@tab@collect@token\si@tab@collect@token@s - \let\si@tab@print@out\si@tab@print@out@s - \def\si@tab@collect@braced##1{% - \si@add@right@n\si@tab@collect@body{{##1}}% - \si@tab@collect@next - }% -} -\newcommand*{\si@tab@collect@begin@S}{% - \def\si@tab@collect@after{}% - \def\si@tab@collect@before{}% - \si@bool@true\si@tab@collect@before@bool - \let\si@tab@collect@token\si@tab@collect@token@S - \let\si@tab@print@out\si@tab@print@out@S - \si@expand@tlist\si@tab@collect@num{% - \si@num@in@ignore - \si@num@in@signs - \si@num@in@digits - \si@num@in@decimal - \si@num@in@exponent - \si@num@in@complex - \si@num@in@symbols - \si@num@in@uncert@open - \si@num@in@uncert@close - }% - \def\si@tab@collect@braced##1{% - \si@bool@if@TF\si@tab@collect@before@bool{% - \si@add@right@n\si@tab@collect@before{##1}% - }{% - \si@bool@false\si@tab@collect@before@bool - \si@bool@true\si@tab@collect@after@bool - \si@add@right@n\si@tab@collect@after{##1}% - }% - \si@tab@collect@next - }% -} -\newcommand*{\si@tab@collect@braced}{} -\newcommand*{\si@tab@collect@expand}[1]{% - \edef\si@tempa{% - \expandafter\si@tab@collect@expand@aux@i\meaning#1:->\si@stop - }% - \si@meaning@eq@if@TF\si@tempa\si@tab@collect@expand@aux@ii{% - \si@tab@collect@before - \def\si@tab@collect@before{}% - \expandafter\def\expandafter\si@tab@collect@next\expandafter{% - \expandafter\si@tab@collect@get#1% - }% - }{% - \si@bool@if@TF\si@tab@collect@before@bool{% - \si@add@right@n\si@tab@collect@before{#1}% - }{% - \si@bool@true\si@tab@collect@after@bool - \si@bool@false\si@tab@collect@before@bool - \si@add@right@n\si@tab@collect@after{#1}% - }% - }% -} -\newcommand*{\si@tab@collect@expand@aux@i}{} -\def\si@tab@collect@expand@aux@i#1:->#2\si@stop{#1} -\newcommand*{\si@tab@collect@expand@aux@ii}{} -\edef\si@tab@collect@expand@aux@ii{% - \expandafter\si@tab@collect@expand@aux@i\meaning - \si@tab@collect@expand@aux@ii:->\si@stop -}% -\newcommand*{\si@tab@collect@get}{% - \let\si@tab@collect@next\si@tab@collect@get - \futurelet\si@tempa\si@tab@collect@get@aux -} -\newcommand*{\si@tab@collect@get@aux}{% - \si@meaning@eq@if@TF\si@tempa\bgroup{% - \si@tab@collect@braced - }{% - \si@tab@collect@unbraced - }% -} -\newcommand*{\si@tab@collect@newline}{% - \si@tab@print@out - \tabularnewline -} -\newcommand*{\si@tab@collect@next}{} -\newcommand*{\si@tab@collect@token}{} -\newcommand*{\si@tab@collect@token@s}[1]{% - \si@add@right@n\si@tab@collect@body{#1}% -} -\newcommand*{\si@tab@collect@token@S}[1]{% - \si@bool@if@TF\si@tab@collect@after@bool{% - \si@add@right@n\si@tab@collect@after{#1}% - }{% - \si@in@if@TF\si@tab@collect@num{#1}{% - \si@bool@false\si@tab@collect@before@bool - \si@add@right@n\si@tab@collect@body{#1}% - }{% - \si@tab@collect@expand{#1}% - }% - }% -} -\newcommand*{\si@tab@collect@unbraced}[1]{% - \si@meaning@eq@if@F{#1}\ignorespaces{% - \si@meaning@eq@if@F{#1}\unskip{% - \si@tab@collect@unbraced@aux{#1}% - }% - }% - \si@tab@collect@next -} -\newcommand*{\si@tab@collect@unbraced@aux}[1]{% - \def\si@tempa##1{% - \si@meaning@eq@if@T{#1}##1{% - \let\si@tab@collect@next##1% - }% - }% - \si@tempa\csname - \si@tempa\end - \si@tempa\endtabular - \si@tempa\si@tab@print@out - \si@tempa\relax - \si@meaning@eq@if@T\si@tab@collect@next\si@tab@collect@get{% - \si@meaning@eq@if@TF{#1}\tabularnewline{% - \let\si@tab@collect@next\si@tab@collect@newline - }{% - \si@tab@collect@token{#1}% - }% - }% -} -\si@keys@family{tables} -\pgfkeys{ - /siunitx/tables, - align exponents/.is siunitx switch = {}, - align uncertainties/.is siunitx switch = {}, - number position/.is choice, - number position/.cd, - center/.code = {}, - centre/.code = {}, - decimal centred/.code = {}, - decimal centered/.code = {}, - left/.code = {}, - right/.code = {}, - /siunitx/tables, - number format/.code = {}, - position/.is choice, - position/.cd, - center/.style = { - /siunitx/tables/number position = center, - /siunitx/tables/text position = center, - /siunitx/tables/unit position = center, - }, - centre/.style = { - /siunitx/tables/number position = centre, - /siunitx/tables/text position = centre, - /siunitx/tables/unit position = centre, - }, - left/.style = { - /siunitx/tables/number position = left, - /siunitx/tables/text position = left, - /siunitx/tables/unit position = left, - }, - right/.style = { - /siunitx/tables/number position = right, - /siunitx/tables/text position = right, - /siunitx/tables/unit position = right, - }, - /siunitx/tables, - text position/.is choice, - text position/.cd, - center/.code = {}, - centre/.code = {}, - none/.code = {}, - left/.code = {}, - right/.code = {}, - /siunitx/tables, - unit position/.is choice, - unit position/.cd, - center/.code = {}, - centre/.code = {}, - none/.code = {}, - left/.code = {}, - right/.code = {}, - /siunitx/tables, - number position = centre, - text position = centre, - unit position = centre -} -\newcommand*{\si@tab@print@out}{} -\newcommand*{\si@tab@print@out@s}{% - \si@tab@collect@body - \endgroup -} -\newcommand*{\si@tab@print@out@S}{% - \si@tab@collect@before - \si@tab@collect@body - \si@tab@collect@after - \endgroup -} -\newcommand*{\si@unit@def@list}{} -\newcommand*{\si@unit@def@prefix@list}{} -\newcommand*{\si@unit@def@power@list}{} -\newcommand*{\si@unit@def@qual@list}{} -\newcommand*{\si@unit@def@unit@list}{} -\newcommand*{\si@unit@def@list@combine}{% - \si@expand@tlist\si@unit@def@list{% - \si@unit@def@power@list - \si@unit@def@prefix@list - \si@unit@def@qual@list - \si@unit@def@unit@list - }% - \si@add@right@n\si@unit@def@list{% - \per - \raiseto - \tothe - }% -} -\AtBeginDocument{\si@unit@def@list@combine} -\newcommand*{\si@unit@def@power}[2]{% - \si@add@right@n\si@unit@def@power@list{#1}% - \@namedef{si@unit@literal@\string#1}##1{##1\textsuperscript{#2}}% - \@namedef{si@unit@macro@\string#1}{% - \def\si@unit@parse@power@last{#2}% - }% -} -\newcommand*{\si@unit@def@power@post}[2]{% - \si@add@right@n\si@unit@def@power@list{#1}% - \@namedef{si@unit@literal@\string#1}{\textsuperscript{#2}}% - \@namedef{si@unit@macro@\string#1}{% - \def\si@unit@parse@power@current{#2}% - \si@unit@parse@store{power}{null}% - }% -} -\newcommand*{\si@unit@def@prefix}[3]{% - \si@add@right@n\si@unit@def@prefix@list{#1}% - \@namedef{si@unit@literal@\string#1}{#2}% - \@namedef{si@unit@number@\string#1}{#3}% - \@namedef{si@unit@macro@\string#1}{% - \si@unit@parse@store{prefix}{#2}% - }% -} -\newcommand*{\si@unit@def@prefix@binary}[1]{% - \si@unit@def@prefix{#1}% -} -\newcommand*{\si@unit@def@qual}[2]{% - \si@add@right@n\si@unit@def@qual@list{#1}% - \@namedef{si@unit@literal@\string#1}{\text{ }(#2)}% - \@namedef{si@unit@macro@\string#1}{% - \si@unit@parse@store{qual}{#2}% - }% -} -\newcommand*{\si@unit@def@unit}[3]{% - \si@add@right@n\si@unit@def@unit@list{#1}% - \si@empty@tlist@if@TF{#2}{% - \si@let@cN{si@unit@options@\string#1}\@undefined - }{% - \@namedef{si@unit@options@\string#1}{#2}% - }% - \@namedef{si@unit@literal@\string#1}{#3}% - \@namedef{si@unit@macro@\string#1}{% - \si@csname@if@TF{si@unit@macro@\expandafter\string\@car#3\@nil}{% - #3% - }{% - \si@unit@parse@store{unit}{#3}% - }% - }% -} -\si@bool@new\si@unit@create@body@bool -\si@bool@new\si@unit@create@opt@bool -\si@bool@new\si@unit@create@overwrite@bool -\si@bool@new\si@unit@create@prespace@bool -\si@bool@new\si@unit@create@xspace@bool -\si@keys@family{units/creation} -\pgfkeys{ - /siunitx/units/creation, - add leading space/.is siunitx switch = {unit@create@prespace}, - allow in body/.is siunitx switch = {unit@create@body}, - allow optional argument/.is siunitx switch = {unit@create@opt}, - overwrite macros/.is siunitx switch = {unit@create@overwrite}, - use xspace/.is siunitx switch = {unit@create@xspace}, - add leading space = false, - allow in body = false, - allow optional argument = false, - overwrite macros = false, - use xspace = false -} -\newcommand*{\si@unit@create@body}{% - \si@bool@if@T\si@unit@create@body@bool{% - \si@unit@create@macros - }% -} -\AtBeginDocument{\si@unit@create@body} -\newcommand*{\si@unit@create@macros}{% - \si@bool@if@T\si@unit@create@xspace@bool{% - \RequirePackage{xspace}% - }% - \si@bool@if@T\si@unit@create@overwrite@bool{% - \si@loop@over@macro\si@unit@def@list\si@unit@create@undefine - }% - \si@bool@if@TF\si@unit@create@opt@bool{% - \si@loop@over@macro\si@unit@def@list\si@unit@create@optional - }{% - \si@loop@over@macro\si@unit@def@list\si@unit@create@plain - }% -} -\newcommand*{\si@unit@create@optional}[1]{% - \ifdefined#1\else - \edef\si@tempa{% - \unexpanded{\si@newcommand*{#1}[1][]}{% - \si@bool@if@T\si@unit@create@prespace@bool{% - \unexpanded{\si@empty@tlist@if@T{##1}}{% - \unexpanded{\ensuremath{\si@unit@out@unit@sep}}% - }% - }% - \unexpanded{\SI{##1}{#1}}% - \si@bool@if@T\si@unit@create@xspace@bool{% - \noexpand\xspace - }% - }% - }% - \expandafter\si@tempa - \fi -} -\newcommand*{\si@unit@create@plain}[1]{% - \ifdefined#1\else - \edef\si@tempa{% - \unexpanded{\si@newcommand*{#1}}{% - \si@bool@if@T\si@unit@create@prespace@bool{% - \unexpanded{\ensuremath{\si@unit@out@unit@sep}}% - }% - \unexpanded{\si{#1}}% - \si@bool@if@T\si@unit@create@xspace@bool{% - \noexpand\xspace - }% - }% - }% - \expandafter\si@tempa - \fi -} -\newcommand*{\si@unit@create@undefine}[1]{% - \let#1\@undefined -} -\@namedef{si@unit@literal@\string\per}{/} -\@namedef{si@unit@macro@\string\per}{% - \si@bool@true\si@unit@parse@per@last@bool - \def\si@unit@parse@power@last{1}% -} -\@namedef{si@unit@literal@\string\raiseto}#1#2{ - #2\textsuperscript{#1}% -} -\@namedef{si@unit@macro@\string\raiseto}#1{% - \def\si@unit@parse@power@last{#1}% -} -\@namedef{si@unit@literal@\string\tothe}#1{% - \textsuperscript{#1}% -} -\@namedef{si@unit@macro@\string\tothe}#1{% - \def\si@unit@parse@power@current{#1}% - \si@unit@parse@store{power}{null}% -} -\newcommand*{\si@unit@in@parse}[1]{% - \si@empty@tlist@if@F{#1}{% - \si@unit@in@process@if@TF{#1}{% - \si@unit@parse@unit{#1}% - }{% - \si@bool@if@TF\si@unit@out@lit@allow@bool{% - \si@unit@out@literal{#1}% - }{% - \si@log@error{Literal units disabled}{% - You gave the literal input `#1' for a unit\MessageBreak - but literal unit output is disabled. - }% - }% - }% - }% -} -\newcommand*{\si@unit@in@process@if@TF}[1]{% - \begingroup - \si@loop@over@macro\si@unit@def@list\si@unit@in@process@aux - \let\raiseto\@gobble - \let\tothe\@gobble - \protected@edef\@tempa{#1}% - \expandafter\endgroup - \expandafter\def\expandafter\si@tempa\expandafter{\@tempa}% - \si@empty@if@TF\si@tempa -} -\newcommand*{\si@unit@in@process@aux}[1]{% - \si@clear@macro#1% -} -\newcommand*{\si@unit@parse@block}{} -\newcommand*{\si@unit@parse@block@den}{} -\newcount\si@unit@parse@block@cnt -\newcount\si@unit@parse@block@den@cnt -\si@bool@new\si@unit@parse@per@current@bool -\si@bool@new\si@unit@parse@per@last@bool -\newcommand*{\si@unit@parse@power@current}{} -\newcommand*{\si@unit@parse@power@last}{} -\si@bool@new\si@unit@parse@qual@sub@bool -\newcommand*{\si@unit@parse@queue}{} -\newcommand*{\si@unit@parse@queue@den}{} -\newcommand*{\si@unit@parse@sep}{} -\si@bool@new\si@unit@parse@sticky@bool -\newcommand*{\si@unit@parse@type@last}{} -\newcommand*{\si@unit@parse@type@last@den}{} -\newcommand*{\si@unit@parse@type@prefix}{prefix} -\newcommand*{\si@unit@parse@type@power}{power} -\newcommand*{\si@unit@parse@type@qual}{qual} -\newcommand*{\si@unit@parse@type@unit}{unit} -\si@bool@new\si@unit@parse@fraction@bool -\newcommand*{\si@unit@parse@qual@format}{} -\si@keys@family{units/output} -\pgfkeys{ - /siunitx/units/output, - print as fraction/.is siunitx switch = {unit@parse@fraction}, - qualifier format/.is choice, - qualifier format/.cd, - brackets/.code = {% - \def\si@unit@parse@qual@format##1{(##1)}% - \si@bool@false\si@unit@parse@qual@sub@bool - }, - space/.code = {% - \def\si@unit@parse@qual@format##1{\text{ }##1}% - \si@bool@false\si@unit@parse@qual@sub@bool - }, - subscript/.code = {% - \def\si@unit@parse@qual@format##1{_{##1}}% - \si@bool@true\si@unit@parse@qual@sub@bool - }, - /siunitx/units/output, - sticky per/.is siunitx switch = {unit@parse@sticky}, - print as fraction = false, - qualifier format = subscript, - sticky per = false, -} -\newcommand*{\si@unit@parse@unit}[1]{% - \si@unit@parse@init - \si@unit@parse@options{#1}% - \si@unit@out@sep@print - #1% - \si@unit@parse@store@unit{stop}% - \si@print@unit@o{\si@unit@parse@queue}% TEMP -} -\newcommand*{\si@unit@parse@block@new}[1]{% - \si@empty@if@F\si@unit@parse@power@current{% - \si@unit@parse@store@power{null}% - }% - \si@unit@parse@block@trans - \let\si@unit@parse@per@current@bool\si@unit@parse@per@last@bool - \let\si@unit@parse@power@current\si@unit@parse@power@last - \si@clear@macro\si@unit@parse@power@last - \si@bool@if@TF\si@unit@parse@sticky@bool{% - \si@bool@if@T\si@unit@parse@per@last@bool{% - \def\si@unit@parse@power@last{1}% - }% - }{% - \si@bool@false\si@unit@parse@per@last@bool - }% - \@namedef{si@unit@parse@block\si@unit@parse@queue@use}{#1}% -} -\newcommand*{\si@unit@parse@block@trans}{% - \si@empty@cs@if@F{si@unit@parse@queue\si@unit@parse@queue@use}{% - \si@add@right@cs@o{si@unit@parse@queue\si@unit@parse@queue@use}{% - \si@unit@parse@sep - }% - }% - \expandafter\si@unit@parse@block@add@aux\expandafter{% - \csname si@unit@parse@block\si@unit@parse@queue@use\endcsname - }% -} -\newcommand*{\si@unit@parse@block@add@aux}[1]{% - \si@add@right@cs@o{si@unit@parse@queue\si@unit@parse@queue@use}{#1}% -} -\newcommand*{\si@unit@parse@bracket}[1]{% - \si@bool@if@T\si@unit@out@bracket@use@bool{% - \si@add@left@cs@o{si@unit@parse@#1}\si@unit@out@bracket@open - \si@add@right@cs@o{si@unit@parse@#1}\si@unit@out@bracket@close - }% -} -\newcommand*{\si@unit@parse@init}{% - \si@loop@over@macro\si@unit@def@list\si@unit@parse@init@aux - \si@clear@macro\si@unit@parse@current - \si@clear@macro\si@unit@parse@current@den - \si@clear@macro\si@unit@parse@power@current - \si@clear@macro\si@unit@parse@power@last - \si@clear@macro\si@unit@parse@queue - \si@clear@macro\si@unit@parse@queue@den - \def\si@unit@parse@type@last{start}% - \def\si@unit@parse@type@last@den{start}% - \expandafter\def\expandafter\si@unit@parse@sep\expandafter{% - \expandafter\ensuremath\expandafter{\si@unit@out@unit@sep}% - }% - \si@unit@parse@block@cnt\z@\relax - \si@unit@parse@block@den@cnt\z@\relax - \si@bool@false\si@unit@parse@per@last@bool - \si@bool@false\si@unit@parse@per@current@bool -} -\newcommand*{\si@unit@parse@init@aux}[1]{% - \si@let@Nc#1{si@unit@macro@\string#1}% -} -\newcommand*{\si@unit@parse@last@if@F}[1]{% - \si@meaning@eq@cs@if@F - {si@unit@parse@type@last\si@unit@parse@queue@use}% - {si@unit@parse@type@#1}% -} -\newcommand*{\si@unit@parse@last@if@T}[1]{% - \si@meaning@eq@cs@if@T - {si@unit@parse@type@last\si@unit@parse@queue@use}% - {si@unit@parse@type@#1}% -} -\newcommand*{\si@unit@parse@last@if@TF}[1]{% - \si@meaning@eq@cs@if@TF - {si@unit@parse@type@last\si@unit@parse@queue@use}% - {si@unit@parse@type@#1}% -} -\newcommand*{\si@unit@parse@options}[1]{% - \si@csname@if@T{si@unit@options@\expandafter\string\@car#1\@nil}{% - \edef\si@tempa{% - \expandafter\expandafter\expandafter\unexpanded - \expandafter\expandafter\expandafter{% - \csname si@unit@options@\expandafter\string\@car#1\@nil - \endcsname - },% - \expandafter\unexpanded\expandafter{\si@unit@internal@opts}% - }% - \expandafter\sisetup\expandafter{\si@tempa}% - }% -} -\newcommand*{\si@unit@parse@queue@use}{% - \si@bool@if@T\si@unit@parse@fraction@bool{% - \si@bool@if@T\si@unit@parse@per@current@bool{@den}% - }% -} -\newcommand*{\si@unit@parse@store}[2]{% - \@nameuse{si@unit@parse@store@#1}{#2}% -} -\newcommand*{\si@unit@parse@store@add@n}[1]{% - \si@add@right@cs@n{si@unit@parse@block\si@unit@parse@queue@use}{#1}% -} -\newcommand*{\si@unit@parse@store@add@o}[1]{% - \si@add@right@cs@o{si@unit@parse@block\si@unit@parse@queue@use}{#1}% -} -\newcommand*{\si@unit@parse@store@power}[1]{% - \si@unit@parse@last@if@T{qual}{% - \si@bool@if@F\si@unit@parse@qual@sub@bool{% - \si@unit@parse@bracket{block\si@unit@parse@queue@use}% - }% - \si@unit@parse@store@power@aux - }% - \si@unit@parse@last@if@T{unit}{% - \si@unit@parse@store@power@aux - }% - \si@clear@macro\si@unit@parse@power@current -} -\newcommand*{\si@unit@parse@store@power@aux}{% - \si@unit@parse@store@type{power}% - \si@bool@if@T\si@unit@parse@per@current@bool{% - \si@bool@if@F\si@unit@parse@fraction@bool{% - \si@unit@parse@store@power@inv - }% - }% - \def\si@tempa{1}% - \si@meaning@eq@if@F\si@unit@parse@power@current\si@tempa{% - \si@unit@parse@store@add@o{% - \expandafter^\expandafter{\si@unit@parse@power@current}% - }% - }% -} -\newcommand*{\si@unit@parse@store@power@inv}{% - \si@in@if@TF\si@unit@parse@power@current{-}{% - \def\si@tempa##1-##2\si@stop{% - \def\si@unit@parse@power@current{##2}% - }% - }{% - \si@add@left@n\si@unit@parse@power@current{-}% - }% -} -\newcommand*{\si@unit@parse@store@prefix}[1]{% - \si@unit@parse@last@if@F{prefix}{% - \si@unit@parse@store@type{prefix}% - \si@unit@parse@block@new{#1}% - }% -} -\newcommand*{\si@unit@parse@store@qual}[1]{% - \si@unit@parse@last@if@T{unit}{% - \si@unit@parse@store@add@o{\si@unit@parse@qual@format{#1}}% - \si@unit@parse@store@type{qual}% - }% -} -\newcommand*{\si@unit@parse@store@type}[1]{% - \si@let@cc{si@unit@parse@type@last\si@unit@parse@queue@use}% - {si@unit@parse@type@#1}% -} -\newcommand*{\si@unit@parse@store@unit}[1]{% - \si@count@incr@cs{si@unit@parse@block\si@unit@parse@queue@use @cnt}% - \si@unit@parse@last@if@TF{prefix}{% - \si@unit@parse@store@type{unit}% - \si@unit@parse@store@add@n{#1}% - }{% - \si@unit@parse@store@type{unit}% - \si@unit@parse@block@new{#1}% - }% -} -\newcommand*{\si@unit@out@literal@unit}{} -\newcommand*{\si@unit@out@bracket@close}{} -\newcommand*{\si@unit@out@bracket@open}{} -\si@bool@new\si@unit@out@bracket@use@bool -\si@bool@new\si@unit@out@break@bool -\si@bool@new\si@unit@out@lit@allow@bool -\newcommand*{\si@unit@out@num@sep}{} -\newcommand*{\si@unit@out@unit@sep}{} -\newcommand*{\si@unit@out@unit@space}{} -\pgfkeys{ - /siunitx/units/output, - allow literal units/.is siunitx switch = {unit@out@lit@allow}, - allow number-unit breaks/.is siunitx switch = {unit@out@break}, - close bracket/.store in = \si@unit@out@bracket@close, - inter-unit separator/.store in = \si@unit@out@unit@sep, - inter-unit space/.store in = \si@unit@out@unit@space, - number-unit separator/.store in = \si@unit@out@num@sep, - open bracket/.store in = \si@unit@out@bracket@open, - use brackets/.is siunitx switch = {unit@out@bracket@use}, %( - allow literal units = true, - allow number-unit breaks = false, - close bracket = ), - inter-unit separator = \,, - inter-unit space = \,, - number-unit separator = \,, - open bracket = (, % - use brackets = true -} -\newcommand*{\si@unit@out@literal}[1]{% - \si@loop@over@macro\si@unit@def@list\si@unit@out@literal@aux - \si@unit@out@literal@print{#1}% -} -\newcommand*{\si@unit@out@literal@aux}[1]{% - \si@let@Nc#1{si@unit@literal@\string#1}% -} -\si@catcode@set{46}{13}% . -\si@catcode@set{38}{13}% & -\newcommand*{\si@unit@out@literal@print}[1]{% - \def\si@unit@out@literal@unit{#1}% - \si@unit@out@replace@fullstops\si@unit@out@literal@unit - \si@unit@out@replace@tildes\si@unit@out@literal@unit - \begingroup - \si@catcode@set{38}{13}% & - \si@catcode@set{126}{13}% ~ - \let.\si@unit@out@unit@sep - \let&\si@unit@out@unit@space - \protected@edef\si@unit@out@literal@unit{\si@unit@out@literal@unit}% - \si@print@unit@o{\si@unit@out@literal@unit}% - \endgroup -} -\si@catcode@set{46}{12}% . -\si@lccode@set{38}{46}% & -> . -\lowercase{% - \newcommand*{\si@unit@out@replace@fullstops}[1]{% - \si@replace@all@in#1{.}{&}% - } -} -\si@lccode@set{38}{0}% & -> & -\newcommand*{\si@unit@out@replace@tildes}[1]{% - \si@replace@all@in#1{~}{&}% -} -\si@catcode@set{38}{4}% & -\newcommand*{\si@unit@out@sep@print}{% - \ensuremath{% - \si@bool@if@TF\si@unit@out@break@bool{% - \allowbreak - }{% - \nobreak - }% - \si@unit@out@num@sep - }% -} -\si@bool@new\si@symbol@redefine@bool - -\si@keys@family{symbols} -\pgfkeys{ - /siunitx/symbols, - redefine symbols/.is siunitx switch = {symbol@redefine}, - redefine symbols = true -} -\newcommand*{\si@symbol@redefine}{% - \si@bool@if@T\si@symbol@redefine@bool{% - \@ifpackageloaded{textcomp}{% - \sisetup{ - symbols/maths/degree = \text{\textdegree}, - symbols/text/degree = \textdegree - }% - \@ifpackageloaded{mathptmx}{}{% - \sisetup{ - symbols/text/micro = \textmu, - symbols/text/ohm = \textomega - }% - }% - \def\si@tempa{OT1}% - \si@meaning@eq@if@T\si@tempa\encodingdefault{% - \sisetup{ - symbols/maths/angstrom = \text{\capitalring{A}}, - symbols/text/angstrom = \capitalring{A} - }% - }% - }{}% - \@ifpackageloaded{upgreek}{% - \sisetup{ - symbols/maths/ohm = \Upomega - } - }{}% - }% -} -\AtBeginDocument{\si@symbol@redefine} -\newcommand*{\si@symbol@maths@angstrom}{} -\newcommand*{\si@symbol@maths@arcminute}{} -\newcommand*{\si@symbol@maths@arcsecond}{} -\newcommand*{\si@symbol@maths@celsius}{} -\newcommand*{\si@symbol@maths@degree}{} -\newcommand*{\si@symbol@maths@micro}{} -\newcommand*{\si@symbol@maths@ohm}{} -%%\begin{macro}{\si@symbol@text@angstrom} -\newcommand*{\si@symbol@text@angstrom}{} -\newcommand*{\si@symbol@text@arcminute}{} -\newcommand*{\si@symbol@text@arcsecond}{} -\newcommand*{\si@symbol@text@celsius}{} -\newcommand*{\si@symbol@text@degree}{} -\newcommand*{\si@symbol@text@micro}{} -\newcommand*{\si@symbol@text@ohm}{} -\si@keys@family{symbols/maths} -\pgfkeys{ - /siunitx/symbols/maths, - angstrom/.store in = \si@symbol@maths@angstrom, - arcminute/.store in = \si@symbol@maths@arcminute, - arcsecond/.store in = \si@symbol@maths@arcsecond, - celsius/.store in = \si@symbol@maths@celsius, - degree/.store in = \si@symbol@maths@degree, - micro/.store in = \si@symbol@maths@micro, - ohm/.store in = \si@symbol@maths@ohm, - angstrom = \text{\AA}, - arcminute = {}^{\prime}, - arcsecond = {}^{\prime\prime}, - celsius = {}^{\circ}\kern-\scriptspace C, - degree = {}^{\circ}, - micro = \si@symbol@maths@mu, - ohm = \text{\ensuremath{\Omega}} -} -\si@keys@family{symbols/math} -\pgfkeys{ - /siunitx/symbols/math, - angstrom/.store in = \si@symbol@maths@angstrom, - arcminute/.store in = \si@symbol@maths@arcminute, - arcsecond/.store in = \si@symbol@maths@arcsecond, - celsius/.store in = \si@symbol@maths@celsius, - degree/.store in = \si@symbol@maths@degree, - micro/.store in = \si@symbol@maths@micro, - ohm/.store in = \si@symbol@maths@ohm, -} -\si@keys@family{symbols/text} -\pgfkeys{ - /siunitx/symbols/text, - angstrom/.store in = \si@symbol@text@angstrom, - arcminute/.store in = \si@symbol@text@arcminute, - arcsecond/.store in = \si@symbol@text@arcsecond, - celsius/.store in = \si@symbol@text@celsius, - degree/.store in = \si@symbol@text@degree, - micro/.store in = \si@symbol@text@micro, - ohm/.store in = \si@symbol@text@ohm, - angstrom = \AA, - arcminute = \ensuremath{{}^{\prime}}, - arcsecond = \ensuremath{{}^{\prime\prime}}, - celsius = \ensuremath{{}^{\circ}}\kern-\scriptspace C, - degree = \ensuremath{{}^{\circ}}, - micro = \si@symbol@text@mu, - ohm = \ensuremath{\Omega} -} -\newcommand*{\si@symbol@new}[1]{% - \expandafter\si@newcommand\expandafter*\expandafter{% - \csname SIUnitSymbol#1\endcsname - }{% - \si@mode@maths@if@TF{% - \lowercase{\@nameuse{si@symbol@maths@#1}}% - }{% - \lowercase{\@nameuse{si@symbol@text@#1}}% - }% - }% -} -\si@symbol@new{Angstrom} -\si@symbol@new{Arcminute} -\si@symbol@new{Arcsecond} -\si@symbol@new{Celsius} -\si@symbol@new{Degree} -\si@symbol@new{Micro} -\si@symbol@new{Ohm} -\DeclareFontEncoding{TS1}{}{} -\DeclareFontSubstitution{TS1}{cmr}{m}{n} -\DeclareTextSymbol{\si@symbol@text@mu}{TS1}{181} -\DeclareTextSymbolDefault{\si@symbol@text@mu}{TS1} -\newcommand*{\si@symbol@check@upgreek}{% - \@ifpackageloaded{upgreek}{% - \let\si@symbol@maths@mu\upmu - }{% - \DeclareFontFamily{OML}{eur}{\skewchar\font127}% - \DeclareFontShape{OML}{eur}{m}{n}% - {<-6> eurm5 <6-8> eurm7 <8-> eurm10}{}% - \DeclareSymbolFont{si@symbol}{OML}{eur}{m}{n}% - \DeclareMathSymbol{\si@symbol@maths@mu}{\mathord}{si@symbol}{22}% - }% -} -\AtBeginDocument{\si@symbol@check@upgreek} -\newcommand*{\DeclareSIPower}{% - \@ifstar{% - \si@unit@def@power@post - }{% - \si@unit@def@power - }% -} -\newcommand*{\DeclareSIPrefix}{% - \@ifstar{% - \si@unit@def@prefix@binary - }{% - \si@unit@def@prefix - }% -} -\newcommand*{\DeclareSIQualifier}{% - \si@unit@def@qual -} -\newcommand*{\DeclareSIUnit}[2][]{% - \si@unit@def@unit{#2}{#1}% -} -\@onlypreamble\DeclareSIPower -\@onlypreamble\DeclareSIPrefix -\@onlypreamble\DeclareSIQualifier -\@onlypreamble\DeclareSIUnit -\si@newcommand*{\sisetup}[1]{% - \pgfqkeys{/siunitx}{#1}% -} -\si@newcommand*{\num}[2][]{% - \begingroup - \sisetup{#1}% - \si@num@internal{#2}% - \endgroup -} -\newcommand*{\si@num@internal}[1]{% - \si@num@pre@process{#1}% - \si@bool@if@F\si@num@pre@error@bool{% - \si@num@in@parse@o{\si@num@pre@arg}% - \si@bool@if@F\si@num@in@error@bool{% - \si@num@post@process - \si@num@out@process - \si@num@print - }% - }% -} -\si@newcommand*{\SI}[2][]{% - \begingroup - \def\si@tempa{{#1}{#2}}% - \si@unit@internal@i -} -\newcommand*{\si@unit@internal@i}[2][]{% - \expandafter\si@unit@internal@ii\si@tempa{#1}{#2}% -} -\newcommand*{\si@unit@internal@ii}[4]{% TEMP - \sisetup{#1}% - \def\si@unit@internal@opts{#1}% - \si@unit@in@parse{#3}% - \si@num@internal{#2}% - \si@bool@if@F\si@num@in@error@bool{% - \si@empty@tlist@if@T{#4}{% - \let\si@unit@out@sep@print\relax - }% - }% - \si@unit@in@parse{#4}% - \endgroup -} -\newcommand*{\si@unit@internal@opts}{} -\si@newcommand*{\si}[2][]{% - \begingroup - \sisetup{#1}% - \si@unit@in@parse{#2}% - \endgroup -} -\DeclareSIUnit{\kilogram}{\kilo\gram} -\DeclareSIUnit{\metre}{m} -\DeclareSIUnit{\meter}{\metre} -\DeclareSIUnit{\mole}{mol} -\DeclareSIUnit{\second}{s} -\DeclareSIUnit{\ampere}{A} -\DeclareSIUnit{\kelvin}{K} -\DeclareSIUnit{\candela}{cd} -\DeclareSIUnit{\gram}{g} -\DeclareSIPrefix{\yocto}{y}{-24} -\DeclareSIPrefix{\zepto}{z}{-21} -\DeclareSIPrefix{\atto}{a}{-18} -\DeclareSIPrefix{\femto}{f}{-15} -\DeclareSIPrefix{\pico}{p}{-12} -\DeclareSIPrefix{\nano}{n}{-9} -\DeclareSIPrefix{\micro}{\SIUnitSymbolMicro}{-6} -\DeclareSIPrefix{\milli}{m}{-3} -\DeclareSIPrefix{\centi}{c}{-2} -\DeclareSIPrefix{\deci}{d}{-1} -\DeclareSIPrefix{\deca}{da}{1} -\DeclareSIPrefix{\deka}{da}{1} -\DeclareSIPrefix{\hecto}{h}{2} -\DeclareSIPrefix{\kilo}{k}{3} -\DeclareSIPrefix{\mega}{M}{6} -\DeclareSIPrefix{\giga}{G}{9} -\DeclareSIPrefix{\tera}{T}{12} -\DeclareSIPrefix{\peta}{P}{15} -\DeclareSIPrefix{\exa}{E}{18} -\DeclareSIPrefix{\zetta}{Z}{21} -\DeclareSIPrefix{\yotta}{Y}{24} -\DeclareSIUnit{\becquerel}{Bq} -\DeclareSIUnit{\celsius}{\SIUnitSymbolCelsius} -\DeclareSIUnit{\coulomb}{C} -\DeclareSIUnit{\farad}{F} -\DeclareSIUnit{\gray}{Gy} -\DeclareSIUnit{\hertz}{Hz} -\DeclareSIUnit{\henry}{H} -\DeclareSIUnit{\joule}{J} -\DeclareSIUnit{\katal}{kat} -\DeclareSIUnit{\lumen}{lm} -\DeclareSIUnit{\lux}{lx} -\DeclareSIUnit{\newton}{N} -\DeclareSIUnit{\ohm}{\SIUnitSymbolOhm} -\DeclareSIUnit{\pascal}{Pa} -\DeclareSIUnit{\radian}{rad} -\DeclareSIUnit{\siemens}{S} -\DeclareSIUnit{\sievert}{Sv} -\DeclareSIUnit{\steradian}{sr} -\DeclareSIUnit{\tesla}{T} -\DeclareSIUnit{\volt}{V} -\DeclareSIUnit{\watt}{W} -\DeclareSIUnit{\weber}{Wb} -\DeclareSIUnit[units/output/number-unit separator={}] - {\arcmin}{\arcminute} -\DeclareSIUnit[units/output/number-unit separator={}] - {\arcminute}{\SIUnitSymbolArcminute} -\DeclareSIUnit[units/output/number-unit separator={}] - {\arcsecond}{\SIUnitSymbolArcsecond} -\DeclareSIUnit{\day}{d} -\DeclareSIUnit[units/output/number-unit separator={}] - {\degree}{\SIUnitSymbolDegree} -\DeclareSIUnit{\hectare}{ha} -\DeclareSIUnit{\hour}{h} -\DeclareSIUnit{\litre}{l} -\DeclareSIUnit{\liter}{L} -\DeclareSIUnit{\minute}{min} -\DeclareSIUnit{\percent}{\char37} -\DeclareSIUnit{\tonne}{t} -\DeclareSIUnit{\astronomicalunit}{ua} -\DeclareSIUnit{\atomicmassunit}{u} -\DeclareSIUnit{\electronvolt}{eV} -\DeclareSIUnit{\dalton}{Da} -\DeclareSIUnit{\clight}{\text{\ensuremath{c_{0}}}} -\DeclareSIUnit{\electronmass}{\text{\ensuremath{m_{\text{e}}}}} -\DeclareSIUnit{\planckbar}{\text{\ensuremath{\hbar}}} -\DeclareSIUnit{\elementarycharge}{\text{\ensuremath{e}}} -\DeclareSIUnit{\bohr}{\text{\ensuremath{a_{0}}}} -\DeclareSIUnit{\hartree}{\text{\ensuremath{E_{\textup{h}}}}} -\DeclareSIUnit{\angstrom}{\SIUnitSymbolAngstrom} -\DeclareSIUnit{\bar}{bar} -\DeclareSIUnit{\barn}{b} -\DeclareSIUnit{\bel}{B} -\DeclareSIUnit{\decibel}{\deci\bel} -\DeclareSIUnit{\knot}{kn} -\DeclareSIUnit{\mmHg}{mmHg} -\DeclareSIUnit{\nauticalmile}{M} -\DeclareSIUnit{\neper}{Np} -\DeclareSIPower{\square}{2} -\DeclareSIPower*{\squared}{2} -\DeclareSIPower{\cubic}{3} -\DeclareSIPower*{\cubed}{3} -\si@catcode@restore -\si@lccode@restore -%% -%% Copyright (C) 2008-2009 by -%% Joseph Wright -%% -%% It may be distributed and/or modified under the conditions of -%% the LaTeX Project Public License (LPPL), either version 1.3c of -%% this license or (at your option) any later version. The latest -%% version of this license is in the file: -%% -%% http://www.latex-project.org/lppl.txt -%% -%% This work is "maintained" (as per LPPL maintenance status) by -%% Joseph Wright. -%% -%% This work consists of the file siunitx.dtx -%% and the derived files siunitx.pdf, -%% siunitx.sty and -%% siunitx.ins. -%% -%% -%% End of file `siunitx.sty'. diff --git a/vim/spell/en.utf-8.add b/vim/spell/en.utf-8.add index 0778c9e..e9a13b5 100644 --- a/vim/spell/en.utf-8.add +++ b/vim/spell/en.utf-8.add @@ -40,3 +40,6 @@ Sion Cryosphère hydrobiologie piétonisation +CADéco +genevoises +Évolène diff --git a/vim/spell/fr.utf-8.add b/vim/spell/fr.utf-8.add index 3309319..1a18c25 100644 --- a/vim/spell/fr.utf-8.add +++ b/vim/spell/fr.utf-8.add @@ -62,3 +62,12 @@ subsection bachelor Multidisciplinarité nommage +Shannon +Hamming +Viterbi +Channel +géodatabases +géodatabase +Transdisciplinarité +transdisciplinarité +multidisciplinarité diff --git a/vim/spell/fr.utf-8.add.spl b/vim/spell/fr.utf-8.add.spl index 5b6082972cd4681101d70de0b731a61665925c9f..f3d0cc4987facc8cc5827ccfc1af4f1788382e39 100644 GIT binary patch literal 1177 zcmZWoJ#Q015WSg8s8c{kfg($3fkX&|QXmB+B+?wg}Jkf~+|n*5Kv{Xf>bJ7=x7+xqIeN zKgQc-dh8l`CNJcPoB-2LI93}m2SIR%Mu9rH1iC|*0!W8%hOcFP+-x;l!?&d+N`Vql zD#U^jJU!o80X!FxmM3=Nz@VEEXaGjn;TWP|_mR`1A$8S&?G-i~kjEQag2I&K0k5ba zdE${8FGRj(m@N^IqH+Hy^Zj7_IguaU66_2y&d-^-TA5e8RO$rmo13={=4^=qAN}_z zi>WeYUTQa%ce6A7g_TDpErQ;6k7%^Tw5BDolYTFAWrO4GczD7-p>r*MJP<_>$h@o7 zSJqrifk9`4zl3p|WLj85-K`YxCgXLp1QYv~-&3DlBE0OH)GXjxN6O#U>|={s%L&ZQi1?%A4bGTl0TSc>)`+Z literal 337 zcmX|7J8r`;4Ao=01}J)hOr7&70%YuxphMU0j-|v#WZ979Al-VM<{CLjkJ3B}MJ<>n z--o39@%Eku=l$~681pl&_SPM`&<`=?GdxBZRH)IwvFZV1o+4UY{_-%f;erF?L28GH zPYgwqnb*|xtVP(OD{zuk#2Onc@Ip|&7(!uA9OaSO+VV{_x3qf3K#h*fxT$jY&88hs zg=29#jk8gXQIq*VdS8f2Y~ki-YISitY4S*V)avTlRi~FOGe=Y6C2P(h``k*SmY$G) XJ1*dPbd`ehZ#`m*)&Ff?3F~tQq)$6$ diff --git a/vim/vimrc b/vim/vimrc index 18df9b1..7e37eec 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -175,6 +175,8 @@ autocmd BufNewFile,BufRead *.py set keywordprg=pydoc autocmd BufNewFile,BufRead *.php set ts=4 sw=4 keywordprg=~/.vim/scripts/doc.php.sh autocmd BufNewFile,BufRead *.R set ts=4 sw=4 keywordprg=~/.vim/scripts/doc.R.sh autocmd BufNewFile,BufRead *.m set ts=4 sw=4 keywordprg=~/.vim/scripts/doc.octave.sh +"Yeah, well, fuck you ! +autocmd BufNewFile,BufRead *.rs set noexpandtab "Merci Nemolivier ;) vmap ,w :!firefox "http://fr.wikipedia.org/wiki/" >& /dev/null From 21b78de62ba504bd4db18c88f4c8237e0582fe8b Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Thu, 29 Jan 2015 18:17:21 +0100 Subject: [PATCH 19/21] misc --- dwm/config.h | 1 + ssh/config | 3 +++ 2 files changed, 4 insertions(+) diff --git a/dwm/config.h b/dwm/config.h index 40b0193..c16c910 100644 --- a/dwm/config.h +++ b/dwm/config.h @@ -48,6 +48,7 @@ static const Rule rules[] = { { "Gimp", NULL, NULL, 0, True, -1 }, { "Firefox", NULL, NULL, 1 << 0, False, -1 }, { "Thunderbird", NULL, NULL, 1 << 1, False, -1 }, + { "Spotify", NULL, NULL, 2, True, -1 }, { "Profanity", NULL, NULL, 1 << 14, False, -1 }, { "pdfpc", "pdfpc", NULL, 0, True, -1 }, }; diff --git a/ssh/config b/ssh/config index f48fc92..c2e659b 100644 --- a/ssh/config +++ b/ssh/config @@ -3,6 +3,9 @@ IdentityFile ~/.ssh/id_rsa.auth IdentityFile ~/.ssh/id_rsa.git IdentityFile ~/.ssh/id_dsa +Host * + KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256 + ###Compression yes host vi-di.fr From 1282e72be6a71e5ffd4af0f314c9ef11006ded10 Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Thu, 29 Jan 2015 18:18:20 +0100 Subject: [PATCH 20/21] MUTT: delete account --- mutt/account.aei | 20 -------------------- mutt/muttrc | 4 ---- 2 files changed, 24 deletions(-) delete mode 100644 mutt/account.aei diff --git a/mutt/account.aei b/mutt/account.aei deleted file mode 100644 index 66f3804..0000000 --- a/mutt/account.aei +++ /dev/null @@ -1,20 +0,0 @@ -set from="aei-cui@unige.ch" -set use_from -set realname="Association des Étudiants en Informatique" - -set folder="imaps://aei@outlook.unige.ch:993/" -#set imap_user="aei" -set postponed="+Drafts" -set spoolfile="+INBOX" -#set record = "+Sent" -set record = "+Éléments envoyés" -set signature="~/.mutt/signature.aei" -set smtp_url="smtp://aei@outlook.unige.ch:587" - -my_hdr X-URL: http://aei.unige.ch -my_hdr X-Author: Frank - -set smtp_pass=$my_aei_stmp_pass -set imap_pass=$my_aei_imap_pass - -# vim: filetype=muttrc diff --git a/mutt/muttrc b/mutt/muttrc index 365af02..b282e05 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -8,17 +8,13 @@ macro index 'imaps://frank_mail@villaro-dixon.eu' -macro index 'imaps://aei@outlook.unige.ch' folder-hook 'frank_mail@villaro-dixon.eu' 'source ~/.mutt/account.frank' -folder-hook 'aei@outlook.unige.ch' 'source ~/.mutt/account.aei' # switch to default account on startup source ~/.mutt/account.frank set my_frank_smtp_pass=`~/.mutt/unlock-pass.sh frank_smtp` set my_frank_imap_pass=`~/.mutt/unlock-pass.sh frank_imap` -set my_aei_smtp_pass=`~/.mutt/unlock-pass.sh aei_smtp` -set my_aei_imap_pass=`~/.mutt/unlock-pass.sh aei_imap` ### MOTS DE PASSE From 8e068fff35c2155cd4f6961107dd4b9b8561ab2b Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Tue, 24 Feb 2015 21:50:11 +0100 Subject: [PATCH 21/21] some useless stuff --- Utils/octopus.sh | 3 ++- dwm/config.h | 2 +- procmailrc | 4 ++++ ssh/config | 4 ++-- vim/spell/en.utf-8.add | 2 ++ vim/vimrc | 7 +++++-- 6 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Utils/octopus.sh b/Utils/octopus.sh index 78f5f79..66302e7 100755 --- a/Utils/octopus.sh +++ b/Utils/octopus.sh @@ -94,8 +94,8 @@ case $1 in --output $VGA --auto --same-as $LVDS ;; "off") + sleep 0.1 xset dpms force off - sleep 1 ;; esac $0 wallpaper @@ -161,6 +161,7 @@ case $1 in $0 init-ethernet & $0 init-mouse $0 wallpaper + echo 0 | sudo tee ./devices/platform/thinkpad_acpi/leds/tpacpi::power/brightness ;; "init-mouse") diff --git a/dwm/config.h b/dwm/config.h index c16c910..06d1b83 100644 --- a/dwm/config.h +++ b/dwm/config.h @@ -111,7 +111,7 @@ static Key keys[] = { // { MODKEY|ShiftMask, XK_t, spawn, {.v = mailcmd } }, { MODKEY|ShiftMask, XK_m, spawn, {.v = muttcmd } }, { MODKEY|ShiftMask, XK_l, spawn, {.v = lockcmd } }, - { MODKEY|ShiftMask, XK_o, spawn, {.v = monoff } }, + { MODKEY, XK_m, spawn, {.v = monoff } }, { MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_j, focusstack, {.i = +1 } }, /* change window focus */ { MODKEY, XK_k, focusstack, {.i = -1 } }, /* idem */ diff --git a/procmailrc b/procmailrc index ed08183..2e4996d 100644 --- a/procmailrc +++ b/procmailrc @@ -281,6 +281,10 @@ VACATION="no" * ^To: .*bit_flipping@villaro-dixon.eu.* $BITFLIPBOX +:0 + * ^From:.*MailCleaner.* + $DEVNULLBOX + #Mailing lists mal foutues #{{{ :0 diff --git a/ssh/config b/ssh/config index c2e659b..8f43a95 100644 --- a/ssh/config +++ b/ssh/config @@ -3,8 +3,8 @@ IdentityFile ~/.ssh/id_rsa.auth IdentityFile ~/.ssh/id_rsa.git IdentityFile ~/.ssh/id_dsa -Host * - KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256 +#Host * +# KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256 ###Compression yes diff --git a/vim/spell/en.utf-8.add b/vim/spell/en.utf-8.add index e9a13b5..6f1e5da 100644 --- a/vim/spell/en.utf-8.add +++ b/vim/spell/en.utf-8.add @@ -43,3 +43,5 @@ piétonisation CADéco genevoises Évolène +Optionnellement +Milankovitch diff --git a/vim/vimrc b/vim/vimrc index 7e37eec..afb7236 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -11,8 +11,8 @@ hi SpellBad cterm=underline,bold ctermfg=lightblue set spell set spelllang=en,fr -set viminfo+=n~/Private/.viminfo -set directory=~/Private/.vim/ +"set viminfo+=n~/Private/.viminfo +"set directory=/dev/shm/vimfr "set nocompatible "fuck you !. impossible de backspace, sinon set backspace=indent,eol,start @@ -187,6 +187,9 @@ vmap ,D :!firefox "http://en.wiktionary.org/wiki/" >& /dev/null< "JAVA iabbr syso System.out.println +iabbr env. environnement +iabbr envale environnementale +iabbr enval environnemental if bufwinnr(1)