Math & Science ⇒ Weird spacing problem
Weird spacing problem
I don't know what to do here: The underlined sigma should not look fine (see my screenshot with URW's GaramondNo8), but indeed does look ok with the Latin Modern, and I've just noticed the not existing horizontal space between the \dund{D} and \uli{u}.
Could anyone give me a hint what the problem is, or if I misunderstood something?
Latin Modern: GaramondNo8 with mathdesign:
- Attachments
-
- weird-spacing.tex
- (389 Bytes) Downloaded 193 times
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Re: Weird spacing problem
Weird spacing problem
Yes, I can, it looks weird. What's the way to go, is it common to add horizontal space via \, or something alike?frabjous wrote:Out of curiousity, can you still tell the difference printed?

The underline sigma set in GaramondNo8 looks simply horrible. :/
But using the Minion Pro font which is provided via CTAN, it looks ok. I guess I'll stick to any font except the GaramondNo8 then.
Weird spacing problem
Code: Select all
\documentclass{scrartcl}
\usepackage[english]{babel}
\usepackage[garamond]{mathdesign}
\usepackage{amsmath}
\newcommand{\uli}[1]{\underline{#1}}
\newcommand{\dund}[1]{\underline{\underline{#1}}}
\begin{document}
\begin{align*}
\uli{\varepsilon} &= \rlap{\uli{\phantom{\uli{D}}}}\uli{Du} \\
\uli{\smash\sigma} &= \rlap{\uli{\phantom{\uli{D}}}}\uli{D\varepsilon}
\end{align*}
\end{document}
Surely Minion Pro isn't provided by CTAN? Adobe owns that font. Do you mean the package that is on CTAN for use with the Adobe fonts?
Weird spacing problem
Hm, yes, you are right, it is a lot of work. And these constructions appear a lot, so not using Garamond isn't that bad here. Thank you for your code though!frabjous wrote:But that's a lot of work if you have a lot of these constructions popping up, and kind of an ugly kludge. If this is just a couple equations here and there, it might be worth it if you really had your heart set on Garamond/mathdesign.
Oh, yes, I know, I meant this version which I use.Surely Minion Pro isn't provided by CTAN? Adobe owns that font. Do you mean the package that is on CTAN for use with the Adobe fonts?
But could you add anything to my other question about the horizontal space, if possible?
Re: Weird spacing problem
Weird spacing problem
Hm, yes, that makes sense.frabjous wrote:I guess I don't understand the horizontal space question. Why should/would there be horizontal space there? In math mode, spaces in the code never do anything. The spacing is controlled by the semantic/syntactic nature of the symbols. If you wanted space, you'd have to put it in, or change the syntactic category of the symbols (with e.g., \mathalpha, \mathord, \mathop, \mathrel, \mathpunct, \mathleft, \mathright, etc.)

Weird spacing problem

Weird spacing problem
You can make up its height by reinserting a \vphantom{K} which inserts the height of something without inserting that something; and then of course you'll need to smash that back down unless you want the superscript raised too. It's all very exhausting. Probably there's a better way, but I've never seen a document that uses so much overlining and underlining as the one you're apparently using.
Code: Select all
\documentclass[
8pt
]{scrartcl}
\usepackage[
notextcomp,
oldstylenums
]{kpfonts}
\newcommand{\dund}[1]{{\smash{\underline{\underline{#1}}}}}
\begin{document}
\begin{equation*}
\dund{T}^{T} \smash{\overline{\vphantom{K}\dund{K}}}^{(e)} \dund{T}
\end{equation*}
\end{document}
Weird spacing problem
Thank you this explanation, I appreciate it. But it's not your "fault", I looked for \smash online myself after reading this and it's actually explaiend in the Amsmath-manual -- which I should have read when you talked about \smash earlier. Thanks again.frabjous wrote:This has nothing to do with the 8pt option. It's because of the \smash in the \und definition. My fault from some other thread, probably -- I probably shouldn't have recommended smash without telling you what it did. It basically makes LaTeX ignore what's inside the \smash{...} command when computing the vertical dimensions of something. This can be useful if you want to keep things level across different characters, etc., but can also create problems like this. As far as LaTeX knows, that K doesn't have any height, so it's overlining it too low.
Well, yes, it's abit exhausting, but it's necessary, but at long sight, I think I'll redefine my underlining commands either to the ones provided bei ulem or delete the \smash.You can make up its height by reinserting a \vphantom{K} which inserts the height of something without inserting that something; and then
[...]
Well, it is a summary of a lecture notes which contains a lot of vectors/matrices and which I'll print out (like this). The notation of the vectors/matrices is the version with the underlinings, which I like more than the version with symbols formatted in bold.