summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fbb/fbb.sty
blob: 09b37024184a0b88b64d4b7eb99d7bf45e95f36b (plain)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
%% fbb.sty
%%
\NeedsTeXFormat{LaTeX2e}

\def\fileversion{1.06}
\def\filedate{2014/09/09}
\ProvidesPackage{fbb}[\filedate\space v\fileversion]

\message{`fbb' v\fileversion, \filedate\space Text macros for fbb, a Bembo-like font family (msharpe)}

\RequirePackage[LY1,T1]{fontenc}
\RequirePackage{textcomp}
\RequirePackage{etoolbox}
\IfFileExists{mweights.sty}{\RequirePackage{mweights}}{}
\IfFileExists{fontaxes.sty}{
    \RequirePackage{fontaxes}
    \fa@naming@exception{figures}{{superior}{proportional}}{Sup}
    \fa@naming@exception{figures}{{superior}{tabular}}{Sup}
    \def\sufigures{\@nomath\sufigures
        \fontfigurestyle{superior}\selectfont}
    \DeclareTextFontCommand{\textsu}{\sufigures}
    \let\textsuperior\textsu
%    \def\@makefnmark{\hbox{\textsu{\@thefnmark}}}
}{}
\newcommand*{\fbb@scale}{1}
\IfFileExists{xkeyval.sty}{
    \RequirePackage{xkeyval}
    \DeclareOptionX{scale}{\renewcommand*{\fbb@scale}{##1}}
    \DeclareOptionX{scaled}{\renewcommand*{\fbb@scale}{##1}}
}{
    \let\DeclareOptionX\DeclareOption
    \let\ExecuteOptionsX\ExecuteOptions
    \let\ProcessOptionsX\ProcessOptions
}

\let\orig@footnote=\thefootnote
\let\orig@makefnmark=\@makefnmark

\newif\if@fbb@sups
\newif\if@fbb@scosf
\DeclareOptionX{lining}{\edef\fbb@figurestyle{LF}}
\DeclareOptionX{oldstyle}{\edef\fbb@figurestyle{OsF}}
\DeclareOptionX{osf}{\edef\fbb@figurestyle{OsF}}
\DeclareOptionX{tabular}{\edef\fbb@figurealign{T}}
\DeclareOptionX{p}{\edef\fbb@figurealign{}}
\DeclareOptionX{proportional}{\edef\fbb@figurealign{}}
\DeclareOptionX{bold}{\edef\bfseries@rm{b}}
\DeclareOptionX{regular}{\edef\mdseries@rm{m}}
\DeclareOptionX{sups}{\@fbb@supstrue}
\DeclareOptionX{scosf}{\@fbb@scosftrue}
\ExecuteOptionsX{lining,tabular,bold,regular}
\ProcessOptionsX\relax

\DeclareTextCommand{\textcircled}{TS1}[1]{\hmode@bgroup
   \ooalign{%
      \hfil \raise .39ex\hbox {\fontencoding{T1}\fontseries{m}\fontshape{sc}\fontsize{7.5}{9}\selectfont \lowercase{#1}}\hfil \crcr
     \textbigcircle   % bigcircle
   }%
 \egroup}

\renewcommand*{\rmdefault}{fbb-TLF}
\def\useosf{\edef\fbb@figurestyle{OsF}\edef\fbb@figurealign{}%
%  \AtEndPreamble{\renewcommand*{\rmdefault}{fbb-OsF}}
}
\@onlypreamble\useosf
\def\usetosf{\edef\fbb@figurestyle{OsF}\edef\fbb@figurealign{T}%
%  \AtEndPreamble{\renewcommand*{\rmdefault}{fbb-TOsF}}
}
\@onlypreamble\usetosf

\DeclareRobustCommand{\textlf}[1]{%
  {\fontfamily{fbb-LF}\selectfont #1}%
}% to get lf
\DeclareRobustCommand{\texttlf}[1]{%
  {\fontfamily{fbb-TLF}\selectfont #1}%
}% to get tlf
\DeclareRobustCommand{\textosf}[1]{%
  {\fontfamily{fbb-OsF}\selectfont #1}%
}% to get osf
\DeclareRobustCommand{\texttosf}[1]{%
  {\fontfamily{fbb-TOsF}\selectfont #1}%
}% to get tosf
\if@fbb@scosf %
\DeclareRobustCommand{\textsc}[1]{%
{\fontfamily{fbb-\fbb@figurealign OsF}\fontshape{sc}\selectfont #1}%
}\fi
\AtEndPreamble{\renewcommand*{\rmdefault}{fbb-\fbb@figurealign\fbb@figurestyle}}
\renewcommand*{\familydefault}{\rmdefault}
\if@fbb@sups %
 \ifdefined\sufigures
  \def\f@@tn@te{footnote}
  \def\@makefnmark{%
    \ifx\@mpfn\f@@tn@te%
      \ifx\thefootnote\orig@footnote%
        \hbox{\sufigures\hspace*{.04em}\@thefnmark\hspace*{.04em}}%
      \else%
        \orig@makefnmark%
      \fi
    \else%
      \orig@makefnmark%
    \fi}%
 \fi%
\fi

\endinput