Use of currency symbols along with a thousand separator
I frequently use the eurosym
package to typeset Euro values.
documentclass{article}
usepackage{eurosym}
begin{document}
EUR{100000}
end{document}
This translates into '€ 100000'.
It however misses the option for thousands separators. For an English text, I'd like to convert this into '€ 100,000'. In a German text, one would rather do '100.000 €'. The placement of the Euro sign is already taken care of by the eurosym package.
Is there a way (ideally, a package) that provides this or does someone have an idea how to achieve this easily?
units
add a comment |
I frequently use the eurosym
package to typeset Euro values.
documentclass{article}
usepackage{eurosym}
begin{document}
EUR{100000}
end{document}
This translates into '€ 100000'.
It however misses the option for thousands separators. For an English text, I'd like to convert this into '€ 100,000'. In a German text, one would rather do '100.000 €'. The placement of the Euro sign is already taken care of by the eurosym package.
Is there a way (ideally, a package) that provides this or does someone have an idea how to achieve this easily?
units
3
Have you had a look at thesiunitx
package? It can also handle currency with a special syntax. And includes various tools to format numbers
– daleif
Jan 15 at 13:28
Not yet, I'll check that out
– E. Sommer
Jan 15 at 13:36
add a comment |
I frequently use the eurosym
package to typeset Euro values.
documentclass{article}
usepackage{eurosym}
begin{document}
EUR{100000}
end{document}
This translates into '€ 100000'.
It however misses the option for thousands separators. For an English text, I'd like to convert this into '€ 100,000'. In a German text, one would rather do '100.000 €'. The placement of the Euro sign is already taken care of by the eurosym package.
Is there a way (ideally, a package) that provides this or does someone have an idea how to achieve this easily?
units
I frequently use the eurosym
package to typeset Euro values.
documentclass{article}
usepackage{eurosym}
begin{document}
EUR{100000}
end{document}
This translates into '€ 100000'.
It however misses the option for thousands separators. For an English text, I'd like to convert this into '€ 100,000'. In a German text, one would rather do '100.000 €'. The placement of the Euro sign is already taken care of by the eurosym package.
Is there a way (ideally, a package) that provides this or does someone have an idea how to achieve this easily?
units
units
edited Jan 15 at 13:25
E. Sommer
asked Jan 15 at 13:19
E. SommerE. Sommer
1546
1546
3
Have you had a look at thesiunitx
package? It can also handle currency with a special syntax. And includes various tools to format numbers
– daleif
Jan 15 at 13:28
Not yet, I'll check that out
– E. Sommer
Jan 15 at 13:36
add a comment |
3
Have you had a look at thesiunitx
package? It can also handle currency with a special syntax. And includes various tools to format numbers
– daleif
Jan 15 at 13:28
Not yet, I'll check that out
– E. Sommer
Jan 15 at 13:36
3
3
Have you had a look at the
siunitx
package? It can also handle currency with a special syntax. And includes various tools to format numbers– daleif
Jan 15 at 13:28
Have you had a look at the
siunitx
package? It can also handle currency with a special syntax. And includes various tools to format numbers– daleif
Jan 15 at 13:28
Not yet, I'll check that out
– E. Sommer
Jan 15 at 13:36
Not yet, I'll check that out
– E. Sommer
Jan 15 at 13:36
add a comment |
2 Answers
2
active
oldest
votes
Just use the same eurosym
package along with sistyle
package in which you define the separator location to be thousand using SIthousandsep{,}
. Then you can use this
documentclass{article}
usepackage{eurosym}
usepackage{sistyle}
SIthousandsep{,}
newcommand{euros}[1]{euro{num{#1}}}
begin{document}
I have a 5-figure pay check with euros{40000}.
Now I am a millionaire with euros{4000000}.
I wish I own a Ferrari worth of euros{400000000000} (I have no idea how much that costs).
end{document}
to get:
PS: I prefer to use euro{...}
instead of EUR{...}
. Because, the latter gives an additional spurious space which, I personally do not prefer ;)
The output with EUR{...}
:
Also, note that you can use just euro
as well.
1
I like EUR{} because that way I don't have to bother about the language I'm writing in ;)
– E. Sommer
Jan 15 at 21:12
What do you mean by that?
– Raaja
Jan 15 at 21:20
Because EUR{} recognizes the babel setting and sets the euro sign to the left or the right accordingly.
– E. Sommer
Jan 15 at 21:27
1
Sorry for raising this old question again. But with your codeeuros{1000}
does not have a separator. How does one make this work for four digits?
– E. Sommer
Mar 6 at 11:00
1
@E.Sommer Very nice remark! I think this deserves to be a new question. Right now I dont have a solution for that. But I will work on that.
– Raaja
Mar 6 at 11:32
|
show 1 more comment
Combine eurosym
with siunitx
:
documentclass{article}
usepackage{eurosym}
usepackage{siunitx}
newcommand{eur}[2]{EUR{num[#1]{#2}}}
begin{document}
eur{10000}
eur[group-separator={,}]{10000}
sisetup{group-separator={,}}
eur{10000}
end{document}
A particular option for number formatting can be passed as optional argument or set by default with sisetup
.
The same but with usepackage[right]{eurosym}
:
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%2f470232%2fuse-of-currency-symbols-along-with-a-thousand-separator%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
Just use the same eurosym
package along with sistyle
package in which you define the separator location to be thousand using SIthousandsep{,}
. Then you can use this
documentclass{article}
usepackage{eurosym}
usepackage{sistyle}
SIthousandsep{,}
newcommand{euros}[1]{euro{num{#1}}}
begin{document}
I have a 5-figure pay check with euros{40000}.
Now I am a millionaire with euros{4000000}.
I wish I own a Ferrari worth of euros{400000000000} (I have no idea how much that costs).
end{document}
to get:
PS: I prefer to use euro{...}
instead of EUR{...}
. Because, the latter gives an additional spurious space which, I personally do not prefer ;)
The output with EUR{...}
:
Also, note that you can use just euro
as well.
1
I like EUR{} because that way I don't have to bother about the language I'm writing in ;)
– E. Sommer
Jan 15 at 21:12
What do you mean by that?
– Raaja
Jan 15 at 21:20
Because EUR{} recognizes the babel setting and sets the euro sign to the left or the right accordingly.
– E. Sommer
Jan 15 at 21:27
1
Sorry for raising this old question again. But with your codeeuros{1000}
does not have a separator. How does one make this work for four digits?
– E. Sommer
Mar 6 at 11:00
1
@E.Sommer Very nice remark! I think this deserves to be a new question. Right now I dont have a solution for that. But I will work on that.
– Raaja
Mar 6 at 11:32
|
show 1 more comment
Just use the same eurosym
package along with sistyle
package in which you define the separator location to be thousand using SIthousandsep{,}
. Then you can use this
documentclass{article}
usepackage{eurosym}
usepackage{sistyle}
SIthousandsep{,}
newcommand{euros}[1]{euro{num{#1}}}
begin{document}
I have a 5-figure pay check with euros{40000}.
Now I am a millionaire with euros{4000000}.
I wish I own a Ferrari worth of euros{400000000000} (I have no idea how much that costs).
end{document}
to get:
PS: I prefer to use euro{...}
instead of EUR{...}
. Because, the latter gives an additional spurious space which, I personally do not prefer ;)
The output with EUR{...}
:
Also, note that you can use just euro
as well.
1
I like EUR{} because that way I don't have to bother about the language I'm writing in ;)
– E. Sommer
Jan 15 at 21:12
What do you mean by that?
– Raaja
Jan 15 at 21:20
Because EUR{} recognizes the babel setting and sets the euro sign to the left or the right accordingly.
– E. Sommer
Jan 15 at 21:27
1
Sorry for raising this old question again. But with your codeeuros{1000}
does not have a separator. How does one make this work for four digits?
– E. Sommer
Mar 6 at 11:00
1
@E.Sommer Very nice remark! I think this deserves to be a new question. Right now I dont have a solution for that. But I will work on that.
– Raaja
Mar 6 at 11:32
|
show 1 more comment
Just use the same eurosym
package along with sistyle
package in which you define the separator location to be thousand using SIthousandsep{,}
. Then you can use this
documentclass{article}
usepackage{eurosym}
usepackage{sistyle}
SIthousandsep{,}
newcommand{euros}[1]{euro{num{#1}}}
begin{document}
I have a 5-figure pay check with euros{40000}.
Now I am a millionaire with euros{4000000}.
I wish I own a Ferrari worth of euros{400000000000} (I have no idea how much that costs).
end{document}
to get:
PS: I prefer to use euro{...}
instead of EUR{...}
. Because, the latter gives an additional spurious space which, I personally do not prefer ;)
The output with EUR{...}
:
Also, note that you can use just euro
as well.
Just use the same eurosym
package along with sistyle
package in which you define the separator location to be thousand using SIthousandsep{,}
. Then you can use this
documentclass{article}
usepackage{eurosym}
usepackage{sistyle}
SIthousandsep{,}
newcommand{euros}[1]{euro{num{#1}}}
begin{document}
I have a 5-figure pay check with euros{40000}.
Now I am a millionaire with euros{4000000}.
I wish I own a Ferrari worth of euros{400000000000} (I have no idea how much that costs).
end{document}
to get:
PS: I prefer to use euro{...}
instead of EUR{...}
. Because, the latter gives an additional spurious space which, I personally do not prefer ;)
The output with EUR{...}
:
Also, note that you can use just euro
as well.
answered Jan 15 at 14:24
RaajaRaaja
5,46121645
5,46121645
1
I like EUR{} because that way I don't have to bother about the language I'm writing in ;)
– E. Sommer
Jan 15 at 21:12
What do you mean by that?
– Raaja
Jan 15 at 21:20
Because EUR{} recognizes the babel setting and sets the euro sign to the left or the right accordingly.
– E. Sommer
Jan 15 at 21:27
1
Sorry for raising this old question again. But with your codeeuros{1000}
does not have a separator. How does one make this work for four digits?
– E. Sommer
Mar 6 at 11:00
1
@E.Sommer Very nice remark! I think this deserves to be a new question. Right now I dont have a solution for that. But I will work on that.
– Raaja
Mar 6 at 11:32
|
show 1 more comment
1
I like EUR{} because that way I don't have to bother about the language I'm writing in ;)
– E. Sommer
Jan 15 at 21:12
What do you mean by that?
– Raaja
Jan 15 at 21:20
Because EUR{} recognizes the babel setting and sets the euro sign to the left or the right accordingly.
– E. Sommer
Jan 15 at 21:27
1
Sorry for raising this old question again. But with your codeeuros{1000}
does not have a separator. How does one make this work for four digits?
– E. Sommer
Mar 6 at 11:00
1
@E.Sommer Very nice remark! I think this deserves to be a new question. Right now I dont have a solution for that. But I will work on that.
– Raaja
Mar 6 at 11:32
1
1
I like EUR{} because that way I don't have to bother about the language I'm writing in ;)
– E. Sommer
Jan 15 at 21:12
I like EUR{} because that way I don't have to bother about the language I'm writing in ;)
– E. Sommer
Jan 15 at 21:12
What do you mean by that?
– Raaja
Jan 15 at 21:20
What do you mean by that?
– Raaja
Jan 15 at 21:20
Because EUR{} recognizes the babel setting and sets the euro sign to the left or the right accordingly.
– E. Sommer
Jan 15 at 21:27
Because EUR{} recognizes the babel setting and sets the euro sign to the left or the right accordingly.
– E. Sommer
Jan 15 at 21:27
1
1
Sorry for raising this old question again. But with your code
euros{1000}
does not have a separator. How does one make this work for four digits?– E. Sommer
Mar 6 at 11:00
Sorry for raising this old question again. But with your code
euros{1000}
does not have a separator. How does one make this work for four digits?– E. Sommer
Mar 6 at 11:00
1
1
@E.Sommer Very nice remark! I think this deserves to be a new question. Right now I dont have a solution for that. But I will work on that.
– Raaja
Mar 6 at 11:32
@E.Sommer Very nice remark! I think this deserves to be a new question. Right now I dont have a solution for that. But I will work on that.
– Raaja
Mar 6 at 11:32
|
show 1 more comment
Combine eurosym
with siunitx
:
documentclass{article}
usepackage{eurosym}
usepackage{siunitx}
newcommand{eur}[2]{EUR{num[#1]{#2}}}
begin{document}
eur{10000}
eur[group-separator={,}]{10000}
sisetup{group-separator={,}}
eur{10000}
end{document}
A particular option for number formatting can be passed as optional argument or set by default with sisetup
.
The same but with usepackage[right]{eurosym}
:
add a comment |
Combine eurosym
with siunitx
:
documentclass{article}
usepackage{eurosym}
usepackage{siunitx}
newcommand{eur}[2]{EUR{num[#1]{#2}}}
begin{document}
eur{10000}
eur[group-separator={,}]{10000}
sisetup{group-separator={,}}
eur{10000}
end{document}
A particular option for number formatting can be passed as optional argument or set by default with sisetup
.
The same but with usepackage[right]{eurosym}
:
add a comment |
Combine eurosym
with siunitx
:
documentclass{article}
usepackage{eurosym}
usepackage{siunitx}
newcommand{eur}[2]{EUR{num[#1]{#2}}}
begin{document}
eur{10000}
eur[group-separator={,}]{10000}
sisetup{group-separator={,}}
eur{10000}
end{document}
A particular option for number formatting can be passed as optional argument or set by default with sisetup
.
The same but with usepackage[right]{eurosym}
:
Combine eurosym
with siunitx
:
documentclass{article}
usepackage{eurosym}
usepackage{siunitx}
newcommand{eur}[2]{EUR{num[#1]{#2}}}
begin{document}
eur{10000}
eur[group-separator={,}]{10000}
sisetup{group-separator={,}}
eur{10000}
end{document}
A particular option for number formatting can be passed as optional argument or set by default with sisetup
.
The same but with usepackage[right]{eurosym}
:
answered Jan 15 at 15:01
egregegreg
736k8919353261
736k8919353261
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%2f470232%2fuse-of-currency-symbols-along-with-a-thousand-separator%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
3
Have you had a look at the
siunitx
package? It can also handle currency with a special syntax. And includes various tools to format numbers– daleif
Jan 15 at 13:28
Not yet, I'll check that out
– E. Sommer
Jan 15 at 13:36