josephwright / siunitx

A comprehensive (SI) units package for LaTeX
LaTeX Project Public License v1.3c
350 stars 25 forks source link

`quotient-mode=fraction` not working in newer version #696

Closed UlyssesZh closed 9 months ago

UlyssesZh commented 9 months ago

Reproduceable on siunitx 3.3.6.

\documentclass{minimal}
\usepackage{siunitx}
\begin{document}
    \SI[quotient-mode=fraction]{3/4}{\meter}
\end{document}
Log
This is XeTeX, Version 3.141592653-2.6-0.999995 (TeX Live 2023) (preloaded format=xelatex 2023.9.29)  29 SEP 2023 19:33
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**main.tex
(./main.tex
LaTeX2e <2023-06-01> patch level 1
L3 programming layer <2023-08-29>
(/usr/local/texlive/2023/texmf-dist/tex/latex/base/minimal.cls
Document Class: minimal 2001/05/25 Standard LaTeX minimal class
) (/usr/local/texlive/2023/texmf-dist/tex/latex/siunitx/siunitx.sty
Package: siunitx 2023-09-01 v3.3.6 A comprehensive (SI) units package
\l__siunitx_number_uncert_offset_int=\count181
\l__siunitx_number_exponent_fixed_int=\count182
\l__siunitx_number_min_decimal_int=\count183
\l__siunitx_number_min_integer_int=\count184
\l__siunitx_number_round_precision_int=\count185
\l__siunitx_number_lower_threshold_int=\count186
\l__siunitx_number_upper_threshold_int=\count187
\l__siunitx_number_group_first_int=\count188
\l__siunitx_number_group_size_int=\count189
\l__siunitx_number_group_minimum_int=\count190
\l__siunitx_angle_tmp_dim=\dimen140
\l__siunitx_angle_marker_box=\box51
\l__siunitx_angle_unit_box=\box52
\l__siunitx_compound_count_int=\count191
(/usr/local/texlive/2023/texmf-dist/tex/latex/translations/translations.sty
Package: translations 2022/02/05 v1.12 internationalization of LaTeX2e packages
 (CN)
(/usr/local/texlive/2023/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2020/10/05 v2.5k e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count192
) (/usr/local/texlive/2023/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
Package: pdftexcmds 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO
)
(/usr/local/texlive/2023/texmf-dist/tex/generic/infwarerr/infwarerr.sty
Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO)
) (/usr/local/texlive/2023/texmf-dist/tex/generic/iftex/iftex.sty
Package: iftex 2022/02/03 v1.0f TeX engine tests
) (/usr/local/texlive/2023/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
Package: ltxcmds 2020-05-10 v1.25 LaTeX kernel commands for general use (HO)
)
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode not found.
)) (/usr/local/texlive/2023/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2021/08/26 v2.01 AMS text
(/usr/local/texlive/2023/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks17
\ex@=\dimen141
))
\l__siunitx_table_tmp_box=\box53
\l__siunitx_table_tmp_dim=\dimen142
\l__siunitx_table_column_width_dim=\dimen143
\l__siunitx_table_integer_box=\box54
\l__siunitx_table_decimal_box=\box55
\l__siunitx_table_uncert_box=\box56
\l__siunitx_table_before_box=\box57
\l__siunitx_table_after_box=\box58
\l__siunitx_table_before_dim=\dimen144
\l__siunitx_table_carry_dim=\dimen145
\l__siunitx_unit_tmp_int=\count193
\l__siunitx_unit_position_int=\count194
\l__siunitx_unit_total_int=\count195
(/usr/local/texlive/2023/texmf-dist/tex/latex/tools/array.sty
Package: array 2022/09/04 v2.5g Tabular extension package (FMi)
\col@sep=\dimen146
\ar@mcellbox=\box59
\extrarowheight=\dimen147
\NC@list=\toks18
\extratabsurround=\skip48
\backup@length=\skip49
\ar@cellbox=\box60
))
Package translations Info: No language package found. I am going to use `englis
h' as default language. on input line 3.
(/usr/local/texlive/2023/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
File: l3backend-xetex.def 2023-04-19 L3 backend support: XeTeX
\g__graphics_track_int=\count196
\l__pdf_internal_box=\box61
\g__pdf_backend_object_int=\count197
\g__pdf_backend_annotation_int=\count198
\g__pdf_backend_link_int=\count199
) (./output.aux)
\openout1 = `output.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 OMS/cmsy/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 T1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 3.
LaTeX Font Info:    Trying to load font information for TS1+cmr on input line 3
.
(/usr/local/texlive/2023/texmf-dist/tex/latex/base/ts1cmr.fd
File: ts1cmr.fd 2023/04/13 v2.5m Standard LaTeX font definitions
)
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for TU/lmr/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/local/texlive/2023/texmf-dist/tex/latex/graphics/color.sty
Package: color 2022/01/06 v1.3d Standard LaTeX Color (DPC)
(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics-cfg/color.cfg
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package color Info: Driver file: xetex.def on input line 149.
(/usr/local/texlive/2023/texmf-dist/tex/latex/graphics-def/xetex.def
File: xetex.def 2022/09/22 v5.0n Graphics/color driver for xetex
) (/usr/local/texlive/2023/texmf-dist/tex/latex/graphics/mathcolor.ltx))
(/usr/local/texlive/2023/texmf-dist/tex/latex/translations/translations-basic-d
ictionary-english.trsl
File: translations-basic-dictionary-english.trsl (english translation file `tra
nslations-basic-dictionary')
)
Package translations Info: loading dictionary `translations-basic-dictionary' f
or `english'. on input line 3.

Package siunitx Warning: Option "quotient-mode" has been removed in this
(siunitx)                release.

! Package siunitx Error: Invalid number '3/4'.

For immediate help type H .
 ...                                              

l.4 \SI[quotient-mode=fraction]{3/4}{\meter}

The input '3/4' could not be parsed as a number following the format defined
in module documentation.

)
Runaway argument?
\q_stop \group_end: \group_end:  \end {document} 
! File ended while scanning use of \__siunitx_quantity_parsed_aux:w.
 
                \par 
<*> main.tex

I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.

! Emergency stop.
<*> main.tex

*** (job aborted, no legal \end found)

Here is how much of TeX's memory you used:
 4968 strings out of 475591
 139530 string characters out of 5773841
 1910422 words of memory out of 5000000
 26336 multiletter control sequences out of 15000+600000
 558077 words of font info for 37 fonts, out of 8000000 for 9000
 1348 hyphenation exceptions out of 8191
 73i,0n,80p,221b,498s stack positions out of 10000i,1000n,20000p,200000b,200000s
No pages of output.

Expected result (rendered using siunitx 2.7u): image

josephwright commented 9 months ago

This is a documented change from v2 to v3: https://github.com/josephwright/siunitx/compare/v2.8e...v3.0.0

UlyssesZh commented 9 months ago

Is there a v2 to v3 migration guide?

josephwright commented 9 months ago

The changes are listed in the manual: very little is needed in the vast majority of cases, but you have one of the pieces of input that on revisiting I decided was a poor design choice.