0

I'm using ShareLaTeX on my Chromebook.

I'd like to write

in LaTeX (m^2), but the hat does not come out in the source code, instead it just turns everything into a superscript directly. How can I stop that?

  • Welcome. Please note that we speak english here. You can use package siunitx-> \si{\meter\squared} – Johannes_B Oct 10 '18 at 9:13
  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – albert Oct 10 '18 at 9:13
  • You probably have to go into math mode or see the comment from Johannes_B. Please also see how to create a MWE. – albert Oct 10 '18 at 9:34
  • 1
    Ik heb jou vraag naar het Engels vertaald omdat Engels de voertaal op deze website is. (Ik ben niet helemaal zeker of ik dat goed heb gedaan, dus zou het zeker helpen als je je vraag zelf in het Engels gaat stellen.) – moewe Oct 10 '18 at 9:38
  • 1
    At the moment I'm not even sure if this is a TeX problem, a feature of your OS (Chromebook) or a feature of the editor. Can you include a screenshot of what exactly you are seeing? – moewe Oct 10 '18 at 9:42
2

Chance from "rich text" to "source" view:

enter image description here

enter image description here

0

Initial question was unclear in respect what was required. it looked like a hat symbol was required, but turns out that a superscript is needed (from the translation by moewe).

A possible starting point with a number (not exhaustive) of possibilities (based on assumed 'hat' requirement):

\documentclass{article}

\begin{document}
$\hat{m^2}$
$\hat{m}^2$
$\widehat{m^2}$
$\widehat{m}^2$
\end{document}

required superscript (non exhaustive):

\documentclass{article}

\begin{document}
$m^2$
m\textsuperscript{2}
\end{document}
  • see also questions about superscripts likehttps://tex.stackexchange.com/questions/47324/superscript-outside-math-mode/47327 – albert Oct 10 '18 at 9:40
  • 4
    I think the question is about the behaviour of typing ^ key in the sharelatex online editor, not actually about tex syntax (but it isn't clear, I may be wrong:-) – David Carlisle Oct 10 '18 at 9:41

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.