Using raisebox to change nested underlining

TeX - LaTeX Asked by LaTeXereXeTaL on November 9, 2020

This is a followup to my previous question How do I raise underlining within underlining? and I have indeed found a solution. My question is how can I predict the value I feed to raisebox to adjust the underlining height? At present, I’m doing it purely by eye and looking at the result under magnification in my PDF viewer. The overall goal is to have the longer underlined "slot" the same height all the way across.

Here is my MWE and its output.


NewDocumentCommand{slot}{ s O{} }{%
  IfBooleanTF {#1} % check for *
    {% * doesn't print a filled slot.
    {% Print a filled slot by default, a la Thorne and Blandford.


  mathbf{a}(slot) quad 
  mathbf{a}(slot[raisebox{0.5pt}{ensuremath{mathbf{b}}}]) quad
  mathbf{a}(slot[mathbf{b}smallslot]) quad
  mathbf{T}(slot,slot) quad 
  %mathbf{T}(slot[raisebox{0.5pt}{ensuremath{mathbf{b}}}],slot) quad
  mathbf{T}(slot[mathbf{b}],slot) quad
  mathbf{T}(slot[mathbf{b}smallslot],slot) quad

Compiled MWE output

Add your own answers!

Ask a Question

Get help from others!

© 2024 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP