2

So I want to write a Cobb-Douglas function F = Kα * L1-α. I've written this in LaTeX:

\(Y = K^{\alpha}L^{1−\alpha}\)

Everything is fine except that the minus sign that should be between 1 and alpha in superscript above L is missing. What am I doing wrong?

  • 1
    Replace with - – Au101 Oct 13 '16 at 20:07
6

For the minus sign in math mode LaTeX requires the "hyphen-minus" of ASCII days, in Unicode U+002D: -. That is, the one that should be produced by your keyboard ordinarily.

It seems you have ended up giving it the minus sign (U+2212). I'm not sure how you have done this, perhaps copying and pasting from somewhere.

LaTeX does not recognise this by default, although I'm sure with inputenc or XeLaTeX it could use it. But the character you need in math mode is U+002D: -

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\(Y = K^{\alpha}L^{1 - \alpha}\)

\end{document}

enter image description here

(Spaces around the - are not necessary, I just think it makes your code easier to read and it aids hard wrapping).

  • Oh I see. Yeah that was the case, I copy pasted it since I copied a text that included it. Thank you for your answer! – Gregor Stopar Oct 13 '16 at 20:18
  • @GregorStopar You're most welcome, glad to be of service. This is an easy thing to be caught out on. If an answer helped you, usual practice on Stackexchange is to upvote (although I believe you'll need a drop more rep for that?) You can also use the tick to accept the answer which most helped you, which will give you 2 rep points yourself, although it's worth waiting around a little while before you do that, something better might come along :) – Au101 Oct 13 '16 at 20:21
  • Or \usepackage{newunicodechar} and \newunicodechar{−}{-} – egreg Oct 13 '16 at 20:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.