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 in math code #121

Closed
neozhaoliang opened this issue Apr 4, 2017 · 3 comments
Closed

\newcommand in math code #121

neozhaoliang opened this issue Apr 4, 2017 · 3 comments

Comments

@neozhaoliang
Copy link

\newcommand{\mycommand}[1]{\mathcal{#1}}

does not work, it says it has dropped the math mode. How can I use self-defined commands in math mode?

@johannesbottcher
Copy link

johannesbottcher commented Apr 4, 2017 via email

@johannesbottcher
Copy link

johannesbottcher commented Apr 4, 2017

I cannot reproduce the problem by the way:

\documentclass{Classes/PhDThesisPSnPDF}
\newcommand{\mycommand}[1]{\mathcal{#1}}
\begin{document}
$\mycommand{L}$
\end{document}

You will need to add a minimal working example to the question you will ask on any other site. Please crosslink the questions.

@neozhaoliang
Copy link
Author

Hi thanks for the reply. I have fixed the problem. The template has changed the default behavier of Latex:

if you put your self-defined math commands in a separate file command.tex and use the \include it will report the error. One should use \input 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