Typesetting a double Over Dot on top of a symbol
$begingroup$
I wanted to make a notation with a double dot over a symbol in Mathematica. Searching online or in the documentation did not yield any results. However, just randomly attempting to give a second parameter to the OverDot
function surprisingly did exactly what I needed:
I assume the red font suggests that Mathematica perceives this as a syntax mistake at some level, even though the output is as desired. Unfortunately, this does not work for three dots and more.
Is there a proper way to do this without red font appearing?
formatting
$endgroup$
add a comment |
$begingroup$
I wanted to make a notation with a double dot over a symbol in Mathematica. Searching online or in the documentation did not yield any results. However, just randomly attempting to give a second parameter to the OverDot
function surprisingly did exactly what I needed:
I assume the red font suggests that Mathematica perceives this as a syntax mistake at some level, even though the output is as desired. Unfortunately, this does not work for three dots and more.
Is there a proper way to do this without red font appearing?
formatting
$endgroup$
1
$begingroup$
{Overscript[x, ".."], Overscript[x, "..."], Overscript[x, "[Ellipsis]"]}
$endgroup$
– Bob Hanlon
2 days ago
3
$begingroup$
The code editor and documentation are not always completely in sync with the actual typesetting. This is only one of several examples. Ignore the code coloring.
$endgroup$
– m_goldberg
2 days ago
$begingroup$
@BobHanlon as a German speaker I perceive yourOverscript[x, ".."]
Umlaut to be very improperly typeset.Overscript[x, "¨"]
is bad as well. They work, yes; but not for publication. Cheers!
$endgroup$
– Roman
yesterday
$begingroup$
@Roman Why not just literally use the German character set for that? The double dot over a symbol has e.g. the meaning of a second time derivative in Physics -- which is typeset properly.
$endgroup$
– Kagaratsch
yesterday
$begingroup$
For Umlaut characters you only get äëïöüÿ from the font set but not the others. That wasn't my point though. All I'm saying is that the size of the dots and their distance must be appropriate for the chosen font, otherwise it looks very bad for a native speaker of German, Turkish, Swedish, French, etc. If you don't care about the aesthetics, then all the given solutions work, sure.
$endgroup$
– Roman
yesterday
add a comment |
$begingroup$
I wanted to make a notation with a double dot over a symbol in Mathematica. Searching online or in the documentation did not yield any results. However, just randomly attempting to give a second parameter to the OverDot
function surprisingly did exactly what I needed:
I assume the red font suggests that Mathematica perceives this as a syntax mistake at some level, even though the output is as desired. Unfortunately, this does not work for three dots and more.
Is there a proper way to do this without red font appearing?
formatting
$endgroup$
I wanted to make a notation with a double dot over a symbol in Mathematica. Searching online or in the documentation did not yield any results. However, just randomly attempting to give a second parameter to the OverDot
function surprisingly did exactly what I needed:
I assume the red font suggests that Mathematica perceives this as a syntax mistake at some level, even though the output is as desired. Unfortunately, this does not work for three dots and more.
Is there a proper way to do this without red font appearing?
formatting
formatting
asked 2 days ago
KagaratschKagaratsch
4,83831348
4,83831348
1
$begingroup$
{Overscript[x, ".."], Overscript[x, "..."], Overscript[x, "[Ellipsis]"]}
$endgroup$
– Bob Hanlon
2 days ago
3
$begingroup$
The code editor and documentation are not always completely in sync with the actual typesetting. This is only one of several examples. Ignore the code coloring.
$endgroup$
– m_goldberg
2 days ago
$begingroup$
@BobHanlon as a German speaker I perceive yourOverscript[x, ".."]
Umlaut to be very improperly typeset.Overscript[x, "¨"]
is bad as well. They work, yes; but not for publication. Cheers!
$endgroup$
– Roman
yesterday
$begingroup$
@Roman Why not just literally use the German character set for that? The double dot over a symbol has e.g. the meaning of a second time derivative in Physics -- which is typeset properly.
$endgroup$
– Kagaratsch
yesterday
$begingroup$
For Umlaut characters you only get äëïöüÿ from the font set but not the others. That wasn't my point though. All I'm saying is that the size of the dots and their distance must be appropriate for the chosen font, otherwise it looks very bad for a native speaker of German, Turkish, Swedish, French, etc. If you don't care about the aesthetics, then all the given solutions work, sure.
$endgroup$
– Roman
yesterday
add a comment |
1
$begingroup$
{Overscript[x, ".."], Overscript[x, "..."], Overscript[x, "[Ellipsis]"]}
$endgroup$
– Bob Hanlon
2 days ago
3
$begingroup$
The code editor and documentation are not always completely in sync with the actual typesetting. This is only one of several examples. Ignore the code coloring.
$endgroup$
– m_goldberg
2 days ago
$begingroup$
@BobHanlon as a German speaker I perceive yourOverscript[x, ".."]
Umlaut to be very improperly typeset.Overscript[x, "¨"]
is bad as well. They work, yes; but not for publication. Cheers!
$endgroup$
– Roman
yesterday
$begingroup$
@Roman Why not just literally use the German character set for that? The double dot over a symbol has e.g. the meaning of a second time derivative in Physics -- which is typeset properly.
$endgroup$
– Kagaratsch
yesterday
$begingroup$
For Umlaut characters you only get äëïöüÿ from the font set but not the others. That wasn't my point though. All I'm saying is that the size of the dots and their distance must be appropriate for the chosen font, otherwise it looks very bad for a native speaker of German, Turkish, Swedish, French, etc. If you don't care about the aesthetics, then all the given solutions work, sure.
$endgroup$
– Roman
yesterday
1
1
$begingroup$
{Overscript[x, ".."], Overscript[x, "..."], Overscript[x, "[Ellipsis]"]}
$endgroup$
– Bob Hanlon
2 days ago
$begingroup$
{Overscript[x, ".."], Overscript[x, "..."], Overscript[x, "[Ellipsis]"]}
$endgroup$
– Bob Hanlon
2 days ago
3
3
$begingroup$
The code editor and documentation are not always completely in sync with the actual typesetting. This is only one of several examples. Ignore the code coloring.
$endgroup$
– m_goldberg
2 days ago
$begingroup$
The code editor and documentation are not always completely in sync with the actual typesetting. This is only one of several examples. Ignore the code coloring.
$endgroup$
– m_goldberg
2 days ago
$begingroup$
@BobHanlon as a German speaker I perceive your
Overscript[x, ".."]
Umlaut to be very improperly typeset. Overscript[x, "¨"]
is bad as well. They work, yes; but not for publication. Cheers!$endgroup$
– Roman
yesterday
$begingroup$
@BobHanlon as a German speaker I perceive your
Overscript[x, ".."]
Umlaut to be very improperly typeset. Overscript[x, "¨"]
is bad as well. They work, yes; but not for publication. Cheers!$endgroup$
– Roman
yesterday
$begingroup$
@Roman Why not just literally use the German character set for that? The double dot over a symbol has e.g. the meaning of a second time derivative in Physics -- which is typeset properly.
$endgroup$
– Kagaratsch
yesterday
$begingroup$
@Roman Why not just literally use the German character set for that? The double dot over a symbol has e.g. the meaning of a second time derivative in Physics -- which is typeset properly.
$endgroup$
– Kagaratsch
yesterday
$begingroup$
For Umlaut characters you only get äëïöüÿ from the font set but not the others. That wasn't my point though. All I'm saying is that the size of the dots and their distance must be appropriate for the chosen font, otherwise it looks very bad for a native speaker of German, Turkish, Swedish, French, etc. If you don't care about the aesthetics, then all the given solutions work, sure.
$endgroup$
– Roman
yesterday
$begingroup$
For Umlaut characters you only get äëïöüÿ from the font set but not the others. That wasn't my point though. All I'm saying is that the size of the dots and their distance must be appropriate for the chosen font, otherwise it looks very bad for a native speaker of German, Turkish, Swedish, French, etc. If you don't care about the aesthetics, then all the given solutions work, sure.
$endgroup$
– Roman
yesterday
add a comment |
3 Answers
3
active
oldest
votes
$begingroup$
Use ToBoxes
to find the boxes generated for OverDot[x, 2]
:
OverDot[x,2] //ToBoxes
OverscriptBox["x", "¨"]
You can reproduce these boxes using Overscript:
Overscript[x, RawBoxes @ "¨"]
You can use the same approach for triple dots:
Overscript[x, RawBoxes @ "[TripleDot]"]
For more dots, you will have to use a different mechanism to generate the dots, e.g.:
Overscript[x, Style[Row[{".",".",".","."}],FontTracking->"Condensed"]]
Update
You could also overload OverDot
to work with the 3 and higher versions (I also included @Michael's syntax information fix):
SyntaxInformation[OverDot] = {"ArgumentsPattern" -> {_, _.}};
MakeBoxes[OverDot[a_, n_Integer?(GreaterThan[2])], StandardForm] := If[n==3,
OverscriptBox[MakeBoxes[a], "[TripleDot]"],
OverscriptBox[
MakeBoxes[a],
ToBoxes @ Style[Row[ConstantArray[".", n]], FontTracking->"Condensed"]
]
]
Then:
$endgroup$
add a comment |
$begingroup$
You could fix the syntax highlighting, or ignore it. Here's a fix:
SyntaxInformation[OverDot] = {"ArgumentsPattern" -> {_, _.}};
$endgroup$
add a comment |
$begingroup$
Go to the Basic math assistant palette and click on the template.
$endgroup$
$begingroup$
There indeed is a [DoubleDot] template, but it actually leads to an expression with the FullFormOverDot[X,2]
! So the syntax is in fact intended, then I'm confused why Mathematica marks it in red font when typed in directly?
$endgroup$
– Kagaratsch
2 days ago
1
$begingroup$
Yes... confusing. The documentation forOverDot
shows only one argument... so the $2$ is somehow treated extraneously. (Perhaps a bug report is in order.)
$endgroup$
– David G. Stork
2 days ago
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "387"
};
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%2fmathematica.stackexchange.com%2fquestions%2f194850%2ftypesetting-a-double-over-dot-on-top-of-a-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
$begingroup$
Use ToBoxes
to find the boxes generated for OverDot[x, 2]
:
OverDot[x,2] //ToBoxes
OverscriptBox["x", "¨"]
You can reproduce these boxes using Overscript:
Overscript[x, RawBoxes @ "¨"]
You can use the same approach for triple dots:
Overscript[x, RawBoxes @ "[TripleDot]"]
For more dots, you will have to use a different mechanism to generate the dots, e.g.:
Overscript[x, Style[Row[{".",".",".","."}],FontTracking->"Condensed"]]
Update
You could also overload OverDot
to work with the 3 and higher versions (I also included @Michael's syntax information fix):
SyntaxInformation[OverDot] = {"ArgumentsPattern" -> {_, _.}};
MakeBoxes[OverDot[a_, n_Integer?(GreaterThan[2])], StandardForm] := If[n==3,
OverscriptBox[MakeBoxes[a], "[TripleDot]"],
OverscriptBox[
MakeBoxes[a],
ToBoxes @ Style[Row[ConstantArray[".", n]], FontTracking->"Condensed"]
]
]
Then:
$endgroup$
add a comment |
$begingroup$
Use ToBoxes
to find the boxes generated for OverDot[x, 2]
:
OverDot[x,2] //ToBoxes
OverscriptBox["x", "¨"]
You can reproduce these boxes using Overscript:
Overscript[x, RawBoxes @ "¨"]
You can use the same approach for triple dots:
Overscript[x, RawBoxes @ "[TripleDot]"]
For more dots, you will have to use a different mechanism to generate the dots, e.g.:
Overscript[x, Style[Row[{".",".",".","."}],FontTracking->"Condensed"]]
Update
You could also overload OverDot
to work with the 3 and higher versions (I also included @Michael's syntax information fix):
SyntaxInformation[OverDot] = {"ArgumentsPattern" -> {_, _.}};
MakeBoxes[OverDot[a_, n_Integer?(GreaterThan[2])], StandardForm] := If[n==3,
OverscriptBox[MakeBoxes[a], "[TripleDot]"],
OverscriptBox[
MakeBoxes[a],
ToBoxes @ Style[Row[ConstantArray[".", n]], FontTracking->"Condensed"]
]
]
Then:
$endgroup$
add a comment |
$begingroup$
Use ToBoxes
to find the boxes generated for OverDot[x, 2]
:
OverDot[x,2] //ToBoxes
OverscriptBox["x", "¨"]
You can reproduce these boxes using Overscript:
Overscript[x, RawBoxes @ "¨"]
You can use the same approach for triple dots:
Overscript[x, RawBoxes @ "[TripleDot]"]
For more dots, you will have to use a different mechanism to generate the dots, e.g.:
Overscript[x, Style[Row[{".",".",".","."}],FontTracking->"Condensed"]]
Update
You could also overload OverDot
to work with the 3 and higher versions (I also included @Michael's syntax information fix):
SyntaxInformation[OverDot] = {"ArgumentsPattern" -> {_, _.}};
MakeBoxes[OverDot[a_, n_Integer?(GreaterThan[2])], StandardForm] := If[n==3,
OverscriptBox[MakeBoxes[a], "[TripleDot]"],
OverscriptBox[
MakeBoxes[a],
ToBoxes @ Style[Row[ConstantArray[".", n]], FontTracking->"Condensed"]
]
]
Then:
$endgroup$
Use ToBoxes
to find the boxes generated for OverDot[x, 2]
:
OverDot[x,2] //ToBoxes
OverscriptBox["x", "¨"]
You can reproduce these boxes using Overscript:
Overscript[x, RawBoxes @ "¨"]
You can use the same approach for triple dots:
Overscript[x, RawBoxes @ "[TripleDot]"]
For more dots, you will have to use a different mechanism to generate the dots, e.g.:
Overscript[x, Style[Row[{".",".",".","."}],FontTracking->"Condensed"]]
Update
You could also overload OverDot
to work with the 3 and higher versions (I also included @Michael's syntax information fix):
SyntaxInformation[OverDot] = {"ArgumentsPattern" -> {_, _.}};
MakeBoxes[OverDot[a_, n_Integer?(GreaterThan[2])], StandardForm] := If[n==3,
OverscriptBox[MakeBoxes[a], "[TripleDot]"],
OverscriptBox[
MakeBoxes[a],
ToBoxes @ Style[Row[ConstantArray[".", n]], FontTracking->"Condensed"]
]
]
Then:
edited yesterday
answered 2 days ago
Carl WollCarl Woll
73.3k398191
73.3k398191
add a comment |
add a comment |
$begingroup$
You could fix the syntax highlighting, or ignore it. Here's a fix:
SyntaxInformation[OverDot] = {"ArgumentsPattern" -> {_, _.}};
$endgroup$
add a comment |
$begingroup$
You could fix the syntax highlighting, or ignore it. Here's a fix:
SyntaxInformation[OverDot] = {"ArgumentsPattern" -> {_, _.}};
$endgroup$
add a comment |
$begingroup$
You could fix the syntax highlighting, or ignore it. Here's a fix:
SyntaxInformation[OverDot] = {"ArgumentsPattern" -> {_, _.}};
$endgroup$
You could fix the syntax highlighting, or ignore it. Here's a fix:
SyntaxInformation[OverDot] = {"ArgumentsPattern" -> {_, _.}};
answered 2 days ago
Michael E2Michael E2
150k12203482
150k12203482
add a comment |
add a comment |
$begingroup$
Go to the Basic math assistant palette and click on the template.
$endgroup$
$begingroup$
There indeed is a [DoubleDot] template, but it actually leads to an expression with the FullFormOverDot[X,2]
! So the syntax is in fact intended, then I'm confused why Mathematica marks it in red font when typed in directly?
$endgroup$
– Kagaratsch
2 days ago
1
$begingroup$
Yes... confusing. The documentation forOverDot
shows only one argument... so the $2$ is somehow treated extraneously. (Perhaps a bug report is in order.)
$endgroup$
– David G. Stork
2 days ago
add a comment |
$begingroup$
Go to the Basic math assistant palette and click on the template.
$endgroup$
$begingroup$
There indeed is a [DoubleDot] template, but it actually leads to an expression with the FullFormOverDot[X,2]
! So the syntax is in fact intended, then I'm confused why Mathematica marks it in red font when typed in directly?
$endgroup$
– Kagaratsch
2 days ago
1
$begingroup$
Yes... confusing. The documentation forOverDot
shows only one argument... so the $2$ is somehow treated extraneously. (Perhaps a bug report is in order.)
$endgroup$
– David G. Stork
2 days ago
add a comment |
$begingroup$
Go to the Basic math assistant palette and click on the template.
$endgroup$
Go to the Basic math assistant palette and click on the template.
edited 2 days ago
answered 2 days ago
David G. StorkDavid G. Stork
24.9k22155
24.9k22155
$begingroup$
There indeed is a [DoubleDot] template, but it actually leads to an expression with the FullFormOverDot[X,2]
! So the syntax is in fact intended, then I'm confused why Mathematica marks it in red font when typed in directly?
$endgroup$
– Kagaratsch
2 days ago
1
$begingroup$
Yes... confusing. The documentation forOverDot
shows only one argument... so the $2$ is somehow treated extraneously. (Perhaps a bug report is in order.)
$endgroup$
– David G. Stork
2 days ago
add a comment |
$begingroup$
There indeed is a [DoubleDot] template, but it actually leads to an expression with the FullFormOverDot[X,2]
! So the syntax is in fact intended, then I'm confused why Mathematica marks it in red font when typed in directly?
$endgroup$
– Kagaratsch
2 days ago
1
$begingroup$
Yes... confusing. The documentation forOverDot
shows only one argument... so the $2$ is somehow treated extraneously. (Perhaps a bug report is in order.)
$endgroup$
– David G. Stork
2 days ago
$begingroup$
There indeed is a [DoubleDot] template, but it actually leads to an expression with the FullForm
OverDot[X,2]
! So the syntax is in fact intended, then I'm confused why Mathematica marks it in red font when typed in directly?$endgroup$
– Kagaratsch
2 days ago
$begingroup$
There indeed is a [DoubleDot] template, but it actually leads to an expression with the FullForm
OverDot[X,2]
! So the syntax is in fact intended, then I'm confused why Mathematica marks it in red font when typed in directly?$endgroup$
– Kagaratsch
2 days ago
1
1
$begingroup$
Yes... confusing. The documentation for
OverDot
shows only one argument... so the $2$ is somehow treated extraneously. (Perhaps a bug report is in order.)$endgroup$
– David G. Stork
2 days ago
$begingroup$
Yes... confusing. The documentation for
OverDot
shows only one argument... so the $2$ is somehow treated extraneously. (Perhaps a bug report is in order.)$endgroup$
– David G. Stork
2 days ago
add a comment |
Thanks for contributing an answer to Mathematica 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.
Use MathJax to format equations. MathJax reference.
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%2fmathematica.stackexchange.com%2fquestions%2f194850%2ftypesetting-a-double-over-dot-on-top-of-a-symbol%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
1
$begingroup$
{Overscript[x, ".."], Overscript[x, "..."], Overscript[x, "[Ellipsis]"]}
$endgroup$
– Bob Hanlon
2 days ago
3
$begingroup$
The code editor and documentation are not always completely in sync with the actual typesetting. This is only one of several examples. Ignore the code coloring.
$endgroup$
– m_goldberg
2 days ago
$begingroup$
@BobHanlon as a German speaker I perceive your
Overscript[x, ".."]
Umlaut to be very improperly typeset.Overscript[x, "¨"]
is bad as well. They work, yes; but not for publication. Cheers!$endgroup$
– Roman
yesterday
$begingroup$
@Roman Why not just literally use the German character set for that? The double dot over a symbol has e.g. the meaning of a second time derivative in Physics -- which is typeset properly.
$endgroup$
– Kagaratsch
yesterday
$begingroup$
For Umlaut characters you only get äëïöüÿ from the font set but not the others. That wasn't my point though. All I'm saying is that the size of the dots and their distance must be appropriate for the chosen font, otherwise it looks very bad for a native speaker of German, Turkish, Swedish, French, etc. If you don't care about the aesthetics, then all the given solutions work, sure.
$endgroup$
– Roman
yesterday