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'?













10















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.



enter image description here



However cdot as there are many spaces between left and right. How do I get the following image should I have a macro?



enter image description here



Related to: https://tex.stackexchange.com/a/29838/33075










share|improve this question

















  • 5





    $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















10















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.



enter image description here



However cdot as there are many spaces between left and right. How do I get the following image should I have a macro?



enter image description here



Related to: https://tex.stackexchange.com/a/29838/33075










share|improve this question

















  • 5





    $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













10












10








10


0






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.



enter image description here



However cdot as there are many spaces between left and right. How do I get the following image should I have a macro?



enter image description here



Related to: https://tex.stackexchange.com/a/29838/33075










share|improve this question














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.



enter image description here



However cdot as there are many spaces between left and right. How do I get the following image should I have a macro?



enter image description here



Related to: https://tex.stackexchange.com/a/29838/33075







macros math-operators






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Apr 18 at 14:28









ÖzgürÖzgür

1,5111021




1,5111021







  • 5





    $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












  • 5





    $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







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










2 Answers
2






active

oldest

votes


















14














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.



enter image description here



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





share|improve this answer

























  • 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 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


















7














cdot is defined in fontmath.ltx with:



DeclareMathSymbolcdotmathbinsymbols"01


which means it is a binary 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 ordinary 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.






share|improve this answer




















  • 1





    +1 Or call it mdot for "multiplication dot"

    – Andrew Swann
    yesterday











Your Answer








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

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

else
createEditor();

);

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



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%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









14














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.



enter image description here



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





share|improve this answer

























  • 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 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















14














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.



enter image description here



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





share|improve this answer

























  • 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 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













14












14








14







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.



enter image description here



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





share|improve this answer















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.



enter image description here



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






share|improve this answer














share|improve this answer



share|improve this answer








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 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

















  • 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 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
















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











7














cdot is defined in fontmath.ltx with:



DeclareMathSymbolcdotmathbinsymbols"01


which means it is a binary 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 ordinary 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.






share|improve this answer




















  • 1





    +1 Or call it mdot for "multiplication dot"

    – Andrew Swann
    yesterday















7














cdot is defined in fontmath.ltx with:



DeclareMathSymbolcdotmathbinsymbols"01


which means it is a binary 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 ordinary 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.






share|improve this answer




















  • 1





    +1 Or call it mdot for "multiplication dot"

    – Andrew Swann
    yesterday













7












7








7







cdot is defined in fontmath.ltx with:



DeclareMathSymbolcdotmathbinsymbols"01


which means it is a binary 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 ordinary 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.






share|improve this answer















cdot is defined in fontmath.ltx with:



DeclareMathSymbolcdotmathbinsymbols"01


which means it is a binary 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 ordinary 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.







share|improve this answer














share|improve this answer



share|improve this answer








edited yesterday

























answered Apr 18 at 14:51









Phelype OleinikPhelype Oleinik

26.1k54791




26.1k54791







  • 1





    +1 Or call it mdot for "multiplication dot"

    – Andrew Swann
    yesterday












  • 1





    +1 Or call it mdot 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

















draft saved

draft discarded
















































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


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

But avoid


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

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

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




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%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





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company