Index
Subject
: Re: LUG: LaTeX problem with bar/overline
From
: "B. Pike" <bapike@gmail.[redacted]>
Date
: Wed, 02 Feb 2011 11:45:48 -0500
Parent
Daniel,
If you're unhappy with how \overline does things with specific
characters, you could try "rolling-your-own" \overline command. For
example, the code:
% Usage: \asdf{text}{lift fraction}{width fraction}{thickness}
\newcommand{\asdf}[4]{%
\makebox[0pt][l]{%
\makebox[\widthof{#1}][c]{%
\rule[\heightof{#1}*\real{#2}]{\widthof{#1}*\real{#3}}{#4}}%
}#1}
defines an \asdf command (change the name) which centers a line of a
certain thickness above the text, where the length and lift of the
line is proportional to the size of the formatted text. (This
requires the 'calc' package.) I've attached an example file, and am
sure you can find some parameters that you like.
If I were you, I would define commands which give you barred
characters, whose parameters you can then fiddle with individually:
\newcommand{\oX}{\asdf{X}{1.1}{0.95}{0.3pt}}
\newcommand{\ox}{\overline{x}}
\newcommand{\oY}{\asdf{Y}{1.1}{1.5}{0.4pt}}
Beware: changing the font or font size might make this look bad. And
I have no idea whether $\oX^2$ will look right.
Thanks,
Brian Pike
Attachments
:
(Please be wary of attachments - they have not been scanned for viruses)