2

So, here is my minimal working example;

\documentclass{article}
\usepackage{siunitx}
\begin{document}
    \title{The mysterious case of the disappearing units.}
    \author{Touchstone}

    \maketitle

    something with units \SI{2}{\second} 
\end{document}

I compile it with latexmk example.tex and the output contains only the number with no units. In the log file;

! Undefined control sequence.
l.9     something with units \SI
                                {2}{\second}
? 
! Undefined control sequence.
l.9     something with units \SI{2}{\second
                                           }
? 
[1

I must be doing something really silly, but I have no idea what.

Here is the full log file;

This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex 2018.2.6)  2 MAY 2018 19:19
entering extended mode
 restricted \write18 enabled.
 file:line:error style messages enabled.
 %&-line parsing enabled.
**example.tex
(./example.tex
LaTeX2e <2016/02/01>
Babel <3.9q> and hyphenation patterns for 5 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) (/usr/share/texlive/texmf-dist/tex/latex/siunitx/siunitx.sty (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty
Package: expl3 2016/01/19 v6377 L3 programming layer (loader) 
 (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3-code.tex
Package: expl3 2016/01/19 v6377 L3 programming layer (code)
L3 Module: l3bootstrap 2016/01/01 v6339 L3 Bootstrap code
L3 Module: l3names 2015/12/21 v6328 L3 Namespace for primitives
L3 Module: l3basics 2015/11/22 v6315 L3 Basic definitions
L3 Module: l3expan 2015/09/10 v5983 L3 Argument expansion
L3 Module: l3tl 2015/09/29 v6121 L3 Token lists
L3 Module: l3str 2016/01/03 v6357 L3 Strings
L3 Module: l3seq 2015/08/05 v5777 L3 Sequences and stacks
L3 Module: l3int 2016/01/05 v6366 L3 Integers
\c_max_int=\count87
\l_tmpa_int=\count88
\l_tmpb_int=\count89
\g_tmpa_int=\count90
\g_tmpb_int=\count91
L3 Module: l3quark 2015/08/17 v5855 L3 Quarks
L3 Module: l3prg 2015/11/01 v6216 L3 Control structures
\g__prg_map_int=\count92
L3 Module: l3clist 2015/09/02 v5901 L3 Comma separated lists
L3 Module: l3token 2015/11/11 v6249 L3 Experimental token manipulation
L3 Module: l3prop 2016/01/05 v6366 L3 Property lists
L3 Module: l3msg 2015/09/28 v6113 L3 Messages
L3 Module: l3file 2015/12/03 v6317 L3 File and I/O operations
\l_iow_line_count_int=\count93
\l__iow_target_count_int=\count94
\l__iow_current_line_int=\count95
\l__iow_current_word_int=\count96
\l__iow_current_indentation_int=\count97
L3 Module: l3skip 2016/01/05 v6366 L3 Dimensions and skips
\c_zero_dim=\dimen103
\c_max_dim=\dimen104
\l_tmpa_dim=\dimen105
\l_tmpb_dim=\dimen106
\g_tmpa_dim=\dimen107
\g_tmpb_dim=\dimen108
\c_zero_skip=\skip43
\c_max_skip=\skip44
\l_tmpa_skip=\skip45
\l_tmpb_skip=\skip46
\g_tmpa_skip=\skip47
\g_tmpb_skip=\skip48
\c_zero_muskip=\muskip10
\c_max_muskip=\muskip11
\l_tmpa_muskip=\muskip12
\l_tmpb_muskip=\muskip13
\g_tmpa_muskip=\muskip14
\g_tmpb_muskip=\muskip15
L3 Module: l3keys 2015/11/17 v6284 L3 Key-value interfaces
\g__keyval_level_int=\count98
\l_keys_choice_int=\count99
L3 Module: l3fp 2015/08/25 v5890 L3 Floating points
\c__fp_leading_shift_int=\count100
\c__fp_middle_shift_int=\count101
\c__fp_trailing_shift_int=\count102
\c__fp_big_leading_shift_int=\count103
\c__fp_big_middle_shift_int=\count104
\c__fp_big_trailing_shift_int=\count105
\c__fp_Bigg_leading_shift_int=\count106
\c__fp_Bigg_middle_shift_int=\count107
\c__fp_Bigg_trailing_shift_int=\count108
L3 Module: l3box 2015/08/09 v5822 L3 Experimental boxes
\c_empty_box=\box26
\l_tmpa_box=\box27
\l_tmpb_box=\box28
\g_tmpa_box=\box29
\g_tmpb_box=\box30
L3 Module: l3coffins 2015/08/06 v5789 L3 Coffin code layer
\l__coffin_internal_box=\box31
\l__coffin_internal_dim=\dimen109
\l__coffin_offset_x_dim=\dimen110
\l__coffin_offset_y_dim=\dimen111
\l__coffin_x_dim=\dimen112
\l__coffin_y_dim=\dimen113
\l__coffin_x_prime_dim=\dimen114
\l__coffin_y_prime_dim=\dimen115
\c_empty_coffin=\box32
\l__coffin_aligned_coffin=\box33
\l__coffin_aligned_internal_coffin=\box34
\l_tmpa_coffin=\box35
\l_tmpb_coffin=\box36
\l__coffin_display_coffin=\box37
\l__coffin_display_coord_coffin=\box38
\l__coffin_display_pole_coffin=\box39
\l__coffin_display_offset_dim=\dimen116
\l__coffin_display_x_dim=\dimen117
\l__coffin_display_y_dim=\dimen118
L3 Module: l3color 2014/08/23 v5354 L3 Experimental color support
L3 Module: l3sys 2015/09/25 v6087 L3 Experimental system/runtime functions
L3 Module: l3candidates 2016/01/14 v6376 L3 Experimental additions to l3kernel
\l__box_top_dim=\dimen119
\l__box_bottom_dim=\dimen120
\l__box_left_dim=\dimen121
\l__box_right_dim=\dimen122
\l__box_top_new_dim=\dimen123
\l__box_bottom_new_dim=\dimen124
\l__box_left_new_dim=\dimen125
\l__box_right_new_dim=\dimen126
\l__box_internal_box=\box40
\l__coffin_bounding_shift_dim=\dimen127
\l__coffin_left_corner_dim=\dimen128
\l__coffin_right_corner_dim=\dimen129
\l__coffin_bottom_corner_dim=\dimen130
\l__coffin_top_corner_dim=\dimen131
\l__coffin_scaled_total_height_dim=\dimen132
\l__coffin_scaled_width_dim=\dimen133
L3 Module: l3luatex 2015/11/11 v6250 L3 Experimental LuaTeX-specific functions
) (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3pdfmode.def
File: l3pdfmode.def 2015/11/11 v6250 L3 Experimental driver: PDF mode
\l__driver_color_stack_int=\count109
))
Package: siunitx 2017/11/26 v3.0alpha A comprehensive (SI) units package
 (/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty
Package: xparse 2016/01/19 v6377 L3 Experimental document command parser
\l__xparse_current_arg_int=\count110
\l__xparse_m_args_int=\count111
\l__xparse_mandatory_args_int=\count112
\l__xparse_processor_int=\count113
\l__xparse_v_nesting_int=\count114
)
.................................................
. LaTeX info: "xparse/define-command"
. 
. Defining command \DeclareSIPower with sig. '+m+mm' on line 54.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
. 
. Defining command \DeclareSIPrefix with sig. '+mmm' on line 58.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
. 
. Defining command \DeclareSIQualifier with sig. '+mm' on line 62.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
. 
. Defining command \DeclareSIUnit with sig. 'O{}+mm' on line 66.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
. 
. Defining command \qty with sig. 'O{}mm' on line 78.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
. 
. Defining command \num with sig. 'O{}m' on line 87.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
. 
. Defining command \unit with sig. 'O{}m' on line 96.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
. 
. Defining command \sisetup with sig. 'm' on line 98.
.................................................
 (/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty
Package: array 2014/10/28 v2.4c Tabular extension package (FMi)
\col@sep=\dimen134
\extrarowheight=\dimen135
\NC@list=\toks14
\extratabsurround=\skip49
\backup@length=\skip50
)
\l__siunitx_number_round_precision_int=\count115
\l__siunitx_number_group_minimum_int=\count116
 (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2000/06/29 v2.01 AMS text
 (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks15
\ex@=\dimen136
)) (/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty
Package: color 2016/01/03 v1.1b Standard LaTeX Color (DPC)
 (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg
File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
)
Package color Info: Driver file: pdftex.def on input line 143.
 (/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def
File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX
 (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)
) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
)
\Gread@gobject=\count117
))
\l__siunitx_print_tmp_box=\box41
\l__siunitx_table_column_width_dim=\dimen137
\l__siunitx_unit_tmp_int=\count118
\l__siunitx_unit_position_int=\count119
\l__siunitx_unit_total_int=\count120
) (./example.aux)
\openout1 = `example.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
 (/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count121
\scratchdimen=\dimen138
\scratchbox=\box42
\nofMPsegments=\count122
\nofMParguments=\count123
\everyMPshowfont=\toks16
\MPscratchCnt=\count124
\MPscratchDim=\dimen139
\MPnumerator=\count125
\makeMPintoPDFobject=\count126
\everyMPtoPDFconversion=\toks17
) (/usr/share/texlive/texmf-dist/tex/latex/base/textcomp.sty
Package: textcomp 2005/09/27 v1.99g Standard LaTeX package
Package textcomp Info: Sub-encoding information:
(textcomp)               5 = only ISO-Adobe without \textcurrency
(textcomp)               4 = 5 + \texteuro
(textcomp)               3 = 4 + \textohm
(textcomp)               2 = 3 + \textestimated + \textcurrency
(textcomp)               1 = TS1 - \textcircled - \t
(textcomp)               0 = TS1 (full)
(textcomp)             Font families with sub-encoding setting implement
(textcomp)             only a restricted character set as indicated.
(textcomp)             Family '?' is the default used for unknown fonts.
(textcomp)             See the documentation for details.
Package textcomp Info: Setting ? sub-encoding to TS1/1 on input line 79.
 (/usr/share/texlive/texmf-dist/tex/latex/base/ts1enc.def
File: ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
)
LaTeX Info: Redefining \oldstylenums on input line 334.
Package textcomp Info: Setting cmr sub-encoding to TS1/0 on input line 349.
Package textcomp Info: Setting cmss sub-encoding to TS1/0 on input line 350.
Package textcomp Info: Setting cmtt sub-encoding to TS1/0 on input line 351.
Package textcomp Info: Setting cmvtt sub-encoding to TS1/0 on input line 352.
Package textcomp Info: Setting cmbr sub-encoding to TS1/0 on input line 353.
Package textcomp Info: Setting cmtl sub-encoding to TS1/0 on input line 354.
Package textcomp Info: Setting ccr sub-encoding to TS1/0 on input line 355.
Package textcomp Info: Setting ptm sub-encoding to TS1/4 on input line 356.
Package textcomp Info: Setting pcr sub-encoding to TS1/4 on input line 357.
Package textcomp Info: Setting phv sub-encoding to TS1/4 on input line 358.
Package textcomp Info: Setting ppl sub-encoding to TS1/3 on input line 359.
Package textcomp Info: Setting pag sub-encoding to TS1/4 on input line 360.
Package textcomp Info: Setting pbk sub-encoding to TS1/4 on input line 361.
Package textcomp Info: Setting pnc sub-encoding to TS1/4 on input line 362.
Package textcomp Info: Setting pzc sub-encoding to TS1/4 on input line 363.
Package textcomp Info: Setting bch sub-encoding to TS1/4 on input line 364.
Package textcomp Info: Setting put sub-encoding to TS1/5 on input line 365.
Package textcomp Info: Setting uag sub-encoding to TS1/5 on input line 366.
Package textcomp Info: Setting ugq sub-encoding to TS1/5 on input line 367.
Package textcomp Info: Setting ul8 kage textcomp Info: Setting txss sub-encoding to TS1/0 on input line 377.
Package textcomp Info: Setting txtt sub-encoding to TS1/0 on input line 378.
Package textcomp Info: Setting lmr sub-encoding to TS1/0 on input line 379.
Package textcomp Info: Setting lmdh sub-encoding to TS1/0 on input line 380.
Package textcomp Info: Setting lmss sub-encoding to TS1/0 on input line 381.
Package textcomp Info: Setting lmssq sub-encoding to TS1/0 on input line 382.
Package textcomp Info: Setting lmvtt sub-encoding to TS1/0 on input line 383.
Package textcomp Info: Setting lmtt sub-encoding to TS1/0 on input line 384.
Package textcomp Info: Setting qhv sub-encoding to TS1/0 on input line 385.
Package textcomp Info: Setting qag sub-encoding to TS1/0 on input line 386.
Package textcomp Info: Setting qbk sub-encoding to TS1/0 on input line 387.
Package textcomp Info: Setting qcr sub-encoding to TS1/0 on input line 388.
Package textcomp Info: Setting qcs sub-encoding to TS1/0 on input line 389.
Package textcomp Info: Setting qpl sub-encoding to TS1/0 on input line 390.
Package textcomp Info: Setting qtm sub-encoding to TS1/0 on input line 391.
Package textcomp Info: Setting qzc sub-encoding to TS1/0 on input line 392.
Package textcomp Info: Setting qhvc sub-encoding to TS1/0 on input line 393.
Package textcomp Info: Setting futs sub-encoding to TS1/4 on input line 394.
Package textcomp Info: Setting futx sub-encoding to TS1/4 on input line 395.
Package textcomp Info: Setting futj sub-encoding to TS1/4 on input line 396.
Package textcomp Info: Setting hlh sub-encoding to TS1/3 on input line 397.
Package textcomp Info: Setting hls sub-encoding to TS1/3 on input line 398.
Package textcomp Info: Setting hlst sub-encoding to TS1/3 on input line 399.
Package textcomp Info: Setting hlct sub-encoding to TS1/5 on input line 400.
Package textcomp Info: Setting hlx sub-encoding to TS1/5 on input line 401.
Package textcomp Info: Setting hlce sub-encoding to TS1/5 on input line 402.
Package textcomp Info: Setting hlcn sub-encoding to TS1/5 on input line 403.
Package textcomp Info: Setting hlcw sub-encoding to TS1/5 on input line 404.
Package textcomp Info: Setting hlcf sub-encoding to TS1/5 on input line 405.
Package textcomp Info: Setting pplx sub-encoding to TS1/3 on input line 406.
Package textcomp Info: Setting pplj sub-encoding to TS1/3 on input line 407.
Package textcomp Info: Setting ptmx sub-encoding to TS1/4 on input line 408.
Package textcomp Info: Setting ptmj sub-encoding to TS1/4 on input line 409.
)
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <7> on input line 3.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <5> on input line 3.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <12> on input line 7.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <8> on input line 7.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <6> on input line 7.

! Undefined control sequence.
l.9     something with units \SI
                                {2}{\second}
? 
! Undefined control sequence.
l.9     something with units \SI{2}{\second
                                           }
? 
[1

] (./example.aux) ) 
Here is how much of TeX's memory you used:
 8833 strings out of 494911
 179723 string characters out of 6179863
 171677 words of memory out of 5000000
 12147 multiletter control sequences out of 15000+600000
 9496 words of font info for 36 fonts, out of 8000000 for 9000
 36 hyphenation exceptions out of 8191
 34i,6n,42p,10376b,275s stack positions out of 5000i,500n,10000p,200000b,80000s

Output written on example.dvi (1 page, 576 bytes).
quence.
l.9     something with units \SI
                                {2}{\second}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

./example.tex:9: Undefined control sequence.
l.9     something with units \SI{2}{\second
                                           }
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

[1

{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./example.aux) ) 
Here is how much of TeX's memory you used:
 9288 strings out of 494910
 185549 string characters out of 6179837
 183311 words of memory out of 5000000
 12591 multiletter control sequences out of 15000+600000
 9496 words of font info for 36 fonts, out of 8000000 for 9000
 36 hyphenation exceptions out of 8191
 34i,6n,42p,10376b,275s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb>
Output written on example.pdf (1 page, 33851 bytes).
PDF statistics:
 20 PDF objects out of 1000 (max. 8388607)
 13 compressed objects within 1 object stream
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)
8
  • Do you have the latest version installed? I can run your MWE. May 2 '18 at 19:14
  • Should work fine, show the log-file. May 2 '18 at 19:16
  • @UlrikeFischer Ok, the whole log file is big but I will throw it in
    – Clumsy cat
    May 2 '18 at 19:19
  • 1
    @Dr.ManuelKuehner bummer, I probably installed something wrong then...
    – Clumsy cat
    May 2 '18 at 19:19
  • 1
    You are using the unreleased v3.0alpha code: I'm wondering how you ended up with that even installed! I'm experimenting there with better names for the commands: if you really want to use it, it's \qty.
    – Joseph Wright
    May 2 '18 at 19:24
6

It looks like there was a mess-up in one siunitx release, meaning that some pre-release testing code went to CTAN. I will correct that as soon as possible.

1
  • Can confirm that changing \SI to \qty works
    – Clumsy cat
    May 2 '18 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.