I'm currently writing my bachelor thesis and forgot to include \usepackage[T1]{fontenc}. But I'm using \usepackage[utf8]{inputenc} and \usepackage{microtype}. When I included \usepackage[T1]{fontenc} I needed to choose a scalable font, so I chose \usepackage{lmodern}. Now I have a few new problems. The hat from $\widehat{K}$is to large. I solved this with a new command:
\usepackage{accents}
\DeclareMathSymbol{\widehatsym}{\mathord}{largesymbols}{"62}
\newcommand\lowerwidehatsym{%
\text{\smash{\raisebox{-1.2ex}{%
$\widehatsym$}}}}
\newcommand\fixwidehat[1]{%
\mathchoice
{\accentset{\displaystyle\lowerwidehatsym}{#1}}
{\accentset{\textstyle\lowerwidehatsym}{#1}}
{\accentset{\scriptstyle\lowerwidehatsym}{#1}}
{\accentset{\scriptscriptstyle\lowerwidehatsym}{#1}}
}
Now I have the following questions/problems:
- I use
$\fixwidehat{}$with$\overline{\fixwidehat{K}}$but the hat crosses the line. - My absolute-value-command
\newcommand{\abs}[1]{\left\vert#1\right\vert}doesn't scale the size when$\fixwidehat{}$is used. - But
$\abs{e^{i*t*\omega}}$is compared to the normal computer modern font not well sized. It's to high.
I was very happy with my results before including \usepackage{lmodern} and just want to adjust it to look similar to the old version. Could you please help me? I have to print the thesis in a little more then a week and I'm currently really frustrated with LaTeX.
Edit: Here is a minimal working example:
\documentclass[
11pt,
a4paper,
twoside = false,
headings=standardclasses,
toc=chapterentrywithdots,
toc=bibliography]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{lmodern}
\usepackage{amsmath}
\usepackage{amsthm, thmtools}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{accents}
\DeclareMathSymbol{\widehatsym}{\mathord}{largesymbols}{"62}
\newcommand\lowerwidehatsym{%
\text{\smash{\raisebox{-1.2ex}{%
$\widehatsym$}}}}
\newcommand\fixwidehat[1]{%
\mathchoice
{\accentset{\displaystyle\lowerwidehatsym}{#1}}
{\accentset{\textstyle\lowerwidehatsym}{#1}}
{\accentset{\scriptstyle\lowerwidehatsym}{#1}}
{\accentset{\scriptscriptstyle\lowerwidehatsym}{#1}}
}
\newcommand{\norm}[1]{\left\lVert#1\right\rVert}
\newcommand{\abs}[1]{\left\vert#1\right\vert}
\usepackage[pdftex]{graphicx}
\usepackage{tikz}
\usepackage[final,babel,tracking=true,kerning=true,spacing=true]{microtype}
\begin{document}
\begin{align*}
\overline{\fixwidehat{K}} \\
\abs{\fixwidehat{K}} \\
\norm{\fixwidehat{K}} \\
\abs{e^{it\omega}}
\end{align*}
\end{document}



\documentclass{...}, the required\usepackage's,\begin{document}, and\end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – dexteritas Sep 16 '17 at 11:49