I need to show unit symbols of micro, nano, kilo, mega ..
Is there a recommend front for this usage?
ex: 10µ Ω
fontsunits
I need to show unit symbols of micro, nano, kilo, mega ..
Is there a recommend front for this usage?
ex: 10µ Ω
It may take more than comments to clarify some things. So here is an answer though it probably won't get what you want. Don't hesitate to ask if there are unclear points.
x
or A
, what's the width and height and depths they occupy. In the end. What TeX see is a lot of boxes.mf
etc., to generate the bitmap fonts, but still TeX only sees the glyphs as boxes.The above explanations are not exactly how TeX works. But it shall explain how TeX sees fonts. Things like encodings has changed from engine to engine. For example LuaTeX use a font table to store the metrics information and use Unicode for both input and output.
So the conclusion is that, pdfTeX has (almost) nothing to do with generating fonts.
Therefore, I think you question can be rephrased as the following
How do I transfer the fonts used in a file to TTF fonts
Also, why do you want TTF instead of OTF? OTF can be used by most platforms. TTF use quadratic Bézier splines while OpenType can use the same cubic Bézier splines as Type1 fonts (the so called CFF fonts, a PostScript flavor of OTF). I haven't done any actual converting myself, but I think it shall be more natural to convert Type1 to CFF rathe than TTF. I guess you use Windows, and TTF is indeed more common there. But recent Windows support OTF as well (without ClearType obviously, which use TTF hinting explicitly)
The last, I hope I got your idea right. Do you think that because pdfTeX can generate PDF files that can be viewed by modern applications like Adobe Reader, so it must have a way to generate modern format fonts which is commonly used in today's applications? In fact, that is just a feature of the PDF file format, which allows font embedding. And not only TTF, OpenType, Type1, Type3 even bitmap fonts all can be embedded in a PDF file and be viewed by a PDF reader. To do that pdfTeX need to know 1) the font metrics 2) where to find the font files to embed.
If all you want, ultimately, is being able to input those math symbols in other applications, say Word, then you can simply use a OpenType math fonts. Freely available fonts are XITS-Math, Asana-Math, Commercial fonts including LucidaBr Math (cost 90USD) and Minion Math (something like 700EUR for a complete set, but I found it worth it). Also Cambria Math is distributed with Windows and Office (for both Windows and Mac). The last, the computer modern fonts can be replaced with Latin Modern, and Computer Modern math symbols can be found in Latin Modern Math.
You can use mathastext to partially obtain what you are aiming at.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[vscale=0.7]{geometry}
\usepackage[subdued,defaultmathsizes]{mathastext}
\MTnonlettersobeymathxx % math alphabets will act on (, ), [, ], etc...
\MTexplicitbracesobeymathxx % math alphabets will act on \{ and \}
\MTfamily {\ttdefault} % we will declare a math version using tt font
\Mathastext [typewriter] % the math version is called typewriter
\begin{document}\thispagestyle{empty}
So far everything is normal $ (a^n +b^n)[c^m +d^m] = \left<x_i + y_j\right>$.
Indeed, we are here in the \emph{subdued} mode of mathastext.
Let's see the effect of \string\mathtt\ or \string\mathrm\ or \string\mathbf:
\[ \mathtt{ (a^n +b^n)[c^m +d^m] = \left<x_i + y_j\right>}\]
\[ \mathrm{ (a^n +b^n)[c^m +d^m] = \left<x_i + y_j\right>}\]
\[ \mathbf{ (a^n +b^n)[c^m +d^m] = \left<x_i + y_j\right>}\]
You should compare with a document not loading mathastext, and you will see
there that the math alphabet commands do not act on parentheses, etc...
I must dwelve on a subtelty: in the \emph{subdued} mode, the \string\mathrm,
etc.. commands are not modified by \texttt{mathastext}: it defines altered
variants \string\Mathrm, etc... but does not identify the original with the new.
For some matters of font encoding, it is the variants which should be used (the
problem didn't show in the examples above, but it was just lucky):
\[ \Mathtt{\{a[1],t\}\times\{t,a[2]\}} \]
\[ \Mathbf{\{a[1],t\}\times\{t,a[2]\}} \]
\texttt{mathastext} has limited influence: we see that the \string\times{}
symbol is not affected. We now will switch to the typewriter math version using
the command \string\MTversion \{typewriter\}. In this math version, we are not
in \emph{subdued} mode anymore, and the lowercase form of the math alphabets can
be used directly. \MTversion {typewriter}
\[ (a^n +b^n)[c^m +d^m] = \left<x_i + y_j\right>\]
\[ \{a[1],t\}\times\{t,a[2]\} \]
\[ \mathit{\{a[1],t\}\times\{t,a[2]\}} \]
By default the text font is also modified. Perhaps we
don't want that, so we issue \string\MTversion [normal]\{typewriter\}.\MTversion
[normal]{typewriter} This way the text font is not affected. But the math is
automatically in typewriter font (not the delimiters though):
\[ (a^n +b^n)[c^m +d^m] = \left<x_i + y_j\right>\]
The idea of the math version is to typeset only portions of the code with the
desired fonts for the letters and simple symbols in math. We return to the
normal situation with \string\MTversion \{normal\}. Here it is:
\MTversion {normal}
\[ (a^n +b^n)[c^m +d^m] = \left<x_i + y_j\right>\]
Because we switched back to the subdued version, we have to explicitely
reactivate the action of the math alphabets on the non letters (from the ascii
range), with
\string\MTnonlettersobeymathxx{}
and \string\MTexplicitbracesobeymathxx{}
\MTnonlettersobeymathxx{}
\MTexplicitbracesobeymathxx{}
$\Mathtt{\{a[1],t\}\times\{t,a[2]\}}$
$\Mathit{\{a[1],t\}\times\{t,a[2]\}}$
$\Mathbf{\{a[1],t\}\times\{t,a[2]\}}$
And I was careful to use \string\Mathtt{} and \string\Mathit, not
\string\mathtt{} or \string\mathit.
\end{document}
And here is the effect of math alphabet without mathastext:
Best Answer
Use the siunitx package, it's pretty much the best way to typeset (SI)units, since you don't have to take care of spacing, symbols and whatnot.
Example:
Gives the following: