This repository has been archived by the owner on Mar 26, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fixes.tex
61 lines (61 loc) · 1.66 KB
/
fixes.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
\robustify\emshape
\makeatletter
% no chapters in algorithm counter
\counterwithout{\algocf@float}{chapter}
\counterwithout{equation}{chapter}
% figcenter from skrapport
\ExplSyntaxOn
\cs_generate_variant:Nn\coffin_typeset:Nnnnn{Nnnon}
\DeclareDocumentEnvironment{figcenter}{}{
\coffin_clear:N\l_tmpa_coffin
\hcoffin_set:Nw\l_tmpa_coffin
}{
\hcoffin_set_end:
\dim_set:Nn\l_tmpa_dim{(\textwidth - \coffin_wd:N\l_tmpa_coffin)/2}
\coffin_typeset:Nnnon\l_tmpa_coffin{H}{l}{\dim_use:N\l_tmpa_dim}{0pt}
}
\ExplSyntaxOff
% http://tex.stackexchange.com/a/70498/66
\newcommand*\placeaccent[2]{%
\begingroup
\def\acc@hat{\mbox{\raisebox{-1.27ex}[0ex][0ex]{\^{}}}}
\def\acc@dot{\kern-0.08em.\kern-0.08em}%
\def\acc@skip{%
\ifx\macc@style\displaystyle0.32
\else\ifx\macc@style\textstyle0.32
\else\ifx\macc@style\scriptstyle0.22
\else0.15\fi\fi\fi ex
}%
\def\mathaccent##1##2{%
\setbox6\hbox{$\m@th\macc@style#1$}%
\@tempdima\wd4
\advance\@tempdima\macc@kerna
\advance\@tempdima-\wd6
\divide\@tempdima\tw@
\@tempdimb\z@
\ifdim\@tempdima<\z@ \@tempdimb-\@tempdima \@tempdima\z@ \fi
\vbox{%
\offinterlineskip
\moveright\@tempdima\box6
\kern\acc@skip
\moveright\@tempdimb\box4
}%
}%
\macc@depth\@ne
\let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar
\mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax}%
\macc@set@skewchar\relax
\let\mathaccentV\macc@nested@a
\macc@nested@a\relax111{#2}%
\endgroup
}
\renewcommand*\dot[1]{%
\placeaccent{\acc@dot}{#1}%
}
\renewcommand*\ddot[1]{%
\placeaccent{\acc@dot\mkern1.4mu\acc@dot}{#1}%
}
\renewcommand*\hat[1]{%
\placeaccent{\acc@hat}{#1}%
}
\makeatother