Euro sign in table with siunitxColor table element with siunitx S columnsiunitx: Decimal alignment with 'less than' signTable, siunitx, render + signAligning in table with siunitxtabu package - gaps in vertical linesAlignment in siunitx tableTable with numbers in parentheses in siunitxRounding integers in table with siunitxTable Formatting using siunitxSiunitx table with significance stars not working
Ethics: Is it ethical for a professor to conduct research using a student's ideas without giving them credit?
Static forces on a rocket engine
UK visitors visa needed fast for badly injured family member
What is the difference between 词 and 汉字?
Names of all the spacecrafts on the art by Philippe “Manchu" Bouchet
Stalemate situation with all pieces on the board
How can I improve combat so my players don't always use the strategy of collectively focusing fire on one enemy at a time until it's dead?
Can a tail pipe fire occur in cruise (and why not)?
How to exit read-only mode
Is there a heavy usage of the word "bonfire" in English?
Raised concerns about a security vulnerability to various managers, for more than a year, with no results. Should I mention it to external auditors?
Isn't any conversation with the US president quid-pro-quo?
Are there any dishes that can only be cooked with a microwave?
"Startup" working hours - is it normal to be asked to work 11 hours/ day?
ASCII texturing
Bubble Sort Implementation in Python 3
Bash script that shows changing real time values from commands
Why has no one requested the tape of the Trump/Ukraine call?
Can it be viewed as a negative for PhD applications in the US if I have children?
Days in indexed month
Should I tell an editor that I believe an article I'm reviewing is not good enough for the journal?
What exactly is "Japanese" Salt and Pepper?
How to break a equation with a single "summation symbol (sum) " common?
Is "montäglich" commonly used?
Euro sign in table with siunitx
Color table element with siunitx S columnsiunitx: Decimal alignment with 'less than' signTable, siunitx, render + signAligning in table with siunitxtabu package - gaps in vertical linesAlignment in siunitx tableTable with numbers in parentheses in siunitxRounding integers in table with siunitxTable Formatting using siunitxSiunitx table with significance stars not working
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
I'm trying to align some money in a table using the S column type of the siunitx
package, but the € symbol keeps running wild (inconsistent alignment).
Using the eurosym
package helps with the alignment but puts the currency symbol up front and I would like to have it behind the number. Any suggestions?
documentclassarticle
usepackage[ngerman]babel
usepackage[locale = DE]siunitx
usepackage[gen]eurosym
begindocument
begintable[h]
centering
begintabularS
hline
A & B & C & D \
hline
-199,37 € & 0,00 € & 33,27 € & 166,10 € \
252,56 € & 0,00 € & -409,58 € & 157,02 € \
104,67 € & 0,00 € & -40,18 € & -64,48 € \
0,17 € & 0,00 € & -2,52 € & 2,35 € \
0,00 € & 0,00 € & 0,00 € & 0,00 € \
hline
endtabular
endtable
begintable[h]
centering
begintabularS
hline
A & B & C & D \
hline
euro-199,37 & euro0,00 & euro33,27 & euro166,10 \
euro252,56 & euro0,00 & euro-409,58 & euro157,02 \
euro104,67 & euro0,00 & euro-40,18 & euro-64,48 \
euro0,17 & euro0,00 & euro-2,52 & euro2,35 \
euro0,00 & euro0,00 & euro0,00 & euro0,00 \
hline
endtabular
endtable
enddocument
tables siunitx eurosym
add a comment
|
I'm trying to align some money in a table using the S column type of the siunitx
package, but the € symbol keeps running wild (inconsistent alignment).
Using the eurosym
package helps with the alignment but puts the currency symbol up front and I would like to have it behind the number. Any suggestions?
documentclassarticle
usepackage[ngerman]babel
usepackage[locale = DE]siunitx
usepackage[gen]eurosym
begindocument
begintable[h]
centering
begintabularS
hline
A & B & C & D \
hline
-199,37 € & 0,00 € & 33,27 € & 166,10 € \
252,56 € & 0,00 € & -409,58 € & 157,02 € \
104,67 € & 0,00 € & -40,18 € & -64,48 € \
0,17 € & 0,00 € & -2,52 € & 2,35 € \
0,00 € & 0,00 € & 0,00 € & 0,00 € \
hline
endtabular
endtable
begintable[h]
centering
begintabularS
hline
A & B & C & D \
hline
euro-199,37 & euro0,00 & euro33,27 & euro166,10 \
euro252,56 & euro0,00 & euro-409,58 & euro157,02 \
euro104,67 & euro0,00 & euro-40,18 & euro-64,48 \
euro0,17 & euro0,00 & euro-2,52 & euro2,35 \
euro0,00 & euro0,00 & euro0,00 & euro0,00 \
hline
endtabular
endtable
enddocument
tables siunitx eurosym
9
Typographically, this is wrong and looks horrible. Remove all euro signs and add a table note stating: "NOTE: All numbers in Euro". Or move the euro sign to the column header: "A (€) B (€)" if you have columns that is not in Euro.
– Sveinung
Sep 5 at 13:43
add a comment
|
I'm trying to align some money in a table using the S column type of the siunitx
package, but the € symbol keeps running wild (inconsistent alignment).
Using the eurosym
package helps with the alignment but puts the currency symbol up front and I would like to have it behind the number. Any suggestions?
documentclassarticle
usepackage[ngerman]babel
usepackage[locale = DE]siunitx
usepackage[gen]eurosym
begindocument
begintable[h]
centering
begintabularS
hline
A & B & C & D \
hline
-199,37 € & 0,00 € & 33,27 € & 166,10 € \
252,56 € & 0,00 € & -409,58 € & 157,02 € \
104,67 € & 0,00 € & -40,18 € & -64,48 € \
0,17 € & 0,00 € & -2,52 € & 2,35 € \
0,00 € & 0,00 € & 0,00 € & 0,00 € \
hline
endtabular
endtable
begintable[h]
centering
begintabularS
hline
A & B & C & D \
hline
euro-199,37 & euro0,00 & euro33,27 & euro166,10 \
euro252,56 & euro0,00 & euro-409,58 & euro157,02 \
euro104,67 & euro0,00 & euro-40,18 & euro-64,48 \
euro0,17 & euro0,00 & euro-2,52 & euro2,35 \
euro0,00 & euro0,00 & euro0,00 & euro0,00 \
hline
endtabular
endtable
enddocument
tables siunitx eurosym
I'm trying to align some money in a table using the S column type of the siunitx
package, but the € symbol keeps running wild (inconsistent alignment).
Using the eurosym
package helps with the alignment but puts the currency symbol up front and I would like to have it behind the number. Any suggestions?
documentclassarticle
usepackage[ngerman]babel
usepackage[locale = DE]siunitx
usepackage[gen]eurosym
begindocument
begintable[h]
centering
begintabularS
hline
A & B & C & D \
hline
-199,37 € & 0,00 € & 33,27 € & 166,10 € \
252,56 € & 0,00 € & -409,58 € & 157,02 € \
104,67 € & 0,00 € & -40,18 € & -64,48 € \
0,17 € & 0,00 € & -2,52 € & 2,35 € \
0,00 € & 0,00 € & 0,00 € & 0,00 € \
hline
endtabular
endtable
begintable[h]
centering
begintabularS
hline
A & B & C & D \
hline
euro-199,37 & euro0,00 & euro33,27 & euro166,10 \
euro252,56 & euro0,00 & euro-409,58 & euro157,02 \
euro104,67 & euro0,00 & euro-40,18 & euro-64,48 \
euro0,17 & euro0,00 & euro-2,52 & euro2,35 \
euro0,00 & euro0,00 & euro0,00 & euro0,00 \
hline
endtabular
endtable
enddocument
tables siunitx eurosym
tables siunitx eurosym
asked Sep 5 at 13:02
JMCJMC
634 bronze badges
634 bronze badges
9
Typographically, this is wrong and looks horrible. Remove all euro signs and add a table note stating: "NOTE: All numbers in Euro". Or move the euro sign to the column header: "A (€) B (€)" if you have columns that is not in Euro.
– Sveinung
Sep 5 at 13:43
add a comment
|
9
Typographically, this is wrong and looks horrible. Remove all euro signs and add a table note stating: "NOTE: All numbers in Euro". Or move the euro sign to the column header: "A (€) B (€)" if you have columns that is not in Euro.
– Sveinung
Sep 5 at 13:43
9
9
Typographically, this is wrong and looks horrible. Remove all euro signs and add a table note stating: "NOTE: All numbers in Euro". Or move the euro sign to the column header: "A (€) B (€)" if you have columns that is not in Euro.
– Sveinung
Sep 5 at 13:43
Typographically, this is wrong and looks horrible. Remove all euro signs and add a table note stating: "NOTE: All numbers in Euro". Or move the euro sign to the column header: "A (€) B (€)" if you have columns that is not in Euro.
– Sveinung
Sep 5 at 13:43
add a comment
|
5 Answers
5
active
oldest
votes
What about this?
documentclassarticle
usepackage[ngerman]babel
usepackage[T1]fontenc
usepackage[locale = DE]siunitx
usepackagetextcomp
usepackagebooktabs, makecell
newcommandmc[1]multicolumn1c#1
begindocument
begintable[h]
centering
setcellgapes3pt
makegapedcells
sisetuptable-space-text-post=,€,
table-align-text-post=false
begintabularS[table-format=-3.2]<,€
S[table-format= 1.2]<,€
*2S[table-format=-3.2]<,€
toprule
mcA & mcB & mcC & mcD cr
midrule
-199,37 & 0,00 & 33,27 & 166,10 cr
252,56 & 0,00 & -409,58 & 157,02 cr
104,67 & 0,00 & -40,18 & -64,48 cr
0,17 & 0,00 & -2,52 & 2,35 cr
0,00 & 0,00 & 0,00 & 0,00 cr
bottomrule
endtabular
endtable
enddocument
add a comment
|
I would like to suggest an alternative solution: put the euro sign in the column headers.
And egreg suggests to use eurosym
without the gen
option, this way the euro symbol is more beautiful.
documentclassarticle
usepackage[ngerman]babel
usepackage[locale = DE]siunitx
usepackageeurosym
usepackagebooktabs
begindocument
begintable[h]
centering
begintabularSSSS
toprule
A (euro) & B (euro) & C (euro) & D (euro) \
midrule
-199,37 & 0,00 & 33,27 & 166,10 \
252,56 & 0,00 & -409,58 & 157,02 \
104,67 & 0,00 & -40,18 & -64,48 \
0,17 & 0,00 & -2,52 & 2,35 \
0,00 & 0,00 & 0,00 & 0,00 \
bottomrule
endtabular
endtable
Or:
begintable[h]
centering
begintabularSSSS
toprule
A & B & C & D \
(euro) & (euro) & (euro) & (euro) \
midrule
-199,37 & 0,00 & 33,27 & 166,10 \
252,56 & 0,00 & -409,58 & 157,02 \
104,67 & 0,00 & -40,18 & -64,48 \
0,17 & 0,00 & -2,52 & 2,35 \
0,00 & 0,00 & 0,00 & 0,00 \
bottomrule
endtabular
endtable
enddocument
1
Not using the horrible Euro symbol provided with thegen
option toeurosym
would be a good thing.
– egreg
Sep 5 at 17:47
@egreg I copied from the OP's MWE. What should I use?
– CarLaTeX
Sep 5 at 17:48
1
Just remove thegen
option.
– egreg
Sep 5 at 17:49
@egreg Done, thanks!
– CarLaTeX
Sep 5 at 17:55
add a comment
|
With the appropriate table-format
option for the individual cells as well as with table-space-text-post=€
and table-align-text-post=true
you can get the following output:
documentclassarticle
usepackage[ngerman]babel
usepackage[locale = DE]siunitx
usepackage[gen]eurosym
begindocument
begintable[h]
sisetuptable-space-text-post=€, table-align-text-post=true
centering
begintabularS[table-format=-3.2]
hline
A & B & C & D \
hline
-199,37 € & 0,00 € & 33,27 € & 166,10 € \
252,56 € & 0,00 € & -409,58 € & 157,02 € \
104,67 € & 0,00 € & -40,18 € & -64,48 € \
0,17 € & 0,00 € & -2,52 € & 2,35 € \
0,00 € & 0,00 € & 0,00 € & 0,00 € \
hline
endtabular
endtable
enddocument
To avoid repeating the € symbol over and over again, I'd either put it into the column header of the corresponding columns or even into the caption of the table.
add a comment
|
Since so many have provided solution, I provide one using threeparttable to set a note in the caption regarding euro, and with columns of equal width (using array's w
-column).
documentclassarticle
usepackage[ngerman]babel
usepackagebooktabs, caption,array
usepackage[flushleft, online]threeparttable
begindocument
begintable
centering
beginthreeparttable
captionCaption for table~reftab:a, which has both a tablenotetnotea and a label labeltab:a
begintabular@*4wr1.3cm@
toprule
%multicolumn1wc1cmsmall A & multicolumn1wc1cmkern1.2emsmall B &
%multicolumn1wc1cmkern1emsmall C & multicolumn1wc1cm@kern1emsmall D \
smallscshape Head A & small Head B &small Head C &small Head D \
midrule
$-$199,37 & 0,00 & 33,27 & 166,10 \
252,56 & 0,00 & $-$409,58 & 157,02 \
104,67 & 0,00 & $-$40,18 & $-$64,48 \
0,17 & 0,00 & $-$2,52 & 2,35 \
0,00 & 0,00 & 0,00 & 0,00 \
bottomrule
endtabular
begintablenotes
item [a] footnotesize All numbers are in Euro
endtablenotes
endthreeparttable
endtable
enddocument
add a comment
|
Fundamentally same solution, but slightly improved with a thin unbreakble space between number and euro, and some padding at toˆof rows with extrarowheight
:
documentclassarticle
usepackage[ngerman]babel
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagelmodern
usepackage[locale = DE]siunitx
usepackagetextcomp
setlengthextrarowheight2pt
begindocument
begintable[h]
centering
sisetuptable-format =-3.2, table-number-alignment=center, table-space-text-post=€, table-align-text-post=false
begintabularS
hline
A & B & C & D \
hline
-199,37,€ & 0,00 ,€ & 33,27 ,€ & 166,10 \
252,56 ,€ & 0,00 ,€ & -409,58 ,€ & 157,02 ,€ \
104,67 ,€ & 0,00 ,€ & -40,18 ,€ & -64,48 ,€ \
0,17 ,€ & 0,00 ,€ & -2,52 ,€ & 2,35 ,€ \
0,00 ,€ & 0,00 ,€ & 0,00 ,€ & 0,00 ,€ \
hline
endtabular
endtable
enddocument
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/4.0/"u003ecc by-sa 4.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%2f507126%2feuro-sign-in-table-with-siunitx%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
What about this?
documentclassarticle
usepackage[ngerman]babel
usepackage[T1]fontenc
usepackage[locale = DE]siunitx
usepackagetextcomp
usepackagebooktabs, makecell
newcommandmc[1]multicolumn1c#1
begindocument
begintable[h]
centering
setcellgapes3pt
makegapedcells
sisetuptable-space-text-post=,€,
table-align-text-post=false
begintabularS[table-format=-3.2]<,€
S[table-format= 1.2]<,€
*2S[table-format=-3.2]<,€
toprule
mcA & mcB & mcC & mcD cr
midrule
-199,37 & 0,00 & 33,27 & 166,10 cr
252,56 & 0,00 & -409,58 & 157,02 cr
104,67 & 0,00 & -40,18 & -64,48 cr
0,17 & 0,00 & -2,52 & 2,35 cr
0,00 & 0,00 & 0,00 & 0,00 cr
bottomrule
endtabular
endtable
enddocument
add a comment
|
What about this?
documentclassarticle
usepackage[ngerman]babel
usepackage[T1]fontenc
usepackage[locale = DE]siunitx
usepackagetextcomp
usepackagebooktabs, makecell
newcommandmc[1]multicolumn1c#1
begindocument
begintable[h]
centering
setcellgapes3pt
makegapedcells
sisetuptable-space-text-post=,€,
table-align-text-post=false
begintabularS[table-format=-3.2]<,€
S[table-format= 1.2]<,€
*2S[table-format=-3.2]<,€
toprule
mcA & mcB & mcC & mcD cr
midrule
-199,37 & 0,00 & 33,27 & 166,10 cr
252,56 & 0,00 & -409,58 & 157,02 cr
104,67 & 0,00 & -40,18 & -64,48 cr
0,17 & 0,00 & -2,52 & 2,35 cr
0,00 & 0,00 & 0,00 & 0,00 cr
bottomrule
endtabular
endtable
enddocument
add a comment
|
What about this?
documentclassarticle
usepackage[ngerman]babel
usepackage[T1]fontenc
usepackage[locale = DE]siunitx
usepackagetextcomp
usepackagebooktabs, makecell
newcommandmc[1]multicolumn1c#1
begindocument
begintable[h]
centering
setcellgapes3pt
makegapedcells
sisetuptable-space-text-post=,€,
table-align-text-post=false
begintabularS[table-format=-3.2]<,€
S[table-format= 1.2]<,€
*2S[table-format=-3.2]<,€
toprule
mcA & mcB & mcC & mcD cr
midrule
-199,37 & 0,00 & 33,27 & 166,10 cr
252,56 & 0,00 & -409,58 & 157,02 cr
104,67 & 0,00 & -40,18 & -64,48 cr
0,17 & 0,00 & -2,52 & 2,35 cr
0,00 & 0,00 & 0,00 & 0,00 cr
bottomrule
endtabular
endtable
enddocument
What about this?
documentclassarticle
usepackage[ngerman]babel
usepackage[T1]fontenc
usepackage[locale = DE]siunitx
usepackagetextcomp
usepackagebooktabs, makecell
newcommandmc[1]multicolumn1c#1
begindocument
begintable[h]
centering
setcellgapes3pt
makegapedcells
sisetuptable-space-text-post=,€,
table-align-text-post=false
begintabularS[table-format=-3.2]<,€
S[table-format= 1.2]<,€
*2S[table-format=-3.2]<,€
toprule
mcA & mcB & mcC & mcD cr
midrule
-199,37 & 0,00 & 33,27 & 166,10 cr
252,56 & 0,00 & -409,58 & 157,02 cr
104,67 & 0,00 & -40,18 & -64,48 cr
0,17 & 0,00 & -2,52 & 2,35 cr
0,00 & 0,00 & 0,00 & 0,00 cr
bottomrule
endtabular
endtable
enddocument
answered Sep 5 at 17:39
ZarkoZarko
155k9 gold badges87 silver badges200 bronze badges
155k9 gold badges87 silver badges200 bronze badges
add a comment
|
add a comment
|
I would like to suggest an alternative solution: put the euro sign in the column headers.
And egreg suggests to use eurosym
without the gen
option, this way the euro symbol is more beautiful.
documentclassarticle
usepackage[ngerman]babel
usepackage[locale = DE]siunitx
usepackageeurosym
usepackagebooktabs
begindocument
begintable[h]
centering
begintabularSSSS
toprule
A (euro) & B (euro) & C (euro) & D (euro) \
midrule
-199,37 & 0,00 & 33,27 & 166,10 \
252,56 & 0,00 & -409,58 & 157,02 \
104,67 & 0,00 & -40,18 & -64,48 \
0,17 & 0,00 & -2,52 & 2,35 \
0,00 & 0,00 & 0,00 & 0,00 \
bottomrule
endtabular
endtable
Or:
begintable[h]
centering
begintabularSSSS
toprule
A & B & C & D \
(euro) & (euro) & (euro) & (euro) \
midrule
-199,37 & 0,00 & 33,27 & 166,10 \
252,56 & 0,00 & -409,58 & 157,02 \
104,67 & 0,00 & -40,18 & -64,48 \
0,17 & 0,00 & -2,52 & 2,35 \
0,00 & 0,00 & 0,00 & 0,00 \
bottomrule
endtabular
endtable
enddocument
1
Not using the horrible Euro symbol provided with thegen
option toeurosym
would be a good thing.
– egreg
Sep 5 at 17:47
@egreg I copied from the OP's MWE. What should I use?
– CarLaTeX
Sep 5 at 17:48
1
Just remove thegen
option.
– egreg
Sep 5 at 17:49
@egreg Done, thanks!
– CarLaTeX
Sep 5 at 17:55
add a comment
|
I would like to suggest an alternative solution: put the euro sign in the column headers.
And egreg suggests to use eurosym
without the gen
option, this way the euro symbol is more beautiful.
documentclassarticle
usepackage[ngerman]babel
usepackage[locale = DE]siunitx
usepackageeurosym
usepackagebooktabs
begindocument
begintable[h]
centering
begintabularSSSS
toprule
A (euro) & B (euro) & C (euro) & D (euro) \
midrule
-199,37 & 0,00 & 33,27 & 166,10 \
252,56 & 0,00 & -409,58 & 157,02 \
104,67 & 0,00 & -40,18 & -64,48 \
0,17 & 0,00 & -2,52 & 2,35 \
0,00 & 0,00 & 0,00 & 0,00 \
bottomrule
endtabular
endtable
Or:
begintable[h]
centering
begintabularSSSS
toprule
A & B & C & D \
(euro) & (euro) & (euro) & (euro) \
midrule
-199,37 & 0,00 & 33,27 & 166,10 \
252,56 & 0,00 & -409,58 & 157,02 \
104,67 & 0,00 & -40,18 & -64,48 \
0,17 & 0,00 & -2,52 & 2,35 \
0,00 & 0,00 & 0,00 & 0,00 \
bottomrule
endtabular
endtable
enddocument
1
Not using the horrible Euro symbol provided with thegen
option toeurosym
would be a good thing.
– egreg
Sep 5 at 17:47
@egreg I copied from the OP's MWE. What should I use?
– CarLaTeX
Sep 5 at 17:48
1
Just remove thegen
option.
– egreg
Sep 5 at 17:49
@egreg Done, thanks!
– CarLaTeX
Sep 5 at 17:55
add a comment
|
I would like to suggest an alternative solution: put the euro sign in the column headers.
And egreg suggests to use eurosym
without the gen
option, this way the euro symbol is more beautiful.
documentclassarticle
usepackage[ngerman]babel
usepackage[locale = DE]siunitx
usepackageeurosym
usepackagebooktabs
begindocument
begintable[h]
centering
begintabularSSSS
toprule
A (euro) & B (euro) & C (euro) & D (euro) \
midrule
-199,37 & 0,00 & 33,27 & 166,10 \
252,56 & 0,00 & -409,58 & 157,02 \
104,67 & 0,00 & -40,18 & -64,48 \
0,17 & 0,00 & -2,52 & 2,35 \
0,00 & 0,00 & 0,00 & 0,00 \
bottomrule
endtabular
endtable
Or:
begintable[h]
centering
begintabularSSSS
toprule
A & B & C & D \
(euro) & (euro) & (euro) & (euro) \
midrule
-199,37 & 0,00 & 33,27 & 166,10 \
252,56 & 0,00 & -409,58 & 157,02 \
104,67 & 0,00 & -40,18 & -64,48 \
0,17 & 0,00 & -2,52 & 2,35 \
0,00 & 0,00 & 0,00 & 0,00 \
bottomrule
endtabular
endtable
enddocument
I would like to suggest an alternative solution: put the euro sign in the column headers.
And egreg suggests to use eurosym
without the gen
option, this way the euro symbol is more beautiful.
documentclassarticle
usepackage[ngerman]babel
usepackage[locale = DE]siunitx
usepackageeurosym
usepackagebooktabs
begindocument
begintable[h]
centering
begintabularSSSS
toprule
A (euro) & B (euro) & C (euro) & D (euro) \
midrule
-199,37 & 0,00 & 33,27 & 166,10 \
252,56 & 0,00 & -409,58 & 157,02 \
104,67 & 0,00 & -40,18 & -64,48 \
0,17 & 0,00 & -2,52 & 2,35 \
0,00 & 0,00 & 0,00 & 0,00 \
bottomrule
endtabular
endtable
Or:
begintable[h]
centering
begintabularSSSS
toprule
A & B & C & D \
(euro) & (euro) & (euro) & (euro) \
midrule
-199,37 & 0,00 & 33,27 & 166,10 \
252,56 & 0,00 & -409,58 & 157,02 \
104,67 & 0,00 & -40,18 & -64,48 \
0,17 & 0,00 & -2,52 & 2,35 \
0,00 & 0,00 & 0,00 & 0,00 \
bottomrule
endtabular
endtable
enddocument
edited Sep 5 at 17:54
answered Sep 5 at 17:28
CarLaTeXCarLaTeX
42.6k5 gold badges62 silver badges172 bronze badges
42.6k5 gold badges62 silver badges172 bronze badges
1
Not using the horrible Euro symbol provided with thegen
option toeurosym
would be a good thing.
– egreg
Sep 5 at 17:47
@egreg I copied from the OP's MWE. What should I use?
– CarLaTeX
Sep 5 at 17:48
1
Just remove thegen
option.
– egreg
Sep 5 at 17:49
@egreg Done, thanks!
– CarLaTeX
Sep 5 at 17:55
add a comment
|
1
Not using the horrible Euro symbol provided with thegen
option toeurosym
would be a good thing.
– egreg
Sep 5 at 17:47
@egreg I copied from the OP's MWE. What should I use?
– CarLaTeX
Sep 5 at 17:48
1
Just remove thegen
option.
– egreg
Sep 5 at 17:49
@egreg Done, thanks!
– CarLaTeX
Sep 5 at 17:55
1
1
Not using the horrible Euro symbol provided with the
gen
option to eurosym
would be a good thing.– egreg
Sep 5 at 17:47
Not using the horrible Euro symbol provided with the
gen
option to eurosym
would be a good thing.– egreg
Sep 5 at 17:47
@egreg I copied from the OP's MWE. What should I use?
– CarLaTeX
Sep 5 at 17:48
@egreg I copied from the OP's MWE. What should I use?
– CarLaTeX
Sep 5 at 17:48
1
1
Just remove the
gen
option.– egreg
Sep 5 at 17:49
Just remove the
gen
option.– egreg
Sep 5 at 17:49
@egreg Done, thanks!
– CarLaTeX
Sep 5 at 17:55
@egreg Done, thanks!
– CarLaTeX
Sep 5 at 17:55
add a comment
|
With the appropriate table-format
option for the individual cells as well as with table-space-text-post=€
and table-align-text-post=true
you can get the following output:
documentclassarticle
usepackage[ngerman]babel
usepackage[locale = DE]siunitx
usepackage[gen]eurosym
begindocument
begintable[h]
sisetuptable-space-text-post=€, table-align-text-post=true
centering
begintabularS[table-format=-3.2]
hline
A & B & C & D \
hline
-199,37 € & 0,00 € & 33,27 € & 166,10 € \
252,56 € & 0,00 € & -409,58 € & 157,02 € \
104,67 € & 0,00 € & -40,18 € & -64,48 € \
0,17 € & 0,00 € & -2,52 € & 2,35 € \
0,00 € & 0,00 € & 0,00 € & 0,00 € \
hline
endtabular
endtable
enddocument
To avoid repeating the € symbol over and over again, I'd either put it into the column header of the corresponding columns or even into the caption of the table.
add a comment
|
With the appropriate table-format
option for the individual cells as well as with table-space-text-post=€
and table-align-text-post=true
you can get the following output:
documentclassarticle
usepackage[ngerman]babel
usepackage[locale = DE]siunitx
usepackage[gen]eurosym
begindocument
begintable[h]
sisetuptable-space-text-post=€, table-align-text-post=true
centering
begintabularS[table-format=-3.2]
hline
A & B & C & D \
hline
-199,37 € & 0,00 € & 33,27 € & 166,10 € \
252,56 € & 0,00 € & -409,58 € & 157,02 € \
104,67 € & 0,00 € & -40,18 € & -64,48 € \
0,17 € & 0,00 € & -2,52 € & 2,35 € \
0,00 € & 0,00 € & 0,00 € & 0,00 € \
hline
endtabular
endtable
enddocument
To avoid repeating the € symbol over and over again, I'd either put it into the column header of the corresponding columns or even into the caption of the table.
add a comment
|
With the appropriate table-format
option for the individual cells as well as with table-space-text-post=€
and table-align-text-post=true
you can get the following output:
documentclassarticle
usepackage[ngerman]babel
usepackage[locale = DE]siunitx
usepackage[gen]eurosym
begindocument
begintable[h]
sisetuptable-space-text-post=€, table-align-text-post=true
centering
begintabularS[table-format=-3.2]
hline
A & B & C & D \
hline
-199,37 € & 0,00 € & 33,27 € & 166,10 € \
252,56 € & 0,00 € & -409,58 € & 157,02 € \
104,67 € & 0,00 € & -40,18 € & -64,48 € \
0,17 € & 0,00 € & -2,52 € & 2,35 € \
0,00 € & 0,00 € & 0,00 € & 0,00 € \
hline
endtabular
endtable
enddocument
To avoid repeating the € symbol over and over again, I'd either put it into the column header of the corresponding columns or even into the caption of the table.
With the appropriate table-format
option for the individual cells as well as with table-space-text-post=€
and table-align-text-post=true
you can get the following output:
documentclassarticle
usepackage[ngerman]babel
usepackage[locale = DE]siunitx
usepackage[gen]eurosym
begindocument
begintable[h]
sisetuptable-space-text-post=€, table-align-text-post=true
centering
begintabularS[table-format=-3.2]
hline
A & B & C & D \
hline
-199,37 € & 0,00 € & 33,27 € & 166,10 € \
252,56 € & 0,00 € & -409,58 € & 157,02 € \
104,67 € & 0,00 € & -40,18 € & -64,48 € \
0,17 € & 0,00 € & -2,52 € & 2,35 € \
0,00 € & 0,00 € & 0,00 € & 0,00 € \
hline
endtabular
endtable
enddocument
To avoid repeating the € symbol over and over again, I'd either put it into the column header of the corresponding columns or even into the caption of the table.
answered Sep 5 at 13:09
leandriisleandriis
23.3k1 gold badge12 silver badges41 bronze badges
23.3k1 gold badge12 silver badges41 bronze badges
add a comment
|
add a comment
|
Since so many have provided solution, I provide one using threeparttable to set a note in the caption regarding euro, and with columns of equal width (using array's w
-column).
documentclassarticle
usepackage[ngerman]babel
usepackagebooktabs, caption,array
usepackage[flushleft, online]threeparttable
begindocument
begintable
centering
beginthreeparttable
captionCaption for table~reftab:a, which has both a tablenotetnotea and a label labeltab:a
begintabular@*4wr1.3cm@
toprule
%multicolumn1wc1cmsmall A & multicolumn1wc1cmkern1.2emsmall B &
%multicolumn1wc1cmkern1emsmall C & multicolumn1wc1cm@kern1emsmall D \
smallscshape Head A & small Head B &small Head C &small Head D \
midrule
$-$199,37 & 0,00 & 33,27 & 166,10 \
252,56 & 0,00 & $-$409,58 & 157,02 \
104,67 & 0,00 & $-$40,18 & $-$64,48 \
0,17 & 0,00 & $-$2,52 & 2,35 \
0,00 & 0,00 & 0,00 & 0,00 \
bottomrule
endtabular
begintablenotes
item [a] footnotesize All numbers are in Euro
endtablenotes
endthreeparttable
endtable
enddocument
add a comment
|
Since so many have provided solution, I provide one using threeparttable to set a note in the caption regarding euro, and with columns of equal width (using array's w
-column).
documentclassarticle
usepackage[ngerman]babel
usepackagebooktabs, caption,array
usepackage[flushleft, online]threeparttable
begindocument
begintable
centering
beginthreeparttable
captionCaption for table~reftab:a, which has both a tablenotetnotea and a label labeltab:a
begintabular@*4wr1.3cm@
toprule
%multicolumn1wc1cmsmall A & multicolumn1wc1cmkern1.2emsmall B &
%multicolumn1wc1cmkern1emsmall C & multicolumn1wc1cm@kern1emsmall D \
smallscshape Head A & small Head B &small Head C &small Head D \
midrule
$-$199,37 & 0,00 & 33,27 & 166,10 \
252,56 & 0,00 & $-$409,58 & 157,02 \
104,67 & 0,00 & $-$40,18 & $-$64,48 \
0,17 & 0,00 & $-$2,52 & 2,35 \
0,00 & 0,00 & 0,00 & 0,00 \
bottomrule
endtabular
begintablenotes
item [a] footnotesize All numbers are in Euro
endtablenotes
endthreeparttable
endtable
enddocument
add a comment
|
Since so many have provided solution, I provide one using threeparttable to set a note in the caption regarding euro, and with columns of equal width (using array's w
-column).
documentclassarticle
usepackage[ngerman]babel
usepackagebooktabs, caption,array
usepackage[flushleft, online]threeparttable
begindocument
begintable
centering
beginthreeparttable
captionCaption for table~reftab:a, which has both a tablenotetnotea and a label labeltab:a
begintabular@*4wr1.3cm@
toprule
%multicolumn1wc1cmsmall A & multicolumn1wc1cmkern1.2emsmall B &
%multicolumn1wc1cmkern1emsmall C & multicolumn1wc1cm@kern1emsmall D \
smallscshape Head A & small Head B &small Head C &small Head D \
midrule
$-$199,37 & 0,00 & 33,27 & 166,10 \
252,56 & 0,00 & $-$409,58 & 157,02 \
104,67 & 0,00 & $-$40,18 & $-$64,48 \
0,17 & 0,00 & $-$2,52 & 2,35 \
0,00 & 0,00 & 0,00 & 0,00 \
bottomrule
endtabular
begintablenotes
item [a] footnotesize All numbers are in Euro
endtablenotes
endthreeparttable
endtable
enddocument
Since so many have provided solution, I provide one using threeparttable to set a note in the caption regarding euro, and with columns of equal width (using array's w
-column).
documentclassarticle
usepackage[ngerman]babel
usepackagebooktabs, caption,array
usepackage[flushleft, online]threeparttable
begindocument
begintable
centering
beginthreeparttable
captionCaption for table~reftab:a, which has both a tablenotetnotea and a label labeltab:a
begintabular@*4wr1.3cm@
toprule
%multicolumn1wc1cmsmall A & multicolumn1wc1cmkern1.2emsmall B &
%multicolumn1wc1cmkern1emsmall C & multicolumn1wc1cm@kern1emsmall D \
smallscshape Head A & small Head B &small Head C &small Head D \
midrule
$-$199,37 & 0,00 & 33,27 & 166,10 \
252,56 & 0,00 & $-$409,58 & 157,02 \
104,67 & 0,00 & $-$40,18 & $-$64,48 \
0,17 & 0,00 & $-$2,52 & 2,35 \
0,00 & 0,00 & 0,00 & 0,00 \
bottomrule
endtabular
begintablenotes
item [a] footnotesize All numbers are in Euro
endtablenotes
endthreeparttable
endtable
enddocument
edited Sep 6 at 9:37
answered Sep 5 at 21:43
SveinungSveinung
15.7k2 gold badges39 silver badges64 bronze badges
15.7k2 gold badges39 silver badges64 bronze badges
add a comment
|
add a comment
|
Fundamentally same solution, but slightly improved with a thin unbreakble space between number and euro, and some padding at toˆof rows with extrarowheight
:
documentclassarticle
usepackage[ngerman]babel
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagelmodern
usepackage[locale = DE]siunitx
usepackagetextcomp
setlengthextrarowheight2pt
begindocument
begintable[h]
centering
sisetuptable-format =-3.2, table-number-alignment=center, table-space-text-post=€, table-align-text-post=false
begintabularS
hline
A & B & C & D \
hline
-199,37,€ & 0,00 ,€ & 33,27 ,€ & 166,10 \
252,56 ,€ & 0,00 ,€ & -409,58 ,€ & 157,02 ,€ \
104,67 ,€ & 0,00 ,€ & -40,18 ,€ & -64,48 ,€ \
0,17 ,€ & 0,00 ,€ & -2,52 ,€ & 2,35 ,€ \
0,00 ,€ & 0,00 ,€ & 0,00 ,€ & 0,00 ,€ \
hline
endtabular
endtable
enddocument
add a comment
|
Fundamentally same solution, but slightly improved with a thin unbreakble space between number and euro, and some padding at toˆof rows with extrarowheight
:
documentclassarticle
usepackage[ngerman]babel
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagelmodern
usepackage[locale = DE]siunitx
usepackagetextcomp
setlengthextrarowheight2pt
begindocument
begintable[h]
centering
sisetuptable-format =-3.2, table-number-alignment=center, table-space-text-post=€, table-align-text-post=false
begintabularS
hline
A & B & C & D \
hline
-199,37,€ & 0,00 ,€ & 33,27 ,€ & 166,10 \
252,56 ,€ & 0,00 ,€ & -409,58 ,€ & 157,02 ,€ \
104,67 ,€ & 0,00 ,€ & -40,18 ,€ & -64,48 ,€ \
0,17 ,€ & 0,00 ,€ & -2,52 ,€ & 2,35 ,€ \
0,00 ,€ & 0,00 ,€ & 0,00 ,€ & 0,00 ,€ \
hline
endtabular
endtable
enddocument
add a comment
|
Fundamentally same solution, but slightly improved with a thin unbreakble space between number and euro, and some padding at toˆof rows with extrarowheight
:
documentclassarticle
usepackage[ngerman]babel
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagelmodern
usepackage[locale = DE]siunitx
usepackagetextcomp
setlengthextrarowheight2pt
begindocument
begintable[h]
centering
sisetuptable-format =-3.2, table-number-alignment=center, table-space-text-post=€, table-align-text-post=false
begintabularS
hline
A & B & C & D \
hline
-199,37,€ & 0,00 ,€ & 33,27 ,€ & 166,10 \
252,56 ,€ & 0,00 ,€ & -409,58 ,€ & 157,02 ,€ \
104,67 ,€ & 0,00 ,€ & -40,18 ,€ & -64,48 ,€ \
0,17 ,€ & 0,00 ,€ & -2,52 ,€ & 2,35 ,€ \
0,00 ,€ & 0,00 ,€ & 0,00 ,€ & 0,00 ,€ \
hline
endtabular
endtable
enddocument
Fundamentally same solution, but slightly improved with a thin unbreakble space between number and euro, and some padding at toˆof rows with extrarowheight
:
documentclassarticle
usepackage[ngerman]babel
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagelmodern
usepackage[locale = DE]siunitx
usepackagetextcomp
setlengthextrarowheight2pt
begindocument
begintable[h]
centering
sisetuptable-format =-3.2, table-number-alignment=center, table-space-text-post=€, table-align-text-post=false
begintabularS
hline
A & B & C & D \
hline
-199,37,€ & 0,00 ,€ & 33,27 ,€ & 166,10 \
252,56 ,€ & 0,00 ,€ & -409,58 ,€ & 157,02 ,€ \
104,67 ,€ & 0,00 ,€ & -40,18 ,€ & -64,48 ,€ \
0,17 ,€ & 0,00 ,€ & -2,52 ,€ & 2,35 ,€ \
0,00 ,€ & 0,00 ,€ & 0,00 ,€ & 0,00 ,€ \
hline
endtabular
endtable
enddocument
answered Sep 5 at 16:55
BernardBernard
197k8 gold badges88 silver badges233 bronze badges
197k8 gold badges88 silver badges233 bronze badges
add a comment
|
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%2f507126%2feuro-sign-in-table-with-siunitx%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
9
Typographically, this is wrong and looks horrible. Remove all euro signs and add a table note stating: "NOTE: All numbers in Euro". Or move the euro sign to the column header: "A (€) B (€)" if you have columns that is not in Euro.
– Sveinung
Sep 5 at 13:43