/
siunitx150Acomprehensivesiunitspackage3JosephWright134Relea siunitx150Acomprehensivesiunitspackage3JosephWright134Relea

siunitx150Acomprehensivesiunitspackage3JosephWright134Relea - PDF document

kylie
kylie . @kylie
Follow
346 views
Uploaded On 2021-06-12

siunitx150Acomprehensivesiunitspackage3JosephWright134Relea - PPT Presentation

3This2ledescribesv3012lastrevised20210609134Emailjosephwrightmorningstar2couk1 7Localisation518Compatibilitywithotherpackages529Hintsforusingsiunitx5291Adjustinglitreandliter ID: 840595

table num unit option num table option unit mode text sisetup qty tabular exponent uncertainty metre format ang symbol

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "siunitx150Acomprehensivesiunitspackage3J..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

1 siunitx–Acomprehensive(si)unitspack
siunitx–Acomprehensive(si)unitspackageJosephWright†Released2021-06-09Contents1Introduction32siunitxfortheimpatient33Usingthesiunitxpackage43.1Numbers.....................................43.2Angles......................................53.3Units.......................................63.4Complexnumbersandquantities......................73.5Theunitmacros................................83.6Unitabbreviations...............................103.7Creatingnewmacros.............................143.8Tabularmaterial................................154Packagecontroloptions174.1Thekey–valuecontrolsystem........................174.2Printing.....................................184.3Parsingnumbers................................204.4Post-processingnumbers...........................224.5Printingnumbers................................254.6Lists,productsandranges..........................284.7Complexnumbers...............................314.8Angles......................................324.9Creatingunits..................................344.10Usingunits...................................344.11Quantities....................................374.12Tabularmaterial................................394.13Localeoptions.................................494.14Preamble-onlyoptions.............................495Upgradingfromversion2496UnitchangesmadebyBIPM50 Thisledescribesv3.0.12,lastrevised2021-06-09.†E-mail:joseph.wright@morningstar2.co.uk1 7Localisation518Compatibilitywithotherpackages529Hintsforusingsiunitx529.1Adjusting\litreand\liter........................529.2Ensuringtexto

2 rmathoutput.........................529.
rmathoutput.........................529.3Expandingcontentintables.........................539.4Usingsiunitxwithdatatool..........................549.5Usingunitsinsectionheadingsandbookmarks..............559.6Aleft-alignedcolumnvisuallycentredunderaheading.........569.7Regressiontables................................579.8Maximisingperformance...........................589.9Specialconsiderationsforthe\kWhunit...................589.10Creatingacolumnwithnumbersandunits................599.11Tableswithheadingrows...........................609.12Associatingalocalewithababellanguage.................609.13Symbolic`digits'................................609.14Demonstratingprexes............................619.15Creatingasetofpre-denedunits......................6110Using(SI)units6210.1Units.......................................6210.2Mathematicalmeaning............................6310.3Graphsandtables...............................6411Installation6712Thanks6713Makingsuggestionsandreportingbugs67Index68AbstractPhysicalquantitieshavebothnumbersandunits,andeachphysicalquantityshouldbeexpressedastheproductofanumberandaunit.Typesettingphysicalquantitiesrequirescaretoensurethatthecombinedmathematicalmeaningofthenumber–unitcombinationisclear.Inparticular,thesiunitssystemlaysdownaconsistentsetofunitswithrulesonhowthesearetobeused.However,differ-entcountriesandpublishershavedifferingconventionsontheexactappearanceofnumbers(andunits).Thesiunitxpackageprovidesasetoftoolsforauthorstotype-setquantitiesinaconsistentway.Thepackagehasanextendedsetofcongurationoptionswhichmakeitpossible

3 tofollowvaryingtypographicconventionswit
tofollowvaryingtypographicconventionswiththesameinputsyntax.Thepackageincludesautomatedprocessingofnumbersandunits,andtheabilitytocontroltabularalignmentofnumbers.2 1IntroductionThecorrectapplicationofunitsofmeasurementisveryimportantintechnicalapplic-ations.Forthisreason,carefully-crafteddenitionsofacoherentunitssystemhavebeenlaiddownbytheConférenceGénraledesPoidsetMesures(cgpm):thishasresultedintheSystèmeInternationald'Unités(si).Atthesametime,typographicconventionsforcorrectlydisplayingbothnumbersandunitsexisttoensurethatnolossofmeaningoccursinprintedmatter.ThesiunitxpackageaimstoprovideauniedmethodforLATEXuserstotypesetnumbersandunitscorrectlyandeasily.Thedesignphilosophyofsiunitxistofollowtheagreedrulesbydefault,buttoallowvariationthroughoptionsettings.Inthisway,userscanusesiunitxtofollowtherequirementsofpublishers,co-authors,universities,etc.withoutneedingtoaltertheinputatall.2siunitxfortheimpatientThepackageprovidestheusermacros:•\ang[hoptionsi]{hanglei}•\num[hoptionsi]{hnumberi}•\unit[hoptionsi]{huniti}•\qty[hoptionsi]{hnumberi}{huniti}•\numlist[hoptionsi]{hnumbersi}•\numproduct[hoptionsi]{hnumbersi}•\numrange[hoptionsi]{hnumbersi}{hnumber2i}•\qtylist[hoptionsi]{hnumbersi}{huniti}•\qtyproduct[hoptionsi]{hnumbersi}{huniti}•\qtyrange[hoptionsi]{hnumber1i}{hnumber2i}{huniti}•\complexnum[hoptionsi]{hnumberi}•\complexqty[hoptionsi]{hnumberi}{huniti}•\sisetup{hoptionsi}•\tablenum[hoptionsi]{hnumberi}plustheScolumntypefordecimalalignmentsandunitsintabularenvironments.Theseusermacrosandcolumntyp

4 esaredesignedfortypesettingnumbersanduni
esaredesignedfortypesettingnumbersandunitswithcontrolofappearanceandwithintelligentprocessing.Numbersareprocessedwithunderstandingofexponents,orusingadditionalcommandsforproductsandcomplexnumbers.12345.678900.3104512i1.6542.343.430\num{12345,67890}\\\num{.3e45}\\\complexnum{1+-2i}\\\numproduct{1.654x2.34x3.430}3 Theunitsystemcaninterpretunitsgivenastexttobeuseddirectlyorasmacro-basedunits.Inthelattercase,differentformattingispossible.\unit{kg.m.s^{-1}}\\\unit{\kilogram\metre\per\second}\\\unit[per-mode=symbol]{\kilogram\metre\per\second}\\\unit[per-mode=symbol]{\kilogram\metre\per\ampere\per\second}kgms�1kgms�1kgm/skgm/(As)Simplelistsandrangesofnumberscanbehandled.\numlist{10;20;30}\\\qtylist{0.13;0.67;0.80}{\milli\metre}\\\numrange{10}{20}\\\qtyrange{0.13}{0.67}{\milli\metre}10,20and300.13mm,0.67mmand0.80mm10to200.13mmto0.67mmBydefault,alltextistypesetinthecurrentuprightmathfont.Thiscanbechangedbysettingtheappropriateoptions.3Usingthesiunitxpackage3.1Numbers \num[hoptionsi]{hnumberi} \num Numbersareautomaticallyformattedbythe\nummacro.Thistakesoneoptionalargument,hoptionsi,andonemandatoryone,hnumberi.Thecontentsofhnumberiareautomaticallyformatted.Theformatterremovesboth`soft'( )and`hard'spaces(\,and~),automaticallyidentiesexponents(asstandardmarkedusinge,E,dorD)andaddstheappropriatespacingoflargenumbers.Withthestandardsettingsaleadingzeroisaddedbeforeadecimalmarker,ifneeded:both.and,arerecognisedasdecimalmarkers.1231234123450.1230.12340.123453.4510�4�11010\num{123}\\\num{1234}\\\num{12345}\\\num{0.123}\\\num{0,1234}\\\num{.12345}\\\num

5 {3.45d-4}\\\num{-e10}4 Notethatnumbersar
{3.45d-4}\\\num{-e10}4 Notethatnumbersareparsedbeforetypesetting,whichdoeshaveaperformanceoverhead(onlyobviouswithverylargeamountsofnumericalinput).Theparserun-derstandsarangeofinputsyntaxes,asdemonstratedabove. \numlist[hoptionsi]{hnumbersi} \numlist Listsofnumbersmaybeprocessedusingthe\numlistfunction.Eachhnumberiisgivenwithinthelistofhnumbersiwithinabracepair,asthelistcanhaveaexiblelength.10,30,50and70\numlist{10;30;50;70} \numproduct[hoptionsi]{hnumbersi} \numproduct Runsofproductsofnumbersmaybeinsertedusingthe\numproductfunction.Thisactsinthesamewayas\num,butinsertseitherasymbolorphrasebetweentheentries.Thelattershouldbeseparatedbyxtokens.1030\numproduct{10x30} \numrange[hoptionsi]{hnumber1i}{hnumber2i} \numrange Simplerangesofnumberscanbehandledusingthe\numrangefunction.Thisactsinthesamewayas\num,butinsertsaphraseorothertextbetweenthetwoentries.10to30\numrange{10}{30}3.2Angles \ang[hoptionsi]{hanglei} \ang Anglescanbetypesetusingthe\angcommand.Thehangleicanbegiveneitherasadecimalnumberorasasemi-colonseparatedlistofdegrees,minutesandseconds,whichiscalled`arcformat'inthisdocument.Thenumberswhichmakeupanangleareprocessedusingthesamesystemasothernumbers.10°12.3°4.5°1°2030010010°�0°10\ang{10}\\\ang{12.3}\\\ang{4,5}\\\ang{1;2;3}\\\ang{;;1}\\\ang{+10;;}\\\ang{-0;1;}5 3.3Units \unit[hoptionsi]{huniti} \unit Thesymbolforaunitcanbetypesetusingthe\unitmacro:thisprovidesfullcontroloveroutputformatfortheunit.Likethe\nummacro,\unittakesoneoptionalandonemandatoryargument.Theunitformattingsystemcanaccepttwotypesofin-put.Whenthehuniticontainsliteralitems(forexamplelette

6 rsornumbers)thensiunitxconverts.and~into
rsornumbers)thensiunitxconverts.and~intointer-unitproductandcorrectlypositionssub-andsuperscriptsspeciedusing_and^.Theformattingmethodswillworkwithbothmathandtextmode.kgm/s2gpolymermolcats�1\unit{kg.m/s^2}\\\unit{g_{polymer}~mol_{cat}.s^{-1}}Thesecondoperationmodeforthe\unitmacroisan`interpreted'system,Here,eachunit,simultipleprexandpowerisgivenamacroname.TheseareenteredinamethodverysimilartothereadingoftheunitnameinEnglish.\unit{\kilo\gram\metre\per\square\second}\\\unit{\gram\per\cubic\centi\metre}\\\unit{\square\volt\cubic\lumen\per\farad}\\\unit{\metre\squared\per\gray\cubic\lux}\\\unit{\henry\second}kgms�2gcm�3V2lm3F�1m2Gy�1lx3HsOnitsown,thisislessconvenientthanthedirectmethod,althoughitdoesusemeaningratherthanappearanceforinput.However,thepackageallowsyoutodenenewunitmacros;alargenumberofpre-denedabbreviationsarealsosupplied.Moreimportantly,bydeningmacrosforunits,insteadofliteralinput,newfunctionalityismadeavailable.Byalteringthesettingsusedbythepackage,thesameinputcanyieldavarietyofdifferentoutputformats.Forexample,the\permacrocangivereciprocalpowers,slashesorbeusedtoconstructunitsasfractions. \qty[hoptionsi]{hnumberi}{huniti} \qty Veryoften,numbersandunitsaregiventogether.Formally,thevalueofaquantityistheproductofthenumberandtheunit,thespacebeingregardedasamultiplicationsign.The\qtymacrocombinesthefunctionalityof\numand\unit,andmakesthisbothpossibleandeasy.Thehnumberiandhunitiargumentsworkexactlylikethoseforthe\numand\unitmacros,respectively.\qty[mode=text]{1.23}{J.mol^{-1}.K^{-1}}\\\qty{.23e7}{\candela}\\\qty[per-mode=symbol]{1.99}{

7 \per\kilogram}\\\qty[per-mode=fraction]{
\per\kilogram}\\\qty[per-mode=fraction]{1,345}{\coulomb\per\mole}6 1.23Jmol 1K 10.23107cd1.991/kg1.345C molItispossibletosetuptheunitmacrostobeavailableoutsideofthe\qtyand\unitfunctions.Thisisnotthestandardbehaviourasthereistheriskofnameclashes(forexample,\dayisaTEXprimitiveandseveralpackagesdene\degree).Fulldetailsofusing`standalone'unitsarefoundin4.9. \qtylist[hoptionsi]{hnumbersi}{huniti} \qtylist Listsofnumberswithunitscanbehandledusingthe\qtylistfunction.Thebehaviourofthisfunctionissimilarto\numlist,butwiththeadditionoftheunittoeachnumber.10m,30mand45m\qtylist{10;30;45}{\metre} \qtyproduct[hoptionsi]{hnumbersi}{huniti} \qtyproduct Runsofproductsofofnumberswithunitscanbehandledusingthe\qtyproductfunction.Thebehaviourofthisfunctionissimilarto\numproduct,butwiththeaddi-tionofaunittoeachnumber.10m30m45m\qtyproduct{10x30x45}{\metre} \qtyrange[hoptionsi]{hnumber1i}{hnumber2i}{huniti} \qtyrange Rangesofnumberswithunitscanbehandledusingthe\qtyrangefunction.Thebehaviourofthisfunctionissimilarto\numrange,butwiththeadditionofaunittoeachnumber.10mto30m\qtyrange{10}{30}{\metre}Theinputoflists,productsandrangesofquantitiesusingasinglecommandal-lowsthemtobeadjustedtogether.Thesecommandsareintendedtoallowconsistentformattingofrelatedvalues:assuch,theyapplyasingleunittoallofthevalues.Thisisparticularlynotablewhenusingadjustmentofthenumericalvalues.3.4Complexnumbersandquantities \complexnum[hoptionsi]{hnumberi} \complexnum Typesetsthecomplexnumber,whichmustbegivenintheforma+biora+ib.Processingofthenumericalpartsisotherwiseidenticaltothestandard\numcommand. \complex

8 qty[hoptionsi]{hnumberi}{huniti} \comple
qty[hoptionsi]{hnumberi}{huniti} \complexqty Typesetsthecomplexquantity,whichmustbegivenintheforma+biora+ib.Processingofthenumericalpartsisotherwiseidenticaltothestandard\qtycommand.7 Table1:sibaseunits. UnitCommandSymbol ampere\ampereAcandela\candelacdkelvin\kelvinKkilogram\kilogramkgmetre\metremmole\molemolsecond\seconds Table2:Coherentderivedunitsinthesiwithspecialnamesandsymbols. UnitCommandSymbolUnitCommandSymbol becquerel\becquerelBqnewton\newtonNdegreeCelsius\degreeCelsius°Cohm\ohmWcoulomb\coulombCpascal\pascalPafarad\faradFradian\radianradgray\grayGysiemens\siemensShertz\hertzHzsievert\sievertSvhenry\henryHsteradian\steradiansrjoule\jouleJtesla\teslaTlumen\lumenlmvolt\voltVkatal\katalkatwatt\wattWlux\luxlxweber\weberWb 3.5TheunitmacrosThepackagealwaysdenesthebasicsetofsiunitswithmacronames.Thisincludesthebasesiunits,thederivedunitswithspecialnamesandtheprexes.Asmallnumberofpowersarealsogivenpre-denednames.Fulldetailsofunitsinthesiareavailableon-line[1].Thesevenbasesiunitsarealwaysdened(Table1).Inaddition,themacro\meterisavailableasanaliasfor\metre,forusersofUSspellings.ThefulldetailsofthebaseunitsaregiveninthesiBrochure.Thesialsolistsanumberofunitswhichhavespecialnamesandsymbols:thesearelistedinTable2.Inadditiontotheofcialsiunits,siunitxalsoprovidesmacrosforanumberofunitswhichareacceptedforuseinthesialthoughtheyarenotsiunits.Table3liststhe`accepted'units.Thecommand\percentisalsoprovidedforuseinunits:thisisacceptedwiththesiasdetailedinSection5.3.7oftheBrochure.Inadditiontotheunitsthemselves,siunitxprovidespre-denedmacrosforallofthesiprexes(

9 Table4).Thespelling`\deka'isprovidedforU
Table4).Thespelling`\deka'isprovidedforUSusersasanalternativeto\deca.Asmallnumberofpre-denedpowersareprovidedasmacros.\squareand\cubicareintendedforusebeforeunits,with\squaredand\cubedgoingaftertheunit.8 Table3:Non-siunitsacceptedforusewiththeInternationalSystemofUnits. UnitCommandSymbol astronomicalunit\astronomicalunitaubel\belBdalton\daltonDaday\dayddecibel\decibeldBdegree\degree°electronvolt\electronvolteVhectare\hectarehahour\hourhlitre\litreL\literLminute(planeangle)\arcminute0minute(time)\minuteminsecond(planeangle)\arcsecond00neper\neperNptonne\tonnet Table4:SIprexes. PrexCommandSymbolPowerPrexCommandSymbolPower yocto\yoctoy�24deca\decada1zepto\zeptoz�21hecto\hectoh2atto\attoa�18kilo\kilok3femto\femtof�15mega\megaM6pico\picop�12giga\gigaG9nano\nanon�9tera\teraT12micro\microµ�6peta\petaP15milli\millim�3exa\exaE18centi\centic�2zetta\zettaZ21deci\decid�1yotta\yottaY24 9 Bq2J2lm�1lx3VT3\unit{\square\becquerel}\\\unit{\joule\squared\per\lumen}\\\unit{\cubic\lux\volt\tesla\cubed}Genericpowerscanbeinsertedonaone-offbasisusingthe\totheand\raisetomacros.Thesearetheonlymacrosforunitswhichtakeanargument:H5rad4.5\unit{\henry\tothe{5}}\\\unit{\raiseto{4.5}\radian}Reciprocalpowersareindicatedusingthe\permacro.Thisappliestothenextunitonly,unlessthesticky-peroptionisturnedon.Jmol�1K�1Jmol�1KH�5Bq�2\unit{\joule\per\mole\per\kelvin}\\\unit{\joule\per\mole\kelvin}\\\unit{\per\henry\tothe{5}}\\\unit{\per\square\becquerel}Asforgenericpowers,genericqualiersarealsoavailableusingthe\offunction:\unit{\kilogram\of{metal}}\\\

10 qty[qualifier-mode=bracket]{0.1}{\milli\
qty[qualifier-mode=bracket]{0.1}{\milli\mole\of{cat}\per\kilogram\of{prod}}kgmetal0.1mmol(cat)kg(prod)�1Whenthecancelpackageisloaded,itispossibleto`cancelout'unitsusingthe\cancelmacro.Thisappliestothenextunit,inasimilarmannertoaprex.The\highlightmacroisalsoavailabletoselectivelycolorunits.Both\canceland\highlightareoutsideofthenormalsemanticmeaningofunits,butareprovidedastheymaybeusefulinsomecases.\unit[per-mode=fraction]{\cancel\kilogram\metre\per\cancel\kilogram\per\second}\\\unit{\highlight{red}\kilogram\metre\per\second}\\\unit[unit-color=purple]{\highlight{blue}\kilogram\metre\per\second}��kgm ��kgskgms�1kgms�13.6UnitabbreviationsInadditiontothe`full'names,siunitxloadsasetofabbreviatedversionsofthesiunits(Table5).Thestandardsiunitxsettingsonlycreatetheseabbreviationswithinthescopeofthe\unitand\qtyfunctions,meaningthatnoclashesshouldoccur(forexamplewiththestandard\pmsymbol).10 Table5:Unitabbreviations UnitAbbreviationSymbol femtogram\fgfgpicogram\pgpgnanogram\ngngmicrogram\ugµgmilligram\mgmggram\ggkilogram\kgkg picometre\pmpmnanometre\nmnmmicrometre\umµmmillimetre\mmmmcentimetre\cmcmdecimetre\dmdmmetre\mmkilometre\kmkm attosecond\asasfemtosecond\fsfspicosecond\pspsnanosecond\nsnsmicrosecond\usµsmillisecond\msmssecond\ss femtomole\fmolfmolpicomole\pmolpmolnanomole\nmolnmolmicromole\umolµmolmillimole\mmolmmolmole\molmolkilomole\kmolkmol picoampere\pApAnanoampere\nAnA Continuedonnextpage11 Continuedfrompreviouspage UnitAbbreviationSymbol microampere\uAµAmilliampere\mAmAampere\AAkiloampere\kAkA microlitre\ulµLmillilitre\mlmLlitre\lLhectolitre\hl

11 hLmicroliter\uLµLmilliliter\mLmLliter\L
hLmicroliter\uLµLmilliliter\mLmLliter\LLhectoliter\hLhL millihertz\mHzmHzhertz\HzHzkilohertz\kHzkHzmegahertz\MHzMHzgigahertz\GHzGHzterahertz\THzTHz millinewton\mNmNnewton\NNkilonewton\kNkNmeganewton\MNMN pascal\PaPakilopascal\kPakPamegapacal\MPaMPagigapascal\GPaGPa milliohm\mohmmWkilohm\kohmkWmegohm\MohmMW picovolt\pVpVnanovolt\nVnVmicrovolt\uVµVmillivolt\mVmVvolt\VVkilovolt\kVkV watt\WW Continuedonnextpage12 Table6:Binaryprexes. PrexCommandSymbolPower kibi\kibiKi10mebi\mebiMi20gibi\gibiGi30tebi\tebiTi40pebi\pebiPi50exbi\exbiEi60zebi\zebiZi70yobi\yobiYi80 Continuedfrompreviouspage UnitAbbreviationSymbol microwatt\uWµWmilliwatt\mWmWkilowatt\kWkWmegawatt\MWMWgigawatt\GWGWjoule\JJmicrojoule\uJµJmillijoule\mJmJkilojoule\kJkJelectronvolt\eVeVmillielectronvolt\meVmeVkiloelectronvolt\keVkeVmegaelectronvolt\MeVMeVgigaelectronvolt\GeVGeVteraelectronvolt\TeVTeVkilowatthour\kWhkWh farad\FFfemtofarad\fFfFpicofarad\pFpFnanofarad\nFnFmicrofarad\uFµF henry\HHmillihenry\mHmHmicrohenry\uHµH kelvin\KK decibel\dBdB Binarydataisexpressedinunitsofbitsandbytes.Thesearenormallygivenbitbyteprexeswhichusepowersoftwo,ratherthanthepowersoftenusedbythesiprexes.Asthesebinaryprexesarecloselyrelatedtothesiprexes,theyaredenedbysiunitx.13 3.7CreatingnewmacrosThevariousmacrocomponentsofaunithavetobedenedbeforetheycanbeused.Thepackagesuppliesanumberofcommondenitions,butnewdenitionsarealsopossible.Asthedenitionofalogicalunitshouldremainthesameinasingledocu-ment,thesecreationfunctionsareallpreamble-only. \DeclareSIUnit[hoptionsi]{huniti}{hsymboli} \DeclareSIUnit

12 Newunitsareproducedusingthe\DeclareSIUni
Newunitsareproducedusingthe\DeclareSIUnitmacro.Thehsymbolicancon-tainliteralinput,otherunits,multipleprexes,powersand\per,althoughliteraltextshouldnotbeintermixedwithunitmacros.Unitscanbecreatedwithhoptionsifromtheusuallistunderstoodbysiunitx,andapplythespecicunitmacroonly.The(rst)optionalargumentto\qtyand\unitcanbeusedtooverridethesettingsfortheunit:anexampleisthe\degreeunit.3.1415°\qty{3.1415}{\degree}Thisisdeclaredinthepackage(effectively)as\DeclareSIUnit[quantity-product={}]\degree{\text{\textdegree}}Thespacingcanstillbealteredatpointofuse:\qty{67890}{\degree}\\\qty[quantity-product=\,]{67890}{\degree}67890°67890°Themeaningofapre-denedunitcanbealteredbyusing\DeclareSIUnitafterload-ingsiunitx.Thiswilloverwritetheoriginaldenitionwiththenewerversion. \DeclareSIPrefix{hprefixi}{hsymboli}{hpowers-teni} \DeclareSIPrefix Thestandardsipowersoftenaredenedbythepackage,andaredescribedabove.However,theusercandenenewprexeswith\DeclareSIPrefix.Forex-ample,\kiloisdened\DeclareSIPrefix\kilo{k}{3} \DeclareSIPower{hsymbol-beforei}{hsymbol-afteri}{hpoweri} \DeclareSIPower Thisfunctioncreatestwosymbols,oneforusebeforeaunit,thesecondforuseafteraunit,bothofwhichareequivalenttothehpoweri.Forexample,onemightuse\DeclareSIPower\quartic\tothefourth{4}withthefunctionsthenusedinthedocumentaskg4m4\unit{\kilogram\tothefourth}\\\unit{\quartic\metre}14 \DeclareSIQualifier{hqualifieri}{hsymboli} \DeclareSIQualifier Followingthesyntaxoftheothermacros,qualiersmaybecreatedusingthe\DeclareSIQualifiercommand.Incontrasttotheotherpartsofaunit,therearenopre-denedqual

13 iers.Itisthereforeentirelyuptotheuse
iers.Itisthereforeentirelyuptotheusertocreatethese.Forexample,toidentifythemassofaproductcreatedwhenusingaparticularcatalyst,thepreamblecouldcontain:\DeclareSIQualifier\polymer{pol}\DeclareSIQualifier\catalyst{cat}andtheninthebodythedocumentcouldread\qty{1.234}{\gram\polymer\per\mole\catalyst\per\hour}1.234gpolmol�1cath�13.8TabularmaterialAligningnumbersintabularcontentishandledbyanewcolumntype,theScolumn.Thisnewcolumntypecanalignmaterialusinganumberofdifferentstrategies,withtheaimofexibilityofoutputwithoutneedingtoaltertheinput.Themethodusedasstandardistoplacethedecimalmarkerinthenumberatthecentreofthecellandtoalignthematerialappropriately(Table7).\begin{table}\caption{Standardbehaviourofthe\texttt{S}columntype.%\label{tab:S:standard}}\begin{tabular}{@{}S@{}}\toprule{SomeValues}\\\midrule2.3456\\34.2345\\-6.7835\\90.473\\5642.5\\1.2e3\\e4\\\bottomrule\end{tabular}\end{table}TheScolumnwillattempttoautomaticallydetectmaterialwhichshouldbeplacedbeforeorafteranumber,andwillmaintainthealignmentofthenumericaldata(Table8).Ifthematerialcouldbemistakenforpartofanumber,itshouldbeprotectedbybraces.Theuseof\colorinatablecellwillalsobedetectedandwilloverrideanygeneralcolorappliedbysiunitx.\begin{table}\caption{Detectionofsurroundingmaterialinan\texttt{S}column.%\label{tab:S:extras}}\begin{tabular}{@{}S[color=orange]@{}}\toprule{SomeValues}\\15 Table7:StandardbehaviouroftheScolumntype. SomeValues 2.345634.2345�6.783590.4735642.51.21031104 Table8:DetectionofsurroundingmaterialinanScolumn. SomeValues 12.34975.3144.268a \midrule12.34\\\color{purple}975,31\\44.268\tex

14 tsuperscript{\emph{a}}\\\bottomrule\end{
tsuperscript{\emph{a}}\\\bottomrule\end{tabular}\end{table} \tablenum[hoptionsi]{hnumberi} \tablenum Withinmorecomplextables,alignednumbersmaybedesirablewithintheargu-mentof\multicolumnor\multirow.1The\tablenumfunctionisavailabletoachievealignmentinthesesituations:thisis,ineffect,amacroversionoftheScolumn(Table9).\begin{table}\caption{Controllingcomplexalignmentwiththe\cs{tablenum}macro.%\label{tab:tablenum}}\begin{tabular}{@{}lr@{}}\topruleHeading&Heading\\\midruleInfo&Moreinfo\\Info&Moreinfo\\\multicolumn{2}{c}{\tablenum[table-format=4.4]{12,34}}\\\multicolumn{2}{c}{\tablenum[table-format=4.4]{333.5567}}\\\multicolumn{2}{c}{\tablenum[table-format=4.4]{4563.21}}\\\bottomrule\end{tabular}\hfil\begin{tabular}{@{}lr@{}} 1Providedbythemultirowpackage16 Table9:Controllingcomplexalignmentwiththe\tablenummacro. HeadingHeading InfoMoreinfoInfoMoreinfo12.34333.55674563.21 HeadingHeading 88.999aaabbb33.435cccddd \topruleHeading&Heading\\\midrule\multirow{2}*{\tablenum{88,999}}&aaa\\&bbb\\\multirow{2}*{\tablenum{33,435}}&ccc\\&ddd\\\bottomrule\end{tabular}\end{table}4Packagecontroloptions4.1Thekey–valuecontrolsystemThepackageusesarangeofdifferentkeytypes:ChoiceTakesalimitednumberofchoices,whicharedescribedseparatelyforeachkey.IntegerRequiresanumberastheargument.LengthRequiresalength,eitherasaliteralvaluesuchas2.0cm,orstoredasaLATEXlength.LiteralAkeywhichusesthevalue(s)givendirectly,eithertocheckinputorinout-put.MacroRequiresamacro,whichmayneedasingleargument.MathSimilartoaliteraloption,buttheinputisalwaysusedinmathmode,irre-spectiveofothersiunitxsettings.Thustotext-modeonlyinputmu

15 stbeplacedinsidetheargumentofa\textmacro
stbeplacedinsidetheargumentofa\textmacro.MetaTheseareoptionswhichactuallyapplyanumberofotheroptions.SwitchTheseareon–offswitches,andrecognisetrueandfalse.Givingjustthekeynamealsoturnsthekeyon.Thetablesofoptionnamesusethesedescriptionstoindicatehowthekeysshouldbeused.17 Table10:Printoptions. OptionnameTypeDefault colorLiteralhnoneimodeChoicemathnumber-colorLiteralhnoneinumber-modeChoicemathpropagate-math-fontSwitchfalsereset-math-versionSwitchtruereset-text-familySwitchtruereset-text-seriesSwitchtruereset-text-shapeSwitchtruetext-family-to-mathSwitchfalsetext-font-commandLiteralhnoneitext-series-to-mathSwitchfalseunit-colorLiteralhnoneiunit-modeChoicemath 4.2PrintingThesiunitxpackagecancontrolthefontusedtoprintoutputindependentlyofthesurroundingmaterial.WhichaspectsofthefontfollowthoseofthesurroundingsisinuencedbyarangeofsettingasdetailedinTable10.Themodeoptiondetermineswhethersiunitxusesmathortextmodewhenprintingmodenumber-modeunit-modeoutput.Thechoicesarematch,math,text.ThematchsettingmeansthatprintingusestheprevailingmodeunchangedwhereasmathandtextselecttheappropriateTEXmode.Itispossibletohavedifferentfontsinmathandtextmodes,whichwillhighlightthedifference.Thefontsettingswhichapplyarealsodifferentdependingonthemode.Aswellastheoverallsetting,itispossibletoapplymodetonumbersandunitsseparatelyusingthenumber-modeandunit-modeoptions.Whenprintingintextmode,theoptionsreset-text-family,reset-text-seriesreset-text-familyreset-text-seriesreset-text-shapeandreset-text-shapeapply.Whentheseareactive,siunitxresetstherelevantfontselectionaxispropertywhenprinting:thestandardfontse

16 ttingisuprightmid-weightroman(\upshape\m
ttingisuprightmid-weightroman(\upshape\mdseries\rmfamily).123412341234123412341234\sisetup{mode=text}{\itshape\num{1234}}\\{\bfseries\num{1234}}\\{\sffamily\num{1234}}\\\sisetup{reset-text-family=false,reset-text-series=false,reset-text-shape=false}{\itshape\num{1234}}\\{\bfseries\num{1234}}\\{\sffamily\num{1234}}\\Inmathmode,thefontusedbyLATEXis`invariant',andthisisreectedinthepropagate-math-fontreset-math-versionoptionsavailable.Withthestandardsettings,inmathmodeprintingusesthestandard18 mathfontandversion(weight).Theoptionpropagate-math-fontmaybeusedtoap-plytheprevailingmathfonttotheprintedmaterial.Thesettingreset-math-versioncontrolswhetherthemathversionisresetornot.Notethatmathversionistypicallyusedtoset`boldmath'butmayalsobeusedforothereffects,forexampleallsanserifmath.kgkgkgkgkgkg{\boldmath\unit{\kilogram}}\\{\sansmath$\unit{\kilogram}$}\\{$\mathsf{\unit{\kilogram}}$}\\\sisetup{propagate-math-font=true,reset-math-version=false}{\boldmath\unit{\kilogram}}\\{\sansmath$\unit{\kilogram}$}\\{$\mathsf{\unit{\kilogram}}$}Theoptionstext-family-to-mathandtext-family-to-mathcanbeusedtotext-family-to-mathtext-series-to-mathmatch(asfaraspossible)mathmodeoutputtothesurroundingtext.Theseoptionsworkbydetectingthecurrenttextsettingsandmakingtheappropriatechoiceinmathmode.kgkgkgkg{\sffamily\unit{\kilogram}}\\{\bfseries$\unit{\kilogram}$}\\\sisetup{text-family-to-math=true,text-series-to-math=true}{\sffamily\unit{\kilogram}}\\{\bfseries$\unit{\kilogram}$}Insomecircumstances,itmaybedesirabletouseanon-standardfontcommandtext-font-commandwhenprintingintextmode.Thismightbeusedforexample

17 toswitchfromold-styletoliningnumberswhil
toswitchfromold-styletoliningnumberswhilststillusingtextmode.Thismaybeachievedbysettingtext-font-command.Forexample,thisdocumentusesold-stylenumbersintextmodeas-standard,whichcanbeover-riddenbyselectingthefontvariantwhichdoesnotfeaturethem.\sisetup{number-mode=text}\qty{123456789}{\kilo\volt\per\centi\metre}\\\sisetup{text-font-command=\fontfamily{pplx}\selectfont}\qty{123456789}{\kilo\volt\per\centi\metre}123456789kVcm�1123456789kVcm�1Thecolorofprintedoutputcanbesetusingthecoloroption.Whennocoloriscolornumber-colorunit-colorgiven,printingfollowsthesurroundingtext.Incontrast,whenaspeciccolorisgiven,itisusedirrespectiveofthesurroundings.Aswithmode,thecolorsettingmayalsobeappliedtonumbersandunitsindependently.Sometext4kgMoretext4kgStillredhere!\color{red}%Sometext\\\qty{4}{\kilogram}\\Moretext\\\qty[color=blue]{4}{\kilogram}\\Stillredhere!19 Table11:Optionsfornumberparsing. OptionnameTypeDefault evaluate-expressionSwitchfalseexpressionLiteral#1input-close-uncertaintyLiteral)input-comparatorsLiteral&#x=000;\\\\gg\le\leq\ll\siminput-decimal-markersLiteral.,input-digitsLiteral0123456789input-exponent-markersLiteraldDeEinput-ignoreLiteralhnoneiinput-open-uncertaintyLiteral(input-signsLiteral+-\pm\mpinput-uncertainty-signsLiteral\pmparse-numbersSwitchtrueretain-explicit-plusSwitchfalseretain-zero-uncertaintySwitchfalse 4.3ParsingnumbersThepackageusesasophisticatedparsingsystemtounderstandnumbers.Thisallowssiunitxtocarryoutarangeofformatting,asdescribedlater.Alloftheinputoptionstakelistsofliteraltokens,andaresummarisedinTable11.Thebasicpartsofanumberarethedigits,anysignanda

18 separatorbetweeninput-digitsinput-decima
separatorbetweeninput-digitsinput-decimal-markersinput-signsinput-exponent-markerstheintegeranddecimalparts.Thesearestoredintheinputoptionsinput-digits,input-decimal-markersandinput-signs,respectively.Morethanoneinputdecimalmarkercanbeused:itwillbeconvertedbythepackagetotheappropriateoutputmarker.Numberswhichincludeanexponentpartalsorequireamarkerfortheex-ponent:thisagainistakenfromtherangeoftokensintheinput-exponent-markersoption.Tokensgivenintheinput-ignorelistaretotallypassedoverbysiunitx:theywillinput-ignoreberemovedfromtheinputwithnofurtherprocessing.Inadditiontosigns,siunitxcanrecognisecomparators,suchas.Thepackageinput-comparatorswillautomaticallycarryoutconversionsfor,,and&#x=]TJ;&#x/F10; 9.;阦&#x Tf ;.8;H 0;&#x Td ;&#x[000;=to\ll,\gg,\leand\ge,respectively.105m0.12\num{10}\\\qty{&#x-549;&#x-549;5}{\metre}\\\num{\le0.12}Insomeelds,itiscommontogivetheuncertaintyinanumberinbracketsinput-open-uncertaintyinput-close-uncertaintyinput-uncertainty-signsafterthemainpartofthenumber,forexample`1.234(5)'.Theopeningandclos-ingsymbolsusedforthistypeofinputaresetasinput-open-uncertaintyandinput-close-uncertainty.Alternatively,theuncertaintymaybegivenasasepar-atepartfollowingasign.Whichsignsarevalidforthisoperationisdeterminedbytheinput-uncertainty-signsoption.Aswithothersigns,thecombination+-willautomaticallybeconvertedto\pminternally.20 9.99(9)9.99(9)9.99(9)123.0(45)12.3(60)\num{9.99(9)}\\\num{9.99+-0.09}\\\num{9.99\pm0.09}\\\num{123+-4.5}\\\num{12.3+-6}Uncertaintieswhichcrossthedecimalmarkermaybegivenwithorwithoutadecimalmarkerin`compact'form

19 .Thesearetreatedasequivalentbythecode.21
.Thesearetreatedasequivalentbythecode.2123.4(12)123.4(12)\num{123.4(12)}\\\num{123.4(1.2)}Theparse-numbersoptionturnstheentireparsingsystemonandoff.Theoptionparse-numbersismadeavailablefortworeasons.First,ifallofthenumbersinadocumentaretobereproduced`asgiven',turningofftheparserwillrepresentasignicantsavinginprocessingrequired.Second,itallowstheuseofarbitraryTEXcodeinnumbers.Iftheparseristurnedoff,theinputwillbeprintedinmathmode(requiring\texttoprotectanytextinthenumber).\num[parse-numbers=false]{\sqrt{2}}\\\qty[parse-numbers=false]{\sqrt{3}}{\metre}p 2p 3mWiththestandardsettings,numericalinputisparsed`asis'withnoattempttoevaluate-expressionexpressioninterpretitmathematically.Byenablingtheevaluate-expressionoption,theinputcanbeprocessedbythestandardLATEX3fpu(seepackagexfpformore).Thenatureoftheexpressionitselfcanbeadjustedusingtheexpressionsetting:asstandard,theentireinputissimplyparsedwithnochange,butthissettingmaybeusedtoaddadditionalsteps.Theinputinsuchanexpressionisrepresentedby#1.Notethatthefpuusesitsownsyntaxfornumbers,mostnotablyinthatadecimalmarkermustbe..\sisetup{evaluate-expression}%\qty{2+4*3}{\joule}\\\qty[expression=10*(#1)]{2+4*3}{\joule}14J140JTheinclusionofaleadingplussignisusuallyunnecessaryforpositivenumbers,retain-explicit-plusretain-zero-uncertaintyandsotheyarenotretainedas-standardwhenparsing.Theretain-explicit-plusoptionisavailabletocontrolthisbehaviour.Similarly,anuncertaintyofzeroisnor-mallynotmeaningful,andsoisignoredbytheparser.Thiscanbecontrolledusingtheretain-zero-uncertaintyoption.345+34512.312.3(0)\num{+345}\\\num[retain-explicit-plus]{+345}\

20 \\num{12.3(0)}\\\num[retain-zero-uncerta
\\num{12.3(0)}\\\num[retain-zero-uncertainty]{12.3(0)} 2Thepackageauthorfavorstheformwithoutadecimalmarker,andformalguidanceisambiguousonwhichiscorrect.Theformwithadecimalmarkerisseeninforexamplesomenistpublications.21 Table12:Numberpost-processingoptions. OptionnameTypeDefault drop-exponentSwitchfalsedrop-uncertaintySwitchfalsedrop-zero-decimalSwitchfalseexponent-modeSwitchinputfixed-exponentInteger0minimum-integer-digitsInteger0minimum-decimal-digitsInteger0round-halfChoiceupround-minimumLiteral0round-modeChoicenoneround-padSwitchtrueround-precisionInteger2 4.4Post-processingnumbersBeforetypesettingnumbers,variouspost-processingstepscanbecarriedout.Theseinvolveaddingorremovinginformationfromthenumberinasystematicway;theoptionsaresummarisedinTable12.Numberscanbeconvertedtoscienticnotationbythepackage.Thisiscontrolledexponent-modefixed-exponentbytheexponent-modeoption,whichtakeschoicesinput,fixed,engineeringandscientific.Thefixedsettingwillusetheexponentvaluebythefixed-exponentoption.Whenengineeringisset,theexponentisalwaysapowerofthree.0.0010.01001200110�31.0010�21.200103110�310.010�31.2001030.000011020.00010010212.00102\num{0.001}\\\num{0.0100}\\\num{1200}\\\sisetup{exponent-mode=scientific}%\num{0.001}\\\num{0.0100}\\\num{1200}\\\sisetup{exponent-mode=engineering}%\num{0.001}\\\num{0.0100}\\\num{1200}\\\sisetup{exponent-mode=fixed,fixed-exponent=2,}%\num{0.001}\\\num{0.0100}\\\num{1200}Whenusedwithafixed-exponentofzero,thismaybeusedtoremovescienticnota-tionfromtheinput\num{1.23e4}\\\num[exponent-mode=fixed,fixed-expon

21 ent=0]{1.23e4}1.231041230022 Exponen
ent=0]{1.23e4}1.231041230022 Exponentmodeappliesafterrounding,suchthatthenumberofdecimalplacesforroundingisthosewhichappearintheoutput.Theuseofanuncertaintycanbesuppressedentirelyusingthedrop-uncertaintydrop-exponentdrop-uncertaintyoption:thisappliesbeforeroundingisattempted.Similarly,exponentscanbedroppedusingdrop-exponentcanbeusedtosuppresstheexponentpart(afterconversiontoaxedexponent).0.01(2)0.010.011030.01\num{0.01(2)}\\\num[drop-uncertainty]{0.01(2)}\\\num{0.01e3}\\\num[drop-exponent]{0.01e3}Thepackagecanroundnumericalinputtoaxednumberofsignicantguresorround-moderound-precisionround-paddecimalplaces.Thisiscontrolledbytheround-modeoption,whichtakesthechoicesnone,figures,placesanduncertainty.Whenroundingisturnedon,thenumberofdigitsused(eitherdecimalplacesorsignicantguresinthemantissa)issetusingtheround-precisionoption.Roundingnumberswithuncertaintiesmaybecarriedoutusingtheuncertaintysettingtoround-mode.Inthiscasetheprecisionisusedrsttoroundtheuncertaintyitself(toanumberofgures),beforeroundingthemainvaluetofollow.1.2345614.230.12345(9)1.23514.2300.12345(9)1.2314.20.12345(9)0.12345(9)0.1235(2)0.123(2)\num{1.23456}\\\num{14.23}\\\num{0.12345(9)}\\\sisetup{round-mode=places,round-precision=3}%\num{1.23456}\\\num{14.23}\\\num{0.12345(9)}\\\sisetup{round-mode=figures,round-precision=3}%\num{1.23456}\\\num{14.23}\\\num{0.12345(9)}\\\sisetup{round-mode=uncertainty,round-precision=1}%\num{0.12345(9)}\\\num{0.12345(23)}\\\num{0.12345(234)}Roundingmy`extend'ashortnumbertomoredigits(orgures):thisiscontrolledbytheswitchround-pad,whichistrueas

22 standard.\sisetup{round-mode=figures,rou
standard.\sisetup{round-mode=figures,round-precision=4}%\num{12.3}\\\num[round-pad=false]{12.3}12.3012.323 Incaseswheretheroundedpartofanumberisexactlyhalf,therearetwocommonround-halfmethodsfor`breakingthetie'.Thechoiceofmethodisdeterminedbytheoptionround-half,whichrecognisesthechoicesupandeven.0.060.050.050.05\sisetup{round-mode=figures,round-precision=1,round-half=up}%\num{0.055}\\\num{0.045}\\\sisetup{round-half=even}%\num{0.055}\\\num{0.045}Therearecasesinwhichroundingwillresultinthenumberreachingzero.Itmayround-minimumbedesirabletoshowsuchresultsasbelowathresholdvalue.Thiscanbeachievedbysettinground-minimumtothethresholdvalue.Therewillbenoeffectwhenroundingtoanumberofsignicantguresasitisnotpossibletoobtainthevaluezerointhesecases.0.010.000.010.01\sisetup{round-mode=places}%\num{0.0055}\\\num{0.0045}\\\sisetup{round-minimum=0.01}%\num{0.0055}\\\num{0.0045}Itmaybedesirabletoconvertdecimalstointegerswhenthedecimalpartiszero.drop-zero-decimalThisissetupusingthedrop-zero-decimaloption,whichappliesafterroundingbutbeforesettingminimumnumbersofdigits.2.02.122.1\num{2.0}\\\num{2.1}\\\sisetup{drop-zero-decimal}%\num{2.0}\\\num{2.1}Theminimum-decimal-digitsandminimum-integer-digitsoptionmaybeusedminimum-decimal-digitsminimum-integer-digitstopadnumberstoagivensize.Thisappliesindependentofanyrounding.\num{123}\\\num[minimum-integer-digits=2]{123}\\\num[minimum-integer-digits=4]{123}\\\num{0.123}\\\num[minimum-decimal-digits=2]{0.123}\\\num[minimum-decimal-digits=4]{0.123}\\12312301230.1230.1230.123024 Table13:Outputoptionsfornumbers. OptionnameTypeDefault bracket-negative-num

23 bersSwitchfalseexponent-baseLiteral10exp
bersSwitchfalseexponent-baseLiteral10exponent-productMath\timesgroup-digitsChoiceallgroup-minimum-digitsinteger5group-separatorLiteral\,negative-colorLiteralhnoneioutput-close-uncertaintyLiteral)output-decimal-markerLiteral.output-exponent-markerLiteralhnoneioutput-open-uncertaintyLiteral(print-implicit-plusSwitchfalseprint-unity-mantissaSwitchtrueprint-zero-exponentSwitchfalsetight-spacingSwitchfalseuncertainty-modeChoicecompactuncertainty-separatorLiteralhnonei 4.5PrintingnumbersActuallyprintingnumbersiscontrolledbyanumberofsettings,whichapplyideassuchasdifferingdecimalmarkers,digitgroupingandsoon.Alloftheseoptionsareconcernedwiththeappearanceofoutput,ratherthanthedataitconveys.TheoptionsaresummarisedinTable13.Groupingdigitsintoblocksofthreeisacommonmethodtoincreasetheeaseofgroup-digitsgroup-separatorreadingofnumbers.Thegroup-digitschoicecontrolswhetherthisbehaviourapplies,andtakesthevaluesall,none,decimalandinteger.Groupingcanbeactivatedsep-aratelyfortheintegeranddecimalpartsofanumberusingtheappropriately-namedvalues.\num{12345.67890}\\\num[group-digits=none]{12345.67890}\\\num[group-digits=decimal]{12345.67890}\\\num[group-digits=integer]{12345.67890}12345.6789012345.6789012345.6789012345.67890Theseparatorusedbetweengroupsofdigitsisstoredbythegroup-separatoroption.Thistakesliteralinputandmaybeusedinmathmode:foratext-modefullspaceuse\ .1234512,34512345\num{12345}\\\num[group-separator={,}]{12345}\\\num[group-separator=\]{12345}25 Groupingisnotalwaysappliedtosmallernumbers;thiscanbecontrolledusinggroup-minimum-digitstheoptiongroup-minimum-digits,whichspecieshowmanydigit

24 smustbepresentbeforegroupingisapplied.Th
smustbepresentbeforegroupingisapplied.Thenumberofdigitsisconsideredseparatelyfortheintegeranddecimalpartsofthenumber:groupingdoesnot`crosstheboundary'.\num{1234}\\\num{12345}\\\num[group-minimum-digits=5]{1234}\\\num[group-minimum-digits=5]{12345}\\\num{1234.5678}\\\num{12345.67890}\\\num[group-minimum-digits=5]{1234.5678}\\\num[group-minimum-digits=5]{12345.67890}1234123451234123451234.567812345.678901234.567812345.67890Thedecimalmarkerusedinoutputissetusingtheoutput-decimal-markerop-output-decimal-markertion;thiscandifferfromtheinputmarker.\num{1.23}\\\num[output-decimal-marker={,}]{1.23}\\1.231,23Whenexponentsarepresentintheinput,theexponent-baseandexponent-productexponent-baseexponent-productoptionssettheobviouspartsoftheoutput.\num[exponent-product=\times]{1e2}\\\num[exponent-product=\cdot]{1e2}\\\num[exponent-base=2]{1e2}11021102122Alternatively,iftheoutput-exponent-markeroptionissetthenthevaluestoredwilloutput-exponent-markerbeusedinplaceofthenormalproductandbasecombination.\num[output-exponent-marker=e]{1e2}\\\num[output-exponent-marker=\mathrm{E}]{1e2}1e21E2Wheninputisgivenincludinganuncertaintyinanumber,itcanbeprintedeitheruncertainty-separatoroutput-open-uncertaintyoutput-close-uncertaintyuncertainty-separatorwiththeuncertaintyinbracketsorasaseparatenumber.Thisbehaviouriscontrolledbytheuncertainty-modechoice.Whenthisissettoseparate,theuncertaintyisprin-tedasanentirelyseparatenumberprecededby\pm.Othersettingsallplacetheuncer-taintyinbracketsdirectlyattachedtothemainvalue.Thestandardsettingofcompact26 printsdigitsofuncertaintyintheleast-signicantdigit

25 s.Itdoesnotprintadecimalmarkeriftheuncer
s.Itdoesnotprintadecimalmarkeriftheuncertaintycrossesthedecimal.Thesettingfullprintsthefullvalueoftheuncertainty.Finally,compact-markerisavailabletoprintinthecompactstyleexceptwheretheuncertaintycrossesthedecimal,inwhichcasethefullstyleisused.Whentheuncertaintyisgiveninbrackets,aspacemaybeaddedbetweenthemainnumberandtheuncertainty:thisisstoredusingtheuncertainty-separatoroption.Theopeningandclosingbracketsusedarestoredinoutput-open-uncertaintyandoutput-close-uncertainty,respectively.Tokensmaybeinsertedbeforetheopeningbracketusinguncertainty-separator.\num{123.45(120)}\\\num{0.035(14)}\\\sisetup{uncertainty-mode=full}\num{123.45(120)}\\\num{0.035(14)}\\\sisetup{uncertainty-mode=compact-marker}\num{123.45(120)}\\\num{0.035(14)}\\\sisetup{uncertainty-mode=separate}\sisetup{output-open-uncertainty=[,output-close-uncertainty=],uncertainty-separator=\,}%\num{1.234(5)}123.45(120)0.035(14)123.45(1.20)0.035(0.014)123.45(1.20)0.035(14)1.2340.005Therearecertaincombinationsofnumericalinputwhichcanbeambiguous.Thisbracket-ambiguous-numberscanbecorrectedbyaddingbracketsintheappropriateplace,andiscontrolledbythebracket-ambiguous-numbersswitch.Thisoptiononlyappliestopurenumbers:whenformattingquantities,theneedforbracketsalsodependsontheplacementofunits,soiscontrolledbyseparate-uncertainty-units.\sisetup{separate-uncertainty}\num{1.2(3)e4}\\\num[bracket-ambiguous-numbers=false]{1.2(3)e4}(1.20.3)1041.20.3104Thepackagecandetectnegativemantissavaluesandalterprintcoloraccordingly.negative-colorThisisdisabledbysettingtheoptiontoanemptyvalue.�15673�15673\num{-15673}\\\num[n

26 egative-color=red]{-15673}Acommonmeansto
egative-color=red]{-15673}Acommonmeanstodisplaynegativenumbersinnancialsituationsistoplacebracket-negative-numberstheminbrackets.Thiscanbecarriedoutautomaticallyusingthebracket-negative-numbersoption.27 \num{-15673}\\\num[bracket-negative-numbers]{-15673}\\\qty{-10}{\metre}\\\qty[bracket-negative-numbers]{-10}{\metre}�15673(15673)�10m(10)mUndersomecircumstancesismaybedesirableto`squeeze'theoutputspacing.tight-spacingThisisturnedonusingthetight-spacingswitch,whichcompressesspacingwherepossible.21032103\num{2e3}\\\num[tight-spacing=true]{2e3}Itmaybeusefultoforceallnumberstohaveasign.Thisbehaviouriscontrolledprint-implicit-plusbytheprint-implicit-plusoption:thisisusedifgivenandifnosignwaspresentintheinput.345+345\num{345}\\\num[print-implicit-plus]{345}Printingofamantissaof1andanexponentof0iscontrollablebytheoptionsprint-unity-mantissaprint-zero-exponentprint-unity-mantissaandprint-zero-exponent.Thestandardsettingsprintaman-tissaof1butomitanexponentof0.\num{1e4}\\\num[print-unity-mantissa=false]{1e4}\\\num{444e0}\\\num[print-zero-exponent=true]{444e0}11041044444441004.6Lists,productsandrangesLists,productsandrangesofnumbersandquantitieshaveasmallnumberofspecial-isedoptions,whichapplytothesemoreunusualinputforms(Table14).Listsofnumbersareprintedwithaseparatorbetweeneachitem,whichisstoredlist-final-separatorlist-pair-separatorlist-separatorusingthelist-separatoroption.Theseparatorbeforethelastitemofalistmaybedifferent,andisthereforesetusingthelist-final-separatoroption.Theseparatorusedforexactlytwoitemsissetusingthelist-pair-separatoroption.Anyspacesneede

27 dshouldbeincludedintheoptionsettings:non
dshouldbeincludedintheoptionsettings:noneareaddedwithinthecode.Theseparatorsarealwaysprintedintextmode.28 Table14:Outputoptionsforlists,productsandrangesofnumbersandquantities. OptionnameTypeDefault* list-exponentsChoiceindividuallist-final-separatorLiteral \text{and} list-pair-separatorLiteral \text{and} list-separatorLiteral\text{,} list-unitsChoicerepeatproduct-exponentsChoiceindividualproduct-modeChoicesymbolproduct-phraseLiteral \text{by} product-symbolLiteral\timesproduct-unitsChoicerepeatrange-exponentsChoiceindividualrange-phraseLiteral \text{to} range-unitsChoicerepeat *Thedefaultvaluesareactuallymorecomplexfortworeas-ons:allowingspacestoworkinbothmathandtextmodes,andlocalizationofstrings.\numlist{0.1;0.2;0.3}\\\numlist[list-separator={;}]{0.1;0.2;0.3}\\\numlist[list-final-separator={,}]{0.1;0.2;0.3}\\\numlist[list-separator={and},list-final-separator={andfinally}]{0.1;0.2;0.3}\\\numlist{0.1;0.2}\\\numlist[list-pair-separator={,and}]{0.1;0.2}0.1,0.2and0.30.1;0.2and0.30.1,0.2,0.30.1and0.2andnally0.30.1and0.20.1,and0.2Productsofnumberscanbeoutputusingeitheraproductsymbolorphrase:thisproduct-modeproduct-phraseproduct-symboliscontrolledbytheproduct-modesetting.Whensymbolisset,theappropriatesymbolisstoredinproduct-symbol.Whenusingphrase-mode,theinformationisstoredinproduct-phrase.Phrasesarealwaysprintedintextmode;symbolsareprintedusingthesameroutineasfornumbers.\numproduct{5x100x2}\\\numproduct[product-symbol=\ensuremath{\cdot}]{5x100x2}\\\sisetup{product-mode=phrase}%\numproduct{5x100x2}\\\numproduct[product-phrase={BY}]{5x100x2}\\29 51002510025by100b

28 y25BY100BY2Rangesofnumberscanbegivenasin
y25BY100BY2Rangesofnumberscanbegivenasinput.Thesewillhaveanappropriatewordorrange-phrasesymbolinsertedbetweenthetwoentries:thisisstoredusingtherange-phraseoption.Thephraseshouldincludeanynecessaryspaces:noextraspaceisadded.Thephraseisalwaysprintedintextmode.5to1005–100\numrange{5}{100}\\\numrange[range-phrase=--]{5}{100}Lists,productsandrangescanbe`compressed'bycombiningtheexponentlist-exponentsproduct-exponentsrange-exponentsparts.Thisiscontrolledbytheoptionslist-exponents,product-exponentsandrange-exponents,allofwhichtakethechoicesindividual,combine-bracketandcombine.Thestandardsetting,individual,leavestheexponentwiththematchingvalue.Bothcombineandcombine-brackettaketheexponentoftherstentryandapplytotoallotherentries,withtheexponentitselfplacesattheend.\numlist{5e3;7e3;9e3;1e4}\\\numproduct{5e3x7e3x9e3x1e4}\\\numrange{5e3}{7e3}\\\sisetup{list-exponents=combine-bracket,product-exponents=combine-bracket,range-exponents=combine-bracket}\numlist{5e3;7e3;9e3;1e4}\\\numproduct{5e3x7e3x9e3x1e4}\\\numrange{5e3}{7e3}\\\sisetup{list-exponents=combine,product-exponents=combine,range-exponents=combine}\numlist{5e3;7e3;9e3;1e4}\\\numproduct{5e3x7e3x9e3x1e4}\\\numrange{5e3}{7e3}5103,7103,9103and110451037103910311045103to7103(5,7,9and10)103(57910)103(5to7)1035,7,9and10103579101035to7103Thelist-units,product-unitsandrange-unitsoptionsdeterminehow\qtylist,list-unitsproduct-unitsrange-units\qtyproductand\qtyrangecommandprintunits,respectively.Thestandardsetting30 Table15:Optionsforcom

29 plexnumbers. OptionnameTypeDefault compl
plexnumbers. OptionnameTypeDefault complex-root-positionChoiceafter-numberinput-complex-rootLiteralijoutput-complex-rootLiteral\mathrm{i} fortheseisrepeat,whereeachnumberwillbeprintedwithaunit.Alternativesarebracketandsingle.Ifsettosingle,thiswilloverridecollectionofexponents.\qtylist{2;4;6;8}{\tesla}\\\qtylist[list-units=bracket]{2;4;6;8}{\tesla}\\\qtylist[list-units=repeat]{2;4;6;8}{\tesla}\\\qtylist[list-units=single]{2;4;6;8}{\tesla}\\\qtyrange{2}{4}{\degreeCelsius}\\\qtyrange[range-units=bracket]{2}{4}{\degreeCelsius}\\\qtyrange[range-units=repeat]{2}{4}{\degreeCelsius}\\\qtyrange[range-units=single]{2}{4}{\degreeCelsius}2T,4T,6Tand8T(2,4,6and8)T2T,4T,6Tand8T2,4,6and8T2°Cto4°C(2to4)°C2°Cto4°C2to4°C4.7ComplexnumbersAsmallnumberofoptionsapplyspecicallytothehandlingofcomplexnumbers;thesearesummarisedinTable15.Whenusingcomplexnumbersininput,thecomplexroot(i=p �1)isindicatedinput-complex-rootbyoneofthetokensstoredininput-complex-roots.Theparserunderstandscomplexrootsymbolsgiveneitherbeforeoraftertheassociatednumber(butwilldetectanyinvalidarrangement):9.99+88.8i9.99+88.8i\complexnum{9.99+88.8i}\\\complexnum{9.99+i88.8}Theoutputcomplexrootsymbolisindependentoftheinputandcanbechangedoutput-complex-rootusingtheoutput-complex-rootsetting.\complexnum[output-complex-root=i]{1+2i}\\\complexnum[output-complex-root=j]{1+2i}1+2i1+2jThepositionofthecomplexrootcanbeadjustedtoplaceiteitherbeforeorafterthecomplex-root-positionassociatednumeralinacomplexnumberusingthecomplex-root-positionoption.31 Table16:Angleoptions. OptionnameTypeDefault angle-modeChoiceinputangle-symbol-degr

30 eeLiteral\degreeangle-symbol-minuteLiter
eeLiteral\degreeangle-symbol-minuteLiteral\arcminuteangle-symbol-over-decimalSwitchfalseangle-symbol-secondLiteral\arcsecondangle-separatorLiteralhemptyifill-angle-degreesSwitchfalsefill-angle-minutesSwitchfalsefill-angle-secondsSwitchfalsenumber-angle-productLiteralhemptyi \complexnum{67-0.9i}\\\complexnum[complex-root-position=before-number]{67-0.9i}\\\complexnum[complex-root-position=after-number]{67-0.9i}67�0.9i67�i0.967�0.9i4.8AnglesAngleprocessingprovidedbythe\angfunctionhasasetofoptionswhichapplyinadditiontothegeneralonessetupfornumberprocessing.Theformatinwhichanglesareprintedcanbesetusingtheangle-modeoption.angle-modeWiththestandardsetting(input),theangleisprintedas-given.Bysettingtheoptiontoarcordecimal,theoutputformatcanbesettoanarc(degrees/minutes/seconds)ordecimalvalue.ConversionusestheLATEX3oating-pointunit,soislimitedto16decimalplaces.2.67°2°304002°40012002°304002.67°2.051111111111111°\ang{2.67}\\\ang{2;3;4}\\\ang[angle-mode=arc]{2.67}\\\ang[angle-mode=arc]{2;3;4}\\\ang[angle-mode=decimal]{2.67}\\\ang[angle-mode=decimal]{2;3;4}\\Theseparatorbetweenthenumberandanglesymbol(degrees,minutesornumber-angle-productseconds)canbesetusingthenumber-angle-productoption,independentofthere-latednumber-unit-productoptionusedbythe\qtycommand.2.67°2.67°\ang{2.67}\\\ang[number-angle-product=\,]{2.67}Whenanglesareprintedinarcformat,theseparationofthedifferentpartsissetangle-separatorupusingthearc-separatoroption.6°706.5006°706.500\ang{6;7;6.5}\\\ang[angle-separator=\,]{6;7;6.5}32 Zero-llingforthedegree,minuteorsecondpartsofanarciscontrolledusingthefill-

31 angle-degreesfill-angle-minutesfill-angl
angle-degreesfill-angle-minutesfill-angle-secondsfill-angle-degrees,fill-angle-minutesandfill-angle-secondsoptions.Allareoffasstandard.�1°�20�300�1°�0°20�0°300�1°00�20�00300�1°000�20000�300\ang{-1;;}\\\ang{;-2;}\\\ang{;;-3}\\{\sisetup{fill-angle-degrees}\ang{-1;;}\\\ang{;-2;}\\\ang{;;-3}\\}{\sisetup{fill-angle-minutes}\ang{-1;;}\\\ang{;-2;}\\\ang{;;-3}\\}{\sisetup{fill-angle-seconds}\ang{-1;;}\\\ang{;-2;}\\\ang{;;-3}}Withthestandardsettings,thesymbolsusedforarcanglesaretheunitcommandsangle-symbol-degreeangle-symbol-minuteangle-symbol-second\degree,\arcminuteand\arcsecond.Thesecanbealteredusingangle-symbol-degree,angle-symbol-minuteandangle-symbol-second.Thisismostlikelytobeusedwhenthedenitionoftheunitmacrosisaltered,forexampletoset\arcsecondasas.6°706.5006d7m6.5s\ang{6;7;6.5}\\\sisetup{angle-symbol-degree=d,angle-symbol-minute=m,angle-symbol-second=s}\ang{6;7;6.5}Insomesubjectareas,mostnotablyastronomy,theanglesymbolsaregivenoverangle-symbol-over-decimalthedecimalmarker,ratherthanattheendofthenumber.Thisbehaviourisavailableusingtheangle-symbol-over-decimaloption.\ang{45.697}\\\ang{6;7;6.5}\\\ang[angle-symbol-over-decimal]{45.697}\\\ang[angle-symbol-over-decimal]{6;7;6.5}45.697°6°706.50045.°6976°706.00533 Table17:Unitcreationoptions. OptionnameTypeDefault free-standing-unitsSwitchfalseoverwrite-commandSwitchfalsespace-before-unitSwitchfalseunit-optional-argumentSwitchfalseuse-xspaceSwitchfalse 4.9CreatingunitsThevariousmacrounitsarecreatedatthestartofthedocument.siunitxcandenethesesuchthattheyareonlyavailableforusewithinth

32 e\unitand\qtyfunctions,orcanmaketheunitm
e\unitand\qtyfunctions,orcanmaketheunitmacrosavailablethroughoutthedocumentbody.Thereareanumberofsettingswhichcontrolthiscreationprocess(Table17).Asaresult,theseoptionsallapplyinthepreambleonly.Thefree-standing-unitsoptioncontrolswhethertheunitmacrosexistoutsidefree-standing-unitsoverwrite-functionsofthe\unitand\qtyarguments.Whenthisoptionistrue,siunitxcreatesthemacrosforgeneraluse.Thestandardmethodtoachievethisdoesnotoverwriteanyexistingmacros:thisbehaviourcanbealteredusingtheoverwrite-commandsswitch.When`freestanding'unitmacrosarecreated,theirbehaviourcanbeadjustedbyspace-before-unitunit-optional-argumentuse-xspaceanumberofoptions.Thesearemainlyintendedforemulatingtheinputsyntaxofolderpackages.Theoptionunit-optional-argumentgivesthesamebehaviourfortheinputs\qty{10}{\metre}and\metre[10].Thespace-before-unitanduse-xspaceoptionscontrolthebehaviouratthe`ends'oftheunitmacros.Activatingspace-before-unitinsertsthenumber–unitspacebeforetheunitisprinted.Thisissuitablefortheinputsyntax30\metrebutdoesmeanthattheunitmacrosareincorrectlyspacedinrunningtext.Ontheotherhand,theuse-xspaceoptionattemptstocorrectlyspaceinputsuchas\metreisthesymbolformetres.4.10UsingunitsPartofthepowerofsiunitxistheabilitytoaltertheoutputformatforunitswithoutchangingtheinput.Thebehaviourofunitsisthereforecontrolledbyanumberofoptionswhichaltereithertheprocessingofunitsortheoutputdirectly(Table18).Theseparatorbetweeneachunitisstoredusingtheinter-unit-productoption.inter-unit-productThestandardsettingisathinspace:anothercommonchoiceisacentreddot.Togetthecorrectspacingitisnecessarytouse\ensuremath{{}\cdot{}}i

33 nthelattercase.34 Table18:Unitoutputopti
nthelattercase.34 Table18:Unitoutputoptions. OptionnameTypeDefault bracket-unit-denominatorSwitchtrueforbid-literal-unitsSwitchfalseinter-unit-productLiteral\,parse-unitsSwitchtrueper-modeChoicepowerper-symbolLiteral/qualifier-modeChoicesubscriptqualifier-phraseLiteralhemptyisticky-perSwitchfalseunit-font-commandLiteral\mathrm \unit{\farad\squared\lumen\candela}\\\unit[inter-unit-product=\ensuremath{{}\cdot{}}]{\farad\squared\lumen\candela}F2lmcdF2lmcdThehandlingof\perisalteredusingtheper-modechoiceoption.Thestandardper-modeper-symbolbracket-unit-denominatorsettingispower,meaningthat\pergeneratesreciprocalpowersforunits.Settingtheoptiontofractionusesthe\fracfunctiontotypesetthepositiveandnegativepowersofaunitseparately.\unit{\joule\per\mole\per\kelvin}\\\unit{\metre\per\second\squared}\\\unit[per-mode=fraction]{\joule\per\mole\per\kelvin}\\\unit[per-mode=fraction]{\metre\per\second\squared}Jmol�1K�1ms�2J molKm s2Theclosely-relatedpower-positive-firstsettingactsinthesamewaybutplacesallofthepositivepowersbeforeanynegativeones.Amol�1sAsmol�1\unit{\ampere\per\mole\second}\\\unit[per-mode=power-positive-first]{\ampere\per\mole\second}Itispossibletouseasymbol(usually/)toseparatethetwopartsofaunitbysettingper-modetosymbol;thesymbolusedisstoredusingthesettingper-symbol.Thismethodfordisplayingunitscanbeambiguous,andsobracketsareaddedunlessbracket-unit-denominatorissettofalse.Noticethatbracket-unit-denominatoronlyapplieswhenper-modeissettosymbolorsymbol-or-fraction.\sisetup{per-mode=symbol}%\unit{\joule\per\mole\per\kelvin}\\\unit{\metre\per\second\squared}\\\uni

34 t[per-symbol=\\text{div}\]{\joule\per\mo
t[per-symbol=\\text{div}\]{\joule\per\mole\per\kelvin}\\\unit[bracket-unit-denominator=false]{\joule\per\mole\per\kelvin}35 J/(molK)m/s2Jdiv(molK)J/molKTheoften-requested(butmathematicallyinvalid)repeated-symboloptionisalsoavail-abletorepeatthesymbolforeach\per.\unit[per-mode=repeated-symbol]{\joule\per\mole\per\kelvin}J/mol/KFinally,itispossibleforthebehaviourofthe\perfunctiontodependontheprevailingmathstyle.Settingper-modetosymbol-or-fractionwillusethesymbolsettingforinlinemath,andthefractionsettingwhenusedindisplaymath.\sisetup{per-mode=symbol-or-fraction}%$\unit{\joule\per\mole\per\kelvin}$\[\unit{\joule\per\mole\per\kelvin}\]\unit{\joule\per\mole\per\kelvin}\\$\displaystyle\unit{\joule\per\mole\per\kelvin}$\[\textstyle\unit{\joule\per\mole\per\kelvin}\]J/(molK)J molKJ/(molK)J molKJ/(molK)Bydefault,\perappliesonlytothenextunitgiven.3Bysettingthesticky-persticky-perag,thisbehaviourischangedsothat\perappliestoallsubsequentunits.\unit{\pascal\per\gray\henry}\\\unit[sticky-per]{\pascal\per\gray\henry}PaGy�1HPaGy�1H�1Unitqualierscanbeprintedinthreedifferentformats,setbythequalifier-modequalifier-modequalifier-phraseoption.Thestandardsettingissubscript,whiletheoptionsbracket,combineandphrasearealsopossible.Withthelastsettings,powerscanleadtoambiguityandareautomaticallydetectedandbracketsaddedasappropriate. 3ThisisthestandardmethodofreadingunitsinEnglish:forexample,Jmol�1K�1ispronounced`joulespermoleperkelvin'.36 \unit{\kilogram\of{pol}\squared\per\mole\of{cat}\per\hour}\\\unit[qualifier-mode=bracket]{\kilogram\of{pol}\squared\per\mole\of{cat}\per\hour}\\\

35 unit[qualifier-mode=combine]{\deci\bel\o
unit[qualifier-mode=combine]{\deci\bel\of{i}}kg2polmol�1cath�1kg(pol)2mol(cat)�1h�1dBiThephraseoptionisusedwithqualifier-phrase,whichallowsforexampleaspaceorotherlinkingtexttobeinserted.\sisetup{qualifier-mode=phrase,qualifier-phrase=\}%\unit{\kilogram\of{pol}\squared\per\mole\of{cat}\per\hour}\\\sisetup{qualifier-phrase=\\mbox{of}\}%\unit{\kilogram\of{pol}\squared\per\mole\of{cat}\per\hour}kgpol2molcat�1h�1kgofpol2molofcat�1h�1Normally,siunitxisusedwiththeunitparseenabled,andonlyprintsunitsdirectlyparse-unitsifthereisliteralinput.However,iftheinputisknowntobeessentiallyconsistentandhighperformanceisdesired,thentheparsercanbeturnedoffusingtheparse-unitsswitch.300MHz300MHz\qty{300}{\MHz}\\\qty[parse-units=false]{300}{\MHz}Someusersmayprefertocompletelydisabletheuseofliteralinputinunits,forbid-literal-unitsforexampletoenforceconsistency.Thiscanbeaccomplishedbysettingtheforbid-literal-unitsswitch.Withthisoptionenabled,onlymacro-basedunitscanbeusedinadocument.Thisonlyapplieswhenparse-unitsistrue.Thecommandusedtosetunitthemselvesmaybeadjustedusingtheunit-font-commandunit-font-commandoption.Thisistypicallysetto\mathrm.\unit{\lumen}\\\unit[unit-font-command=\mathit]{\lumen}lmlm4.11QuantitiesSomeoptionsapplytoquantities(thecombinationofanumberandaunit),ratherthantothenumbersorunitsalone(Table19).Usually,thecombinationofanumberandunitisregardedasasinglemathemat-allow-quantity-breaksicalentitywhichshouldnotbesplitacrosslines.However,therearecases(verylongunits,narrowcolumns,etc.)wherebreaksmaybeneeded.Thiscanbeturnedonusingtheallow-quantity-breaksoption.Some

36 llertext10mSomellertext10m\begin{min
llertext10mSomellertext10m\begin{minipage}{2.55cm}%GivesanunderfullhboxSomefillertext\qty{10}{\metre}\\\sisetup{allow-quantity-breaks}Somefillertext\qty{10}{\metre}\end{minipage}37 Table19:Optionsforquantities. OptionnameTypeDefault allow-quantity-breaksSwitchfalseextract-mass-in-kilogramsSwitchtrueprefix-modeChoiceinputquantity-productLiteral\,separate-uncertainty-unitsChoicebracket Theproductsymbolbetweenthenumberandunitissetusingthequantity-productnumber-unit-productoption.\qty{2.67}{\farad}\\\qty[quantity-product=\]{2.67}{\farad}\\\qty[quantity-product=]{2.67}{\farad}2.67F2.67F2.67FTheunitprexes(\kilo,etc.)arenormallygivenasletters.However,thepackageprefix-modeextract-mass-in-kilogramscanconverttheseintonumericalpowers.Thisiscontrolledbytheprefix-modeoption,whichtakesthevaluesinput,combine-exponentandextract-exponent.Theinputsettingleavestheprexesunchanged.Usingcombine-exponentwilladdanyexponentamountfromthenumbertotherstunit:thiswillmodifyanyexistingprex.Finally,usingextract-exponentwillremoveallprexesandexpressthemasanexponent.Thetreatmentofkilogramsinthiscasecanbesetusingextract-mass-in-kilograms:whentrue,thekiloprexisretainedaspartoftheunit.Thiswillmeanthatallgramsareconvertedtokilograms.\qty{1e3}{\metre\second}\\\qty[prefix-mode=combine-exponent]{1e3}{\metre\second}\\\qty{10}{\kilo\gram\squared\deci\second}\\\qty[prefix-mode=extract-exponent]{10}{\kilo\gram\squared\deci\second}\\\qty[prefix-mode=extract-exponent]{7.5}{\gram}\\\sisetup{extract-mass-in-kilograms=false}\qty{10}{\kilo\gram\squared\deci\second}\\\qty[prefix-mode=extract-exponen

37 t]{10}{\kilo\gram\squared\deci\second}\\
t]{10}{\kilo\gram\squared\deci\second}\\\qty[prefix-mode=extract-exponent]{7.5}{\gram}\\1103ms1kms10kg2ds1010�1kg2s7.510�3kg10kg2ds10105g2s7.5gWhenanumberhasmultipleparts(suchasaseparateuncertainty)thentheunitseparate-uncertainty-unitsmustapplytoallpartsofthenumber.Howthisisshowniscontrolledusingthe38 Table20:Optionsfortabularmaterial. OptionnameTypeDefault table-align-comparatorSwitchtruetable-align-exponentSwitchtruetable-align-text-afterSwitchtruetable-align-text-beforeSwitchtruetable-align-uncertaintySwitchtruetable-alignmentMetacentertable-alignment-modeChoicemarkertable-auto-roundSwitchfalsetable-column-widthLength0pttable-fixed-widthSwitchfalsetable-formatSpecial2.2table-number-alignmentChoicecentertable-text-alignmentChoicecenter separate-uncertainty-unitsoptions.Thestandardsettingisbrackets,whichwillplacetheentirenumericalpartinbracketsanduseasingleunitsymbol.Alternativeoptionsarerepeat(printtheunitforeachpartofthenumber)andsingle(printonlyoneunitsymbol:mathematicallyincorrect).\sisetup{separate-uncertainty}\qty{12.3(4)}{\kilo\gram}\\\qty[separate-uncertainty-units=bracket]{12.3(4)}{\kilo\gram}\\\qty[separate-uncertainty-units=repeat]{12.3(4)}{\kilo\gram}\\\qty[separate-uncertainty-units=single]{12.3(4)}{\kilo\gram}(12.30.4)kg(12.30.4)kg12.3kg0.4kg12.30.4kg4.12TabularmaterialProcessingofmaterialintablesobeysthesamesettingsasdescribedforthefunctionsalreadydescribed.However,therearesomesettingswhichapplyonlytothelayoutoftabularmaterial(Table20).Themethodusedbysiunitxtoalignnumbersisselectedusingthetable-alignment-modetable-alignmen

38 t-modeoption,whichmaybeoneofmarker,forma
t-modeoption,whichmaybeoneofmarker,formatorhnonei.Withthestandardsetting,hmarkeri,thepackagecentersthedecimalmarkerinatabularcolumn,potentiallyleav-ingwhitespaceattheshorterendofanumber.Thehformatimodeusesinformationfromthehtable-formatikeytoconstructamodel:thisisthenusedtodenethespaceavailabletoanumber.Forasymmetricalnumbers,thismethodisstronglypreferable.Finally,nonedisablesalignmententirely:numbersaresimplyparsed.Whentable-alignment-modeissettohformatiorhnonei,theplacementofthetable-number-alignmentnumber`block'withinthecellasawholeissetbythehtable-number-alignmentioption,whichmaybeoneofhlefti,hcenteriorhrighti.(Whentable-alignment-modeissettohmarkeri,thedecimalmarkerisalwayscenteredinthecell.)Thedifferentalignment39 Table21:AligningtheScolumn. SomeValuesSomeValuesSomeValuesSomeValues 2.34562.34562.34562.345634.234534.234534.234534.234556.783556.783556.783556.783590.47390.47390.47390.473 choicesareillustratedinTable21,whichusessomewhatexaggeratedcolumnheadingstoshowtherelativepositionofthecellcontents.\begin{table}\caption{Aligningthe\texttt{S}column.%\label{tab:S:align}}\centering\sisetup{table-format=2.4,table-alignment-mode=format}\begin{tabular}{@{}S[table-alignment-mode=marker]S[table-number-alignment=center]S[table-number-alignment=left]S[table-number-alignment=right]@{}}\toprule{SomeValues}&{SomeValues}&{SomeValues}&{SomeValues}\\\midrule2.3456&2.3456&2.3456&2.3456\\34.2345&34.2345&34.2345&34.2345\\56.7835&56.7835&56.7835&56.7835\\90.473&90.473&90.473&90.473\\\bottomrule\end{tabular}\end{table}Whenthealignmentmodeissettonone,numberaresimplycollectedandparsedwith

39 outanyfurtherprocessing,asillustratedinT
outanyfurtherprocessing,asillustratedinTable22.\begin{table}\caption{Parsingwithoutaligninginan\texttt{S}column.%\label{tab:S:parse}}\begin{tabular}{@{}SS[table-alignment-mode=none]@{}}\toprule{Decimal-centred}&{Simplecentring}\\\midrule12.345&12.345\\6,78&6,78\\-88.8(9)&-88.8(9)\\4.5e3&4.5e3\\\bottomrule40 Table22:ParsingwithoutaligninginanScolumn. Decimal-centredSimplecentring 12.34512.3456.786.78�88.8(9)�88.8(9)4.51034.5103 \end{tabular}\end{table}Whenthetable-alignment-modeissettoformat,siunitxusestheinformationtable-formatsetinhtable-formatitoconstructa`model'whichdenesthespacetoreserveforanumber.Thetable-formatkeyisinterpretedinmuchthesamewayasatablecell.Thenumericalpartshouldconsistofanumbershowinghowmanygurestoreserveineachpartoftheinput,plusanycomparators,signs,etc.AvarietyofexamplesaregiveninTable23.\begin{table}\caption{Reservingspacein\texttt{S}columns.%\label{tab:S:format}}\sisetup{table-alignment-mode=format,table-number-alignment=center,}\begin{tabular}{@{}S[table-format=2.2]S[table-format=2.2,table-number-alignment=right]S[table-format=2.2(1)]S[table-format=2.2(1),separate-uncertainty]S[table-format=+2.2]S[table-format=2.2e1]@{}}\toprule{Values}&{Values}&{Values}&{Values}&{Values}&{Values}\\\midrule2.3&2.3&2.3(5)&2.3(5)&2.3&2.3e8\\34.23&34.23&34.23(4)&34.23(4)&34.23&34.23\\56.78&56.78&56.78(3)&56.78(3)&-56.78&56.78e3\\3,76&3,76&3,76(2)&3.76(2)&+-3.76&e6\\\bottomrule\end{tabular}\end{table}Itisimportanttonotethatanypartsofanumbernotspeciedinthetableformatargumentaresettobeabsent(thenumberofguresissettozero).Settingthetable-formatop

40 tionalsoresetstable-alignment-modetoform
tionalsoresetstable-alignment-modetoformat.41 Table23:ReservingspaceinScolumns. ValuesValuesValuesValuesValuesValues 2.32.32.3(5)2.30.52.32.310834.2334.2334.23(4)34.230.0434.2334.2356.7856.7856.78(3)56.780.03�56.7856.781033.763.763.76(2)3.760.023.761106 Table24:Textbeforeandafternumbers. Values 2.345634.2345a56.7835now90.473 SpaceformaterialbeforeandaftertheScolumncanbereservedbygivingmodeltextaspartofthetable-formatkey.Thisisthenusedtoprovidethenecessarygapwhilemaintainingalignment(Table24).\begin{table}\caption{Textbeforeandafternumbers.%\label{tab:S:ends}}\sisetup{table-format={now}2.4{\textsuperscript{\emph{a}}}}\begin{tabular}{@{}S@{}}\toprule{Values}\\\midrule2.3456\\34.2345\textsuperscript{\emph{a}}\\56.7835\\now~90.473\\\bottomrule\end{tabular}\end{table}Whenprintingexponentsintables,thereisachoiceofaligningtheexpo-table-align-exponenttable-align-uncertaintynentpartsorhavingthesecloseuptothemantissa.Thisiscontrolledbythetable-align-exponentoption(Table25).Similarly,uncertaintypartswhichareprin-tedseparatelyfromthemantissacanbealignedorclosedup.Thisissetbythetable-align-uncertaintyoption(Table26).Finally,thesameapproachisavailableforthecomparatorwiththetable-align-comparatoroption(Table27).\begin{table}\caption{The\opt{table-align-exponent}option.%\label{tab:align:exp}}\sisetup{table-format=1.3e2}\begin{tabular}{@{}SS[table-align-exponent=false]@{}}\toprule{Header}&{Header}\\\midrule42 Table25:Thetable-align-exponentoption. HeaderHeader 1.21031.21031.23410561.2341056 Table26:Thetable-align-uncertaintyoption. HeaderHead

41 er 1.20.11.20.31.2340.0051.2
er 1.20.11.20.31.2340.0051.2340.005 1.2e3&1.2e3\\1.234e56&1.234e56\\\bottomrule\end{tabular}\end{table}\begin{table}\caption{The\opt{table-align-uncertainty}option.%\label{tab:align:uncert}}\sisetup{separate-uncertainty,table-format=1.3(1),}\begin{tabular}{@{}SS[table-align-uncertainty=false]@{}}\toprule{Header}&{Header}\\\midrule1.2(1)&1.2(3)\\1.234(5)&1.234(5)\\\bottomrule\end{tabular}\end{table}\begin{table}\caption{The\opt{table-align-comparator}option.%\label{tab:align:comp}}\sisetup{table-format=Γ2.2}\begin{tabular}{@{}SS[table-align-comparator=false]@{}}\toprule{Header}&{Header}\\\midruleΓ1.2&Γ1.2\\12.34&12.34\\\bottomrule\end{tabular}\end{table}Notemarkersareoftengivenintablesafterthenumericalcontent.Itmaybetable-align-text-beforetable-align-text-after43 Table27:Thetable-align-comparatoroption. HeaderHeader Γ1.2Γ1.212.3412.34 desirableforthesetocloseuptothenumbers.Whetherthistakesplaceiscontrolledbythetable-align-text-beforeand...-afteroption(Table28).\begin{table}\caption{Closingnotesuptotext.%\label{tab:S:notes}}\newrobustcmd\NoteMark[1]{%\textsuperscript{\emph{#1}}%}\sisetup{table-format={\NoteMark{a}}2.4}\begin{tabular}{@{}SS[table-align-text-before=false]@{}}\toprule{Values}&{Values}\\\midrule2.3456&2.3456\\\NoteMark{a}4.234&\NoteMark{a}4.234\\\NoteMark{b}.78&\NoteMark{b}.78\\\NoteMark{d}88&\NoteMark{d}88\\\bottomrule\end{tabular}\hfil\sisetup{table-format=2.4\NoteMark{a}}\begin{tabular}{@{}SS[table-align-text-after=false]@{}}\toprule{Values}&{Values}\\\midrule2.3456&2.3456\\34.234\NoteMark{a}&34.234\NoteMark{a}\\56.78\NoteMark{b}&56.78\NoteM

42 ark{b}\\90.4\NoteMark{c}&90.4\NoteMark{c
ark{b}\\90.4\NoteMark{c}&90.4\NoteMark{c}\\88\NoteMark{d}&88\NoteMark{d}\\\bottomrule\end{tabular}\end{table}Thecontentsoftablecellscanautomaticallyberoundedorzero-lledtothenum-table-auto-roundberofdecimaldigitsgivenforthedecimalpartofthetable-formatoption.Thismodeisactivatedusingthetable-auto-roundswitch,asillustratedinTable29.\begin{table}\centering44 Table28:Closingnotesuptotext. ValuesValues 2.34562.3456a4.234a4.234b0.78b0.78d88d88 ValuesValues 2.34562.345634.234a34.234a56.78b56.78b90.4c90.4c88d88d Table29:Thetable-auto-roundoption. HeaderHeader 1.21.2001.23451.235 \caption{The\opt{table-auto-round}option.%\label{tab:S:auto}}\sisetup{table-format=1.3}\begin{tabular}{@{}SS[table-auto-round]@{}}\toprule{Header}&{Header}\\\midrule1.2&1.2\\1.2345&1.2345\\\bottomrule\end{tabular}\end{table}Whentheparse-numbersoptionissettofalse,thenthealignmentcodefortablesparse-numberstakesadifferentapproach.Theoutputisalwayssetinmathmode,andalignmenttakesplaceattherstdecimalmarker.Thisisachievedbymakingitactiveinmathmode.Whenreservingspaceforcontentonlytheintegeranddecimalvaluesforthemantissaareconsidered(Table30).\begin{table}\caption{Aligningwithoutparsing.%\label{tab:S:nonparsed}}\sisetup{parse-numbers=false,table-format=3.3}\centering\begin{tabular}{@{}SS[table-number-alignment=center]S[table-number-alignment=right]S[table-number-alignment=left]@{}}\toprule{Somevalues}&{Somevalues}45 Table30:Aligningwithoutparsing. SomevaluesSomevaluesSomevaluesSomevalues 2.352.352.352.3534.23434.23434.23434.23456.78356.78356.78356.7833.7623.7623.7623.762p 2p 2p 2p 2 &{Somevalues}&{Somevalues}\\\

43 midrule2.35&2.35&2.35&2.35\\34.234&34.23
midrule2.35&2.35&2.35&2.35\\34.234&34.234&34.234&34.234\\56.783&56.783&56.783&56.783\\3,762&3,762&3,762&3.762\\\sqrt{2}&\sqrt{2}&\sqrt{2}&\sqrt{2}\\\bottomrule\end{tabular}\end{table}Incaseswheredatacoverarangeofvalues,printingusingaxedexponentindrop-exponentatablemaymakepresentationclearer.Inthesecases,droppingtheexponentvaluefromthetableisuseful.Thegeneralnumericaloptionsdrop-exponentcombinedwithexponent-mode=fixedcanbeusedtoachievethis(Table31).\begin{table}\caption{The\opt{table-omit-exponent}option.%\label{tab:exp:omit}}\begin{tabular}{@{}S[table-format=1.1e1]S[drop-exponent=true,exponent-mode=fixed,fixed-exponent=3,table-format=2.1,]@{}}\toprule{Header}&\multicolumn{1}{c@{}}{Header/\num[print-unity-mantissa=false]{e3}}\\\midrule1.2e3&1.2e3\\3e2&3e2\\1.0e4&1.0e4\\\bottomrule\end{tabular}\end{table}Usually,thewidthofthenumericalcolumnisallowedtovarydependingonthetable-column-widthtable-fixed-widthcontent.However,therearecaseswhereastrictlyxedwidthisdesirable.Forthesecases,thetable-fixed-widthandtable-column-widthoptionsareavailable.The46 Table31:Thetable-omit-exponentoption. HeaderHeader/103 1.21031.231020.31.010410 Table32:Fixed-widthcolumns. FlexibleFixed 1.231.2345.645.6 table-fixed-widthoptionactivatesxed-widthcolumns,whilsttable-column-widthdenesthetargetwidth(Table32).\begin{table}\caption{Fixed-widthcolumns.%\label{tab:width:fixed}}\begin{tabular}{@{}SS[table-column-width=2cm]@{}}\toprule{Flexible}&{Fixed}\\\midrule1.23&1.23\\45.6&45.6\\\bottomrule\end{tabular}\end{table}Thetable-column-widthoptioncanalsobeusedtoachievespecialeffects.One

44 exampleiscentringacolumnofnumbersunderaw
exampleiscentringacolumnofnumbersunderawideheading,withthenumbersthemselvesright-aligned(Table33).\begin{table}\centering\caption{Right-aligningunderaheading.%\label{tab:width:special}}\settowidth{\mylength}{Longheader}\sisetup{table-alignment-mode=none,table-column-width=\mylength,table-number-alignment=right}\begin{tabular}{@{}S@{}}\toprule{Longheader}\\\midrule47 Table33:Right-aligningunderaheading. Longheader 12.3321234 Table34:AligningtextinScolumns. ValuesValuesValues 992.435992.435992.4357734.23447734.23447734.234456.783456.783456.78343.74623.74623.7462 12.33\\2\\1234\\\bottomrule\end{tabular}\end{table}Cellcontentswhicharenotpartofanumbercanbeprotectedusingbraces,astable-text-alignmenttable-alignmentillustrated.Cellswhichcontainnonumericaldataatallarealignedusingthesettingspeciedbythetable-text-alignmentoption,whichrecognisesthevaluescenter,leftandright(Table34).\begin{table}\caption{Aligningtextin\texttt{S}columns.%\label{tab:S:text}}\sisetup{table-format=4.4}\centering\begin{tabular}{@{}SS[table-text-alignment=left]S[table-text-alignment=right]@{}}\toprule{Values}&{Values}&{Values}\\\midrule992.435&992.435&992.435\\7734.2344&7734.2344&7734.2344\\56.7834&56.7834&56.7834\\3,7462&3,7462&3,7462\\\bottomrule\end{tabular}\end{table}Thetablealignmentoptionstable-number-alignmentandtable-text-alignmenttable-alignment48 canbesettothesamevalueusingthetable-alignmentoption.Thiswillsetallthreealignmentoptionstothesamevalue(oneofcenter,rightorleft).4.13Localeoptionssiunitxallowstheusertoswitchbetweenthetypographicconventionsofdifferent(geo-localegraphical)areasbyusinglocales

45 .Currently,thepackageissuppliedwithcon&#
.Currently,thepackageissuppliedwithcongura-tionsforlocalesUK,US,DE(Germany),FR(French)andZA(SouthAfrica).Thelocaleoptionisusedtoswitchtoaparticularlocale.1.234m6,789m\qty{1.234}{\metre}\\\qty[locale=DE]{6.789}{\metre}4.14Preamble-onlyoptionsTheletter(s)usedtocreatetablecolumnscanbeadjustedusingthetable-column-typetable-column-typeoption.ThestandardsettingisS,butoneormorelettersmaybeused:thesemustbesingletokens.Forexample,providedthenumprintpackagehasnotbeenloaded,theletterncouldbeusedasthiswouldsuggestanumericalcolumn.5Upgradingfromversion2Thepackagehasbeenlargelyre-writteninternallybetweenversions2and3.Asignic-antnumberofkey–valuesettingshavenew,moredescriptive,names.Wherepossible,oldernamesaremappedtoneweronesinternally:youwillbewarnedinthelogifthisisthecase.ItispossibletousetheLATEX2#kernelmechanismtoloadthelastversion2releasefordocumentsthatcannotbesuccessfullyprocessedusingversion3.Thiscanbeachievedusing\usepackage{siunitx}[=2021-04-09]or\usepackage{siunitx}[=v2]Thisapproachwillworkwitholdersystemswhichstillhaveversion2installed,mean-ingthatyoucanreliablyuseittoworkbetweensystemswithdifferentversionsofsiunitx.Inversion3,thedocumentcommandshavebeenrevisedtobemoredescriptive.Assuch,thecommands\SI,\SIlist,\SIrangeand\siremainavailablebutarenotrecommendedforuseinnewdocuments.Usethenew\qty...commandsinstead:theyareclearerandinsomecasesveryslightlyfaster. \SI\SIlist\SIrange\si Somechangeshavebeenmadetothesemanticsofcommandsoroptions.Mostnotably•prexescannotnowbegivenwithoutunits;•prexescanonlybeinterconvertedwithnumbersaspartofaquantity,notasstan

46 d-aloneunits.49 SeeSection9.14forhowtowo
d-aloneunits.49 SeeSection9.14forhowtoworkwiththenewapproachifyouwanttoprintprexinformation.Thefontcontrolsystemhasbeencompletelyre-writtenforversion3.Themethodusedisentirelydifferentfromversion2.Emulationisthereforenotprovidedforalloutcomes:ifyouneednon-standardfontsettings,youwillneedtoadjustyoursource.SeeSection4.2formoredetailsontheoptionsavailableinthisarea.Theinputapproachforversion3isslightlymorestructuredandrestrictedthanforversion2.Aswellastheupdatednamesfordocumentcommands,thismeansthat•Productsofnumbersmustnowbegivenusingthededicated\numproductand\qtyproductcommands;•Quotientsofnumbersareonlysupportedasliterals;•Complexvaluesneedtobegivenusingthededicatedcommand\complexnum.Theoptionround-integer-to-decimal=falsehasbeenremoved,andwhilstthereisnotadirectreplacement,usersarelikelytondthatround-pad=falseoffersthedesiredoutcome.Anewapproachhasbeentakentoprovidingnon-Latinsymbolsforuseinunits:thesearenowhandleddirectlywhereneeded,forexampleinthedenitionofthe\microprex.Translationofxedstringsisnowcarriedoutusingthetranslationspackage.Ifyouhavemanuallysetuptranslationsinversion2usingtranslator,youwillneedtoloaditmanually.Theletterusedforanumericaltabularcolumncannowbeselectedbytheuser:theletterShasbeenretainedasthestandardinterface.Theunitcolumn(s)hasbeenremovedfromthisrelease.Itcanbeemulatedusingthecollcellpackage,forexample\usepackage{collcell}\newcolumntype{s}{Γ{\collectcell\unit}c{\endcollectcell}}or\usepackage{collcell}\newcolumntype{s}{&#x-800;{\collectcell\si}c{\endcollectcell}}Ifyouareusingtable-column-widthtohavexed-widthcol

47 umns,youalsonowneedtable-fixed-widthtose
umns,youalsonowneedtable-fixed-widthtosetthisoptionactive.Directsupportforloadingalocalcongurationle,siunitx.cfg,hasbeenre-moved.However,theapproachdescribedinSection9.15maybeusedtoachievethesameeffectwiththeadditionsmoreclearlyshownindocumentsources.6UnitchangesmadebyBIPMInadditiontothechangesinthesiunitxpackagedescribedinSection5,therearechangesintheunitsdenedbythebipminthe9thEditionofthesiBrochurewhicharereectedhere.Therearetwomajorareasofchange.Therstisinrespectofunitsacceptedforusewithsiunits.Inthe8thEditionofthesiBrochure,thefollowingunitswerelistedasacceptedforuseinspecialistelds•ångström(\angstrom)•bar(\bar)50 •barn(\barn)•knot(\knot)•millimetreofmercury(\mmHg)•nauticalmile(\nauticalmile)Thesearenolongerlistedinthe9thEdition,andsoaredeprecatedaspre-denedunitsbysiunitx.Theseunitswillissueawarningonrstuse,andusersshouldaddtheirowndenitionstothestartoftheirsourcestoavoidthis.Secondly,themovetoanewdenitionofbaseunitsmeansthatthetableofunitsdeterminedexperimentallyhasbeenremovedfromthesiBrochure.Thiscoversthefollowingunitsdenedbysiunitxinpreviousreleases•\bohr•\clight•\electronmass•\elementarycharge•\hartree•\planckbarThesearealsodeprecatedinsiunitxandusersshouldprovidetheirowndenitions.Inadditiontothesetwomajorblocks,theunit\atomicmassunithassimilarde-precatedstatus:thiswaslistedaswithexperimentally-determinedunitsinthe8thEditionofthesiBrochurebutisequivalenttothedalton,aunitwhichremainsaccep-ted.7LocalisationThetranslationspackageprovidesastructuredframeworkforlo

48 calisationofwordsandphrases,andispartoft
calisationofwordsandphrases,andispartofthelargerbeamerbundle.Thetranslationspackageprovidesthe\translatemacro,whichwillprovideappropriatetranslationsbasedonthecurrentbabelorpolyglossialanguagesetting.Iftranslationsisavailable,siunitxwillloaditandalterthestandardsettingsforthelist-final-separatorandrange-phraseoptionstoread:\sisetup{list-final-separator={\GetTranslation{and}},list-pair-separator={\GetTranslation{and}},range-phrase={\GetTranslation{to(numericalrange)}},}Ifthecurrentlanguageisknowntothetranslatorpackagethentheresultwillbelocal-isedtext.ThepreambleforthismanualloadsEnglish,French,GermanandSpanishasoptions,andalsoloadsthebabelpackage:51 1,2and31to101,2et31à101,2und31bis101,2y31a10%InEnglishbydefault\numlist{1;2;3}\\\numrange{1}{10}\\\selectlanguage{french}%\numlist{1;2;3}\\\numrange{1}{10}\\\selectlanguage{german}%\numlist{1;2;3}\\\numrange{1}{10}\\\selectlanguage{spanish}%\numlist{1;2;3}\\\numrange{1}{10}8CompatibilitywithotherpackagesIngeneral,siunitxshouldbeusablewithotherpackageswithoutinterference.Whenthephysicspackageisloadedbeforesiunitx,thecommand\qtyisnotdened:userswillneedtousetheversion2command\SI.9Hintsforusingsiunitx9.1Adjusting\litreand\literAsdetailedearlier,theunitmacros\litreand\literarebothavailableforlitres.Withthestandardsettings,\literisdenedas\DeclareSIUnit\liter{\litre}meaningthat\litreisthe`canonical'unit.Thisfollowsthesamerelationshipasexistsbetween\metreand\meter.Incontrasttometres,however,thereismorelikelihoodofuserswishingtoad-justtheappearanceoflitres:both`l'and`L'arecommonlyused.Therecommendedapproachtoadjustmentistore-declar

49 ethe\litremacro,as\literwillfollowauto-m
ethe\litremacro,as\literwillfollowauto-matically.\DeclareSIUnit\litre{l}9.2EnsuringtextormathoutputThemacros\ensuremathand\textshouldbeusedtoensurethataparticularitemisalwaysprintedinthedesiredmode.Somemathematicaloutputdoesnotworkwellin\mathrm(thefontsettingusedbysiunitxforprintingunits).Theeasiestwaytosolvethisistousetheconstruction\text{\ensuremath{...}},whichwillprintthematerialinthestandardmathematicsfontwithoutaffectingtherestoftheoutput.Insomecases,simplyforcing\mathnormalwillsufce,butthisislessreliablewithnon-Latincharacters.52 Table35:ValuesasmacrosinScolumns. SomeValues 12348.8123412348.8123412348.8123412348.8123412348.81234 9.3ExpandingcontentintablesWhenprocessingtables,siunitxwillexpandanythingstoredinsideamacro,unlessitislongorprotected.LATEX2#robustcommandsarealsodetectedandarenotexpanded(Table35).Valueswhichwouldotherwisebeexpandedcanbeprotectedbywrappingtheminasetofbraces.AsTEXitselfwillexpandthersttokeninatablecellbeforesiunitxcanactonit,usingthe#-TEXprotectedmechanismistherecommendedcourseofactiontopreventexpansionofmacrosintablecells.(Asisshowninthetable,TEX'sexpansionofLATEX2#robustcommandscanleadtounexpectedresults.)\begin{table}\caption{Valuesasmacrosin\texttt{S}columns.%\label{tab:xmpl:macro}}\newcommand*\myvaluea{1234}\newcommand\myvalueb{1234}\DeclareRobustCommand*\myvaluec{1234}\protected\def\myvalued{1234}\begin{tabular}{@{}S@{}}\toprule{SomeValues}\\\midrule\myvaluea8.8\myvaluea\\%Bothexpanded\myvalueb8.8\myvalueb\\%FirstexpandedbyTeX%tonumbers\myvaluec8.8\myvaluec\\%FirstexpandedbyTeX%butnottonumbers!\myvalued8.8\myvalued\\%Neitherexpande

50 d{\myvaluea\8.8\myvaluea}\\%Neitherexpan
d{\myvaluea\8.8\myvaluea}\\%Neitherexpanded\bottomrule\end{tabular}\end{table}Itispossibletousecalculatedvaluesintables.Forthistowork,thecalculationmusttakeplacebeforeattemptingtoparsethenumber(theparsercannot`know'allofthepossiblevaluesinsideanexpression).Thisismostconvenientlyhandledusingthexfppackage,whichisdistributedaspartoftherequiredsupportforsiunitx.ThegeneralapproachisillustratedinTable36\begin{table}\caption{Calculatedvalues.%\label{tab:xmpl:calc}}\newcommand{\valuea}{66.7012}\newcommand{\valueb}{66.0212}\newcommand{\valuec}{64.9026}53 Table36:Calculatedvalues. ValueDoubled 66.7012133.402466.0212132.042464.9026129.8052 Table37:Displayingadatatooltable.value6.701266.021264.902\begin{tabular}{@{}S[table-format=2.4]S[table-format=3.4]@{}}\toprule{Value}&{Doubled}\\\midrule\valuea&\fpeval{\valuea*2}\\\valueb&\fpeval{\valueb*2}\\\valuec&\fpeval{\valuec*2}\\\bottomrule\end{tabular}\end{table}Amoresophisticatedapproachistogeneratetherowsthemselvesfromadatabase:thisisillustratedinSection9.4.9.4UsingsiunitxwithdatatoolAsillustratedinTable36,siunitxcanbeusedtotypesetdatastoredusingdatatool.Forquicklydisplayingthecontentsoftables,datatooloffersthe\DTLshowtablemacro.ThiswillonlyworkwithScolumnsifnumberparsingisturnedoff(Table37).\DTLnewdb{moredata}\DTLnewrow{moredata}\DTLnewdbentry{moredata}{value}{6.7012}\DTLnewrow{moredata}\DTLnewdbentry{moredata}{value}{66.0212}\DTLnewrow{moredata}\DTLnewdbentry{moredata}{value}{64.902}\begin{table}\caption{Displayinga\textsf{datatool}table.%\label{tab:xmpl:datatool}}\sisetup{parse-numbers=false,table-format=2.4}\renewcommand*\dtlrealalign{S

51 }\DTLdisplaydb{moredata}\end{table}54 Ta
}\DTLdisplaydb{moredata}\end{table}54 Table38:Calculatedvaluesusingdatatool. ValueDoubled 66.7012133.402466.0212132.042464.9026129.8052 Thedatatoolpackagemayalsobeusedtocreateon-the-ytablesusingcalcula-tions.Forexample,thedemonstrationinTable36maybeachievedwithoutneedingtowriteouteachrow,asshowninTable38.Anextracolumnisusedtocontainthecalculationsinthiscase.\begin{table}\caption{Calculatedvaluesusing\pkg{datatool}.%\label{tab:xmpl:datatool-calc}}\DTLnewdb{data}\DTLnewrow{data}\DTLnewdbentry{data}{value}{66.7012}\DTLnewrow{data}\DTLnewdbentry{data}{value}{66.0212}\DTLnewrow{data}\DTLnewdbentry{data}{value}{64.9026}\begin{tabular}{@{}S[table-format=2.4]S[table-format=3.4]@{}l@{}}\toprule{Value}&{Doubled}&\DTLforeach{data}{\myvalue=value}{%\DTLiffirstrow{\\\midrule}{\\}%\myvalue&%Firstcolumn\fpeval{\myvalue*2}%secondcolumn&}\\\bottomrule\end{tabular}\end{table}9.5UsingunitsinsectionheadingsandbookmarksThesiunitxcodeisdesignedtoworkcorrectlywithfunctionsinheadings.Theywillprintcorrectlyinheadingsandinthetableofcontents.Asillustratedhere,thestandardbehaviouristoignorefontchanges.Whenthehyperrefpackageisloaded,thefunctionsautomatically`degradegracefully'toproduceusefulinformationinpdfbookmarks.Ifyouwantmorecontroloverthebookmarktext,usethe\texorpdfstringfunctionfromhyperref,forexample:\section{Sometext\texorpdfstring{\unit{\joule\per\mole\per\kelvin}}{Jmol-1K-1}%}55 Table39:Formattingunrelatednumbers. Header 12012.31234012.021231 Youmaynditusefultoloadhyperrefwiththeunicodeoption,asthiswillallowWtoappearinbookmarks.Withouttheoption,theencodingusedbyhyperrefdoesnotsupportthi

52 ssymbol.9.6Aleft-alignedcolumnvisuallyce
ssymbol.9.6Aleft-alignedcolumnvisuallycentredunderaheadingWhenyouhaveacolumnofnon-relatednumbers,theusualadviceistomaketheseleft-alignedandthencentretheresultingcolumnundertheheading.Withthedcolumnpackage,thatwouldbedonewithsomethinglikeD{x}{}{5.0}.Thisissomethingofanabuseofthenatureofanumber,butcanalsobedoneusingsiunitx(Table39).\begin{table}\caption{Formattingunrelatednumbers.%\label{tbl:xmpl:unrel}}\centering\begin{tabular}{@{}S[table-format=5.0,parse-numbers=false,input-decimal-markers=x]@{}}\toprule\multicolumn{1}{@{}c@{}}{Header}\\\midrule120\\12.3\\12340\\12.02\\123\\1\\\bottomrule\end{tabular}\end{table}56 Table40:Regressiontables HeaderHeaderHeader 1.234�1.234�1.230(0.053)(0.053)(0.053) 9.7RegressiontablesInsomesubjectareas,itiscommontopresentregressionvaluesorsimilar,whichfeatureanuncertaintyvalueinparenthesisonthelinebelowthemainvalue.Astheseareseparatecells,theycannotbeenteredusingsiunitxinonevalue.Thereareacoupleofwaysofformattingthemusingthepackage,dependingonwhetherthevaluesalsoneedtobeparsed.Whereparsingisnotrequired,themoststraight-forwardmethodisavailable:provideamodelformatallowingspaceforanextra`digit'ateachend,whichwillthenallowfortheparenthesis.Ifasignisappliedtothenumber,itmaynotbeneces-sarytoadda`digit'fortheleadingbracket.Ifparsingisalsorequired,thisapproachcannotbeemployed.Instead,theparsingneedstobeadjustedsuchthat(and)arenottreatedaspartofthenumber,andtable-align-text-preissettofalsesuchthatthesewillbeplacednexttothenumericalpart.ThesemethodsareillustratedinTable40.\begin{table}\caption{Regressiontables%\label{tab:regression}}\begin{tabular}{

53 @{}S[table-format=2.4,parse-numbers=fals
@{}S[table-format=2.4,parse-numbers=false]S[table-format=+1.4,parse-numbers=false]S[input-open-uncertainty=,input-close-uncertainty=,minimum-decimal-digits=3,%(table-format=+1.3),table-align-text-pre=false]@{}}\toprule{Header}&{Header}&{Header}\\\midrule1.234&-1.234&-1.23\\(0.053)&(0.053)&(0.053)\\\bottomrule\end{tabular}\end{table}57 9.8MaximisingperformanceBoththenumberandunitparsersrequiresignicanteffortintermsofTEXprogram-ming.Forinputthatdoesnotrequiresuchprocessing,themaximumperformanceforsiunitxcanthereforebeobtainedbyturningoffbothsystems:7.3Hz7.3Hz7.3Hz\qty{7.3}{\Hz}\\\qty[parse-units=false]{7.3}{\Hz}\\\qty[parse-numbers=false,parse-units=false]{7.3}{\Hz}Fortables,anysettingsthatcanbegivenbeforethetableareonlyparsedonce,whereasgivenintheoptionalargumenttoStheyarereadinevercell.Assuch,youshouldfavour\begin{table}\sisetup{...}\begin{tabular}{S}...forcommonsettings.9.9Specialconsiderationsforthe\kWhunitThestandardsettingsprovidethe\kWhunitsetupwithnospacingbetweenthe`kW'andthe`h'unittogive`kWh'.However,thisonlyapplieswhentheunitisgivenonitsown:combinationswillfollowthenormalruleskWhkWhm�1\unit{\kWh}\\\unit{\kWh\per\metre}Thisisbecausetheunit\kWhisdenedsothatitcanstillbevariedbyaltering\kilo,\wattand\hour,andsothattheprexcanstillbeturnedintoanumber.However,someusersmayprefertohaveanon-exiblemacrowhichneveraddsaspace.Thiscanbeachievedbyredening\kWhwith\DeclareSIUnit,byaddedanalternativedenition\DeclareSIUnit\kWh{kWh}\DeclareSIUnit\KWH{kWh}orofcoursebyusingliteralunitinput.kWhm�1kWhm�1\unit{\KWH\per\metre}\\\unit{kWh.m^{-1}}Anotherpointtono

54 ticeisthatthe\permacroappliestothenextun
ticeisthatthe\permacroappliestothenextunit,andnotanentireunitcombination.ThusincdkW�1h\unit{\candela\per\kWh}\perappliestothewattsbutnottothehours.Inthiscase,theunitsneedtobewrittenoutinfullorthesticky-peroptionshouldbeused.\unit{\candela\per\kilo\watt\per\hour}\\\unit[sticky-per]{\candela\per\kWh}cdkW�1h�1cdkW�1h�158 9.10CreatingacolumnwithnumbersandunitsUsually,numbersinatableshouldbegivenwiththeunitsinthecolumnheading.However,therearecaseswhereaseriesofdataarebestpresentedinatablebuthavedifferentunits.Therearetwowaystodothis(Table41).Therstistoplacetheunitsintherstcolumnofthetable,whichmakessenseifthereareseveralrelateditemsinthetable.Thesecondmethodistogeneratetwocolumns,onefornumbersandasecondforunits,andthentoformatthesetogivethevisualeffectofasinglecolumn.Thelatereffectismostappropriatewhenonlyonesetofnumbersarepresentedinatable.Thismethodrequirescellcontentiscollected,easiesttodousingthecollcellpackage.\begin{table}\caption{Tableswherenumbershavedifferentunits.%\label{tab:xmpl:mixed}}\hfil\begin{tabular}{@{}Γ{$}l{$}S[table-format=3.3(1)]S[table-format=3.3(1)]@{}}\toprule&{One}&{Two}\\\midrulea/\unit{\pm}&123.4(2)&567.8(4)\\\beta/\unit{\degree}&90.34(4)&104.45(5)\\\mu/\unit{\per\mm}&0.532&0.894\\\bottomrule\end{tabular}\hfil\begin{tabular}{@{}S[table-format=1.3]@{\,}&#x-800;{\collectcell\unit}l{\endcollectcell}@{}}\toprule\multicolumn{2}{@{}c}{Heading}\\\midrule1.234&\metre\\0.835&\candela\\4.23&\joule\per\mole\\\bottomrule\end{tabular}\hfil\end{table}59 Table41:Tableswherenumbershavedifferentunits. OneTwo a/pm123.4(2)567.8(4)b/°90.34(4)104.45(

55 5)m/mm�10.5320.894 Heading 1.234m0.83
5)m/mm�10.5320.894 Heading 1.234m0.835cd4.23Jmol�1 Table42:Headerrowinatable. 123.45623.45123.43.4569.11TableswithheadingrowsAcommonformatfortablesistomaketheheadingrowvisuallydistinctusingabackgroundcolorandboldtext.IfnumbersappearinsuchaheadingrowwithinanScolumnthengettingtheappearancerightcanbechallenging.Thebestapproachistomakethe\bfseriesmacro`robust'(asdemonstratedinSection9.3),thentousethismacrotomaketheheadingcellsbold.ThisapproachisillustratedinTable42,alongwiththeuseof\rowcolortoprovideabackgroundcolor.\begin{table}\caption{Headerrowinatable.%\label{tab:xmpl:headers}}\robustify\bfseries\centering\begin{tabular}{@{}S[text-series-to-math,table-format=3.3]@{}}\rowcolor[gray]{0.9}\bfseries123.456\\23.45\\123.4\\3.456\\\end{tabular}\end{table}9.12AssociatingalocalewithababellanguageItispossibletoinstructthebabelpackagetoswitchtoaparticularsiunitxlocalewhenchanginglanguage.Thiscanbedoneusingthebabel\extrashlanguageisystem.Forexample,toassociatetheDElocalewiththegermanbabellanguage,theappropriatecodewouldbe\addto\extrasgerman{\sisetup{locale=DE}}9.13Symbolic`digits'Insomecasesyoumaywanttouse`digits'whichdonotfallwithintheusualset0123456789.Thiscanbedonebysettingtheinput-digitsoption,butbearingin60 mindthatthiswillaffect(prevent)forexamplerounding.\sisetup{input-digits=0123456789\pi}%\num{4\pie-7}4p10�7Eachextraentryshouldbeasingletoken,andshouldeitherhaveadenitionwhichissafeinbothmathandtextmode,orshouldonlybeusedwhentheoutputmodeisknown.Itmaybenecessarytomakesometokensrobustusingetoolboxforthistowork,forexample\robustify\dots\sisetup{input-digits=01234567

56 89\dots}%\qty{0,4066\dots}{\metre\square
89\dots}%\qty{0,4066\dots}{\metre\squared}0.4066...m29.14DemonstratingprexesAssiunitxcontainsdataaboutthenumericalvaluesofunitprexes,youmaywishtoprintthisinanautomatedway.Prexescannotbegivenontheirown,butitispossibletocreatea`donothing'unit.\DeclareSIUnit\noop{\relax}whichcanthenbeusedtoshowjusttheprexsymbol.Y\unit{\yotta\noop}Toshowjustthenumericalvalueofaprex,youwillneedtouse\qtyandappropriatesettings.\qty[prefix-mode=extract-exponent,print-unity-mantissa=false]%{1}{\yotta\noop}1024Thismaybeconvenientlywrappedupinsideadocumentcommand,forexample\NewDocumentCommand\prefixvalue{m}{%\qty[prefix-mode=extract-exponent,print-unity-mantissa=false]{1}{#1\noop}}9.15Creatingasetofpre-denedunitsTherearemanyunitswhichsitoutsideofthosedenedinthe(current)siBrochurewhichareofusetomanypeople.MostobviousarethosewhichhavebeendetailedinpreviouseditionsoftheBrochure,asdescribedinSection6,buttherearemanyothers.Itisoftenconvenienttohaveapre-denedsetofusefulunitsavailablewithoutneedingtocopythefullsetofdenitionsintoeachsourcele.Atthesametime,itisimportantthatsuchsourcesdoshowthattheyareusingunitsnotdenedbythecorepartofsiunitx.Themoststraight-forwardwaytoachievethisistocreateaseparatele,forexamplesiunitx-local-units.tex,andplaceitinyourlocalTEXtree(usually~/texmf/tex/latex/onLinux,~/Library/texmf/tex/latex/onmacOSor&#xname;C:\Users\\\\onWindows).Thiscanthenbeloadedinthepreambleusing61 %Loaduseful'local'units\input{siunitx-local-units}10Using(SI)unitsConsistentandlogicalunitsareanecessityforscienticwork,andhaveapplicabilityeverywhere.Historically,a

57 numberofsystemshavebeenusedforphysicalun
numberofsystemshavebeenusedforphysicalunits.siunitswereintroducedbytheConférenceGénéraledesPoidsetMesures(cgpm)in1960.siunitsareacoherentsystembasedonsevenbaseunits,fromwhichallotherunitsmaybederived.Atthesametime,physicalquantitieswithunitsaremathematicalentities,andassuchwaythattheyaretypesetisimportant.Inmathematics,changesoftype(suchasusingbold,italic,sansseriftypefaceandsoon)conveyinformation.Thismeansthatrulesexistnotonlyforthetypeofunitstobeusedunderthesisystem,butalsothewaytheyshouldappearinprint.AdviceonbestpracticehasbeenmadeavailablebytheNationalInstituteofStandardsandTechnology(nist)[2].Asbetsanagreedinternationalstandard,thefullrulesaredetailed.Itisnotappropriatetoreproducetheseintotalityhere;instead,ausefulsummaryofthekeypointsisprovided.ThefulldetailsareavailablefromtheBureauInternationaldesPoidsetMesures[1].Thesiunitxpackagetakesaccountoftheinformationgivenhere,sofarasispos-sible.Thusthepackagedefaultsfollowtherecommendationsmadefortypesettingnumbersandunits.Spacingandsoforthishandledinsuchawayastomakeimple-mentingtherules(relatively)easy.10.1UnitsTherearesevenbasesiunits,listedinTable1.4Thebaseunitshavebeenchosensuchthatallphysicalquantitiescanbeexpressedusinganappropriativecombinationoftheseunits,needingnoothersandwithnoredundancy.Allotherunitswithinthesisystemareregardedas`derived'fromthesevenbaseunits.Atthemostbasic,allothersiunitscanbeexpressedascombinationsofthebaseunits.However,manyunits(listedinTable2)haveaspecialnameandsymbol.Mostoftheseunitsaresimplecombinationsofoneormorebaseunits(raisedtopowersasappropriate).Aseriesofsiprexesfordecimalmu

58 ltiplesandsub-multiplesareprovided,andca
ltiplesandsub-multiplesareprovided,andcanbeusedasmodiersforanysiunit(eitherbaseorderivedunits)withtheexceptionofthekilogram.TheprexesarelistedinTable4.Nospaceshouldbeusedbetweenaprexandtheunit,andonlyasingleprexshouldbeused.EventhedegreeCelsiuscanbegivenaprex,forexample1m°C.Itisimportanttonotethatthekilogramistheonlysiunitwithaprexaspartofitsnameandsymbol.Onlysingleprexmaybeused,andsointhecaseofthekilogramprexnamesareusedwiththeunitname`gram'andtheprexsymbolsareusedwiththeunitsymbolg.Forexample110�6kg=110�3g=1mg.Theapplicationofsiunitsismeanttoprovideasinglesetofunitswhichensureconsistencyandclarityacrossallareas.However,otherunitsarecommonismanyareas,andarenotwithoutmerit.Theunitsprovidedbysiunitxbydefaultdonot 4Somebaseunitsneedothersdenedrst;thereisthereforearequiredorderofdenition.62 includeanyofthese;onlyunitswhicharepartofthesisetorareacceptedforusewithsiunitsaredened.However,severalothersetsofunitscanbeloadedasoptionalmodules.Thebinaryprexesandunits(Table6)arethemostobviousexample.Thesearenotpartofthesispecications,buttheprexnamesarederivedfromthoseinTable4.Otherunitsarenormallytobeavoidedwherepossible.siunitsshould,inthemain,bepreferredduetotheadvantagesofcleardenitionandself-consistencythisbrings.However,therewillprobablyalwaysbeaplaceforspecialistornon-standardunits.Thisisparticularlytrueofunitsderivedfrombasicphysicalconstants.Therearealsomanyareaswherenon-standardunitsareusedsocommonlythattodootherwiseisdifcultorimpossible.Forexample,mostsyntheticchemistsmeasurethepressureinside

59 vacuumapparatusinmmHg,partlybecausethemo
vacuumapparatusinmmHg,partlybecausethemostcommongaugeforthetaskstillusesacolumnofmercurymetal.Forthesereasons,siunitxallowsdenitionofsuchunits.10.2MathematicalmeaningAsexplainedearlier,aquantitycombinationisasinglemathematicalentity.Thishasimplicationsforhowboththenumberandtheunitshouldbeprinted.Firstly,thetwopartsshouldnotbeseparated:aquantityisaproductofthenumberandtheunit.Withtheexceptionofthesymbolsforplaneangles(°,0and00),thebipmspecieseitheraspaceorhalf-height(centred)dotshouldbeused[1].Aspacefor\qty{10}{\percent}\\andalsofor\qty{100}{\degreeCelsius}\\butnotfor\ang{1.23}.Aspacefor10%andalsofor100°Cbutnotfor1.23°.Themathematicalmeaningofunitsalsomeansthattheshape,weightandfamilyareimportant.Unitsaresupposedtobetypesetinanupright,mediumweightfont.Italic,boldandsansserifareallusedmathematicallytoconveyothermeanings.(Inanallsanserifdocument,usingsansserifforunitsisreasonable.)Thesiunitxpackagedefaultsagainfollowthisconvention:anylocalsettingsareignored,andusesthecurrentuprightmathfont.However,thereareoccasionswherethismaynotbethemostdesirablebehaviour.Aclassicexamplewouldbeinanall-boldsectionheading.Asthesurroundingtextisbold,somepeoplefeelthatanyunitsshouldfollowthis.Unitsshould\textbf{notbebold:\qty{54}{\farad}}\\\textbf{Butperhapsinarunningblock,\\itmightlookbetter:\qty[text-series-to-math]{54}{\farad}}Unitsshouldnotbebold:54FButperhapsinarunningblock,itmightlookbetter:54FSymbolsforunitsformedfromotherunitsbymultiplicationareindicatedbymeansofeitherahalf-height(thatis,centred)dotora(thin)space.63 $\unit{\metre\second}=\text{metresecond}$\\$\unit{\milli\second}

60 =\text{millisecond}$\\\sisetup{inter-uni
=\text{millisecond}$\\\sisetup{inter-unit-product=\ensuremath{{}\cdot{}}}$\unit{\metre\second}=\text{metresecond}$\\$\unit{\milli\second}=\text{millisecond}$ms=metresecondms=millisecondms=metresecondms=millisecondTherearesomecircumstancesunderwhichitiscommonpracticetoomitanyspaces.TheclassicexampleiskWh,where`kWh'doesnotaddanyusefulinformation.Ifusingsuchaunitrepeatedly,usersofsiunitxareadvisedtocreateacustomunittoensureconsistency.Itisimportanttonotethatwhilethisiscommonpractice,itisnotallowedbythebipm[1].Symbolsforunitsformedfromotherunitsbydivisionareindicatedbymeansofavirgule(obliquestroke,slash,/),ahorizontalline,ornegativeexponents.5However,toavoidambiguity,thevirgulemustnotberepeatedonthesamelineunlessparenthesesareused.Thisisensuredwhenusingnamedunitmacrosinsiunitx,whichwill`trap'repeateddivisionandformatitcorrectly.Incomplicatedcases,negativeexponentsaretobepreferredoverotherformats.\unit{\joule\per\mole\per\kelvin}\\\unit[per-mode=fraction]{\joule\per\mole\per\kelvin}\\\unit[per-mode=symbol]{\joule\per\mole\per\kelvin}Jmol�1K�1J molKJ/(molK)Productsanderrorsshouldshowwhatunitappliestoeachnumbergiven.Thus(23)misanorderedsetoflengthsofageometricarea,whereas23misalength(andequalto6m).Thus,isnotaproductbutisamathematicaloperator;inthesameway,a23matrixisnota6matrix!Insomeareas,areasandvolumesaregivenwithseparatedunitsbutaunitraisedtotheappropriatepower:23m2.Althoughthisdoesdisplaythecorrectoverallunits,itispotentially-confusingandisnotencouraged.Caremustbetakenwhenwritingrangesofnumbers.Forpurelynumericalvalues,itiscommontouseanen-dashtoshow

61 arange,forexample`seepages1–5'.Onth
arange,forexample`seepages1–5'.Ontheotherhand,physicalquantitiescouldbemisinterpretasnegativevaluesifwritteninthisway.Asthequantityisasinglemathematicalentity,writingthevalueswithanen-dashfollowedbyasingleunitisalsoincorrect.Asaresult,usingtheword`to'isstronglyrecommended.1mto5mlong.\qtyrange{1}{5}{\metre}long.10.3GraphsandtablesIngraphsandtables,repetitionoftheunitsfollowingeachentryoraxismarkiscon-fusingandrepetitive.Itisthereforebesttoplacetheunitinthelabelpartoftheinformation.Placingtheunitinsquarebracketsiscommonbutmathematicallypoor.6 5Noticethatavirguleandasolidusarenotthesamesymbol.6Forexample,foranaccelerationa,theexpression[a]isthedimensionsofa,i.e.lengthpertimesquaredinthiscase.64 Table43:Anexampleoftablelabelling. EntryLength/m 11.123421.142531.757841.9560 Muchbetteristoshowdivisionofallquantitiesbytheunit,whichleavestheentriesasunitlessratios.ThisisillustratedinTable43andFigure1.\begin{table}\caption{Anexampleoftablelabelling.%\label{tab:xmpl:unitless}}\sisetup{table-number-alignment=center,table-format=1.4}\begin{tabular}{@{}cS@{}}\topruleEntry&{Length/\unit{\metre}}\\\midrule1&1.1234\\2&1.1425\\3&1.7578\\4&1.9560\\\bottomrule\end{tabular}\end{table}\begin{figure}\begin{tikzpicture}\begin{axis}[xlabel=$t/\unit{\second}$,xmax=6,xmin=0,ylabel=$d/\unit{\metre}$,ymin=0]\addplot[smooth,mark=*]plotcoordinates{(0,0)(1,5)(2,8)(3,9)(4,8)(5,5)(6,0)};\end{axis}\end{tikzpicture}\caption{Anexampleofgraphlabelling.%65 0 1 2 3 4 5 6 0 2 4 6 8 t/s d/m Figure1:Anexampleofgraphlabelling.\label{fig:xmpl:unitless}}\end{figure}Inmostcases,addingexponentvaluesinthebodyofatableis

62 lessdesirablethanaddingaxedexponentt
lessdesirablethanaddingaxedexponenttocolumnheaders.AnexampleisshowninTable44.Theuseof\multicolumnisneededhereduetothe`';without\multicolumn,thetitlesarefollowedby`kg'!\begin{table}\caption{Badandgoodcolumns.%\label{tab:good}}\sisetup{table-number-alignment=center}\begin{tabular}{@{}cS[table-format=1.3e1]@{\,\unit{\kilogram}}S[table-format=2.2]@{}}\topruleEntry&\multicolumn{1}{c}{Mass}&{Mass/\qty[print-unity-mantissa=false]{e3}{\kilogram}}\\\midrule1&4.56e3&4.56\\2&2.40e3&2.40\\3&1.345e4&13.45\\4&4.5e2&0.45\\\bottomrule\end{tabular}\end{table}66 Table44:Badandgoodcolumns. EntryMassMass/103kg 14.56103kg4.5622.40103kg2.4031.345104kg13.4544.5102kg0.45 11InstallationFormostusers,therewillbenoneedtoexplicitlyinstallsiunitx:itisavailablefromthepackagemanagementsystemincurrentTEXLiveandMiKTEXsystems.Formanualinstallation,thepackageisavailablefromctan.Aswellastherawsourceles,ctanholdthepackageasapre-extractedziple,siunitx.tds.zip.Thelaterismostconvenientformostusers:simplyunzipthisinyourlocaltexmfdirectory.ThepackagerequiresLATEX3supportasprovidedinthel3kernelandl3packagesbundles.BothoftheseareincludedinTEXLiveandMiKTEX,orareagainavailableinready-to-installformfromctan.12ThanksManyusershaveprovidedfeedback,bugreportsandideasfornewfeaturesforsiunitx:thankstoallofthem.ParticularthankstoStefanPinnow,whohastakentheleadroleasbetatesterforsiunitx,ndingincorrectoutput,baddocumentationandtheoddspellingmistakeinthedocumentation.ThanksalsotoEnricoGregorioforencouragingmetocompleteafullyexpl3-compliantversionofthepackage.ThanksalsotoDanieElsandMarcelHeldoornforthe

63 SIstyleandSIunitspackages,respectively,w
SIstyleandSIunitspackages,respectively,whichprovidedthestartingpointforthedevelopmentofsiunitx.13MakingsuggestionsandreportingbugsFeedbackonsiunitxisalwayswelcome,eithertomakesuggestionsortoreportprob-lems.Whensendingfeedback,itisalwaysusefulifasmallexampleleisincluded,showingthebugbeingreportedorillustratingthedesiredoutput.Itishelpfulifa`referencerendering'isincluded,showingwhattheoutputshouldlooklike.Atypicalexamplelemightread\listfiles%Usethearticleclassunlesstheproblemisclass-dependent\documentclass{article}\usepackage{siunitx}%Otherpackagesloadedasrequired\begin{document}Referenceoutput:$1.23\,\mathrm{m}$\textsf{siunitx}output:\qty{1.23}{\metre}\end{document}67 Asillustrated,itisusuallybesttousethearticleclassandtoonlyloadpackageswhichareneededtoshowtheissue.ItisalsousefultoincludeacopyoftheloglegeneratebyLATEXwhenreportingabug(astheversionsofpackagescanbeimportanttosolvingtheissue).Feedbackcanbesentinarangeofways.ThedevelopmentcodeandissuetrackerarehostedonGitHub.Issuesopenedtherearevisibletootherusersandmakessurethattheycannotbeforgotten.References[1]TheInternationalSystemofUnits(si),https://www.bipm.org/en/measurement-units/.[2]InternationalSystemofUnitsfromnist,http://physics.nist.gov/cuu/Units/index.html.IndexTheitalicnumbersdenotethepageswherethecorrespondingentryisdescribed,num-bersunderlinedpointtothedenition,allothersindicatetheplaceswhereitisused.Symbols\,........................25,35,38A\A.............................12allow-quantity-breaks(option)......37\ampere..........................8\ang.........................3,5,32angle-mode(option)..

64 ..............32angle-separator(option).
..............32angle-separator(option)...........32angle-symbol-degree(option)........33angle-symbol-minute(option)........33angle-symbol-over-decimal(option)...33angle-symbol-second(option)........33\angstrom.......................50\approx.........................20\arcminute..................9,32,33\arcsecond..................9,32,33\as............................11\astronomicalunit.................9\atomicmassunit..................51\atto............................9B\bar............................50\barn...........................51\becquerel.......................8\bel.............................9\bfseries.......................60\bit............................13\bohr...........................51bracket-ambiguous-numbers(option)...27bracket-negative-numbers(option)....27bracket-unit-denominator(option)....35\byte...........................13C\cancel.........................10\candela.........................8\centi...........................9\clight.........................51\cm............................11color(option)....................19\color..........................15complex-root-position(option)......31\complexnum..................3,7,50\complexqty....................3,7\coulomb.........................8\cubed...........................8\cubic...........................8D\dalton..........................9\day...........................7,9\dB............................13\deca..........................8,968 \deci............................9\decibel.........................9\DeclareSIPower..................14\DeclareSIPrefix.................14\DeclareSIQuali

65 fier..............15\DeclareSIUnit......
fier..............15\DeclareSIUnit.................14,58\degree................7,9,14,32,33\degreeCelsius....................8\deka............................8\dm............................11drop-exponent(option)...........23,46drop-uncertainty(option)...........23drop-zero-decimal(option)..........24\DTLshowtable....................54E\electronmass....................51\electronvolt.....................9\elementarycharge................51\ensuremath.....................52\eV............................13evaluate-expression(option)........21\exa.............................9\exbi...........................13exponent-base(option).............26exponent-mode(option).............22exponent-product(option)...........26expression(option)................21extract-mass-in-kilograms(option)...38\extrashlanguagei................60F\F.............................13\farad...........................8\femto...........................9\fF............................13\fg............................11fill-angle-degrees(option).........33fill-angle-minutes(option).........33fill-angle-seconds(option).........33fixed-exponent(option)............22\fmol...........................11forbid-literal-units(option).......37free-standing-units(option)........34\fs............................11G\g.............................11\ge............................20\geq............................20\GeV............................13\gg............................20\GHz............................12\gibi...........................13\giga............................9\GPa............................12\gray..

66 ..........................8group-digits(
..........................8group-digits(option)..............25group-minimum-digits(option).......26group-separator(option)...........25\GW............................13H\H.............................13\hartree........................51\hectare.........................9\hecto...........................9\henry...........................8\hertz...........................8\highlight......................10\hL............................12\hl............................12\hour.........................9,58\Hz............................12Iinput-close-uncertainty(option)....20input-comparators(option)..........20input-complex-root(option).........31input-decimal-markers(option)......20input-digits(option)..............20input-exponent-markers(option).....20input-ignore(option)..............20input-open-uncertainty(option).....20input-signs(option)...............20input-uncertainty-signs(option)....20inter-unit-product(option).........34J\J.............................13\joule...........................8K\K.............................13\kA............................12\katal...........................8\kelvin..........................8\keV............................13\kg............................11\kHz............................12\kibi...........................13\kilo....................9,14,38,58\kilogram........................8\kJ............................13\km............................11\kmol...........................11\kN............................12\knot...........................51\kohm...........................1269 \kPa............................12\kV.........

67 ...................12\kW................
...................12\kW............................13\kWh..........................13,58L\L.............................12\l.............................12\le............................20\leq............................20list-exponents(option)............30list-final-separator(option).......28list-pair-separator(option)........28list-separator(option)............28list-units(option)................30\liter........................9,52\litre........................9,52\ll............................20locale(option)...................49\lumen...........................8\lux.............................8M\m.............................11\mA............................12\mathnormal.....................52\mathrm.......................35,52\mebi...........................13\mega............................9\meter........................8,52\metre........................8,52\MeV............................13\meV............................13\mg............................11\mH............................13\MHz............................12\mHz............................12\micro........................9,50\milli...........................9minimum-decimal-digits(option).....24minimum-integer-digits(option).....24\minute..........................9\mJ............................13\mL............................12\ml............................12\mm............................11\mmHg...........................51\mmol...........................11\MN............................12\mN............................12mode(option).....................18\Mohm...........................12\mohm...

68 ........................12\mol..........
........................12\mol............................11\mole............................8\mp............................20\MPa............................12\ms............................11\multicolumn...................16,66\multirow.......................16\mV............................12\MW............................13\mW............................13N\N.............................12\nA............................11\nano............................9\nauticalmile....................51negative-color(option)............27\neper...........................9\newton..........................8\nF............................13\ng............................11\nm............................11\nmol...........................11\ns............................11\num...........................3–7number-angle-product(option).......32number-color(option)..............19number-mode(option)...............18number-unit-product(option)........38\numlist.....................3,5,7\numproduct................3,5,7,50\numrange....................3,5,7\nV............................12O\of............................10\ohm.............................8options:allow-quantity-breaks..........37angle-mode...................32angle-separator...............32angle-symbol-degree............33angle-symbol-minute............33angle-symbol-over-decimal......33angle-symbol-second............33bracket-ambiguous-numbers......27bracket-negative-numbers.......27bracket-unit-denominator.......35color........................19complex-root-position..........31drop-exponent...............23,46drop-uncerta

69 inty..............23drop-zero-decimal...
inty..............23drop-zero-decimal.............24evaluate-expression............21exponent-base.................2670 exponent-mode.................22exponent-product..............26expression...................21extract-mass-in-kilograms......38fill-angle-degrees............33fill-angle-minutes............33fill-angle-seconds............33fixed-exponent................22forbid-literal-units...........37free-standing-units............34group-digits..................25group-minimum-digits...........26group-separator...............25input-close-uncertainty........20input-comparators.............20input-complex-root............31input-decimal-markers..........20input-digits..................20input-exponent-markers.........20input-ignore..................20input-open-uncertainty.........20input-signs...................20input-uncertainty-signs........20inter-unit-product............34list-exponents................30list-final-separator...........28list-pair-separator............28list-separator................28list-units...................30locale.......................49minimum-decimal-digits.........24minimum-integer-digits.........24mode.........................18negative-color................27number-angle-product...........32number-color..................19number-mode...................18number-unit-product............38output-close-uncertainty.......26output-complex-root............31output-decimal-marker..........26output-exponent-marker.........26output-open-uncertainty........26overwrite-functions............34parse-numbers...............21,45parse-units.............

70 ......37per-mode.....................35p
......37per-mode.....................35per-symbol...................35prefix-mode...................38print-implicit-plus............28print-unity-mantissa...........28print-zero-exponent............28product-exponents.............30product-mode..................29product-phrase................29product-symbol................29product-units.................30propagate-math-font............18qualifier-mode................36qualifier-phrase..............36range-exponents...............30range-phrase..................30range-units...................30reset-math-version............18reset-text-family.............18reset-text-series.............18reset-text-shape..............18retain-explicit-plus...........21retain-zero-uncertainty........21round-half...................24round-minimum.................24round-mode...................23round-pad....................23round-precision...............23separate-uncertainty-units.....38space-before-unit.............34sticky-per...................36table-align-exponent...........42table-align-text-after.........43table-align-text-before........43table-align-uncertainty........42table-alignment.............48,48table-alignment-mode...........39table-auto-round..............44table-column-type.............49table-column-width............46table-fixed-width.............46table-format..................41table-number-alignment.........39table-text-alignment...........48text-family-to-math............19text-font-command.............19text-series-to-math............19tight-spacing.................28uncertainty-separator........26,26unit-color...

71 ................19unit-font-command.....
................19unit-font-command.............37unit-mode....................18unit-optional-argument.........34use-xspace...................34output-close-uncertainty(option)....26output-complex-root(option)........31output-decimal-marker(option)......26output-exponent-marker(option).....26output-open-uncertainty(option)....26overwrite-functions(option)........3471 P\Pa............................12\pA............................11parse-numbers(option)...........21,45parse-units(option)...............37\pascal..........................8\pebi...........................13\per................6,10,14,35,36,58per-mode(option)..................35per-symbol(option)................35\percent.........................8\peta............................9\pF............................13\pg............................11\pico............................9\planckbar......................51\pm....................10,11,20,26\pmol...........................11prefix-mode(option)...............38print-implicit-plus(option)........28print-unity-mantissa(option).......28print-zero-exponent(option)........28product-exponents(option)..........30product-mode(option)..............29product-phrase(option)............29product-symbol(option)............29product-units(option).............30propagate-math-font(option)........18\ps............................11\pV............................12Q\qty..........3,6,7,10,14,32,34,52,61\qty............................49\qtylist.....................3,7,30\qtyproduct...............3,7,30,50\qtyrange....................3,7,30qualifier-mode(option)............36q

72 ualifier-phrase(option)...........36R\ra
ualifier-phrase(option)...........36R\radian..........................8\raiseto........................10range-exponents(option)...........30range-phrase(option)..............30range-units(option)...............30reset-math-version(option).........18reset-text-family(option)..........18reset-text-series(option)..........18reset-text-shape(option)...........18retain-explicit-plus(option).......21retain-zero-uncertainty(option)....21round-half(option)................24round-minimum(option).............24round-mode(option)................23round-pad(option).................23round-precision(option)...........23\rowcolor.......................60S\s.............................11\second..........................8separate-uncertainty-units(option)..38\SI..........................49,52\si............................49\siemens.........................8\sievert.........................8\SIlist.........................49\sim............................20\SIrange........................49\sisetup.........................3space-before-unit(option)..........34\square..........................8\squared.........................8\steradian.......................8sticky-per(option)................36Ttable-align-exponent(option).......42table-align-text-after(option).....43table-align-text-before(option)....43table-align-uncertainty(option)....42table-alignment(option).........48,48table-alignment-mode(option).......39table-auto-round(option)...........44table-column-type(option)..........49table-column-width(option).........46table-fixed-width(option)..........46table-format(option)..........

73 ....41table-number-alignment(option)....
....41table-number-alignment(option).....39table-text-alignment(option).......48\tablenum...................3,16,17\tebi...........................13\tera............................9\tesla...........................8\TeV............................13\texorpdfstring..................55\text.........................17,52text-family-to-math(option)........19text-font-command(option)..........19text-series-to-math(option)........19\THz............................12tight-spacing(option).............28\times..........................29\tonne...........................9\tothe..........................10\translate......................5172 U\uA............................12\uF............................13\ug............................11\uH............................13\uJ............................13\uL............................12\ul............................12\um............................11\umol...........................11uncertainty-separator(option)....26,26\unit.................3,6,7,10,14,34unit-color(option)................19unit-font-command(option)..........37unit-mode(option).................18unit-optional-argument(option).....34\us............................11use-xspace(option)................34\uV............................12\uW............................13V\V.............................12\volt............................8W\W.............................12\watt.........................8,58\weber...........................8Y\yobi...........................13\yocto...........................9\yotta...........................9Z\zebi...........................1

Related Contents


Next Show more