Change the color of a single dot in `ddot` symbol The Next CEO of Stack OverflowSame height for list of comma-separated vectorsConflict between color, graphicx and libertineTwo figures side by side with text wrappingHow to change the label color of psaxes?How to change the color of Table of Contents from red to black?How to change the color of bibitems?Symbol at the end of an environmenthow to change color of matrix bracketChange color of sectionsRecolor text, such that floats and footnotes are affected correctly

Could a dragon use hot air to help it take off?

What difference does it make matching a word with/without a trailing whitespace?

Why do we say “un seul M” and not “une seule M” even though M is a “consonne”?

Are British MPs missing the point, with these 'Indicative Votes'?

Calculating discount not working

Does Germany produce more waste than the US?

Can this transistor (2N2222) take 6 V on emitter-base? Am I reading the datasheet incorrectly?

How to show a landlord what we have in savings?

Is it possible to create a QR code using text?

MT "will strike" & LXX "will watch carefully" (Gen 3:15)?

logical reads on global temp table, but not on session-level temp table

Is a linearly independent set whose span is dense a Schauder basis?

Strange use of "whether ... than ..." in official text

Creating a script with console commands

That's an odd coin - I wonder why

Is this a new Fibonacci Identity?

Can I hook these wires up to find the connection to a dead outlet?

How to coordinate airplane tickets?

Why was Sir Cadogan fired?

Finitely generated matrix groups whose eigenvalues are all algebraic

Gödel's incompleteness theorems - what are the religious implications?

How can I separate the number from the unit in argument?

Mathematica command that allows it to read my intentions

How can I prove that a state of equilibrium is unstable?



Change the color of a single dot in `ddot` symbol



The Next CEO of Stack OverflowSame height for list of comma-separated vectorsConflict between color, graphicx and libertineTwo figures side by side with text wrappingHow to change the label color of psaxes?How to change the color of Table of Contents from red to black?How to change the color of bibitems?Symbol at the end of an environmenthow to change color of matrix bracketChange color of sectionsRecolor text, such that floats and footnotes are affected correctly










14















How can we change any of the two dots of the ddots math symbol?



I can change both of them:



documentclassarticle

usepackagexcolor

begindocument

$colorredddotcolorblackx$

enddocument


Two colored dots



Something like:



Example 1



Example 2










share|improve this question


























    14















    How can we change any of the two dots of the ddots math symbol?



    I can change both of them:



    documentclassarticle

    usepackagexcolor

    begindocument

    $colorredddotcolorblackx$

    enddocument


    Two colored dots



    Something like:



    Example 1



    Example 2










    share|improve this question
























      14












      14








      14


      1






      How can we change any of the two dots of the ddots math symbol?



      I can change both of them:



      documentclassarticle

      usepackagexcolor

      begindocument

      $colorredddotcolorblackx$

      enddocument


      Two colored dots



      Something like:



      Example 1



      Example 2










      share|improve this question














      How can we change any of the two dots of the ddots math symbol?



      I can change both of them:



      documentclassarticle

      usepackagexcolor

      begindocument

      $colorredddotcolorblackx$

      enddocument


      Two colored dots



      Something like:



      Example 1



      Example 2







      math-mode formatting color






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 21 at 9:25









      manoooohmanooooh

      1,1801517




      1,1801517




















          3 Answers
          3






          active

          oldest

          votes


















          17














          The following uses two slightly shifted coloured dot macros. The placement is not perfect and might be really bad for some letters.



          documentclass[]article

          % for colours
          usepackagexcolor
          % for mighty interface to define new macros, it also loads the l3 kernel
          usepackagexparse
          % for mathrlap
          usepackagemathtools

          % change to the coding language of LaTeX3 (in which spaces are ignored, that why
          % I can do stuff like #2 etc., also _ is a character now and can be part of
          % macro names)
          ExplSyntaxOn
          % define a user facing macro, it takes one optional argument, which by default
          % is empty and a mandatory one (neither of them can contain a par). The
          % optional argument will be split at a "," once.
          NewDocumentCommand cddot >SplitArgument1,O m

          % pass on the now split argument #1 and the mandatory argument #2. #1 will
          % be something like #1.1 #1.2
          __manooooh_cddot:nnn #1 #2

          % define a new internal macro (cs_new_protected:Npn is like protecteddef)
          cs_new_protected:Npn __manooooh_cddot:nnn #1 #2 #3

          % start a new group
          group_begin:
          % check whether the first argument is blank (meaning it only contains spaces
          % or nothing), if it isn't blank change the color. It will be blank if you
          % don't use an optional argument or if you start your optional argument with
          % a ","
          tl_if_blank:nF #1 color #1
          % mathrlap will print its argument without really taking any space, phantom
          % will only take the space of #3, mkern-1.5mu will move the dot slightly to
          % the left
          mathrlap mkern-1.25mu dot phantom #3
          % end the group containing the first color
          group_end:
          % start a new group
          group_begin:
          % IfValueT will check whether the second part of the split argument was
          % available (so will result in True if there was a comma in [#1]). If there
          % was a second argument assume it is the second color
          IfValueT #2 color #2
          % again mathrlap and a phantom #3, this time shifting the dot slightly to
          % the right by 2mu
          mathrlap mkern+2.25mu dot phantom #3
          % end the second color's group
          group_end:
          % print #3 without further ado (since we used mathrlap previously we're
          % still on the same spot and due to the phantom #3 will only be printed
          % visible once
          #3

          % end the LaTeX3 programming syntax
          ExplSyntaxOff

          begindocument
          % without optional argument
          $cddotx$

          % with the first half of the optional argument
          $cddot[blue]x$

          % with the second half of the optional argument
          $cddot[,green]x$

          % with both halves of the optional argument
          $cddot[blue,green]x$

          % for comparison
          $ddotx$
          enddocument


          enter image description here






          share|improve this answer

























          • I have never read about NewDocumentCommand. I compared the normal output with yours and they are indeed the same! Maybe adding more stuff will break the line spacing, but we need an example for that. Thanks for the answer!

            – manooooh
            Mar 21 at 9:46







          • 2





            @manooooh NewDocumentCommand is part of xparse which is a LaTeX3 package to define macros with powerful syntax. Also I use tl_if_blank:nF which is part of LaTeX3's l3tl which is part of the L3 kernel. Do you want me to add comments to the code to explain it a bit?

            – Skillmon
            Mar 21 at 9:50







          • 2





            It would be fantastic.

            – manooooh
            Mar 21 at 9:52






          • 2





            @manooooh I've added loads of comments to the code, if you still have questions, feel free to ask.

            – Skillmon
            Mar 21 at 10:08






          • 1





            @manooooh the spaces are only a useful side effect (no unintentional spaces which is often an issue, especially for people not that experienced in writing their own macros), the main point being the _ and : in macro names, which is the internal convention of L3. Without ExplSyntaxOn I couldn't use macros like tl_if_blank:nF directly. The macro names in L3 are built from several parts, tl is the module it's taken from, _if_blank is the name/description, :nF means it takes two arguments, one a normal one, the second executed in the False branch.

            – Skillmon
            Mar 21 at 10:18


















          14














          Adapting from the definition of dddot in amsmath. The bottom line in the picture shows the symbol superimposed on each other; the difference is really negligible.



          documentclassarticle
          usepackageamsmath
          usepackagexcolor

          makeatletter
          DeclareRobustCommandcolorddot[3]%
          % #1=color of first dot, #2=color of second dot, #3=accentee
          mathopkernz@#3limits^%
          vbox to-1.55ex@%
          kern-tw@ex@
          hboxnormalfontkern0.05emtextcolor#1.kern-0.085emtextcolor#2.
          vss
          %
          %

          makeatother

          begindocument

          $ddotx$

          $colorddotgreenbluex$

          $ddotx$llap$colorddotgreenbluex$
          $colorddotgreenbluex$llap$ddotx$

          enddocument


          Beware that the different colors will make the dots to appear misaligned.



          enter image description here






          share|improve this answer




















          • 2





            Why is the kern slightly different between the cases? It is more than just an appearance.

            – Steven B. Segletes
            Mar 21 at 10:26







          • 2





            @StevenB.Segletes Refined. :-)

            – egreg
            Mar 21 at 10:33






          • 2





            Did you just post a non-expl3 answer while I did?

            – Skillmon
            Mar 21 at 11:39






          • 1





            @Skillmon Let's share the task of promoting expl3. ;-)

            – egreg
            Mar 21 at 11:44






          • 1





            @egreg well, mine is a wild mix of expl3 and LaTeX2e stuff, unfortunately...

            – Skillmon
            Mar 21 at 11:46


















          13














          One may just use the accents package, which was made for this.



          documentclassarticle
          usepackageamsmath
          usepackageaccents
          usepackagepgffor
          usepackagexcolor
          newcommandColorDots[2]accentsetforeach X in #1
          textcolorXboldsymbol.#2
          begindocument
          $accentsetboldsymbol..x$ $ColorDotsred,bluey$ $ColorDotsredz$
          $ColorDotsred,orange,blueX$
          enddocument


          enter image description here






          share|improve this answer


















          • 3





            Using a package which was made for it seems wrong :)

            – Skillmon
            Mar 22 at 20:09











          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%2f480644%2fchange-the-color-of-a-single-dot-in-ddot-symbol%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          3 Answers
          3






          active

          oldest

          votes








          3 Answers
          3






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          17














          The following uses two slightly shifted coloured dot macros. The placement is not perfect and might be really bad for some letters.



          documentclass[]article

          % for colours
          usepackagexcolor
          % for mighty interface to define new macros, it also loads the l3 kernel
          usepackagexparse
          % for mathrlap
          usepackagemathtools

          % change to the coding language of LaTeX3 (in which spaces are ignored, that why
          % I can do stuff like #2 etc., also _ is a character now and can be part of
          % macro names)
          ExplSyntaxOn
          % define a user facing macro, it takes one optional argument, which by default
          % is empty and a mandatory one (neither of them can contain a par). The
          % optional argument will be split at a "," once.
          NewDocumentCommand cddot >SplitArgument1,O m

          % pass on the now split argument #1 and the mandatory argument #2. #1 will
          % be something like #1.1 #1.2
          __manooooh_cddot:nnn #1 #2

          % define a new internal macro (cs_new_protected:Npn is like protecteddef)
          cs_new_protected:Npn __manooooh_cddot:nnn #1 #2 #3

          % start a new group
          group_begin:
          % check whether the first argument is blank (meaning it only contains spaces
          % or nothing), if it isn't blank change the color. It will be blank if you
          % don't use an optional argument or if you start your optional argument with
          % a ","
          tl_if_blank:nF #1 color #1
          % mathrlap will print its argument without really taking any space, phantom
          % will only take the space of #3, mkern-1.5mu will move the dot slightly to
          % the left
          mathrlap mkern-1.25mu dot phantom #3
          % end the group containing the first color
          group_end:
          % start a new group
          group_begin:
          % IfValueT will check whether the second part of the split argument was
          % available (so will result in True if there was a comma in [#1]). If there
          % was a second argument assume it is the second color
          IfValueT #2 color #2
          % again mathrlap and a phantom #3, this time shifting the dot slightly to
          % the right by 2mu
          mathrlap mkern+2.25mu dot phantom #3
          % end the second color's group
          group_end:
          % print #3 without further ado (since we used mathrlap previously we're
          % still on the same spot and due to the phantom #3 will only be printed
          % visible once
          #3

          % end the LaTeX3 programming syntax
          ExplSyntaxOff

          begindocument
          % without optional argument
          $cddotx$

          % with the first half of the optional argument
          $cddot[blue]x$

          % with the second half of the optional argument
          $cddot[,green]x$

          % with both halves of the optional argument
          $cddot[blue,green]x$

          % for comparison
          $ddotx$
          enddocument


          enter image description here






          share|improve this answer

























          • I have never read about NewDocumentCommand. I compared the normal output with yours and they are indeed the same! Maybe adding more stuff will break the line spacing, but we need an example for that. Thanks for the answer!

            – manooooh
            Mar 21 at 9:46







          • 2





            @manooooh NewDocumentCommand is part of xparse which is a LaTeX3 package to define macros with powerful syntax. Also I use tl_if_blank:nF which is part of LaTeX3's l3tl which is part of the L3 kernel. Do you want me to add comments to the code to explain it a bit?

            – Skillmon
            Mar 21 at 9:50







          • 2





            It would be fantastic.

            – manooooh
            Mar 21 at 9:52






          • 2





            @manooooh I've added loads of comments to the code, if you still have questions, feel free to ask.

            – Skillmon
            Mar 21 at 10:08






          • 1





            @manooooh the spaces are only a useful side effect (no unintentional spaces which is often an issue, especially for people not that experienced in writing their own macros), the main point being the _ and : in macro names, which is the internal convention of L3. Without ExplSyntaxOn I couldn't use macros like tl_if_blank:nF directly. The macro names in L3 are built from several parts, tl is the module it's taken from, _if_blank is the name/description, :nF means it takes two arguments, one a normal one, the second executed in the False branch.

            – Skillmon
            Mar 21 at 10:18















          17














          The following uses two slightly shifted coloured dot macros. The placement is not perfect and might be really bad for some letters.



          documentclass[]article

          % for colours
          usepackagexcolor
          % for mighty interface to define new macros, it also loads the l3 kernel
          usepackagexparse
          % for mathrlap
          usepackagemathtools

          % change to the coding language of LaTeX3 (in which spaces are ignored, that why
          % I can do stuff like #2 etc., also _ is a character now and can be part of
          % macro names)
          ExplSyntaxOn
          % define a user facing macro, it takes one optional argument, which by default
          % is empty and a mandatory one (neither of them can contain a par). The
          % optional argument will be split at a "," once.
          NewDocumentCommand cddot >SplitArgument1,O m

          % pass on the now split argument #1 and the mandatory argument #2. #1 will
          % be something like #1.1 #1.2
          __manooooh_cddot:nnn #1 #2

          % define a new internal macro (cs_new_protected:Npn is like protecteddef)
          cs_new_protected:Npn __manooooh_cddot:nnn #1 #2 #3

          % start a new group
          group_begin:
          % check whether the first argument is blank (meaning it only contains spaces
          % or nothing), if it isn't blank change the color. It will be blank if you
          % don't use an optional argument or if you start your optional argument with
          % a ","
          tl_if_blank:nF #1 color #1
          % mathrlap will print its argument without really taking any space, phantom
          % will only take the space of #3, mkern-1.5mu will move the dot slightly to
          % the left
          mathrlap mkern-1.25mu dot phantom #3
          % end the group containing the first color
          group_end:
          % start a new group
          group_begin:
          % IfValueT will check whether the second part of the split argument was
          % available (so will result in True if there was a comma in [#1]). If there
          % was a second argument assume it is the second color
          IfValueT #2 color #2
          % again mathrlap and a phantom #3, this time shifting the dot slightly to
          % the right by 2mu
          mathrlap mkern+2.25mu dot phantom #3
          % end the second color's group
          group_end:
          % print #3 without further ado (since we used mathrlap previously we're
          % still on the same spot and due to the phantom #3 will only be printed
          % visible once
          #3

          % end the LaTeX3 programming syntax
          ExplSyntaxOff

          begindocument
          % without optional argument
          $cddotx$

          % with the first half of the optional argument
          $cddot[blue]x$

          % with the second half of the optional argument
          $cddot[,green]x$

          % with both halves of the optional argument
          $cddot[blue,green]x$

          % for comparison
          $ddotx$
          enddocument


          enter image description here






          share|improve this answer

























          • I have never read about NewDocumentCommand. I compared the normal output with yours and they are indeed the same! Maybe adding more stuff will break the line spacing, but we need an example for that. Thanks for the answer!

            – manooooh
            Mar 21 at 9:46







          • 2





            @manooooh NewDocumentCommand is part of xparse which is a LaTeX3 package to define macros with powerful syntax. Also I use tl_if_blank:nF which is part of LaTeX3's l3tl which is part of the L3 kernel. Do you want me to add comments to the code to explain it a bit?

            – Skillmon
            Mar 21 at 9:50







          • 2





            It would be fantastic.

            – manooooh
            Mar 21 at 9:52






          • 2





            @manooooh I've added loads of comments to the code, if you still have questions, feel free to ask.

            – Skillmon
            Mar 21 at 10:08






          • 1





            @manooooh the spaces are only a useful side effect (no unintentional spaces which is often an issue, especially for people not that experienced in writing their own macros), the main point being the _ and : in macro names, which is the internal convention of L3. Without ExplSyntaxOn I couldn't use macros like tl_if_blank:nF directly. The macro names in L3 are built from several parts, tl is the module it's taken from, _if_blank is the name/description, :nF means it takes two arguments, one a normal one, the second executed in the False branch.

            – Skillmon
            Mar 21 at 10:18













          17












          17








          17







          The following uses two slightly shifted coloured dot macros. The placement is not perfect and might be really bad for some letters.



          documentclass[]article

          % for colours
          usepackagexcolor
          % for mighty interface to define new macros, it also loads the l3 kernel
          usepackagexparse
          % for mathrlap
          usepackagemathtools

          % change to the coding language of LaTeX3 (in which spaces are ignored, that why
          % I can do stuff like #2 etc., also _ is a character now and can be part of
          % macro names)
          ExplSyntaxOn
          % define a user facing macro, it takes one optional argument, which by default
          % is empty and a mandatory one (neither of them can contain a par). The
          % optional argument will be split at a "," once.
          NewDocumentCommand cddot >SplitArgument1,O m

          % pass on the now split argument #1 and the mandatory argument #2. #1 will
          % be something like #1.1 #1.2
          __manooooh_cddot:nnn #1 #2

          % define a new internal macro (cs_new_protected:Npn is like protecteddef)
          cs_new_protected:Npn __manooooh_cddot:nnn #1 #2 #3

          % start a new group
          group_begin:
          % check whether the first argument is blank (meaning it only contains spaces
          % or nothing), if it isn't blank change the color. It will be blank if you
          % don't use an optional argument or if you start your optional argument with
          % a ","
          tl_if_blank:nF #1 color #1
          % mathrlap will print its argument without really taking any space, phantom
          % will only take the space of #3, mkern-1.5mu will move the dot slightly to
          % the left
          mathrlap mkern-1.25mu dot phantom #3
          % end the group containing the first color
          group_end:
          % start a new group
          group_begin:
          % IfValueT will check whether the second part of the split argument was
          % available (so will result in True if there was a comma in [#1]). If there
          % was a second argument assume it is the second color
          IfValueT #2 color #2
          % again mathrlap and a phantom #3, this time shifting the dot slightly to
          % the right by 2mu
          mathrlap mkern+2.25mu dot phantom #3
          % end the second color's group
          group_end:
          % print #3 without further ado (since we used mathrlap previously we're
          % still on the same spot and due to the phantom #3 will only be printed
          % visible once
          #3

          % end the LaTeX3 programming syntax
          ExplSyntaxOff

          begindocument
          % without optional argument
          $cddotx$

          % with the first half of the optional argument
          $cddot[blue]x$

          % with the second half of the optional argument
          $cddot[,green]x$

          % with both halves of the optional argument
          $cddot[blue,green]x$

          % for comparison
          $ddotx$
          enddocument


          enter image description here






          share|improve this answer















          The following uses two slightly shifted coloured dot macros. The placement is not perfect and might be really bad for some letters.



          documentclass[]article

          % for colours
          usepackagexcolor
          % for mighty interface to define new macros, it also loads the l3 kernel
          usepackagexparse
          % for mathrlap
          usepackagemathtools

          % change to the coding language of LaTeX3 (in which spaces are ignored, that why
          % I can do stuff like #2 etc., also _ is a character now and can be part of
          % macro names)
          ExplSyntaxOn
          % define a user facing macro, it takes one optional argument, which by default
          % is empty and a mandatory one (neither of them can contain a par). The
          % optional argument will be split at a "," once.
          NewDocumentCommand cddot >SplitArgument1,O m

          % pass on the now split argument #1 and the mandatory argument #2. #1 will
          % be something like #1.1 #1.2
          __manooooh_cddot:nnn #1 #2

          % define a new internal macro (cs_new_protected:Npn is like protecteddef)
          cs_new_protected:Npn __manooooh_cddot:nnn #1 #2 #3

          % start a new group
          group_begin:
          % check whether the first argument is blank (meaning it only contains spaces
          % or nothing), if it isn't blank change the color. It will be blank if you
          % don't use an optional argument or if you start your optional argument with
          % a ","
          tl_if_blank:nF #1 color #1
          % mathrlap will print its argument without really taking any space, phantom
          % will only take the space of #3, mkern-1.5mu will move the dot slightly to
          % the left
          mathrlap mkern-1.25mu dot phantom #3
          % end the group containing the first color
          group_end:
          % start a new group
          group_begin:
          % IfValueT will check whether the second part of the split argument was
          % available (so will result in True if there was a comma in [#1]). If there
          % was a second argument assume it is the second color
          IfValueT #2 color #2
          % again mathrlap and a phantom #3, this time shifting the dot slightly to
          % the right by 2mu
          mathrlap mkern+2.25mu dot phantom #3
          % end the second color's group
          group_end:
          % print #3 without further ado (since we used mathrlap previously we're
          % still on the same spot and due to the phantom #3 will only be printed
          % visible once
          #3

          % end the LaTeX3 programming syntax
          ExplSyntaxOff

          begindocument
          % without optional argument
          $cddotx$

          % with the first half of the optional argument
          $cddot[blue]x$

          % with the second half of the optional argument
          $cddot[,green]x$

          % with both halves of the optional argument
          $cddot[blue,green]x$

          % for comparison
          $ddotx$
          enddocument


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 21 at 15:15

























          answered Mar 21 at 9:39









          SkillmonSkillmon

          24.1k12249




          24.1k12249












          • I have never read about NewDocumentCommand. I compared the normal output with yours and they are indeed the same! Maybe adding more stuff will break the line spacing, but we need an example for that. Thanks for the answer!

            – manooooh
            Mar 21 at 9:46







          • 2





            @manooooh NewDocumentCommand is part of xparse which is a LaTeX3 package to define macros with powerful syntax. Also I use tl_if_blank:nF which is part of LaTeX3's l3tl which is part of the L3 kernel. Do you want me to add comments to the code to explain it a bit?

            – Skillmon
            Mar 21 at 9:50







          • 2





            It would be fantastic.

            – manooooh
            Mar 21 at 9:52






          • 2





            @manooooh I've added loads of comments to the code, if you still have questions, feel free to ask.

            – Skillmon
            Mar 21 at 10:08






          • 1





            @manooooh the spaces are only a useful side effect (no unintentional spaces which is often an issue, especially for people not that experienced in writing their own macros), the main point being the _ and : in macro names, which is the internal convention of L3. Without ExplSyntaxOn I couldn't use macros like tl_if_blank:nF directly. The macro names in L3 are built from several parts, tl is the module it's taken from, _if_blank is the name/description, :nF means it takes two arguments, one a normal one, the second executed in the False branch.

            – Skillmon
            Mar 21 at 10:18

















          • I have never read about NewDocumentCommand. I compared the normal output with yours and they are indeed the same! Maybe adding more stuff will break the line spacing, but we need an example for that. Thanks for the answer!

            – manooooh
            Mar 21 at 9:46







          • 2





            @manooooh NewDocumentCommand is part of xparse which is a LaTeX3 package to define macros with powerful syntax. Also I use tl_if_blank:nF which is part of LaTeX3's l3tl which is part of the L3 kernel. Do you want me to add comments to the code to explain it a bit?

            – Skillmon
            Mar 21 at 9:50







          • 2





            It would be fantastic.

            – manooooh
            Mar 21 at 9:52






          • 2





            @manooooh I've added loads of comments to the code, if you still have questions, feel free to ask.

            – Skillmon
            Mar 21 at 10:08






          • 1





            @manooooh the spaces are only a useful side effect (no unintentional spaces which is often an issue, especially for people not that experienced in writing their own macros), the main point being the _ and : in macro names, which is the internal convention of L3. Without ExplSyntaxOn I couldn't use macros like tl_if_blank:nF directly. The macro names in L3 are built from several parts, tl is the module it's taken from, _if_blank is the name/description, :nF means it takes two arguments, one a normal one, the second executed in the False branch.

            – Skillmon
            Mar 21 at 10:18
















          I have never read about NewDocumentCommand. I compared the normal output with yours and they are indeed the same! Maybe adding more stuff will break the line spacing, but we need an example for that. Thanks for the answer!

          – manooooh
          Mar 21 at 9:46






          I have never read about NewDocumentCommand. I compared the normal output with yours and they are indeed the same! Maybe adding more stuff will break the line spacing, but we need an example for that. Thanks for the answer!

          – manooooh
          Mar 21 at 9:46





          2




          2





          @manooooh NewDocumentCommand is part of xparse which is a LaTeX3 package to define macros with powerful syntax. Also I use tl_if_blank:nF which is part of LaTeX3's l3tl which is part of the L3 kernel. Do you want me to add comments to the code to explain it a bit?

          – Skillmon
          Mar 21 at 9:50






          @manooooh NewDocumentCommand is part of xparse which is a LaTeX3 package to define macros with powerful syntax. Also I use tl_if_blank:nF which is part of LaTeX3's l3tl which is part of the L3 kernel. Do you want me to add comments to the code to explain it a bit?

          – Skillmon
          Mar 21 at 9:50





          2




          2





          It would be fantastic.

          – manooooh
          Mar 21 at 9:52





          It would be fantastic.

          – manooooh
          Mar 21 at 9:52




          2




          2





          @manooooh I've added loads of comments to the code, if you still have questions, feel free to ask.

          – Skillmon
          Mar 21 at 10:08





          @manooooh I've added loads of comments to the code, if you still have questions, feel free to ask.

          – Skillmon
          Mar 21 at 10:08




          1




          1





          @manooooh the spaces are only a useful side effect (no unintentional spaces which is often an issue, especially for people not that experienced in writing their own macros), the main point being the _ and : in macro names, which is the internal convention of L3. Without ExplSyntaxOn I couldn't use macros like tl_if_blank:nF directly. The macro names in L3 are built from several parts, tl is the module it's taken from, _if_blank is the name/description, :nF means it takes two arguments, one a normal one, the second executed in the False branch.

          – Skillmon
          Mar 21 at 10:18





          @manooooh the spaces are only a useful side effect (no unintentional spaces which is often an issue, especially for people not that experienced in writing their own macros), the main point being the _ and : in macro names, which is the internal convention of L3. Without ExplSyntaxOn I couldn't use macros like tl_if_blank:nF directly. The macro names in L3 are built from several parts, tl is the module it's taken from, _if_blank is the name/description, :nF means it takes two arguments, one a normal one, the second executed in the False branch.

          – Skillmon
          Mar 21 at 10:18











          14














          Adapting from the definition of dddot in amsmath. The bottom line in the picture shows the symbol superimposed on each other; the difference is really negligible.



          documentclassarticle
          usepackageamsmath
          usepackagexcolor

          makeatletter
          DeclareRobustCommandcolorddot[3]%
          % #1=color of first dot, #2=color of second dot, #3=accentee
          mathopkernz@#3limits^%
          vbox to-1.55ex@%
          kern-tw@ex@
          hboxnormalfontkern0.05emtextcolor#1.kern-0.085emtextcolor#2.
          vss
          %
          %

          makeatother

          begindocument

          $ddotx$

          $colorddotgreenbluex$

          $ddotx$llap$colorddotgreenbluex$
          $colorddotgreenbluex$llap$ddotx$

          enddocument


          Beware that the different colors will make the dots to appear misaligned.



          enter image description here






          share|improve this answer




















          • 2





            Why is the kern slightly different between the cases? It is more than just an appearance.

            – Steven B. Segletes
            Mar 21 at 10:26







          • 2





            @StevenB.Segletes Refined. :-)

            – egreg
            Mar 21 at 10:33






          • 2





            Did you just post a non-expl3 answer while I did?

            – Skillmon
            Mar 21 at 11:39






          • 1





            @Skillmon Let's share the task of promoting expl3. ;-)

            – egreg
            Mar 21 at 11:44






          • 1





            @egreg well, mine is a wild mix of expl3 and LaTeX2e stuff, unfortunately...

            – Skillmon
            Mar 21 at 11:46















          14














          Adapting from the definition of dddot in amsmath. The bottom line in the picture shows the symbol superimposed on each other; the difference is really negligible.



          documentclassarticle
          usepackageamsmath
          usepackagexcolor

          makeatletter
          DeclareRobustCommandcolorddot[3]%
          % #1=color of first dot, #2=color of second dot, #3=accentee
          mathopkernz@#3limits^%
          vbox to-1.55ex@%
          kern-tw@ex@
          hboxnormalfontkern0.05emtextcolor#1.kern-0.085emtextcolor#2.
          vss
          %
          %

          makeatother

          begindocument

          $ddotx$

          $colorddotgreenbluex$

          $ddotx$llap$colorddotgreenbluex$
          $colorddotgreenbluex$llap$ddotx$

          enddocument


          Beware that the different colors will make the dots to appear misaligned.



          enter image description here






          share|improve this answer




















          • 2





            Why is the kern slightly different between the cases? It is more than just an appearance.

            – Steven B. Segletes
            Mar 21 at 10:26







          • 2





            @StevenB.Segletes Refined. :-)

            – egreg
            Mar 21 at 10:33






          • 2





            Did you just post a non-expl3 answer while I did?

            – Skillmon
            Mar 21 at 11:39






          • 1





            @Skillmon Let's share the task of promoting expl3. ;-)

            – egreg
            Mar 21 at 11:44






          • 1





            @egreg well, mine is a wild mix of expl3 and LaTeX2e stuff, unfortunately...

            – Skillmon
            Mar 21 at 11:46













          14












          14








          14







          Adapting from the definition of dddot in amsmath. The bottom line in the picture shows the symbol superimposed on each other; the difference is really negligible.



          documentclassarticle
          usepackageamsmath
          usepackagexcolor

          makeatletter
          DeclareRobustCommandcolorddot[3]%
          % #1=color of first dot, #2=color of second dot, #3=accentee
          mathopkernz@#3limits^%
          vbox to-1.55ex@%
          kern-tw@ex@
          hboxnormalfontkern0.05emtextcolor#1.kern-0.085emtextcolor#2.
          vss
          %
          %

          makeatother

          begindocument

          $ddotx$

          $colorddotgreenbluex$

          $ddotx$llap$colorddotgreenbluex$
          $colorddotgreenbluex$llap$ddotx$

          enddocument


          Beware that the different colors will make the dots to appear misaligned.



          enter image description here






          share|improve this answer















          Adapting from the definition of dddot in amsmath. The bottom line in the picture shows the symbol superimposed on each other; the difference is really negligible.



          documentclassarticle
          usepackageamsmath
          usepackagexcolor

          makeatletter
          DeclareRobustCommandcolorddot[3]%
          % #1=color of first dot, #2=color of second dot, #3=accentee
          mathopkernz@#3limits^%
          vbox to-1.55ex@%
          kern-tw@ex@
          hboxnormalfontkern0.05emtextcolor#1.kern-0.085emtextcolor#2.
          vss
          %
          %

          makeatother

          begindocument

          $ddotx$

          $colorddotgreenbluex$

          $ddotx$llap$colorddotgreenbluex$
          $colorddotgreenbluex$llap$ddotx$

          enddocument


          Beware that the different colors will make the dots to appear misaligned.



          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 21 at 10:34

























          answered Mar 21 at 10:25









          egregegreg

          731k8819293246




          731k8819293246







          • 2





            Why is the kern slightly different between the cases? It is more than just an appearance.

            – Steven B. Segletes
            Mar 21 at 10:26







          • 2





            @StevenB.Segletes Refined. :-)

            – egreg
            Mar 21 at 10:33






          • 2





            Did you just post a non-expl3 answer while I did?

            – Skillmon
            Mar 21 at 11:39






          • 1





            @Skillmon Let's share the task of promoting expl3. ;-)

            – egreg
            Mar 21 at 11:44






          • 1





            @egreg well, mine is a wild mix of expl3 and LaTeX2e stuff, unfortunately...

            – Skillmon
            Mar 21 at 11:46












          • 2





            Why is the kern slightly different between the cases? It is more than just an appearance.

            – Steven B. Segletes
            Mar 21 at 10:26







          • 2





            @StevenB.Segletes Refined. :-)

            – egreg
            Mar 21 at 10:33






          • 2





            Did you just post a non-expl3 answer while I did?

            – Skillmon
            Mar 21 at 11:39






          • 1





            @Skillmon Let's share the task of promoting expl3. ;-)

            – egreg
            Mar 21 at 11:44






          • 1





            @egreg well, mine is a wild mix of expl3 and LaTeX2e stuff, unfortunately...

            – Skillmon
            Mar 21 at 11:46







          2




          2





          Why is the kern slightly different between the cases? It is more than just an appearance.

          – Steven B. Segletes
          Mar 21 at 10:26






          Why is the kern slightly different between the cases? It is more than just an appearance.

          – Steven B. Segletes
          Mar 21 at 10:26





          2




          2





          @StevenB.Segletes Refined. :-)

          – egreg
          Mar 21 at 10:33





          @StevenB.Segletes Refined. :-)

          – egreg
          Mar 21 at 10:33




          2




          2





          Did you just post a non-expl3 answer while I did?

          – Skillmon
          Mar 21 at 11:39





          Did you just post a non-expl3 answer while I did?

          – Skillmon
          Mar 21 at 11:39




          1




          1





          @Skillmon Let's share the task of promoting expl3. ;-)

          – egreg
          Mar 21 at 11:44





          @Skillmon Let's share the task of promoting expl3. ;-)

          – egreg
          Mar 21 at 11:44




          1




          1





          @egreg well, mine is a wild mix of expl3 and LaTeX2e stuff, unfortunately...

          – Skillmon
          Mar 21 at 11:46





          @egreg well, mine is a wild mix of expl3 and LaTeX2e stuff, unfortunately...

          – Skillmon
          Mar 21 at 11:46











          13














          One may just use the accents package, which was made for this.



          documentclassarticle
          usepackageamsmath
          usepackageaccents
          usepackagepgffor
          usepackagexcolor
          newcommandColorDots[2]accentsetforeach X in #1
          textcolorXboldsymbol.#2
          begindocument
          $accentsetboldsymbol..x$ $ColorDotsred,bluey$ $ColorDotsredz$
          $ColorDotsred,orange,blueX$
          enddocument


          enter image description here






          share|improve this answer


















          • 3





            Using a package which was made for it seems wrong :)

            – Skillmon
            Mar 22 at 20:09















          13














          One may just use the accents package, which was made for this.



          documentclassarticle
          usepackageamsmath
          usepackageaccents
          usepackagepgffor
          usepackagexcolor
          newcommandColorDots[2]accentsetforeach X in #1
          textcolorXboldsymbol.#2
          begindocument
          $accentsetboldsymbol..x$ $ColorDotsred,bluey$ $ColorDotsredz$
          $ColorDotsred,orange,blueX$
          enddocument


          enter image description here






          share|improve this answer


















          • 3





            Using a package which was made for it seems wrong :)

            – Skillmon
            Mar 22 at 20:09













          13












          13








          13







          One may just use the accents package, which was made for this.



          documentclassarticle
          usepackageamsmath
          usepackageaccents
          usepackagepgffor
          usepackagexcolor
          newcommandColorDots[2]accentsetforeach X in #1
          textcolorXboldsymbol.#2
          begindocument
          $accentsetboldsymbol..x$ $ColorDotsred,bluey$ $ColorDotsredz$
          $ColorDotsred,orange,blueX$
          enddocument


          enter image description here






          share|improve this answer













          One may just use the accents package, which was made for this.



          documentclassarticle
          usepackageamsmath
          usepackageaccents
          usepackagepgffor
          usepackagexcolor
          newcommandColorDots[2]accentsetforeach X in #1
          textcolorXboldsymbol.#2
          begindocument
          $accentsetboldsymbol..x$ $ColorDotsred,bluey$ $ColorDotsredz$
          $ColorDotsred,orange,blueX$
          enddocument


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 21 at 16:23









          marmotmarmot

          113k5145275




          113k5145275







          • 3





            Using a package which was made for it seems wrong :)

            – Skillmon
            Mar 22 at 20:09












          • 3





            Using a package which was made for it seems wrong :)

            – Skillmon
            Mar 22 at 20:09







          3




          3





          Using a package which was made for it seems wrong :)

          – Skillmon
          Mar 22 at 20:09





          Using a package which was made for it seems wrong :)

          – Skillmon
          Mar 22 at 20:09

















          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%2f480644%2fchange-the-color-of-a-single-dot-in-ddot-symbol%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

          Færeyskur hestur Heimild | Tengill | Tilvísanir | LeiðsagnarvalRossið - síða um færeyska hrossið á færeyskuGott ár hjá færeyska hestinum

          He _____ here since 1970 . Answer needed [closed]What does “since he was so high” mean?Meaning of “catch birds for”?How do I ensure “since” takes the meaning I want?“Who cares here” meaningWhat does “right round toward” mean?the time tense (had now been detected)What does the phrase “ring around the roses” mean here?Correct usage of “visited upon”Meaning of “foiled rail sabotage bid”It was the third time I had gone to Rome or It is the third time I had been to Rome

          Slayer Innehåll Historia | Stil, komposition och lyrik | Bandets betydelse och framgångar | Sidoprojekt och samarbeten | Kontroverser | Medlemmar | Utmärkelser och nomineringar | Turnéer och festivaler | Diskografi | Referenser | Externa länkar | Navigeringsmenywww.slayer.net”Metal Massacre vol. 1””Metal Massacre vol. 3””Metal Massacre Volume III””Show No Mercy””Haunting the Chapel””Live Undead””Hell Awaits””Reign in Blood””Reign in Blood””Gold & Platinum – Reign in Blood””Golden Gods Awards Winners”originalet”Kerrang! Hall Of Fame””Slayer Looks Back On 37-Year Career In New Video Series: Part Two””South of Heaven””Gold & Platinum – South of Heaven””Seasons in the Abyss””Gold & Platinum - Seasons in the Abyss””Divine Intervention””Divine Intervention - Release group by Slayer””Gold & Platinum - Divine Intervention””Live Intrusion””Undisputed Attitude””Abolish Government/Superficial Love””Release “Slatanic Slaughter: A Tribute to Slayer” by Various Artists””Diabolus in Musica””Soundtrack to the Apocalypse””God Hates Us All””Systematic - Relationships””War at the Warfield””Gold & Platinum - War at the Warfield””Soundtrack to the Apocalypse””Gold & Platinum - Still Reigning””Metallica, Slayer, Iron Mauden Among Winners At Metal Hammer Awards””Eternal Pyre””Eternal Pyre - Slayer release group””Eternal Pyre””Metal Storm Awards 2006””Kerrang! Hall Of Fame””Slayer Wins 'Best Metal' Grammy Award””Slayer Guitarist Jeff Hanneman Dies””Bullet-For My Valentine booed at Metal Hammer Golden Gods Awards””Unholy Aliance””The End Of Slayer?””Slayer: We Could Thrash Out Two More Albums If We're Fast Enough...””'The Unholy Alliance: Chapter III' UK Dates Added”originalet”Megadeth And Slayer To Co-Headline 'Canadian Carnage' Trek”originalet”World Painted Blood””Release “World Painted Blood” by Slayer””Metallica Heading To Cinemas””Slayer, Megadeth To Join Forces For 'European Carnage' Tour - Dec. 18, 2010”originalet”Slayer's Hanneman Contracts Acute Infection; Band To Bring In Guest Guitarist””Cannibal Corpse's Pat O'Brien Will Step In As Slayer's Guest Guitarist”originalet”Slayer’s Jeff Hanneman Dead at 49””Dave Lombardo Says He Made Only $67,000 In 2011 While Touring With Slayer””Slayer: We Do Not Agree With Dave Lombardo's Substance Or Timeline Of Events””Slayer Welcomes Drummer Paul Bostaph Back To The Fold””Slayer Hope to Unveil Never-Before-Heard Jeff Hanneman Material on Next Album””Slayer Debut New Song 'Implode' During Surprise Golden Gods Appearance””Release group Repentless by Slayer””Repentless - Slayer - Credits””Slayer””Metal Storm Awards 2015””Slayer - to release comic book "Repentless #1"””Slayer To Release 'Repentless' 6.66" Vinyl Box Set””BREAKING NEWS: Slayer Announce Farewell Tour””Slayer Recruit Lamb of God, Anthrax, Behemoth + Testament for Final Tour””Slayer lägger ner efter 37 år””Slayer Announces Second North American Leg Of 'Final' Tour””Final World Tour””Slayer Announces Final European Tour With Lamb of God, Anthrax And Obituary””Slayer To Tour Europe With Lamb of God, Anthrax And Obituary””Slayer To Play 'Last French Show Ever' At Next Year's Hellfst””Slayer's Final World Tour Will Extend Into 2019””Death Angel's Rob Cavestany On Slayer's 'Farewell' Tour: 'Some Of Us Could See This Coming'””Testament Has No Plans To Retire Anytime Soon, Says Chuck Billy””Anthrax's Scott Ian On Slayer's 'Farewell' Tour Plans: 'I Was Surprised And I Wasn't Surprised'””Slayer””Slayer's Morbid Schlock””Review/Rock; For Slayer, the Mania Is the Message””Slayer - Biography””Slayer - Reign In Blood”originalet”Dave Lombardo””An exclusive oral history of Slayer”originalet”Exclusive! Interview With Slayer Guitarist Jeff Hanneman”originalet”Thinking Out Loud: Slayer's Kerry King on hair metal, Satan and being polite””Slayer Lyrics””Slayer - Biography””Most influential artists for extreme metal music””Slayer - Reign in Blood””Slayer guitarist Jeff Hanneman dies aged 49””Slatanic Slaughter: A Tribute to Slayer””Gateway to Hell: A Tribute to Slayer””Covered In Blood””Slayer: The Origins of Thrash in San Francisco, CA.””Why They Rule - #6 Slayer”originalet”Guitar World's 100 Greatest Heavy Metal Guitarists Of All Time”originalet”The fans have spoken: Slayer comes out on top in readers' polls”originalet”Tribute to Jeff Hanneman (1964-2013)””Lamb Of God Frontman: We Sound Like A Slayer Rip-Off””BEHEMOTH Frontman Pays Tribute To SLAYER's JEFF HANNEMAN””Slayer, Hatebreed Doing Double Duty On This Year's Ozzfest””System of a Down””Lacuna Coil’s Andrea Ferro Talks Influences, Skateboarding, Band Origins + More””Slayer - Reign in Blood””Into The Lungs of Hell””Slayer rules - en utställning om fans””Slayer and Their Fans Slashed Through a No-Holds-Barred Night at Gas Monkey””Home””Slayer””Gold & Platinum - The Big 4 Live from Sofia, Bulgaria””Exclusive! Interview With Slayer Guitarist Kerry King””2008-02-23: Wiltern, Los Angeles, CA, USA””Slayer's Kerry King To Perform With Megadeth Tonight! - Oct. 21, 2010”originalet”Dave Lombardo - Biography”Slayer Case DismissedArkiveradUltimate Classic Rock: Slayer guitarist Jeff Hanneman dead at 49.”Slayer: "We could never do any thing like Some Kind Of Monster..."””Cannibal Corpse'S Pat O'Brien Will Step In As Slayer'S Guest Guitarist | The Official Slayer Site”originalet”Slayer Wins 'Best Metal' Grammy Award””Slayer Guitarist Jeff Hanneman Dies””Kerrang! Awards 2006 Blog: Kerrang! Hall Of Fame””Kerrang! Awards 2013: Kerrang! Legend”originalet”Metallica, Slayer, Iron Maien Among Winners At Metal Hammer Awards””Metal Hammer Golden Gods Awards””Bullet For My Valentine Booed At Metal Hammer Golden Gods Awards””Metal Storm Awards 2006””Metal Storm Awards 2015””Slayer's Concert History””Slayer - Relationships””Slayer - Releases”Slayers officiella webbplatsSlayer på MusicBrainzOfficiell webbplatsSlayerSlayerr1373445760000 0001 1540 47353068615-5086262726cb13906545x(data)6033143kn20030215029