5

I have read this question Special character "dot over dash" for solved my problem. But my question is little different and it is not duplicate.

How to have using command \overline a \dot (or more greater than \dot in the middle and is it almost near the vector mark \overline? I bring back what I would like with a picture:

enter image description here

I made a very impromptu attempt.

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage{mathtools}
\begin{document}
\[\dot{\hspace{-.072cm}\overline J}=\frac{\partial \overline J}{\partial \tau}\]
\end{document}
Sebastiano
  • 54,118
  • 9
  • 1
    My question it is not duplicate. Please can you read well my question? – Sebastiano Nov 02 '18 at 12:26
  • The \dot will usually be well centred on the \overline. It's the latter which is usually badly placed. Try e.g. with \dot{\overline{\mkern-2muJ\mkern2mu}}. – campa Nov 02 '18 at 12:35
  • @campa I've tried and it's fine in half. It is perfectly in the middle, but I would like it lower down. – Sebastiano Nov 02 '18 at 12:38
  • 3
    @Sebastiano with the reputation you have I would have expected a bit a more sophisticated response to fontgeologist's suggestion. I think there might have been some good starting points (especially the answer from Danie Els) and otherwise you could have indicated what you missed there. – albert Nov 02 '18 at 13:28
  • 1
    @albert With extreme sincerity (sometimes or often it is not enough to be honest) I tried but the results were poor.Then I add that the score is relative, which means that I can be slightly better in other fields and with difficulty in other fields. So I don't agree with your highlighted opinion about your score indication. – Sebastiano Nov 02 '18 at 20:59

3 Answers3

6
\documentclass{article}
\usepackage{stackengine,amsmath,graphicx}
\stackMath
\newcommand\overlinedot[1]{%
  \stackengine{.2pt}{\overline{#1}}{\scalebox{2}{.}}{O}{c}{F}{F}{S}%
}
\begin{document}
\[
\overlinedot{J}=\overlinedot{x}
\]
\end{document}

enter image description here

A version that works across math styles.

\documentclass{article}
\usepackage{stackengine,amsmath,graphicx,scalerel}
\newcommand\overlinedot[1]{\ThisStyle{\ensurestackMath{\stackengine%
  {.2\LMpt}{\SavedStyle\overline{#1}}{\scalebox{2}{$\SavedStyle.$}}{O}{c}{F}{F}{S}%
}}}
\begin{document}
\[
\overlinedot{J}=\overlinedot{x}
\]
\[
\scriptstyle\overlinedot{J}=\overlinedot{x}
\]
\[
\scriptscriptstyle\overlinedot{J}=\overlinedot{x}
\]
\end{document}

enter image description here

  • I thank you immensely for your patience and your wonderful work. I really wouldn't know where to put the green tick. If you agree I would give it to campa that has less score. I would like to help everyone. Surely you have had my positive vote. +1 – Sebastiano Nov 02 '18 at 21:01
  • 1
    @Sebastiano Cheers! (as always) – Steven B. Segletes Nov 02 '18 at 22:31
5

Honestly I'm not sure it's worth the effort (I use \overline as rarely as possible). My phantasy wasn't rich enough to come up with a name...

\documentclass{article}

\def\foo{\mathpalette\fooaux}
\def\fooaux#1#2{%
  \mkern2mu
  \setbox0=\hbox{\mathsurround=0pt$#1\overline{\mkern-2mu #2 \mkern2mu}$}%
  \setbox1=\hbox to \wd0{\hss$#1\cdot$\hss}%
  \vbox{\offinterlineskip\copy1\vskip-.4\ht1\box0}%
  \mkern-2mu
}

\begin{document}

$\dot{\overline{J}} J \overline{J} J \foo{J}J$

$\scriptstyle \dot{\overline{J}} J \overline{J} J\ foo{J}J$

$\scriptscriptstyle \dot{\overline{J}} J \overline{J} J \foo{J}J$

\end{document}

enter image description here

campa
  • 31,130
  • As I wrote to Steven a few seconds ago, I also thank you for your patience and the help you have given me. I would like to help everyone. Surely you have had my positive vote. +1 – Sebastiano Nov 02 '18 at 21:02
2
\documentclass[a4paper,12pt]{article}
\usepackage{mathtools}

\usepackage{mattens}
\SetSymbFont{\relax}

\begin{document}

\[\bS[\dot]{J}=\frac{\partial \overline J}{\partial \tau}\]

\end{document}

enter image description here

daniel
  • 1