# Simple partial derivative problem

I have a simple problem with partial derivative symbol, it doesn't work if I try any of these commands: \partial \pdiff \pder

I use sharelatex, and in other projects I could use the \partial symbol. I have no idea what's the problem, could someone help me? Thank you!

The code (edited in from a comment):

\documentclass[a4paper,11pt]{article}
\usepackage{geometry}
\usepackage{multirow}
\usepackage{anysize}
\usepackage[utf8]{inputenc}
\usepackage[magyar]{babel}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage[LGRgreek]{mathastext}
\usepackage{amssymb}
\usepackage{array}
\usepackage{subcaption}
\begin{document}
$$\partial{a}$$
\end{document}


The error message: undefined control sequence

• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. Mar 13, 2015 at 17:37
• Try putting \show\partial in the document and then compiling it. You should get a message showing the current definition of the command. What is this message? Mar 13, 2015 at 17:37
• We will need to see an MWE of what you are trying. $\partial$ should work. The other two are custom commands, I fear. Maybe something like \newcommand{\pder}[2][]{\frac{\partial#1}{\partial#2}} for your preamble. Mar 13, 2015 at 17:38
• @Hajnalka -- i transferred your code from a comment to the main text. (i added \begin{document}, which i believe had been omitted unintentionally.) even as a new user of tex.sx, though, you can always edit your own question, and that is the preferred way of responding to requests in comments. Mar 13, 2015 at 18:00
• The problem is with the mathastext package.
– erik
Mar 13, 2015 at 18:03

The problem arises because you're loading the mathastext package with the option LGRgreek. If you omit this option, the code compiles. If you really need the option LGRgreek, the manual suggests issuing the instruction MTstandardgreek ahead of equations that feature symbols such as \partial.

\documentclass[a4paper,11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[magyar]{babel}
\usepackage[LGRgreek]{mathastext}

\begin{document}
\begingroup % keep the effect of next instruction local
\MTstandardgreek
$$\partial{a}$$
\endgroup
\end{document}


When using the LGRgreek option, mathastext package redefines \partial. You can either remove the option or reset \partial to its original definition by adding the following to your preamble.

\makeatletter
\let\partial\mst@origpartial
\makeatother


A simple MWE follows:

\documentclass[a4paper,11pt]{article}
\usepackage[LGRgreek]{mathastext}
\makeatletter
\let\partial\mst@origpartial
\makeatother
\begin{document}
$$\partial{a}$$
\end{document}