Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--blacker option for tex2svg #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions bin/tex2svg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
* ----------------------------------------------------------------------
*
* Copyright (c) 2014 The MathJax Consortium
* Copyright (c) 2014-2021 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -27,8 +27,8 @@ var mjAPI = require("mathjax-node-sre");

var argv = require("yargs")
.demand(1).strict()
.usage("$0 [options] 'math' > file.svg")
.options({
.usage("$0 [options] 'math' > file.svg")
.options({
inline: {
boolean: true,
describe: "process as in-line TeX"
Expand All @@ -46,6 +46,10 @@ var argv = require("yargs")
default: "TeX",
describe: "web font to use"
},
blacker: {
default: 1,
describe: "character stroke width"
},
ex: {
default: 6,
describe: "ex-size in pixels"
Expand All @@ -62,7 +66,7 @@ var argv = require("yargs")
.argv;

if (argv.font === "STIX") argv.font = "STIX-Web";
mjAPI.config({MathJax: {SVG: {font: argv.font}}, extensions: argv.extensions});
mjAPI.config({MathJax: {SVG: {font: argv.font, blacker: argv.blacker}}, extensions: argv.extensions});
mjAPI.start();

mjAPI.typeset({
Expand Down