|
1 |
| -% language=uk engine=luatex runpath=texruns:manuals/luatex |
| 1 | +% language=us engine=luatex runpath=texruns:manuals/luatex |
2 | 2 |
|
3 | 3 | \environment luatex-style
|
4 | 4 |
|
@@ -835,31 +835,58 @@ \subsection{Skips around display math}
|
835 | 835 |
|
836 | 836 | \topicindex {math+italics}
|
837 | 837 |
|
838 |
| -The \lpr {mathitalicsmode} parameter can be set to~1 to force italic correction |
839 |
| -before noads that represent some more complex structure (read: everything that is |
840 |
| -not an ord, bin, rel, open, close, punct or inner). A value of~2 will enforce the |
841 |
| -old school font code path for all italics. We show a Cambria example. |
842 |
| - |
843 |
| -\starttexdefinition Whatever #1 |
844 |
| - \NC \type{\mathitalicsmode = #1} |
845 |
| - \NC \mathitalicsmode#1\ruledhbox{$\left|T^1\right|$} |
846 |
| - \NC \mathitalicsmode#1\ruledhbox{$\left|T\right|$} |
847 |
| - \NC \mathitalicsmode#1\ruledhbox{$T+1$} |
848 |
| - \NC \mathitalicsmode#1\ruledhbox{$T{1\over2}$} |
849 |
| - \NC \mathitalicsmode#1\ruledhbox{$T\sqrt{1}$} |
850 |
| - \NC \NR |
851 |
| -\stoptexdefinition |
852 |
| - |
853 |
| -\start |
854 |
| - \switchtobodyfont[cambria] |
855 |
| - \starttabulate[|c|c|c|c|c|c|] |
856 |
| - \Whatever{0}% |
857 |
| - \Whatever{1}% |
858 |
| - \stoptabulate |
859 |
| -\stop |
860 |
| - |
861 |
| -This kind of parameters relate to the fact that italic correction in \OPENTYPE\ |
862 |
| -math is bound to fuzzy rules. So, control is the solution. |
| 838 | +The \lpr {mathitalicsmode} parameter was introduced to deal with the difference |
| 839 | +in applying italic correction in traditional and \OPENTYPE\ math fonts. There are |
| 840 | +\OPENTYPE\ fonts out there that have italic correction and assume them to be |
| 841 | +applied like traditional \TEX\ fonts. This parameter takes several values: |
| 842 | + |
| 843 | +When set to zero, you get what was decided when the two code paths (traditional |
| 844 | +and \OPENTYPE) were introduced. |
| 845 | + |
| 846 | +Values larger than zero will add the italic correction between simple noads (it |
| 847 | +checks some classes so you might pay attention to for instance punctuation |
| 848 | +classes assigned). |
| 849 | + |
| 850 | +When set to zero or one, italics are independent, so we separate width from |
| 851 | +italic, while values larger than one combine both in the width but later |
| 852 | +selectively has to get rid of it (depending on code path). |
| 853 | + |
| 854 | +A value larger than two will backtrack italics for large operators, because there |
| 855 | +italic correction is used for anchoring scripts (limits and no limits). In fact, |
| 856 | +\OPENTYPE\ uses italics either between characters or for this purpose but as |
| 857 | +mentioned fonts are sort of messy here. |
| 858 | + |
| 859 | +We tested our version of plain \TEX\ and recommend to use the value of three to |
| 860 | +get the best average results. More about this italic correction dilemma in |
| 861 | +rendering math can be found in articles (in for instance \TUGBOAT) and various |
| 862 | +documents in the \CONTEXT\ distribution, especially those that discuss the |
| 863 | +upgraded math engine in \LUAMETATEX. |
| 864 | + |
| 865 | +% The \lpr {mathitalicsmode} parameter can be set to~1 to force italic correction |
| 866 | +% before noads that represent some more complex structure (read: everything that is |
| 867 | +% not an ord, bin, rel, open, close, punct or inner). A value of~2 will enforce the |
| 868 | +% old school font code path for all italics. We show a Cambria example. |
| 869 | +% |
| 870 | +% \starttexdefinition Whatever #1 |
| 871 | +% \NC \type{\mathitalicsmode = #1} |
| 872 | +% \NC \mathitalicsmode#1\ruledhbox{$\left|T^1\right|$} |
| 873 | +% \NC \mathitalicsmode#1\ruledhbox{$\left|T\right|$} |
| 874 | +% \NC \mathitalicsmode#1\ruledhbox{$T+1$} |
| 875 | +% \NC \mathitalicsmode#1\ruledhbox{$T{1\over2}$} |
| 876 | +% \NC \mathitalicsmode#1\ruledhbox{$T\sqrt{1}$} |
| 877 | +% \NC \NR |
| 878 | +% \stoptexdefinition |
| 879 | +% |
| 880 | +% \start |
| 881 | +% \switchtobodyfont[cambria] |
| 882 | +% \starttabulate[|c|c|c|c|c|c|] |
| 883 | +% \Whatever{0}% |
| 884 | +% \Whatever{1}% |
| 885 | +% \stoptabulate |
| 886 | +% \stop |
| 887 | +% |
| 888 | +% This kind of parameters relate to the fact that italic correction in \OPENTYPE\ |
| 889 | +% math is bound to fuzzy rules. So, control is the solution. |
863 | 890 |
|
864 | 891 | \subsection {Script and kerning}
|
865 | 892 |
|
@@ -1630,26 +1657,31 @@ \subsection{Allowed math commands in non|-|math modes}
|
1630 | 1657 |
|
1631 | 1658 | \subsection {Math options with \lpr {mathoption}}
|
1632 | 1659 |
|
1633 |
| -The logic in the math engine is rather complex and there are often no universal |
1634 |
| -solutions (read: what works out well for one font, fails for another). Therefore |
1635 |
| -some variations in the implementation are driven by parameters (modes). In |
1636 |
| -addition there is a new primitive \lpr {mathoption} which will be used for |
1637 |
| -testing. Don't rely on any option to be there in a production version as they are |
1638 |
| -meant for development. |
1639 |
| -
|
1640 |
| -This option was introduced for testing purposes when the math engine got split |
1641 |
| -code paths and it forces the engine to treat new fonts as old ones with respect |
1642 |
| -to italic correction etc. There are no guarantees given with respect to the final |
1643 |
| -result and unexpected side effects are not seen as bugs as they relate to font |
1644 |
| -properties. There is currently only one option: |
| 1660 | +This command is now obsolete and triggers an error message. It was only meant |
| 1661 | +for experiments. |
1645 | 1662 |
|
1646 |
| -\startbuffer |
1647 |
| -\mathoption old 1 |
1648 |
| -\stopbuffer |
| 1663 | +% % even more obsolete: |
1649 | 1664 |
|
1650 |
| -The \type {oldmath} boolean flag in the \LUA\ font table is the official way to |
1651 |
| -force old treatment as it's bound to fonts. Like with all options we may |
1652 |
| -temporarily introduce with this command this feature is not meant for production. |
| 1665 | +% The logic in the math engine is rather complex and there are often no universal |
| 1666 | +% solutions (read: what works out well for one font, fails for another). Therefore |
| 1667 | +% some variations in the implementation are driven by parameters (modes). In |
| 1668 | +% addition there is a new primitive \lpr {mathoption} which will be used for |
| 1669 | +% testing. Don't rely on any option to be there in a production version as they are |
| 1670 | +% meant for development. |
| 1671 | +% |
| 1672 | +% This option was introduced for testing purposes when the math engine got split |
| 1673 | +% code paths and it forces the engine to treat new fonts as old ones with respect |
| 1674 | +% to italic correction etc. There are no guarantees given with respect to the final |
| 1675 | +% result and unexpected side effects are not seen as bugs as they relate to font |
| 1676 | +% properties. There is currently only one option: |
| 1677 | +% |
| 1678 | +% \startbuffer |
| 1679 | +% \mathoption old 1 |
| 1680 | +% \stopbuffer |
| 1681 | +% |
| 1682 | +% The \type {oldmath} boolean flag in the \LUA\ font table is the official way to |
| 1683 | +% force old treatment as it's bound to fonts. Like with all options we may |
| 1684 | +% temporarily introduce with this command this feature is not meant for production. |
1653 | 1685 |
|
1654 | 1686 | % % obsolete:
|
1655 | 1687 | %
|
|
0 commit comments