One large number in table with decimalsHow to use siunitx and tabularx together?number separator formatting with ragged right positioning using siunitx, R, Hmisc::latexAlign decimal marker with thousands separator using siunitxScientific Notation Only For Large Numbersusing the package siunitxAlignment in tables using siunitxDuplicate decimal marker (siunitx)Problem aligning decimals in multi-column tableWrong value with Decimals and Uncertainty in siunitxAlign large numbers and small ones on comma and decimal point

Why aren't there more Gauls like Obelix?

Unidentified signals on FT8 frequencies

How do I align tablenotes in a threeparttable

What can I do if someone tampers with my SSH public key?

Multi wire circuit or 2 separate 120V 20A dedicated circuits?

Tabular environment - text vertically positions itself by bottom of tikz picture in adjacent cell

Why restrict private health insurance?

How to install "rounded" brake pads

std::string vs const std::string& vs std::string_view

How does learning spells work when leveling a multiclass character?

How does a sound wave propagate?

I've given my players a lot of magic items. Is it reasonable for me to give them harder encounters?

Should I file my taxes? No income, unemployed, but paid 2k in student loan interest

Boss Telling direct supervisor I snitched

Draw this image in the TIKZ package

Too soon for a plot twist?

Finding integer solution to a quadratic equation in two unknowns

How spaceships determine each other's mass in space?

Short story about cities being connected by a conveyor belt

Was this cameo in Captain Marvel computer generated?

Should I apply for my boss's promotion?

A vote on the Brexit backstop

School performs periodic password audits. Is my password compromised?

How to make sure I'm assertive enough in contact with subordinates?



One large number in table with decimals


How to use siunitx and tabularx together?number separator formatting with ragged right positioning using siunitx, R, Hmisc::latexAlign decimal marker with thousands separator using siunitxScientific Notation Only For Large Numbersusing the package siunitxAlignment in tables using siunitxDuplicate decimal marker (siunitx)Problem aligning decimals in multi-column tableWrong value with Decimals and Uncertainty in siunitxAlign large numbers and small ones on comma and decimal point













2















I am using siunitx to align numbers in a column. Problem is I got by intention one row at the beginning which is a large number, indicated by ',' per 1,000. See the following example.



What I would like to achieve:



1) Align the decimals to the decimal point '.' This is row 2, 3 and 4.



2) center the big numbers, i.e. row 1 and 5 in this example. When I tested different options, the large numbers where always either too much to the left or too much to the right. If possible, they should simply be centered. I believe that makes the most sense in terms of formatting.



Is it possible?



documentclassarticle
usepackagesiunitx

sisetup%
input-ignore=,,
input-decimal-markers = .,
table-format = 2.2,
table-number-alignment = center,
%

begindocument
begintabularSS
row & alignToDec \
row1: & 19,000,000.0 \
row2: & 12.38 \
row3: & 1.97 \
row4: & 91.01 \
row5: & 87,000,000.0 \
endtabular
enddocument









share|improve this question



















  • 3





    Try adding a pair of braces around the large numbers.

    – Bernard
    2 hours ago











  • @Bernard what do you mean precisely? I could add braces (could it be anything else but braces?), but I am not sure on the exact consequence of doing that. If I added them only on the left, what would happen? Pls elaborate a bit.

    – ghx
    2 hours ago






  • 2





    Apart from your question: Do not use S type columns for columns that only contain text (first column in your example code) and as already suggested by Bernard, enclose text in S type columns (first row in your code) as well as entries that should be centered in a pair of .

    – leandriis
    2 hours ago












  • Thanks that works! Does that just generally mean those numbers are ignored?

    – ghx
    2 hours ago












  • Yes: cell content between braces in an Scolumn is considered by siunitx as non-numeric content and centred.

    – Bernard
    1 hour ago
















2















I am using siunitx to align numbers in a column. Problem is I got by intention one row at the beginning which is a large number, indicated by ',' per 1,000. See the following example.



What I would like to achieve:



1) Align the decimals to the decimal point '.' This is row 2, 3 and 4.



2) center the big numbers, i.e. row 1 and 5 in this example. When I tested different options, the large numbers where always either too much to the left or too much to the right. If possible, they should simply be centered. I believe that makes the most sense in terms of formatting.



Is it possible?



documentclassarticle
usepackagesiunitx

sisetup%
input-ignore=,,
input-decimal-markers = .,
table-format = 2.2,
table-number-alignment = center,
%

begindocument
begintabularSS
row & alignToDec \
row1: & 19,000,000.0 \
row2: & 12.38 \
row3: & 1.97 \
row4: & 91.01 \
row5: & 87,000,000.0 \
endtabular
enddocument









share|improve this question



















  • 3





    Try adding a pair of braces around the large numbers.

    – Bernard
    2 hours ago











  • @Bernard what do you mean precisely? I could add braces (could it be anything else but braces?), but I am not sure on the exact consequence of doing that. If I added them only on the left, what would happen? Pls elaborate a bit.

    – ghx
    2 hours ago






  • 2





    Apart from your question: Do not use S type columns for columns that only contain text (first column in your example code) and as already suggested by Bernard, enclose text in S type columns (first row in your code) as well as entries that should be centered in a pair of .

    – leandriis
    2 hours ago












  • Thanks that works! Does that just generally mean those numbers are ignored?

    – ghx
    2 hours ago












  • Yes: cell content between braces in an Scolumn is considered by siunitx as non-numeric content and centred.

    – Bernard
    1 hour ago














2












2








2


1






I am using siunitx to align numbers in a column. Problem is I got by intention one row at the beginning which is a large number, indicated by ',' per 1,000. See the following example.



What I would like to achieve:



1) Align the decimals to the decimal point '.' This is row 2, 3 and 4.



2) center the big numbers, i.e. row 1 and 5 in this example. When I tested different options, the large numbers where always either too much to the left or too much to the right. If possible, they should simply be centered. I believe that makes the most sense in terms of formatting.



Is it possible?



documentclassarticle
usepackagesiunitx

sisetup%
input-ignore=,,
input-decimal-markers = .,
table-format = 2.2,
table-number-alignment = center,
%

begindocument
begintabularSS
row & alignToDec \
row1: & 19,000,000.0 \
row2: & 12.38 \
row3: & 1.97 \
row4: & 91.01 \
row5: & 87,000,000.0 \
endtabular
enddocument









share|improve this question
















I am using siunitx to align numbers in a column. Problem is I got by intention one row at the beginning which is a large number, indicated by ',' per 1,000. See the following example.



What I would like to achieve:



1) Align the decimals to the decimal point '.' This is row 2, 3 and 4.



2) center the big numbers, i.e. row 1 and 5 in this example. When I tested different options, the large numbers where always either too much to the left or too much to the right. If possible, they should simply be centered. I believe that makes the most sense in terms of formatting.



Is it possible?



documentclassarticle
usepackagesiunitx

sisetup%
input-ignore=,,
input-decimal-markers = .,
table-format = 2.2,
table-number-alignment = center,
%

begindocument
begintabularSS
row & alignToDec \
row1: & 19,000,000.0 \
row2: & 12.38 \
row3: & 1.97 \
row4: & 91.01 \
row5: & 87,000,000.0 \
endtabular
enddocument






siunitx






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 hours ago







ghx

















asked 2 hours ago









ghxghx

274




274







  • 3





    Try adding a pair of braces around the large numbers.

    – Bernard
    2 hours ago











  • @Bernard what do you mean precisely? I could add braces (could it be anything else but braces?), but I am not sure on the exact consequence of doing that. If I added them only on the left, what would happen? Pls elaborate a bit.

    – ghx
    2 hours ago






  • 2





    Apart from your question: Do not use S type columns for columns that only contain text (first column in your example code) and as already suggested by Bernard, enclose text in S type columns (first row in your code) as well as entries that should be centered in a pair of .

    – leandriis
    2 hours ago












  • Thanks that works! Does that just generally mean those numbers are ignored?

    – ghx
    2 hours ago












  • Yes: cell content between braces in an Scolumn is considered by siunitx as non-numeric content and centred.

    – Bernard
    1 hour ago













  • 3





    Try adding a pair of braces around the large numbers.

    – Bernard
    2 hours ago











  • @Bernard what do you mean precisely? I could add braces (could it be anything else but braces?), but I am not sure on the exact consequence of doing that. If I added them only on the left, what would happen? Pls elaborate a bit.

    – ghx
    2 hours ago






  • 2





    Apart from your question: Do not use S type columns for columns that only contain text (first column in your example code) and as already suggested by Bernard, enclose text in S type columns (first row in your code) as well as entries that should be centered in a pair of .

    – leandriis
    2 hours ago












  • Thanks that works! Does that just generally mean those numbers are ignored?

    – ghx
    2 hours ago












  • Yes: cell content between braces in an Scolumn is considered by siunitx as non-numeric content and centred.

    – Bernard
    1 hour ago








3




3





Try adding a pair of braces around the large numbers.

– Bernard
2 hours ago





Try adding a pair of braces around the large numbers.

– Bernard
2 hours ago













@Bernard what do you mean precisely? I could add braces (could it be anything else but braces?), but I am not sure on the exact consequence of doing that. If I added them only on the left, what would happen? Pls elaborate a bit.

– ghx
2 hours ago





@Bernard what do you mean precisely? I could add braces (could it be anything else but braces?), but I am not sure on the exact consequence of doing that. If I added them only on the left, what would happen? Pls elaborate a bit.

– ghx
2 hours ago




2




2





Apart from your question: Do not use S type columns for columns that only contain text (first column in your example code) and as already suggested by Bernard, enclose text in S type columns (first row in your code) as well as entries that should be centered in a pair of .

– leandriis
2 hours ago






Apart from your question: Do not use S type columns for columns that only contain text (first column in your example code) and as already suggested by Bernard, enclose text in S type columns (first row in your code) as well as entries that should be centered in a pair of .

– leandriis
2 hours ago














Thanks that works! Does that just generally mean those numbers are ignored?

– ghx
2 hours ago






Thanks that works! Does that just generally mean those numbers are ignored?

– ghx
2 hours ago














Yes: cell content between braces in an Scolumn is considered by siunitx as non-numeric content and centred.

– Bernard
1 hour ago






Yes: cell content between braces in an Scolumn is considered by siunitx as non-numeric content and centred.

– Bernard
1 hour ago











1 Answer
1






active

oldest

votes


















3














For some reason your code compiles, but:



1) You should not (at least you have no reason to do that) use an S column type for columns that doesn't contain math.



2) If the contents of a cell inside an 'S' column is text place it inside curly braces. (This way the content will be centered by default from siunitx because it will be considered as a text). [See your "broken" alignToDec in the second column if outside of braces and place it inside braces to see the difference]



3) Use the same method as above for your big numbers...



4) You could specify the table-format as an optional argument in your S columns. (siunitx behaves better like this in general)



documentclassarticle
usepackagesiunitx

sisetup%
input-ignore=,,
input-decimal-markers = .,
table-number-alignment = center,
%

begindocument
begintabularcS[table-format=2.2]
row & alignToDec \
row1: & 19,000,000.0 \
row2: & 12.38 \
row3: & 1.97 \
row4: & 91.01 \
row5: & 87,000,000.0 \
endtabular
enddocument


enter image description here



PS: Remove the luatex tag.






share|improve this answer























  • thanks a lot! My code always compiles ;)

    – ghx
    2 hours ago











  • Welcome... For me, rarely it compiles by the first try when using siunitx... (but usually my tables are somehow ... somehow)... Anyway... I tried to say that usually siunitx doesn't like text when is waiting for numbers and doesn't compile without errors. Happy TeXing

    – koleygr
    2 hours ago











  • No offense taken. Have a great day and thx for your reply.

    – ghx
    2 hours ago










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478492%2fone-large-number-in-table-with-decimals%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














For some reason your code compiles, but:



1) You should not (at least you have no reason to do that) use an S column type for columns that doesn't contain math.



2) If the contents of a cell inside an 'S' column is text place it inside curly braces. (This way the content will be centered by default from siunitx because it will be considered as a text). [See your "broken" alignToDec in the second column if outside of braces and place it inside braces to see the difference]



3) Use the same method as above for your big numbers...



4) You could specify the table-format as an optional argument in your S columns. (siunitx behaves better like this in general)



documentclassarticle
usepackagesiunitx

sisetup%
input-ignore=,,
input-decimal-markers = .,
table-number-alignment = center,
%

begindocument
begintabularcS[table-format=2.2]
row & alignToDec \
row1: & 19,000,000.0 \
row2: & 12.38 \
row3: & 1.97 \
row4: & 91.01 \
row5: & 87,000,000.0 \
endtabular
enddocument


enter image description here



PS: Remove the luatex tag.






share|improve this answer























  • thanks a lot! My code always compiles ;)

    – ghx
    2 hours ago











  • Welcome... For me, rarely it compiles by the first try when using siunitx... (but usually my tables are somehow ... somehow)... Anyway... I tried to say that usually siunitx doesn't like text when is waiting for numbers and doesn't compile without errors. Happy TeXing

    – koleygr
    2 hours ago











  • No offense taken. Have a great day and thx for your reply.

    – ghx
    2 hours ago















3














For some reason your code compiles, but:



1) You should not (at least you have no reason to do that) use an S column type for columns that doesn't contain math.



2) If the contents of a cell inside an 'S' column is text place it inside curly braces. (This way the content will be centered by default from siunitx because it will be considered as a text). [See your "broken" alignToDec in the second column if outside of braces and place it inside braces to see the difference]



3) Use the same method as above for your big numbers...



4) You could specify the table-format as an optional argument in your S columns. (siunitx behaves better like this in general)



documentclassarticle
usepackagesiunitx

sisetup%
input-ignore=,,
input-decimal-markers = .,
table-number-alignment = center,
%

begindocument
begintabularcS[table-format=2.2]
row & alignToDec \
row1: & 19,000,000.0 \
row2: & 12.38 \
row3: & 1.97 \
row4: & 91.01 \
row5: & 87,000,000.0 \
endtabular
enddocument


enter image description here



PS: Remove the luatex tag.






share|improve this answer























  • thanks a lot! My code always compiles ;)

    – ghx
    2 hours ago











  • Welcome... For me, rarely it compiles by the first try when using siunitx... (but usually my tables are somehow ... somehow)... Anyway... I tried to say that usually siunitx doesn't like text when is waiting for numbers and doesn't compile without errors. Happy TeXing

    – koleygr
    2 hours ago











  • No offense taken. Have a great day and thx for your reply.

    – ghx
    2 hours ago













3












3








3







For some reason your code compiles, but:



1) You should not (at least you have no reason to do that) use an S column type for columns that doesn't contain math.



2) If the contents of a cell inside an 'S' column is text place it inside curly braces. (This way the content will be centered by default from siunitx because it will be considered as a text). [See your "broken" alignToDec in the second column if outside of braces and place it inside braces to see the difference]



3) Use the same method as above for your big numbers...



4) You could specify the table-format as an optional argument in your S columns. (siunitx behaves better like this in general)



documentclassarticle
usepackagesiunitx

sisetup%
input-ignore=,,
input-decimal-markers = .,
table-number-alignment = center,
%

begindocument
begintabularcS[table-format=2.2]
row & alignToDec \
row1: & 19,000,000.0 \
row2: & 12.38 \
row3: & 1.97 \
row4: & 91.01 \
row5: & 87,000,000.0 \
endtabular
enddocument


enter image description here



PS: Remove the luatex tag.






share|improve this answer













For some reason your code compiles, but:



1) You should not (at least you have no reason to do that) use an S column type for columns that doesn't contain math.



2) If the contents of a cell inside an 'S' column is text place it inside curly braces. (This way the content will be centered by default from siunitx because it will be considered as a text). [See your "broken" alignToDec in the second column if outside of braces and place it inside braces to see the difference]



3) Use the same method as above for your big numbers...



4) You could specify the table-format as an optional argument in your S columns. (siunitx behaves better like this in general)



documentclassarticle
usepackagesiunitx

sisetup%
input-ignore=,,
input-decimal-markers = .,
table-number-alignment = center,
%

begindocument
begintabularcS[table-format=2.2]
row & alignToDec \
row1: & 19,000,000.0 \
row2: & 12.38 \
row3: & 1.97 \
row4: & 91.01 \
row5: & 87,000,000.0 \
endtabular
enddocument


enter image description here



PS: Remove the luatex tag.







share|improve this answer












share|improve this answer



share|improve this answer










answered 2 hours ago









koleygrkoleygr

12.1k11038




12.1k11038












  • thanks a lot! My code always compiles ;)

    – ghx
    2 hours ago











  • Welcome... For me, rarely it compiles by the first try when using siunitx... (but usually my tables are somehow ... somehow)... Anyway... I tried to say that usually siunitx doesn't like text when is waiting for numbers and doesn't compile without errors. Happy TeXing

    – koleygr
    2 hours ago











  • No offense taken. Have a great day and thx for your reply.

    – ghx
    2 hours ago

















  • thanks a lot! My code always compiles ;)

    – ghx
    2 hours ago











  • Welcome... For me, rarely it compiles by the first try when using siunitx... (but usually my tables are somehow ... somehow)... Anyway... I tried to say that usually siunitx doesn't like text when is waiting for numbers and doesn't compile without errors. Happy TeXing

    – koleygr
    2 hours ago











  • No offense taken. Have a great day and thx for your reply.

    – ghx
    2 hours ago
















thanks a lot! My code always compiles ;)

– ghx
2 hours ago





thanks a lot! My code always compiles ;)

– ghx
2 hours ago













Welcome... For me, rarely it compiles by the first try when using siunitx... (but usually my tables are somehow ... somehow)... Anyway... I tried to say that usually siunitx doesn't like text when is waiting for numbers and doesn't compile without errors. Happy TeXing

– koleygr
2 hours ago





Welcome... For me, rarely it compiles by the first try when using siunitx... (but usually my tables are somehow ... somehow)... Anyway... I tried to say that usually siunitx doesn't like text when is waiting for numbers and doesn't compile without errors. Happy TeXing

– koleygr
2 hours ago













No offense taken. Have a great day and thx for your reply.

– ghx
2 hours ago





No offense taken. Have a great day and thx for your reply.

– ghx
2 hours ago

















draft saved

draft discarded
















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478492%2fone-large-number-in-table-with-decimals%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Isabella Eugénie Boyer Biographie | Références | Menu de navigationmodifiermodifier le codeComparator to Compute the Relative Value of a U.S. Dollar Amount – 1774 to Present.

Join wedge with single bond in chemfigHow to make only one part of double bond bold with chemfig?Crossing bonds in chemfigjoining atoms in chemfig. Two adjacent molculesHow do I selectively change bond length in chemfig?Ugly bond joints in chemfigchemfig: reaction above arrowUsing the mhchem and chemfig packages in conjunctionBonding to specific element letter using chemfigResonance hybrids in chemfigScale chemfig molecule in beamer with tikzWhy does this chemfig bond with a hook start in the middle of the atom?

Should we avoid writing fiction about historical events without extensive research?How do we write a story about genocide committed by a fascist government without falling into the “Nazi Germany” cliché?Researching sensitive subjectsShould I avoid “lecturing” my readers?Archetypical/popular historical fictionHow to write a “strong” passage?Will what worked 'back then' work today? (Novels)Historical Fiction: using you and thouHow do you make characters relatable if they exist in a completely different moral context?How do I write a MODERN combat/violence scene without being dry?Fictionizing firsthand accounts from history?Is it possible to narrate a novel in a faux-historical style without alienating the reader?