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

\newcommand. doesn't work #134

Open
itworkman opened this issue Mar 25, 2022 · 1 comment
Open

\newcommand. doesn't work #134

itworkman opened this issue Mar 25, 2022 · 1 comment

Comments

@itworkman
Copy link

When you input "\newcommand{\yourcommand}{your content},
like this:

\documentclass{article}

\usepackage{comment, multicol}
\usepackage{hyperref}

\usepackage{calc,pict2e,picture}
\usepackage{textgreek,textcomp,gensymb,stix}
\newcommand{\yourcommand}{your content}

.......

then error below:

ERROR: Parsing failure:

line 8 (column 1): tcomp,gensymb,stix}\n\newcommand{\yourcom
----------------------------------------^
expected \begin{document}

It looks like it doesn't recognize the "\newcommand"

I try to search the "\newcommand" definition from latex.js

line 38217:

var newcommand = (context, existsOK, nonexistsOK) => {
  var arg = context.consumeArg().tokens;

So how to fix that. We need fix the \newcommand

Carlos,
Thanks

@oreoluwa-bs
Copy link

I believe you have to create your own custom macro instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants