How to make double overline with less vertical displacement
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
overlineoverlineABC
produces a double bar over ABC
, but it takes up too much vertical space.
How can I make the top bar closer to the bar below it?
math-mode text-decorations
add a comment |Â
up vote
2
down vote
favorite
overlineoverlineABC
produces a double bar over ABC
, but it takes up too much vertical space.
How can I make the top bar closer to the bar below it?
math-mode text-decorations
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
overlineoverlineABC
produces a double bar over ABC
, but it takes up too much vertical space.
How can I make the top bar closer to the bar below it?
math-mode text-decorations
overlineoverlineABC
produces a double bar over ABC
, but it takes up too much vertical space.
How can I make the top bar closer to the bar below it?
math-mode text-decorations
math-mode text-decorations
edited 1 hour ago
Sigur
22k350132
22k350132
asked 2 hours ago
David
1233
1233
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
2
down vote
The overline
operation inserts a kern three times fontdimen8
of the math extension font (which is also used as the rule thickness).
We can so reduce this kerning by artificially making the inner overlined box less tall by twice the applied kerning.
documentclassarticle
usepackageamsmath
makeatletter
newcommanddbloverline[1]overlinedbl@overline#1
newcommanddbl@overline[1]mathpalettedbl@@overline#1
newcommanddbl@@overline[2]%
begingroup
sboxz@$m@th#1overline#2$%
htz@=dimexprhtz@-2dbl@adjust#1relax
boxz@
ifx#1scriptstylekern-scriptspaceelse
ifx#1scriptscriptstylekern-scriptspacefifi
endgroup
newcommanddbl@adjust[1]%
fontdimen8
ifx#1displaystyletextfontelse
ifx#1textstyletextfontelse
ifx#1scriptstylescriptfontelse
scriptscriptfontfififi 3
makeatother
begindocument
$overlineoverlineABC$
$dbloverlineABC$
$X_overlineoverlineABCkern-scriptspace$
$X_dbloverlineABC$
enddocument
I took the occasion for removing the scriptspace
which is added in subscripts/superscripts for the inner overline atom.
add a comment |Â
up vote
1
down vote
You can easily vary the command doverline
by changing the vertical offset (e.g. 0.5ex
).
documentclassmemoir
usepackageamsmath,tikz
usetikzlibrarycalc
newcommanddoverline[1]%
tikz[baseline=(nodeAnchor.base)]
node[inner sep=0] (nodeAnchor) $#1$;
draw[line width=0.1ex,line cap=round]
($(nodeAnchor.north west)+(0.0em,0.2ex)$)
--
($(nodeAnchor.north east)+(0.0em,0.2ex)$)
($(nodeAnchor.north west)+(0.0em,0.5ex)$)
--
($(nodeAnchor.north east)+(0.0em,0.5ex)$)
;
begindocument
noindentOfficia quidem est accusamus labore architecto. Ullam hic corporis quod consectetur sequi quod eaque.
Ducimus iste excepturi et cumque ut. Earum animi autem eum tempora.
.$overlineoverline1234567890$.
Officia quidem est accusamus labore architecto. Ullam hic corporis quod consectetur sequi quod eaque.
Ducimus iste excepturi et cumque ut.
.$doverline1234567890$.
Earum animi autem eum tempora. Officia quidem est accusamus labore architecto. Ullam hic.
beginalign*
Z&=1234567890\
Z&=overlineoverline1234567890\
Z&=doverline1234567890\
Z&=1234567890
endalign*
enddocument
EDIT: egreg's solution is more concise when dealing with subscripts and superscripts. My solution could be adopted to this by using LuaTeX
access to mathstyle
but as his solutions already deals with this issue there is not really a need for it.
There is another solution on https://tex.stackexchange.com/a/418483/128553.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
The overline
operation inserts a kern three times fontdimen8
of the math extension font (which is also used as the rule thickness).
We can so reduce this kerning by artificially making the inner overlined box less tall by twice the applied kerning.
documentclassarticle
usepackageamsmath
makeatletter
newcommanddbloverline[1]overlinedbl@overline#1
newcommanddbl@overline[1]mathpalettedbl@@overline#1
newcommanddbl@@overline[2]%
begingroup
sboxz@$m@th#1overline#2$%
htz@=dimexprhtz@-2dbl@adjust#1relax
boxz@
ifx#1scriptstylekern-scriptspaceelse
ifx#1scriptscriptstylekern-scriptspacefifi
endgroup
newcommanddbl@adjust[1]%
fontdimen8
ifx#1displaystyletextfontelse
ifx#1textstyletextfontelse
ifx#1scriptstylescriptfontelse
scriptscriptfontfififi 3
makeatother
begindocument
$overlineoverlineABC$
$dbloverlineABC$
$X_overlineoverlineABCkern-scriptspace$
$X_dbloverlineABC$
enddocument
I took the occasion for removing the scriptspace
which is added in subscripts/superscripts for the inner overline atom.
add a comment |Â
up vote
2
down vote
The overline
operation inserts a kern three times fontdimen8
of the math extension font (which is also used as the rule thickness).
We can so reduce this kerning by artificially making the inner overlined box less tall by twice the applied kerning.
documentclassarticle
usepackageamsmath
makeatletter
newcommanddbloverline[1]overlinedbl@overline#1
newcommanddbl@overline[1]mathpalettedbl@@overline#1
newcommanddbl@@overline[2]%
begingroup
sboxz@$m@th#1overline#2$%
htz@=dimexprhtz@-2dbl@adjust#1relax
boxz@
ifx#1scriptstylekern-scriptspaceelse
ifx#1scriptscriptstylekern-scriptspacefifi
endgroup
newcommanddbl@adjust[1]%
fontdimen8
ifx#1displaystyletextfontelse
ifx#1textstyletextfontelse
ifx#1scriptstylescriptfontelse
scriptscriptfontfififi 3
makeatother
begindocument
$overlineoverlineABC$
$dbloverlineABC$
$X_overlineoverlineABCkern-scriptspace$
$X_dbloverlineABC$
enddocument
I took the occasion for removing the scriptspace
which is added in subscripts/superscripts for the inner overline atom.
add a comment |Â
up vote
2
down vote
up vote
2
down vote
The overline
operation inserts a kern three times fontdimen8
of the math extension font (which is also used as the rule thickness).
We can so reduce this kerning by artificially making the inner overlined box less tall by twice the applied kerning.
documentclassarticle
usepackageamsmath
makeatletter
newcommanddbloverline[1]overlinedbl@overline#1
newcommanddbl@overline[1]mathpalettedbl@@overline#1
newcommanddbl@@overline[2]%
begingroup
sboxz@$m@th#1overline#2$%
htz@=dimexprhtz@-2dbl@adjust#1relax
boxz@
ifx#1scriptstylekern-scriptspaceelse
ifx#1scriptscriptstylekern-scriptspacefifi
endgroup
newcommanddbl@adjust[1]%
fontdimen8
ifx#1displaystyletextfontelse
ifx#1textstyletextfontelse
ifx#1scriptstylescriptfontelse
scriptscriptfontfififi 3
makeatother
begindocument
$overlineoverlineABC$
$dbloverlineABC$
$X_overlineoverlineABCkern-scriptspace$
$X_dbloverlineABC$
enddocument
I took the occasion for removing the scriptspace
which is added in subscripts/superscripts for the inner overline atom.
The overline
operation inserts a kern three times fontdimen8
of the math extension font (which is also used as the rule thickness).
We can so reduce this kerning by artificially making the inner overlined box less tall by twice the applied kerning.
documentclassarticle
usepackageamsmath
makeatletter
newcommanddbloverline[1]overlinedbl@overline#1
newcommanddbl@overline[1]mathpalettedbl@@overline#1
newcommanddbl@@overline[2]%
begingroup
sboxz@$m@th#1overline#2$%
htz@=dimexprhtz@-2dbl@adjust#1relax
boxz@
ifx#1scriptstylekern-scriptspaceelse
ifx#1scriptscriptstylekern-scriptspacefifi
endgroup
newcommanddbl@adjust[1]%
fontdimen8
ifx#1displaystyletextfontelse
ifx#1textstyletextfontelse
ifx#1scriptstylescriptfontelse
scriptscriptfontfififi 3
makeatother
begindocument
$overlineoverlineABC$
$dbloverlineABC$
$X_overlineoverlineABCkern-scriptspace$
$X_dbloverlineABC$
enddocument
I took the occasion for removing the scriptspace
which is added in subscripts/superscripts for the inner overline atom.
answered 1 hour ago
egreg
684k8418233068
684k8418233068
add a comment |Â
add a comment |Â
up vote
1
down vote
You can easily vary the command doverline
by changing the vertical offset (e.g. 0.5ex
).
documentclassmemoir
usepackageamsmath,tikz
usetikzlibrarycalc
newcommanddoverline[1]%
tikz[baseline=(nodeAnchor.base)]
node[inner sep=0] (nodeAnchor) $#1$;
draw[line width=0.1ex,line cap=round]
($(nodeAnchor.north west)+(0.0em,0.2ex)$)
--
($(nodeAnchor.north east)+(0.0em,0.2ex)$)
($(nodeAnchor.north west)+(0.0em,0.5ex)$)
--
($(nodeAnchor.north east)+(0.0em,0.5ex)$)
;
begindocument
noindentOfficia quidem est accusamus labore architecto. Ullam hic corporis quod consectetur sequi quod eaque.
Ducimus iste excepturi et cumque ut. Earum animi autem eum tempora.
.$overlineoverline1234567890$.
Officia quidem est accusamus labore architecto. Ullam hic corporis quod consectetur sequi quod eaque.
Ducimus iste excepturi et cumque ut.
.$doverline1234567890$.
Earum animi autem eum tempora. Officia quidem est accusamus labore architecto. Ullam hic.
beginalign*
Z&=1234567890\
Z&=overlineoverline1234567890\
Z&=doverline1234567890\
Z&=1234567890
endalign*
enddocument
EDIT: egreg's solution is more concise when dealing with subscripts and superscripts. My solution could be adopted to this by using LuaTeX
access to mathstyle
but as his solutions already deals with this issue there is not really a need for it.
There is another solution on https://tex.stackexchange.com/a/418483/128553.
add a comment |Â
up vote
1
down vote
You can easily vary the command doverline
by changing the vertical offset (e.g. 0.5ex
).
documentclassmemoir
usepackageamsmath,tikz
usetikzlibrarycalc
newcommanddoverline[1]%
tikz[baseline=(nodeAnchor.base)]
node[inner sep=0] (nodeAnchor) $#1$;
draw[line width=0.1ex,line cap=round]
($(nodeAnchor.north west)+(0.0em,0.2ex)$)
--
($(nodeAnchor.north east)+(0.0em,0.2ex)$)
($(nodeAnchor.north west)+(0.0em,0.5ex)$)
--
($(nodeAnchor.north east)+(0.0em,0.5ex)$)
;
begindocument
noindentOfficia quidem est accusamus labore architecto. Ullam hic corporis quod consectetur sequi quod eaque.
Ducimus iste excepturi et cumque ut. Earum animi autem eum tempora.
.$overlineoverline1234567890$.
Officia quidem est accusamus labore architecto. Ullam hic corporis quod consectetur sequi quod eaque.
Ducimus iste excepturi et cumque ut.
.$doverline1234567890$.
Earum animi autem eum tempora. Officia quidem est accusamus labore architecto. Ullam hic.
beginalign*
Z&=1234567890\
Z&=overlineoverline1234567890\
Z&=doverline1234567890\
Z&=1234567890
endalign*
enddocument
EDIT: egreg's solution is more concise when dealing with subscripts and superscripts. My solution could be adopted to this by using LuaTeX
access to mathstyle
but as his solutions already deals with this issue there is not really a need for it.
There is another solution on https://tex.stackexchange.com/a/418483/128553.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
You can easily vary the command doverline
by changing the vertical offset (e.g. 0.5ex
).
documentclassmemoir
usepackageamsmath,tikz
usetikzlibrarycalc
newcommanddoverline[1]%
tikz[baseline=(nodeAnchor.base)]
node[inner sep=0] (nodeAnchor) $#1$;
draw[line width=0.1ex,line cap=round]
($(nodeAnchor.north west)+(0.0em,0.2ex)$)
--
($(nodeAnchor.north east)+(0.0em,0.2ex)$)
($(nodeAnchor.north west)+(0.0em,0.5ex)$)
--
($(nodeAnchor.north east)+(0.0em,0.5ex)$)
;
begindocument
noindentOfficia quidem est accusamus labore architecto. Ullam hic corporis quod consectetur sequi quod eaque.
Ducimus iste excepturi et cumque ut. Earum animi autem eum tempora.
.$overlineoverline1234567890$.
Officia quidem est accusamus labore architecto. Ullam hic corporis quod consectetur sequi quod eaque.
Ducimus iste excepturi et cumque ut.
.$doverline1234567890$.
Earum animi autem eum tempora. Officia quidem est accusamus labore architecto. Ullam hic.
beginalign*
Z&=1234567890\
Z&=overlineoverline1234567890\
Z&=doverline1234567890\
Z&=1234567890
endalign*
enddocument
EDIT: egreg's solution is more concise when dealing with subscripts and superscripts. My solution could be adopted to this by using LuaTeX
access to mathstyle
but as his solutions already deals with this issue there is not really a need for it.
There is another solution on https://tex.stackexchange.com/a/418483/128553.
You can easily vary the command doverline
by changing the vertical offset (e.g. 0.5ex
).
documentclassmemoir
usepackageamsmath,tikz
usetikzlibrarycalc
newcommanddoverline[1]%
tikz[baseline=(nodeAnchor.base)]
node[inner sep=0] (nodeAnchor) $#1$;
draw[line width=0.1ex,line cap=round]
($(nodeAnchor.north west)+(0.0em,0.2ex)$)
--
($(nodeAnchor.north east)+(0.0em,0.2ex)$)
($(nodeAnchor.north west)+(0.0em,0.5ex)$)
--
($(nodeAnchor.north east)+(0.0em,0.5ex)$)
;
begindocument
noindentOfficia quidem est accusamus labore architecto. Ullam hic corporis quod consectetur sequi quod eaque.
Ducimus iste excepturi et cumque ut. Earum animi autem eum tempora.
.$overlineoverline1234567890$.
Officia quidem est accusamus labore architecto. Ullam hic corporis quod consectetur sequi quod eaque.
Ducimus iste excepturi et cumque ut.
.$doverline1234567890$.
Earum animi autem eum tempora. Officia quidem est accusamus labore architecto. Ullam hic.
beginalign*
Z&=1234567890\
Z&=overlineoverline1234567890\
Z&=doverline1234567890\
Z&=1234567890
endalign*
enddocument
EDIT: egreg's solution is more concise when dealing with subscripts and superscripts. My solution could be adopted to this by using LuaTeX
access to mathstyle
but as his solutions already deals with this issue there is not really a need for it.
There is another solution on https://tex.stackexchange.com/a/418483/128553.
edited 31 mins ago
answered 1 hour ago
CampanIgnis
1,8662628
1,8662628
add a comment |Â
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f452085%2fhow-to-make-double-overline-with-less-vertical-displacement%23new-answer', 'question_page');
);
Post as a guest
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
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
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