Skip to content

Commit 8db04ea

Browse files
committed
Merge branch 'textmacros-packages' into textcomp_package
2 parents e64196c + 9dfa6f1 commit 8db04ea

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

ts/input/tex/textmacros/TextMacrosConfiguration.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import './TextMacrosMappings.js';
3737
/**
3838
* The base text macro configuration (used in the TextParser)
3939
*/
40-
export const textBase = Configuration.local({
40+
export const textBase = Configuration.create('text-base', {
4141
handler: {
4242
character: ['command', 'text-special'],
4343
macro: ['text-macros']
@@ -103,8 +103,7 @@ export const TextMacrosConfiguration = Configuration.create('textmacros', {
103103
// Create the configuration and parseOptions objects for the
104104
// internal TextParser and add the textBase configuration.
105105
//
106-
const textConf = new ParserConfiguration([]);
107-
textConf.append(textBase);
106+
const textConf = new ParserConfiguration(jax.parseOptions.options.textmacros.packages);
108107
textConf.init();
109108
const parseOptions = new ParseOptions(textConf, []);
110109
parseOptions.options = jax.parseOptions.options; // share the TeX options
@@ -129,5 +128,10 @@ export const TextMacrosConfiguration = Configuration.create('textmacros', {
129128
//
130129
const config = data.data.packageData.get('textmacros');
131130
config.parseOptions.nodeFactory.setMmlFactory(config.jax.mmlFactory);
132-
}]
131+
}],
132+
options: {
133+
textmacros: {
134+
packages: ['text-base'] // textmacro packages to load
135+
}
136+
}
133137
});

0 commit comments

Comments
 (0)