Re: Changing math layout / microtypography
Valery Ushakov <[email protected]> Tue, 12 Apr 2016 00:02:14 +0300
| Newsgroups | gmane.comp.type-setting.lout |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Apr 11, 2016 at 21:34:49 +0200, Oliver Bandel wrote: > Can you giuve me a working example, that shows how to use these > definitions? I tried around and got nothing working, that looks > different to unchanged lout. Attached. -uwe
int.lt
(text/plain, 1.9 KB)
@SysInclude { doc }
@SysInclude { math }
extend @Math
def lint
named limits { "dft" }
named from { }
named to { }
{
int limits { limits } from { from } to { to }
}
extend @Math
export
symbolfont
basefont
initialstyle
initiallycramped
initialspace
def @MathDefaults
{
def dftsymbolfont { symbolfont }
def symbolfont { dftsymbolfont }
def dftbasefont { basefont }
def basefont { dftbasefont }
def dftinitialstyle { initialstyle }
def initialstyle { dftinitialstyle }
def dftinitiallycramped { initiallycramped }
def initiallycramped { dftinitiallycramped }
def dftinitialspace { initialspace }
def initialspace { dftinitialspace }
}
import @Math
export int
def @MyMath
import @MathDefaults named symbolfont { symbolfont }
import @MathDefaults named basefont { basefont }
import @MathDefaults named initialstyle { initialstyle }
import @MathDefaults named initiallycramped { initiallycramped }
import @MathDefaults named initialspace { initialspace }
# pseudo-body
import @Math @MyMath named @ { }
@Begin
def int # define a new one
named limits { "dft" }
named from { }
named to { }
{
{ @Math {} } @Open {
int limits { limits } from { from } to { to }
}
}
@Math
symbolfont { symbolfont }
basefont { basefont }
initialstyle { initialstyle }
initiallycramped { initiallycramped }
initialspace { initialspace }
{ @ }
@End @MyMath
macro @MM { @HContract @VContract @MyMath initialstyle { "text" } }
@Document
//
@Text @Begin
@LP {
@Math { lint from { 0 } to { 10 } dx }
--- using different symbol ''lint''.
}
@LD {
@MyMath @{ int from { 0 } to { 10 } dx }
--- using ''int'' but with ''"@MyMath"'' instead of ''"@Math"''.
}
@LP Inline "@MM" formula with automatically selected compact limits
@MM @{ int from { 0 } to { 10 } dx },
compare with summation:
@MM @{ sum from { i = 0 } to { 10 } i }.
@End @Text