0

I'm a noob in Latex. After watching some videos on Utube I tried to type up some maths on Latex. Btw I'm using the latest version on my Mac. The default preambles are already there so I started with the \begin{document} and \end{document} as suggested by the video tutorials. A list of error messages came up.

Error messages from \begin{document} and \end{document}

However if I remove them, the text does turn up, but aligned to the right automatically. text aligned to the right I tried adding \begin{flushleft} and \end{flush left} and I got a list of error messages again.

Another problem is that the text seems to get cut off when it's too long. Do I need to create line breaks automatically? text got cut off

Thx in advance!:)

closed as unclear what you're asking by egreg, user31729, Svend Tveskæg, Jesse, Sean Allred Sep 21 '14 at 14:42

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    According to their website LaTeXiT is sort of an equation editor. This means the default preamble has already added the some of the packages and macros you need and repeating them is causing the problem. Try to copy your complete code (with \documentclass, \begin{document}and etc) in TeXShop that is included in MaCTeX and see what happens. – Pouya Sep 16 '14 at 13:24
  • I deleted my previous comment, as I hadn't realized how LaTeXit works, sorry about that. – Torbjørn T. Sep 16 '14 at 13:28
  • \text is defined (in amsmath) to be used in math. although i haven't checked, i suspect it won't behave properly outside of math. this suspicion is reinforced by the message that a $ (the math toggle) has been inserted. – barbara beeton Sep 16 '14 at 21:09
  • @barbarabeeton Outside math \text expands to \mbox without the possibility for line breaks. – Heiko Oberdiek Sep 21 '14 at 12:03
  • tbanks, @HeikoOberdiek. then, put simply, there's no good reason to use \text outside math. – barbara beeton Sep 21 '14 at 12:17
1

You didn't show the full picture, at the bottom there are four modes of compilation in LaTeXiT: inline, display, align and text. So we don't know in which one you are (probably “Align”). So

  • You don't need \begin{document} or \end{document}
  • \text is only for math mode (since you are in “Align”, it's acceptable, but you could remove \text and use “Text mode”)
  • Since you are in align, and you are not using & (alignment characters), it aligns the lines at the end, as always.

I'm not sure what you want to achieve, but, if you want text… why don't you compile with a usual editor? LaTeXiT is thought (IMO) just to create small images or .pdfs with equations or things that you need in LaTeX, and you can't use them in your workflow (for instance, if you use Word).

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