Tag Info

Hot answers tagged

6

Pluses are retained is retain-explicit-plus is set \documentclass{article} \usepackage{siunitx} \begin{document} \begin{tabular}{S[retain-explicit-plus]} +1.23 \\ -4.56 \\ 7.89 \\ \end{tabular} \end{doument}


5

As Joseph Wright pointed out: The solution here is to use \sisetup{per-mode=symbol-or-fraction} as described in the siunitx manual: Finally, it is possible for the behaviour of the \per function to depend on the prevailing math style. Setting per-mode to symbol-or-fraction will use the symbol setting for in line math, and the fraction setting when ...


4

As observed in comments, the key settings are (largely) stored in a set of variables which are marked as private in siunitx. TeX doesn't prevent you accessing these (they are private by convention rather than at any technical level), so you can read the code and then extract the values. However, there is a reason this data is private: there is no documented ...


4

The FPU does not have a concept of 'significant zeros' in the input: internally everything is converted to a standard form. If you want to force a number of places or significant digits, you'll need to do so at the point of output: \documentclass{article} \usepackage{siunitx} \usepackage{expl3} \pagestyle{empty} \ExplSyntaxOn \cs_new_eq:NN \fpeval ...


4

This should work with no special set up \documentclass[french]{article} \usepackage{babel} \usepackage{siunitx} \begin{document} \SIlist{-3;3}{\pascal} \end{document}


3

This code works. I took the opportunity to improve your table: I don't think you really need a tabularx environment, so I replaced the Y column with a plain l. I also made column head two lined when I thought it necessary, with the makecell package: \documentclass[fontsize=10pt, paper=letter, headings=small, bibliography=totoc, DIV=9, headsepline=true, ...


3

Here's a solution that preserves the use of tabularx. It uses S[table-format[5.0] as the main column type for columns 2 and 3 of the tabularx environment. In addition, it uses \multicolumn{1}{C}{...} directives for the header cells -- where C is a centered version of the X column type that comes with the tabularx package -- in order to let LaTeX figure out ...


3

Just shift the | to the first \multicolumn like & A & \multicolumn{2}{c|}{B} & \multicolumn{2}{c}{C} \\ BTW, siunitx has nothing to do with this alignment. Place | carefully while using \multicolumn.


2

With LuaLaTeX you can parse your imported file and access the siunitx parameters, and even resuse them : \documentclass{article} \usepackage{luacode,siunitx} \begin{luacode} function SiunitxSplit ( file ) local param local i = 1 local f = assert(io.open(file, "r")) local t = f:read("*all") f:close() for param in t:gmatch ...


2

A slight modification on egreg's idea: \documentclass{beamer} \usepackage{polyglossia} \setdefaultlanguage{french} \RequirePackage[% locale=FR,% detect-all,% table-number-alignment = center-decimal-marker, inter-unit-product = \ensuremath{{}\cdot{}}, group-minimum-digits=4, explicit-sign = +, bracket-numbers = false ...


1

You can redefine the \num-command to include brackets: \let\oldnum\num \renewcommand{\num}[1]{(\oldnum{#1})} This will only affect the way \num is displayed, \numrange etc. are not affected by this change.


1

Okay, seems that I've found a solution: I tried retain-explicit-plus as an option for \num but that doesn't do any good in tables. What I did is fairly similar to this question: Just omit the "+" sign for numbers that are positive (which gives them the "+" sign stated in S[explicit-sign=+]) and write a minus sign for negative numbers. This makes it work ...


1

I managed to get an answer after a lot of reasoning and trying out. The reason why this did not work, is not because of the boldness and the letterspacing, but because something other than the number was put in the supposed-to-be-cell and this seems to confuse the spreadtab-siunitx-combination, while \robustify from siunitx: aligning numbers by decimal ...



Only top voted, non community-wiki answers of a minimum length are eligible