I am struggling with a computer science document that makes liberal use of overline characters to indicate negation, i.e. NOT. Using a hook instead of an overline is not suitable for this material as it accompanies a textbook that uses overline.

I have kinda-sorta made this work with a strikethough character format with a 9pt offset. It looks somewhat OK, although it won't transfer to ePub format without some manual labor on the CSS.

So, is there a better way to do this, please? I'm primarily interested in something that looks better; I can deal with the ePub problem by hand if necessary.

  • Hi there and welcome to GDSE. You could also use an underline with an offset, but visually it would look exactly the same. Can you explain in which way it only looks "somewhat OK"? Can you not achieve the desired look by setting the proper offset and weight?
    – Wolff
    Jul 12 '20 at 22:45
  • @Wolff I've got the weight adjusted to 0.75pt and that looks right. I can't seem to keep the overline from touching the ascenders of letters like b. I conjecture that it's being stopped by running into the leading. I am very new at InDesign, having started last week. I'm beginning to understand why Donald Knuth paused writing computer books to invent TeX and Metafont.
    – Bob Brown
    Jul 12 '20 at 23:01
  • @Wolff And also, being such a newbie, I was rather hoping someone would tell me the "right" way, thereby solving the ePub problem. That may be less important as I'm going to have to embed a bunch of math as EPS and deal with that anyway.
    – Bob Brown
    Jul 12 '20 at 23:04
  • But the overline touching the ascenders isn't really a technical problem, more a design problem. Visually I can't see any other solution than choosing a font with low ascenders, making the offset large enough for the line to not touch the letters and make the leading large enough for the line not to get too close the descenders in the line above. Do you visualize another way to do it? (Technically I'm unsure what will be the right solution for epub - never had the need for overlines myself.)
    – Wolff
    Jul 12 '20 at 23:08
  • 1
    The css property text-decoration can have the value overline. If I were you I would make a test epub already now to make sure that it works.
    – Wolff
    Jul 12 '20 at 23:16

Setup a character style which uses an underline and apply where needed. The actual underline in a character style can be customized: thickness (aka weight), colour, offset (which can also be a negative offset, turning the underline into an overline).

The offset value can use decimals in case you need to position the underline very accurately.

enter image description here

  • Thanks, Lucian. Your example has the same problem I found with using a strikethrough, namely that the overline touches the ascenders.
    – Bob Brown
    Jul 13 '20 at 10:19
  • 1
    You adjust the offset value until it doesn't, I guess, what else can you do ?
    – Lucian
    Jul 13 '20 at 11:31

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .