How can I reduce the gap between left and right of cdot with a macro?“Closed” (square) root symbolSpacing around left and right Use column-separator & (ampersand) inside newenvironmentMacro for left( and right)Allow macro to end without new lineHow can I influence the spacing of mathematical functions by an own macro?Failure After Using Latexdiff Script: latexdiff marking up lstlisting environmentHow do I reduce the space between operators in math mode?Xparse k argument to parse options at end of environmentleft and right with arrayWhat is the difference between 'macro' and 'command'?
How bug prioritization works in agile projects vs non agile
Nails holding drywall
Why is the underscore command _ useful?
"Whatever a Russian does, they end up making the Kalashnikov gun"? Are there any similar proverbs in English?
What *exactly* is electrical current, voltage, and resistance?
A Paper Record is What I Hamper
std::unique_ptr of base class holding reference of derived class does not show warning in gcc compiler while naked pointer shows it. Why?
Apply a different color ramp to subset of categorized symbols in QGIS?
Will I lose my paid in full property
What is the unit of time_lock_delta in LND?
Is Electric Central Heating worth it if using Solar Panels?
Should the Product Owner dictate what info the UI needs to display?
Philosophical question on logistic regression: why isn't the optimal threshold value trained?
All ASCII characters with a given bit count
Multiple options vs single option UI
Does a large simulator bay have standard public address announcements?
Is there metaphorical meaning of "aus der Haft entlassen"?
Unknown code in script
Why doesn't the standard consider a template constructor as a copy constructor?
What is this word supposed to be?
A strange hotel
Was Dennis Ritchie being too modest in this quote about C and Pascal?
What is purpose of DB Browser(dbbrowser.aspx) under admin tool?
Cayley's Matrix Notation
How can I reduce the gap between left and right of cdot with a macro?
“Closed” (square) root symbolSpacing around left and right Use column-separator & (ampersand) inside newenvironmentMacro for left( and right)Allow macro to end without new lineHow can I influence the spacing of mathematical functions by an own macro?Failure After Using Latexdiff Script: latexdiff marking up lstlisting environmentHow do I reduce the space between operators in math mode?Xparse k argument to parse options at end of environmentleft and right with arrayWhat is the difference between 'macro' and 'command'?
MWE
documentclass[a4paper,11pt,border=1pt]standalone
%LetLtxMacrooldcdotcdot
%renewcommandcdot!cdot! <-- Like this
begindocument
$3cdot 10^8$ m/s
enddocument
I'm getting the following output.
However cdot
as there are many spaces between left and right. How do I get the following image should I have a macro?
Related to: https://tex.stackexchange.com/a/29838/33075
macros math-operators
add a comment |
MWE
documentclass[a4paper,11pt,border=1pt]standalone
%LetLtxMacrooldcdotcdot
%renewcommandcdot!cdot! <-- Like this
begindocument
$3cdot 10^8$ m/s
enddocument
I'm getting the following output.
However cdot
as there are many spaces between left and right. How do I get the following image should I have a macro?
Related to: https://tex.stackexchange.com/a/29838/33075
macros math-operators
5
$3cdot 10^8$ m/s
kills themathbin
space before and aftercdot
.
– Phelype Oleinik
Apr 18 at 14:31
@PhelypeOleinik, How simple!
– Özgür
Apr 18 at 14:42
add a comment |
MWE
documentclass[a4paper,11pt,border=1pt]standalone
%LetLtxMacrooldcdotcdot
%renewcommandcdot!cdot! <-- Like this
begindocument
$3cdot 10^8$ m/s
enddocument
I'm getting the following output.
However cdot
as there are many spaces between left and right. How do I get the following image should I have a macro?
Related to: https://tex.stackexchange.com/a/29838/33075
macros math-operators
MWE
documentclass[a4paper,11pt,border=1pt]standalone
%LetLtxMacrooldcdotcdot
%renewcommandcdot!cdot! <-- Like this
begindocument
$3cdot 10^8$ m/s
enddocument
I'm getting the following output.
However cdot
as there are many spaces between left and right. How do I get the following image should I have a macro?
Related to: https://tex.stackexchange.com/a/29838/33075
macros math-operators
macros math-operators
asked Apr 18 at 14:28
ÖzgürÖzgür
1,5111021
1,5111021
5
$3cdot 10^8$ m/s
kills themathbin
space before and aftercdot
.
– Phelype Oleinik
Apr 18 at 14:31
@PhelypeOleinik, How simple!
– Özgür
Apr 18 at 14:42
add a comment |
5
$3cdot 10^8$ m/s
kills themathbin
space before and aftercdot
.
– Phelype Oleinik
Apr 18 at 14:31
@PhelypeOleinik, How simple!
– Özgür
Apr 18 at 14:42
5
5
$3cdot 10^8$ m/s
kills the mathbin
space before and after cdot
.– Phelype Oleinik
Apr 18 at 14:31
$3cdot 10^8$ m/s
kills the mathbin
space before and after cdot
.– Phelype Oleinik
Apr 18 at 14:31
@PhelypeOleinik, How simple!
– Özgür
Apr 18 at 14:42
@PhelypeOleinik, How simple!
– Özgür
Apr 18 at 14:42
add a comment |
2 Answers
2
active
oldest
votes
For this I recommend siunitx
, that ensures uniformity in numbers and units.
documentclassarticle
usepackageamsmath
usepackagesiunitx
sisetup
exponent-product=cdot, % double brace for avoiding the space
per-mode=symbol,
begindocument
SI3e8meterpersecond % long form
SI3e8m/s % abbreviated form
SI[per-mode=reciprocal]3e8meterpersecond % long form
enddocument
Note that it's easy to change from a representation to another, when the long form is used (which is recommended).
Also this has the advantage that you just need to change the option in the preamble if you change your mind about how to represent that product.
The same effect can be obtained with the option tight-spacing
, which however will act also on all binary operations, for instance uncertainties.
documentclassarticle
usepackageamsmath
usepackagesiunitx
sisetup
exponent-product=cdot,
tight-spacing,
per-mode=symbol,
begindocument
SI3e8meterpersecond % long form
SI3e8m/s % abbreviated form
SI[per-mode=reciprocal]3e8meterpersecond % long form
enddocument
Now this is the proper way to do it :-)
– Phelype Oleinik
Apr 18 at 16:52
2
+1. Instead of hard-coding the tightly-spaced behavior, one could also runsisetupexponent-product=cdot, tight-spacing=true
. Then, if at some point in the document it becomes necessary to switch to non-tight spacing, one can simply executesisetuptight-spacing=false
.
– Mico
Apr 18 at 17:29
@Mico Thanks for the hint. I added it, but noted that this acts also in other places.
– egreg
Apr 18 at 22:18
add a comment |
cdot
is defined in fontmath.ltx
with:
DeclareMathSymbolcdotmathbinsymbols"01
which means it is a bin
ary operator (mathbin
) so it will have an extra space before and after as other binary operators, such as +
and -
.
TeX will not insert that space if you “hide” cdot
within braces:
documentclass[11pt,border=1pt]standalone
begindocument
$3cdot 10^8$ m/s
enddocument
If you will use that symbol multiple times you can define an ord
inary math symbol (mathord
) with the same glyph as cdot
:
documentclass[11pt,border=1pt]standalone
DeclareMathSymbolmdotmathordsymbols"01
begindocument
$3mdot 10^8$ m/s
enddocument
or you can redefine cdot
with the same command.
1
+1 Or call itmdot
for "multiplication dot"
– Andrew Swann
yesterday
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%2f485479%2fhow-can-i-reduce-the-gap-between-left-and-right-of-cdot-with-a-macro%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
For this I recommend siunitx
, that ensures uniformity in numbers and units.
documentclassarticle
usepackageamsmath
usepackagesiunitx
sisetup
exponent-product=cdot, % double brace for avoiding the space
per-mode=symbol,
begindocument
SI3e8meterpersecond % long form
SI3e8m/s % abbreviated form
SI[per-mode=reciprocal]3e8meterpersecond % long form
enddocument
Note that it's easy to change from a representation to another, when the long form is used (which is recommended).
Also this has the advantage that you just need to change the option in the preamble if you change your mind about how to represent that product.
The same effect can be obtained with the option tight-spacing
, which however will act also on all binary operations, for instance uncertainties.
documentclassarticle
usepackageamsmath
usepackagesiunitx
sisetup
exponent-product=cdot,
tight-spacing,
per-mode=symbol,
begindocument
SI3e8meterpersecond % long form
SI3e8m/s % abbreviated form
SI[per-mode=reciprocal]3e8meterpersecond % long form
enddocument
Now this is the proper way to do it :-)
– Phelype Oleinik
Apr 18 at 16:52
2
+1. Instead of hard-coding the tightly-spaced behavior, one could also runsisetupexponent-product=cdot, tight-spacing=true
. Then, if at some point in the document it becomes necessary to switch to non-tight spacing, one can simply executesisetuptight-spacing=false
.
– Mico
Apr 18 at 17:29
@Mico Thanks for the hint. I added it, but noted that this acts also in other places.
– egreg
Apr 18 at 22:18
add a comment |
For this I recommend siunitx
, that ensures uniformity in numbers and units.
documentclassarticle
usepackageamsmath
usepackagesiunitx
sisetup
exponent-product=cdot, % double brace for avoiding the space
per-mode=symbol,
begindocument
SI3e8meterpersecond % long form
SI3e8m/s % abbreviated form
SI[per-mode=reciprocal]3e8meterpersecond % long form
enddocument
Note that it's easy to change from a representation to another, when the long form is used (which is recommended).
Also this has the advantage that you just need to change the option in the preamble if you change your mind about how to represent that product.
The same effect can be obtained with the option tight-spacing
, which however will act also on all binary operations, for instance uncertainties.
documentclassarticle
usepackageamsmath
usepackagesiunitx
sisetup
exponent-product=cdot,
tight-spacing,
per-mode=symbol,
begindocument
SI3e8meterpersecond % long form
SI3e8m/s % abbreviated form
SI[per-mode=reciprocal]3e8meterpersecond % long form
enddocument
Now this is the proper way to do it :-)
– Phelype Oleinik
Apr 18 at 16:52
2
+1. Instead of hard-coding the tightly-spaced behavior, one could also runsisetupexponent-product=cdot, tight-spacing=true
. Then, if at some point in the document it becomes necessary to switch to non-tight spacing, one can simply executesisetuptight-spacing=false
.
– Mico
Apr 18 at 17:29
@Mico Thanks for the hint. I added it, but noted that this acts also in other places.
– egreg
Apr 18 at 22:18
add a comment |
For this I recommend siunitx
, that ensures uniformity in numbers and units.
documentclassarticle
usepackageamsmath
usepackagesiunitx
sisetup
exponent-product=cdot, % double brace for avoiding the space
per-mode=symbol,
begindocument
SI3e8meterpersecond % long form
SI3e8m/s % abbreviated form
SI[per-mode=reciprocal]3e8meterpersecond % long form
enddocument
Note that it's easy to change from a representation to another, when the long form is used (which is recommended).
Also this has the advantage that you just need to change the option in the preamble if you change your mind about how to represent that product.
The same effect can be obtained with the option tight-spacing
, which however will act also on all binary operations, for instance uncertainties.
documentclassarticle
usepackageamsmath
usepackagesiunitx
sisetup
exponent-product=cdot,
tight-spacing,
per-mode=symbol,
begindocument
SI3e8meterpersecond % long form
SI3e8m/s % abbreviated form
SI[per-mode=reciprocal]3e8meterpersecond % long form
enddocument
For this I recommend siunitx
, that ensures uniformity in numbers and units.
documentclassarticle
usepackageamsmath
usepackagesiunitx
sisetup
exponent-product=cdot, % double brace for avoiding the space
per-mode=symbol,
begindocument
SI3e8meterpersecond % long form
SI3e8m/s % abbreviated form
SI[per-mode=reciprocal]3e8meterpersecond % long form
enddocument
Note that it's easy to change from a representation to another, when the long form is used (which is recommended).
Also this has the advantage that you just need to change the option in the preamble if you change your mind about how to represent that product.
The same effect can be obtained with the option tight-spacing
, which however will act also on all binary operations, for instance uncertainties.
documentclassarticle
usepackageamsmath
usepackagesiunitx
sisetup
exponent-product=cdot,
tight-spacing,
per-mode=symbol,
begindocument
SI3e8meterpersecond % long form
SI3e8m/s % abbreviated form
SI[per-mode=reciprocal]3e8meterpersecond % long form
enddocument
edited Apr 18 at 22:18
answered Apr 18 at 15:56
egregegreg
737k8919363264
737k8919363264
Now this is the proper way to do it :-)
– Phelype Oleinik
Apr 18 at 16:52
2
+1. Instead of hard-coding the tightly-spaced behavior, one could also runsisetupexponent-product=cdot, tight-spacing=true
. Then, if at some point in the document it becomes necessary to switch to non-tight spacing, one can simply executesisetuptight-spacing=false
.
– Mico
Apr 18 at 17:29
@Mico Thanks for the hint. I added it, but noted that this acts also in other places.
– egreg
Apr 18 at 22:18
add a comment |
Now this is the proper way to do it :-)
– Phelype Oleinik
Apr 18 at 16:52
2
+1. Instead of hard-coding the tightly-spaced behavior, one could also runsisetupexponent-product=cdot, tight-spacing=true
. Then, if at some point in the document it becomes necessary to switch to non-tight spacing, one can simply executesisetuptight-spacing=false
.
– Mico
Apr 18 at 17:29
@Mico Thanks for the hint. I added it, but noted that this acts also in other places.
– egreg
Apr 18 at 22:18
Now this is the proper way to do it :-)
– Phelype Oleinik
Apr 18 at 16:52
Now this is the proper way to do it :-)
– Phelype Oleinik
Apr 18 at 16:52
2
2
+1. Instead of hard-coding the tightly-spaced behavior, one could also run
sisetupexponent-product=cdot, tight-spacing=true
. Then, if at some point in the document it becomes necessary to switch to non-tight spacing, one can simply execute sisetuptight-spacing=false
.– Mico
Apr 18 at 17:29
+1. Instead of hard-coding the tightly-spaced behavior, one could also run
sisetupexponent-product=cdot, tight-spacing=true
. Then, if at some point in the document it becomes necessary to switch to non-tight spacing, one can simply execute sisetuptight-spacing=false
.– Mico
Apr 18 at 17:29
@Mico Thanks for the hint. I added it, but noted that this acts also in other places.
– egreg
Apr 18 at 22:18
@Mico Thanks for the hint. I added it, but noted that this acts also in other places.
– egreg
Apr 18 at 22:18
add a comment |
cdot
is defined in fontmath.ltx
with:
DeclareMathSymbolcdotmathbinsymbols"01
which means it is a bin
ary operator (mathbin
) so it will have an extra space before and after as other binary operators, such as +
and -
.
TeX will not insert that space if you “hide” cdot
within braces:
documentclass[11pt,border=1pt]standalone
begindocument
$3cdot 10^8$ m/s
enddocument
If you will use that symbol multiple times you can define an ord
inary math symbol (mathord
) with the same glyph as cdot
:
documentclass[11pt,border=1pt]standalone
DeclareMathSymbolmdotmathordsymbols"01
begindocument
$3mdot 10^8$ m/s
enddocument
or you can redefine cdot
with the same command.
1
+1 Or call itmdot
for "multiplication dot"
– Andrew Swann
yesterday
add a comment |
cdot
is defined in fontmath.ltx
with:
DeclareMathSymbolcdotmathbinsymbols"01
which means it is a bin
ary operator (mathbin
) so it will have an extra space before and after as other binary operators, such as +
and -
.
TeX will not insert that space if you “hide” cdot
within braces:
documentclass[11pt,border=1pt]standalone
begindocument
$3cdot 10^8$ m/s
enddocument
If you will use that symbol multiple times you can define an ord
inary math symbol (mathord
) with the same glyph as cdot
:
documentclass[11pt,border=1pt]standalone
DeclareMathSymbolmdotmathordsymbols"01
begindocument
$3mdot 10^8$ m/s
enddocument
or you can redefine cdot
with the same command.
1
+1 Or call itmdot
for "multiplication dot"
– Andrew Swann
yesterday
add a comment |
cdot
is defined in fontmath.ltx
with:
DeclareMathSymbolcdotmathbinsymbols"01
which means it is a bin
ary operator (mathbin
) so it will have an extra space before and after as other binary operators, such as +
and -
.
TeX will not insert that space if you “hide” cdot
within braces:
documentclass[11pt,border=1pt]standalone
begindocument
$3cdot 10^8$ m/s
enddocument
If you will use that symbol multiple times you can define an ord
inary math symbol (mathord
) with the same glyph as cdot
:
documentclass[11pt,border=1pt]standalone
DeclareMathSymbolmdotmathordsymbols"01
begindocument
$3mdot 10^8$ m/s
enddocument
or you can redefine cdot
with the same command.
cdot
is defined in fontmath.ltx
with:
DeclareMathSymbolcdotmathbinsymbols"01
which means it is a bin
ary operator (mathbin
) so it will have an extra space before and after as other binary operators, such as +
and -
.
TeX will not insert that space if you “hide” cdot
within braces:
documentclass[11pt,border=1pt]standalone
begindocument
$3cdot 10^8$ m/s
enddocument
If you will use that symbol multiple times you can define an ord
inary math symbol (mathord
) with the same glyph as cdot
:
documentclass[11pt,border=1pt]standalone
DeclareMathSymbolmdotmathordsymbols"01
begindocument
$3mdot 10^8$ m/s
enddocument
or you can redefine cdot
with the same command.
edited yesterday
answered Apr 18 at 14:51
Phelype OleinikPhelype Oleinik
26.1k54791
26.1k54791
1
+1 Or call itmdot
for "multiplication dot"
– Andrew Swann
yesterday
add a comment |
1
+1 Or call itmdot
for "multiplication dot"
– Andrew Swann
yesterday
1
1
+1 Or call it
mdot
for "multiplication dot"– Andrew Swann
yesterday
+1 Or call it
mdot
for "multiplication dot"– Andrew Swann
yesterday
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%2f485479%2fhow-can-i-reduce-the-gap-between-left-and-right-of-cdot-with-a-macro%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
5
$3cdot 10^8$ m/s
kills themathbin
space before and aftercdot
.– Phelype Oleinik
Apr 18 at 14:31
@PhelypeOleinik, How simple!
– Özgür
Apr 18 at 14:42