summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/mathastext/README
blob: 50814553760a3bc8c3b2ce54339ad66683c9083b (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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
Copyright (C) 2011-2014 Jean-Francois Burnol.

        +-------------------------------------------+
        +                 mathastext                +
        +                                           +
        +      `Use the text font in math mode'     +
        +             v1.3d  2014/05/23             +
        +             jfbu (at) free.fr             +
        +-------------------------------------------+

This Work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
version 1.3 of this license or (at your option) any later
version.

The latest version of this license is in
  http://www.latex-project.org/lppl.txt
and version 1.3 or later is part of all distributions of
LaTeX version 2003/12/01 or later.

The Author of this Work is 
   Jean-Francois Burnol <jfbu at free dot fr>

                    INTRODUCTION

Optimal typographical results for documents containing
mathematical symbols can only be hoped for with math fonts
specifically designed to match a given text typeface.
Although the list of freely available math fonts (alongside
the Computer Modern and AMS extension fonts) is slowly
expanding (fourier, kpfonts, mathdesign, pxfonts, txfonts,
and others...) it remains limited, and the situation is even
worse with Unicode fonts (XeTeX/LuaTeX). So if you can't
find a math font which fits well with your favorite text
font, and wish to still be able to typeset mathematical
documents, perhaps not of the highest typographical quality,
but at least not subjected to obvious visual incompatibi-
-lities between your text font and the math fonts,
try out mathastext: it will simply use the text font also
for the math!


                      USAGE

  `mathastext' is a LaTeX package

      \usepackage{mathastext}

  The document will use in math mode the text font
  as configured at package loading time, for these
  characters:

      abcdefghijklmnopqrstuvwxyz
      ABCDEFGHIJKLMNOPQRSTUVWXYZ
      0123456789
      !?,.:;+-=()[]/#$%&<>|{}\

  The command \MTsetmathskips allows to set up extra
  spacings around each given letter.

  Use multiple \Mathastext[name]'s to define in the
  preamble various math versions using each a given
  text font, to be later activated in the document  
  body via the command \MTversion{name}.

  With the subdued option, mathastext will be active
  only inside such math versions distinct from the
  normal and bold.

  Main options: italic, defaultmathsizes, subdued,
                asterisk, LGRgreek.

Use the `italic' option to get the Latin letters in math
mode be in italics. Digits and log-like operator names
(pre-defined as well as user-defined) will be in the same
shape as the text font (usually this means upright).

For documents needing Greek letters the following is
possible:
    + no option: Greek letters defined by other packages,
    + eulergreek: use the Euler font for the Greek letters,
    + symbolgreek: use the Postscript Symbol font for the
      Greek letters.
    + LGRgreek: use the document text font in LGR encoding
      Further options specify the shape of the lowercase
      and uppercase Greek glyphs; starting with v1.15c it is
      possible to use multiple distinct LGR fonts in the
      same document.

Commands are provided to scale the Euler and Symbol fonts by
an arbitrary factor to let them fit better with the document
text font.

Read the PDF documentation for more.

Examples available there:
     http://jf.burnol.free.fr/mathsastext.html
     http://jf.burnol.free.fr/showcase.html


Installation:
=============

The fastest way is: unzip -d <destination> mathastext.tds.zip, where 
<destination> could be ~/texmf or, on mac os x, ~/Library/texmf, or
the working repertory of your project. Else, download mathastext.dtx,
possibly also mathastext.ins, and follow these instructions:
 
* with mathastext.ins: run tex on mathastext.ins to generate the package
style file mathastext.sty as well as mathastext.tex and some test files.

* without mathastext.ins: run tex on mathastext.dtx to generate the
package style file mathastext.sty as well as mathastext.tex and some
test files. (and also mathastext.ins)
 
  Move the style file mathastext.sty to a location where TeX can find
  it. In a TDS compliant hierarchy this will be
  <TDS>:tex/latex/mathastext/mathastext.sty

*documentation*: run latex thrice on mathastext.tex then dvipdfmx. Or,
run pdflatex thrice on mathastext.dtx. In the former case the
documentation is with source code included, in the latter without. The
file mathastext.tex can be customized to change the font size or set
other options therein.

   (Note: one cannot use lualatex/xelatex to compile the documentation.)

*test files*: mathastexttestmathversions.tex
              mathastexttestunicodemacos.tex
              mathastexttestunicodelinux.tex
              mathastexttestalphabets.tex

CHANGE LOG

1.3d [2014/05/23]

   * new commands \MTstandardgreek and \MTcustomgreek. 

   * The Greek letters, in case of use of one of the package related options,
are left to their defaults in the normal and bold math versions if the
subdued option was also used (this was so far the case only with options
LGRgreek/LGRgreeks).

   * \newmcodes@ of amsmath is left untouched if package lualatex-math
is detected.

1.3c [2013/12/14]
  
   * added a starred variant to \MTversion which tells mathastext to
only do the math set-up and not modify the text fonts.

   * added second optional version name argument to \Mathastext and to
\MTDeclareVersion, to transfer settings for things not otherwise changed
by mathastext from a math version to the one declared. This is mainly
for symbols and large symbols to be the bold ones when the user sets up
the series of a mathastextified font to be bold in a mathastext-declared
version.

   * renamed \defaultprod to \MToriginalprod, \defaultsum to
\MToriginalsum, (this is in case of option symbolmisc).

   * changes to the dtx organization; options for generating the
documentation can be customized in generated mathastext.tex file.

   * 1.2d code for \#, \$, \%, and \& modified erroneously the earlier
correct 1.2c code and created a bug showing up with more than 16 math
families (a possibility only with lualatex or xelatex).

1.3a [2013/09/04]

   * the somewhat silly \string's are removed from the \MTsetmathskips
command of release 1.3, thus allowing its first argument to be a macro,
or any expandable code, giving a letter.

   * the amsmath \resetMathstrut@, which is incompatible with a
mathematically active parenthesis ( is now modified only if necessary
(i.e. only when \MTnonlettersobeymathxx is issued) and is restored to
its original value if not needed anymore (i.e. after
\MTnonlettersdonotobeymathxx, as for example when switching to the
normal version under option subdued).

   * improved documentation.

1.3  [2013/09/02]

   * commands \MTsetmathskips and \MTunsetmathskips added.

   * commands \MTmathactiveletters and \MTmathstandardletters to govern
the math activation of letters independently of its use for insertion of
the italic corrections (\MTicinmath and \MTnoicinmath correspondingly
modified).

   * the new \luatexUmathcodenum as available since TL2013 allows
identical treatment by mathastext of = and - under both LuaTeX and
XeTeX.

   * \newmcodes@ of amsmath is left untouched in case of option basic.

   * a sentence containing | which was written to the log during the
loading caused a problem if | was active (typically if
\MakeShortVerb{\|} was added to the preamble prior to the loading of
mathastext).

   * some preemptive measures taken regarding things such as \mid,
\lbrace, and \rbrace, as some packages define these things in manners
which made the re-definitions done by mathastext issue errors.


1.2f [2013/01/21]

   * minor code improvements. Change log added to the user manual.


1.2e [2013/01/10]

This version should be the last one in the 1.2 series as it seems to
correct most of the main problems which were introduced with the massive
use of mathematically active characters in versions 1.2 and 1.2b.

   * It is indeed a thorny point when one wants to modify only in math
     mode how an active character acts, without breaking things. The
     package now does that /only/ if the activation appears to originate
     in the Babel system, as it is then possible to modify appropriately
     the Babel macros \user@active<char> and \normal@char<char>. The
     relevant issues are discussed in section 2.10 of the user manual,
     in the test file testmathastextalphabets.tex, and in the source
     code comments to the macro \mst@mathactivate. The inherent
     incompatibility of Babel with packages having made mathematically
     active the characters itself makes document active is circumvented
     by this interference of mathastext. A generally applicable Babel
     patch could be derived from the method used by mathastext.

   * The technique of mathematical activation is maintained only for the
     characters which are not catcode active (at the entrance in math
     mode, as mathastext does all its activation job at everymath and
     everydisplay).

   * Sadly, the feature of added italic corrections introduced in
     version 1.2b did not behave as described in the user manual, due to
     forgotten group braces. Fixed.

   * The command \MTlowerast from the user manual of v1.2d was not the
     one implemented in the source code. Fixed.

   * The test files automatically extracted from a latex run on the dtx
     file have been revised and extended.

   * The code is better documented.


1.2d [2013/01/02]

   *  an incompatibility with amsmath (its macro \resetMathstrut@),
      exists since version 1.2 of the package. This is fixed
      here.

   *  various improvements in dealing with the asterisk and in the
      mechanism of letting non-letter symbols obey the math alphabet
      commands.

   *  documentation extended and improved.


1.2c [2012/12/31]

   *  mathastext now inserts automatically after all (latin)
      letters in math mode their italic corrections, if the font
      used is upright (sic). This improves the spacings for the
      positioning of subscripts. The feature is de-activated
      inside the math alphabets commands (apart from \mathnormal),
      so as to not prohibit the formation of ligatures,

   *  the documentation has been extended to explain in detail the
      issues which are relevant to the new feature of added italic
      corrections,

   *  version 1.2 had some bad bugs when confronted to active
      characters. This is corrected and additionally \MTnonletters-
      -donotobeymathxx is made the default, as the user input is too
      much constrained in its absence.

   *  a less fatal, but still annoying, typo had made the dot in 1.2
      of type \mathpunct rather than \mathord

   *  the inner namespace has been rationalized a bit.


1.2 [2012/12/20]

   *  a new command sets up the amount of space to be automatically
      inserted before the derivative glyph (useful when using an
      upright font).

   *  the scope of the math alphabets has been extended to apply
      to the non-alphabetical characters, and also to operator
      names. 

   *  the format of the dtx file has changed. The package file
      is self-extracting from the dtx, and four additional test
      files are also produced during `latex mathastext.dtx'.


1.15f and 1.15g [2012/10/25]

   *  \$, \#, \&, and \% had been re-defined by mathastext since its
      inception in a rather strange (but working) way, which
      could cause surprises to other packages. Fixed.

   *  the subdued mechanism for the math alphabets is implemented
      in a simpler and more efficient manner than in 1.15e.

   *  the `defaultxx' options act a bit differently, and are more
      useful in case of a `too many math alphabets' situation.

   *  various improvements in the documentation.

   *  general clean up and better commenting of the source code.


1.15e [2012/10/22]

   *  new user commands to specify skip or glue to be
      inserted after the math symbols \exists and \forall

   *  complete (user transparent) rewrite of the code
      implementing the subdued option; and its action has
      been extended to apply also to the \mathbf, \mathit,
      \mathsf, \mathtt alphabets and not only to \mathrm and
      \mathnormal as in the previous versions.

   *  improvements in the documentation.


1.15d [2012/10/13]

   *  the Unicode situation is now correctly treated,
      throughout the code (this had been left in a half-done
      way from version 1.14 of April 2011).

        - this includes an issue related to amsmath and its
      DeclareMathOperator macro which has been fixed,

        - and the code related to \relbar and \Relbar (and
      \models) has been revised.


1.15c [2012/10/05]

   *  it is now possible to use distinct fonts in LGR encoding
      for the Greek letters according to the current math
      version.

   *  improvements to the documentation.


1.15b

   *  corrected a `feature' of 1.15 which was backward-
      incompatible

   *  improvements to the pdf documentation


1.15  [2012/09/26]

   *  the subdued option allows the mathastextification to
      act only locally.

   *  some measures taken to deal with amsmath related
      issues when using xetex or luatex.


1.14c

   *  a bug is fixed: the \Mathastext macro reinitializes
      the fonts in the normal and bold math versions, but it
      also erroneously redeclared the math alphabet changing
      commands which could have been set up in previously
      defined math versions (via earlier calls to
      \Mathastext[version_name]).


1.14b [2011/04/03]

   *  there was a bug with \$, \#, \&, \% in math mode which
      showed up when ten or more math families had been
      declared. This bug affected also the minus sign under
      the same circumstances, when Unicode engines were
      used. Fixed.

   *  the options LGRgreek and selfGreek act now a bit
      differently, and new options LGRgreeks and selfGreeks
      have been defined.

   +  I also cleaned up a bit the code, for a more
      structured namespace.


1.14

   *  mathastext now modifies also the math alphabets \mathit,
      \mathsf and \mathtt, thus making it a quite generic
      complete manner to adapt the math configuration to fonts
      provided with no math support.


1.13b

   *  when the Symbol font is used for \prod and \sum this
      will be only for inline math; display math will use the
      default glyphs


1.13 [2011/03/11]

   *  the LGRgreek option is added.

   *  internal changes for better readability of the code.


1.12

   *  various bugs have been corrected.

   *  the endash and alldelims options are active by default.

   *  the package is more Unicode aware.

   *  the \Mathastext command has been improved to
      facilitate the mechanism of math versions also when
      using XeTeX or LuaTeX (with package fontspec.)

   *  the en-dash and dotless i and j now work with all
      encodings, Unicode inclusive.


1.11 [2011/02/06] optional argument to \Mathastext macro.


1.1  [2011/02/01] options italic and frenchmath.


1.0  [2011/01/25] Initial version.