Problems with numbers (result of calculations) alignment using siunitx package inside tabular environmentsiunitx: Alignment Problems with numbers in parenthesisTabular and grid typesettingProblems with siunitx package?siunitx tabular numbers with separated uncertaintyBasic S Column Alignment with siunitx packagephantomsection inside tabular: alignment problems`siunitx` interferes with `array` and `tabular environment`Problems loading siunitx package“Undefined control sequence” Regression table from StataTable using siunitx number alignment affecting rows without numbers
Causes of bimodal distributions when bootstrapping a meta-analysis model
I need a disease
What does 'made on' mean here?
What exactly are the `size issues' preventing formation of presheaves being a left adjoint to some forgetful functor?
Should I dumb down my writing in a foreign country?
US born but as a child of foreign diplomat
What was the first story to feature the plot "the monsters were human all along"?
Does a picture or painting work with Wild Shape?
Does it make sense for a function to return a rvalue reference
Find the cheapest shipping option based on item weight
Are the Night's Watch still required?
How long would it take for people to notice a mass disappearance?
Did we get closer to another plane than we were supposed to, or was the pilot just protecting our delicate sensibilities?
SafeCracker #3 - We've Been Blocked
Why did the Apollo 13 crew extend the LM landing gear?
Why aren't nationalizations in Russia described as socialist?
How to increase the size of the cursor in Lubuntu 19.04?
Out of scope work duties and resignation
Are Finitely generated modules over a ring also finitely generated over a subring containing the identity?
Decoupling cap routing on a 4 layer PCB
Why does sound not move through a wall?
What does "Managed by Windows" do in the Power options for network connection?
How can I support myself financially as a 17 year old with a loan?
Copy previous line to current line from text file
Problems with numbers (result of calculations) alignment using siunitx package inside tabular environment
siunitx: Alignment Problems with numbers in parenthesisTabular and grid typesettingProblems with siunitx package?siunitx tabular numbers with separated uncertaintyBasic S Column Alignment with siunitx packagephantomsection inside tabular: alignment problems`siunitx` interferes with `array` and `tabular environment`Problems loading siunitx package“Undefined control sequence” Regression table from StataTable using siunitx number alignment affecting rows without numbers
I'm having some problems when try align numbers, results from calculations, using siunitx
package. That is my code.
documentclassarticle
usepackagesiunitx
usepackagefp
usepackagebooktabs
% #1: decimal places (default=2), #2: value
newcommand*KelvinToCelsius[2][2]%
FPevaltempKtoCround((#2-273.15):#1)%
numtempKtoC%
begindocument
begintabularS S
toprule
sikelvin & sicelsius \
midrule
10.3 & KelvinToCelsius10.3 \
200.34 & KelvinToCelsius200.34 \
500.26 & KelvinToCelsius500.26 \
1200.5 & KelvinToCelsius[1]1200.5\
12345 & KelvinToCelsius[0]12345 \
bottomrule
endtabular
enddocument
Which produces:
Note that the numbers in second column don't be align.
How to solve this?
tables siunitx
add a comment |
I'm having some problems when try align numbers, results from calculations, using siunitx
package. That is my code.
documentclassarticle
usepackagesiunitx
usepackagefp
usepackagebooktabs
% #1: decimal places (default=2), #2: value
newcommand*KelvinToCelsius[2][2]%
FPevaltempKtoCround((#2-273.15):#1)%
numtempKtoC%
begindocument
begintabularS S
toprule
sikelvin & sicelsius \
midrule
10.3 & KelvinToCelsius10.3 \
200.34 & KelvinToCelsius200.34 \
500.26 & KelvinToCelsius500.26 \
1200.5 & KelvinToCelsius[1]1200.5\
12345 & KelvinToCelsius[0]12345 \
bottomrule
endtabular
enddocument
Which produces:
Note that the numbers in second column don't be align.
How to solve this?
tables siunitx
Maybe section 7.2 "Expanding content in tables" of thesiunitx
manual can help you.
– leandriis
Apr 29 at 17:32
You need something expandable, use the xfp package instead of fp and avoid optional arguments.
– Ulrike Fischer
Apr 29 at 17:35
add a comment |
I'm having some problems when try align numbers, results from calculations, using siunitx
package. That is my code.
documentclassarticle
usepackagesiunitx
usepackagefp
usepackagebooktabs
% #1: decimal places (default=2), #2: value
newcommand*KelvinToCelsius[2][2]%
FPevaltempKtoCround((#2-273.15):#1)%
numtempKtoC%
begindocument
begintabularS S
toprule
sikelvin & sicelsius \
midrule
10.3 & KelvinToCelsius10.3 \
200.34 & KelvinToCelsius200.34 \
500.26 & KelvinToCelsius500.26 \
1200.5 & KelvinToCelsius[1]1200.5\
12345 & KelvinToCelsius[0]12345 \
bottomrule
endtabular
enddocument
Which produces:
Note that the numbers in second column don't be align.
How to solve this?
tables siunitx
I'm having some problems when try align numbers, results from calculations, using siunitx
package. That is my code.
documentclassarticle
usepackagesiunitx
usepackagefp
usepackagebooktabs
% #1: decimal places (default=2), #2: value
newcommand*KelvinToCelsius[2][2]%
FPevaltempKtoCround((#2-273.15):#1)%
numtempKtoC%
begindocument
begintabularS S
toprule
sikelvin & sicelsius \
midrule
10.3 & KelvinToCelsius10.3 \
200.34 & KelvinToCelsius200.34 \
500.26 & KelvinToCelsius500.26 \
1200.5 & KelvinToCelsius[1]1200.5\
12345 & KelvinToCelsius[0]12345 \
bottomrule
endtabular
enddocument
Which produces:
Note that the numbers in second column don't be align.
How to solve this?
tables siunitx
tables siunitx
asked Apr 29 at 17:13
GRSousaJrGRSousaJr
3579
3579
Maybe section 7.2 "Expanding content in tables" of thesiunitx
manual can help you.
– leandriis
Apr 29 at 17:32
You need something expandable, use the xfp package instead of fp and avoid optional arguments.
– Ulrike Fischer
Apr 29 at 17:35
add a comment |
Maybe section 7.2 "Expanding content in tables" of thesiunitx
manual can help you.
– leandriis
Apr 29 at 17:32
You need something expandable, use the xfp package instead of fp and avoid optional arguments.
– Ulrike Fischer
Apr 29 at 17:35
Maybe section 7.2 "Expanding content in tables" of the
siunitx
manual can help you.– leandriis
Apr 29 at 17:32
Maybe section 7.2 "Expanding content in tables" of the
siunitx
manual can help you.– leandriis
Apr 29 at 17:32
You need something expandable, use the xfp package instead of fp and avoid optional arguments.
– Ulrike Fischer
Apr 29 at 17:35
You need something expandable, use the xfp package instead of fp and avoid optional arguments.
– Ulrike Fischer
Apr 29 at 17:35
add a comment |
2 Answers
2
active
oldest
votes
Use the full power of expl3
; the KelvinToCelsius
command must be expandable and you can have it even with an optional argument.
Using fpeval
frees you from fp
.
documentclassarticle
usepackagesiunitx,xfp
usepackagebooktabs
% #1: decimal places (default=2), #2: value
NewExpandableDocumentCommandKelvinToCelsiusO2m%
fpevalround(#2-273.15,#1)%
begindocument
begintabular
S[table-format=5.2]
S[table-format=5.2]
toprule
sikelvin & sicelsius \
midrule
10.3 & KelvinToCelsius10.3 \
200.34 & KelvinToCelsius200.34 \
500.26 & KelvinToCelsius500.26 \
1200.5 & KelvinToCelsius[1]1200.5\
12345 & KelvinToCelsius[0]12345 \
bottomrule
endtabular
enddocument
Works perfectly!
– GRSousaJr
Apr 29 at 22:24
add a comment |
The commands must be expandable so that siunitx sees "pure numbers". Better use the xfp package for the calculations and avoid optional arguments.
documentclassarticle
usepackagesiunitx
usepackagexfp
usepackagebooktabs
% #1: decimal places (default=2), #2: value
newcommand*KelvinToCelsius[1]% no optional argument
fpevalround((#1-273.15)/2,2)%
begindocument
begintabularS S
toprule
sikelvin & sicelsius \
midrule
10.3 & KelvinToCelsius10.3 \
200.34 & KelvinToCelsius200.34 \
500.26 & KelvinToCelsius500.26 \
%1200.5 & KelvinToCelsius[1]1200.5\
%12345 & KelvinToCelsius[0]12345 \
bottomrule
endtabular
enddocument
Why no optional argument?;-)
– egreg
Apr 29 at 17:50
@egreg because I was too lazy to check if it would work with xparse.
– Ulrike Fischer
Apr 29 at 17:53
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f488277%2fproblems-with-numbers-result-of-calculations-alignment-using-siunitx-package-i%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Use the full power of expl3
; the KelvinToCelsius
command must be expandable and you can have it even with an optional argument.
Using fpeval
frees you from fp
.
documentclassarticle
usepackagesiunitx,xfp
usepackagebooktabs
% #1: decimal places (default=2), #2: value
NewExpandableDocumentCommandKelvinToCelsiusO2m%
fpevalround(#2-273.15,#1)%
begindocument
begintabular
S[table-format=5.2]
S[table-format=5.2]
toprule
sikelvin & sicelsius \
midrule
10.3 & KelvinToCelsius10.3 \
200.34 & KelvinToCelsius200.34 \
500.26 & KelvinToCelsius500.26 \
1200.5 & KelvinToCelsius[1]1200.5\
12345 & KelvinToCelsius[0]12345 \
bottomrule
endtabular
enddocument
Works perfectly!
– GRSousaJr
Apr 29 at 22:24
add a comment |
Use the full power of expl3
; the KelvinToCelsius
command must be expandable and you can have it even with an optional argument.
Using fpeval
frees you from fp
.
documentclassarticle
usepackagesiunitx,xfp
usepackagebooktabs
% #1: decimal places (default=2), #2: value
NewExpandableDocumentCommandKelvinToCelsiusO2m%
fpevalround(#2-273.15,#1)%
begindocument
begintabular
S[table-format=5.2]
S[table-format=5.2]
toprule
sikelvin & sicelsius \
midrule
10.3 & KelvinToCelsius10.3 \
200.34 & KelvinToCelsius200.34 \
500.26 & KelvinToCelsius500.26 \
1200.5 & KelvinToCelsius[1]1200.5\
12345 & KelvinToCelsius[0]12345 \
bottomrule
endtabular
enddocument
Works perfectly!
– GRSousaJr
Apr 29 at 22:24
add a comment |
Use the full power of expl3
; the KelvinToCelsius
command must be expandable and you can have it even with an optional argument.
Using fpeval
frees you from fp
.
documentclassarticle
usepackagesiunitx,xfp
usepackagebooktabs
% #1: decimal places (default=2), #2: value
NewExpandableDocumentCommandKelvinToCelsiusO2m%
fpevalround(#2-273.15,#1)%
begindocument
begintabular
S[table-format=5.2]
S[table-format=5.2]
toprule
sikelvin & sicelsius \
midrule
10.3 & KelvinToCelsius10.3 \
200.34 & KelvinToCelsius200.34 \
500.26 & KelvinToCelsius500.26 \
1200.5 & KelvinToCelsius[1]1200.5\
12345 & KelvinToCelsius[0]12345 \
bottomrule
endtabular
enddocument
Use the full power of expl3
; the KelvinToCelsius
command must be expandable and you can have it even with an optional argument.
Using fpeval
frees you from fp
.
documentclassarticle
usepackagesiunitx,xfp
usepackagebooktabs
% #1: decimal places (default=2), #2: value
NewExpandableDocumentCommandKelvinToCelsiusO2m%
fpevalround(#2-273.15,#1)%
begindocument
begintabular
S[table-format=5.2]
S[table-format=5.2]
toprule
sikelvin & sicelsius \
midrule
10.3 & KelvinToCelsius10.3 \
200.34 & KelvinToCelsius200.34 \
500.26 & KelvinToCelsius500.26 \
1200.5 & KelvinToCelsius[1]1200.5\
12345 & KelvinToCelsius[0]12345 \
bottomrule
endtabular
enddocument
answered Apr 29 at 17:49
egregegreg
738k8919393269
738k8919393269
Works perfectly!
– GRSousaJr
Apr 29 at 22:24
add a comment |
Works perfectly!
– GRSousaJr
Apr 29 at 22:24
Works perfectly!
– GRSousaJr
Apr 29 at 22:24
Works perfectly!
– GRSousaJr
Apr 29 at 22:24
add a comment |
The commands must be expandable so that siunitx sees "pure numbers". Better use the xfp package for the calculations and avoid optional arguments.
documentclassarticle
usepackagesiunitx
usepackagexfp
usepackagebooktabs
% #1: decimal places (default=2), #2: value
newcommand*KelvinToCelsius[1]% no optional argument
fpevalround((#1-273.15)/2,2)%
begindocument
begintabularS S
toprule
sikelvin & sicelsius \
midrule
10.3 & KelvinToCelsius10.3 \
200.34 & KelvinToCelsius200.34 \
500.26 & KelvinToCelsius500.26 \
%1200.5 & KelvinToCelsius[1]1200.5\
%12345 & KelvinToCelsius[0]12345 \
bottomrule
endtabular
enddocument
Why no optional argument?;-)
– egreg
Apr 29 at 17:50
@egreg because I was too lazy to check if it would work with xparse.
– Ulrike Fischer
Apr 29 at 17:53
add a comment |
The commands must be expandable so that siunitx sees "pure numbers". Better use the xfp package for the calculations and avoid optional arguments.
documentclassarticle
usepackagesiunitx
usepackagexfp
usepackagebooktabs
% #1: decimal places (default=2), #2: value
newcommand*KelvinToCelsius[1]% no optional argument
fpevalround((#1-273.15)/2,2)%
begindocument
begintabularS S
toprule
sikelvin & sicelsius \
midrule
10.3 & KelvinToCelsius10.3 \
200.34 & KelvinToCelsius200.34 \
500.26 & KelvinToCelsius500.26 \
%1200.5 & KelvinToCelsius[1]1200.5\
%12345 & KelvinToCelsius[0]12345 \
bottomrule
endtabular
enddocument
Why no optional argument?;-)
– egreg
Apr 29 at 17:50
@egreg because I was too lazy to check if it would work with xparse.
– Ulrike Fischer
Apr 29 at 17:53
add a comment |
The commands must be expandable so that siunitx sees "pure numbers". Better use the xfp package for the calculations and avoid optional arguments.
documentclassarticle
usepackagesiunitx
usepackagexfp
usepackagebooktabs
% #1: decimal places (default=2), #2: value
newcommand*KelvinToCelsius[1]% no optional argument
fpevalround((#1-273.15)/2,2)%
begindocument
begintabularS S
toprule
sikelvin & sicelsius \
midrule
10.3 & KelvinToCelsius10.3 \
200.34 & KelvinToCelsius200.34 \
500.26 & KelvinToCelsius500.26 \
%1200.5 & KelvinToCelsius[1]1200.5\
%12345 & KelvinToCelsius[0]12345 \
bottomrule
endtabular
enddocument
The commands must be expandable so that siunitx sees "pure numbers". Better use the xfp package for the calculations and avoid optional arguments.
documentclassarticle
usepackagesiunitx
usepackagexfp
usepackagebooktabs
% #1: decimal places (default=2), #2: value
newcommand*KelvinToCelsius[1]% no optional argument
fpevalround((#1-273.15)/2,2)%
begindocument
begintabularS S
toprule
sikelvin & sicelsius \
midrule
10.3 & KelvinToCelsius10.3 \
200.34 & KelvinToCelsius200.34 \
500.26 & KelvinToCelsius500.26 \
%1200.5 & KelvinToCelsius[1]1200.5\
%12345 & KelvinToCelsius[0]12345 \
bottomrule
endtabular
enddocument
answered Apr 29 at 17:44
Ulrike FischerUlrike Fischer
202k9310697
202k9310697
Why no optional argument?;-)
– egreg
Apr 29 at 17:50
@egreg because I was too lazy to check if it would work with xparse.
– Ulrike Fischer
Apr 29 at 17:53
add a comment |
Why no optional argument?;-)
– egreg
Apr 29 at 17:50
@egreg because I was too lazy to check if it would work with xparse.
– Ulrike Fischer
Apr 29 at 17:53
Why no optional argument?
;-)
– egreg
Apr 29 at 17:50
Why no optional argument?
;-)
– egreg
Apr 29 at 17:50
@egreg because I was too lazy to check if it would work with xparse.
– Ulrike Fischer
Apr 29 at 17:53
@egreg because I was too lazy to check if it would work with xparse.
– Ulrike Fischer
Apr 29 at 17:53
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f488277%2fproblems-with-numbers-result-of-calculations-alignment-using-siunitx-package-i%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Maybe section 7.2 "Expanding content in tables" of the
siunitx
manual can help you.– leandriis
Apr 29 at 17:32
You need something expandable, use the xfp package instead of fp and avoid optional arguments.
– Ulrike Fischer
Apr 29 at 17:35