我目前有以下设置(但有更多键),它可以工作,但不像我希望的那样干净。
\pgfkeys {
/title/.is family, /title,
first/.estore in = \title@first,
last/.estore in = \title@last,
city/.estore = \title@city,
}
\renewcommand {\title} [3] [] {
\pgfkeys{/title,#1}
{\huge \title@first\ \title@last} \\
Location: (\title@city) \\
}
\title [
first = Fred,
last = Flinstone,
city = New York\, NY,
]
我想做类似以下的事情
\pgfkeys {
/title/name/.is family, /title/name,
first/.estore in = \title@name@first,
last/.estore in = \title@name@last,
/title/contact/.is family, /title/contact,
city/.estore = \title@contact@city,
}
\renewcommand {\title} [3] [] {
\pgfkeys{/title,#1}
{\huge \title@name@first\ \title@name@last} \\
Location: (\title@contact@city) \\
}
\title [
name = [ % {} instead of [] would be fine as well for me.
first = Fred,
last = Flinstone,
],
location = [
city = New York\, NY,
],
]
我受到了启发\setmainfont
,它对SmallCapsFeatures
\setmainfont [
Path = font/,
Extension = .otf,
BoldFont = MyFont-Bold,
SmallCapsFeatures = {
Letters = SmallCaps
}
] {MyFont-Regular}
更新
- 将参数数量从 4 个修正为 3 个