LaTeX forum ⇒ Text FormattingAligning all equations to the left

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
BigRedChess
Posts: 5
Joined: Fri Feb 07, 2014 12:14 am

Aligning all equations to the left

Postby BigRedChess » Fri Feb 07, 2014 12:20 am

Hey Guys,

I'm trying to write a math paper, and I want every single equation in an align environment to be completely left aligned. However, when I tried "fleqn" or "flalign" it would just go a little bit to the left and still leave a lot of room between the margin. I also tried the set indent length thing after doing fleqn in the document class.

What else can I do?

I've attached all the information I thought was necessary.


  1. \documentclass[fleqn]{amsart}
  2.  
  3. \usepackage{fancyhdr}
  4. \usepackage{graphicx, amssymb}
  5. \graphicspath{ {./images/} }
  6. \usepackage{enumerate}
  7. \usepackage{amsmath}
  8. \setlength{\mathindent}{-1cm} (I tried fiddling with this, and no cm length (whether it be -10, 10, or 0) changed anything)
  9. \usepackage[parfill]{parskip}
  10. \usepackage[export]{adjustbox}
Last edited by cgnieder on Fri Feb 07, 2014 12:48 am, edited 1 time in total.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9021
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Fri Feb 07, 2014 12:40 am

Hi,

no need to use amsart, article together with amsmath would be fine as well. amsart is specifically for publishing in an AMS journal, it's focused to their needs.

Have a look at Left Alignment with Paragraphs for all Equations.

Stefan
Site admin

BigRedChess
Posts: 5
Joined: Fri Feb 07, 2014 12:14 am

Postby BigRedChess » Fri Feb 07, 2014 5:40 am

Hi,

I have written about 15 pages so far using the \begin{thm} and \begin{lem} environments that I assume come with the amsart document class. I am publishing this in a journal, so would say article be an acceptable document class? Would I have to change the "thm" and "lem" environments?

Thanks!

Jon

User avatar
Stefan Kottwitz
Site Admin
Posts: 9021
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Fri Feb 07, 2014 9:47 am

Hi John,

just load the amsthm package:

  1. \usepackage{amsthm}


Then you can define your theorems. All important amsmath functions are available for article and other classes as packages (amsmath, amsthm, amssymb, amscd, amstext, amsrefs, ...).

Just check if the journal already provides a style (class), that's very common. In that case you should use that style (with amsmath packages).

Stefan
Site admin

BigRedChess
Posts: 5
Joined: Fri Feb 07, 2014 12:14 am

Postby BigRedChess » Fri Feb 07, 2014 5:17 pm

Sure - so I'm looking into the journal now but some other issues arise.

If I change from amsart to article, I get a lot of errors in these parts of my file:

\author{xxx}
\address{xxx}
\email{xxx}

\numberwithin{equation}{section} (this is for the newly stylized theorem and lemma environments

saying I have an undefined control sequence. Which document class can I use that will let me do the proper heading as well as having any kind of lemma/theorem/proof environment?

Thanks so much!

Jon

hugovdberg
Posts: 133
Joined: Sat Feb 25, 2012 6:12 pm

Postby hugovdberg » Sat Feb 08, 2014 12:48 am

Did you include the amsthm package when changing the documentclass to article? An up to date MWE would definitely help here.
Ubuntu 13.10 + Tex Live 2013 + Texmaker / Windows 7 Pro + MikTex 2.9 + TexnicCenter / Android 4.3 + TexPortal + DroidEdit

BigRedChess
Posts: 5
Joined: Fri Feb 07, 2014 12:14 am

Postby BigRedChess » Mon Feb 10, 2014 7:45 am

Here's the whole top attached (this uses a template that I found on Google)

  1. \documentclass[12pt]{amsart}
  2.  
  3. %% This has a default type size 10pt. Other options are 11pt and 12pt
  4. %% This are set by replacing the command above by
  5. %% \documentclass[11pt]{amsart}
  6. %%
  7. %% or
  8. %%
  9. %% \documentclass[12pt]{amsart}
  10.  
  11. \newtheorem{thm}{Theorem}[section]
  12. \newtheorem{prop}[thm]{Proposition}
  13. \newtheorem{lem}[thm]{Lemma}
  14. \newtheorem{cor}[thm]{Corollary}
  15. %\newtheorem{conj}[thm]{Conjecture}
  16.  
  17. \theoremstyle{definition}
  18. \newtheorem{definition}[thm]{Definition}
  19. \newtheorem{example}[thm]{Example}
  20.  
  21. %\newtheorem{note}[thm]{Note}
  22.  
  23. \theoremstyle{remark}
  24.  
  25. \newtheorem{remark}[thm]{Remark}
  26.  
  27. \newcommand{\R}{\mathbf{R}} % The real numbers.he dea
  28. \usepackage{fancyhdr}
  29. \usepackage{graphicx, amssymb}
  30. \graphicspath{ {./images/} }
  31. \usepackage{enumerate}
  32. \usepackage{amsmath}
  33. \usepackage[parfill]{parskip}
  34. \usepackage[export]{adjustbox}
  35.  
  36. \usepackage[margin=1in]{geometry}
  37.  
  38. \DeclareMathOperator{\dist}{dist} % The distance.
  39.  
  40.  
  41. \begin{document}
  42.  
  43. \title{Title Goes Here}
  44.  
  45. \author{xxx}
  46. \address{xxx}
  47. \email{xxx}
  48.  
  49. %\begin{abstract}
  50. %Great stuff. ABSTRACT
  51. %\end{abstract}
  52.  
  53. \maketitle
Last edited by Stefan Kottwitz on Mon Feb 10, 2014 11:03 am, edited 1 time in total.
Reason: code marked

hugovdberg
Posts: 133
Joined: Sat Feb 25, 2012 6:12 pm

Postby hugovdberg » Mon Feb 10, 2014 2:16 pm

I'm sorry, but this is not a complete MWE, it will not compile as it stands. And worse, you mention getting errors when changing the documentclass to article and this snippet uses amsart.
Ubuntu 13.10 + Tex Live 2013 + Texmaker / Windows 7 Pro + MikTex 2.9 + TexnicCenter / Android 4.3 + TexPortal + DroidEdit

BigRedChess
Posts: 5
Joined: Fri Feb 07, 2014 12:14 am

Postby BigRedChess » Mon Mar 24, 2014 7:11 pm

Yes I must have incorrectly used the "amsart" template I found online. When I switch to article and use the given formatting edits I provided in my last post, it does not compile (though it does as of now). After a bit of tinkering here's everything in the top.

Like I mentioned before I just want to be able to force left align all equations for the paper.

  1. \documentclass[12pt]{amsart}
  2.  
  3. \newtheorem{thm}{Theorem}[section]
  4. \newtheorem{prop}[thm]{Proposition}
  5. \newtheorem{lem}[thm]{Lemma}
  6. \newtheorem{cor}[thm]{Corollary}
  7.  
  8.  
  9. \theoremstyle{definition}
  10. \newtheorem{definition}[thm]{Definition}
  11. \newtheorem{example}[thm]{Example}
  12.  
  13.  
  14. \theoremstyle{remark}
  15.  
  16.  
  17. \newtheorem{remark}[thm]{Remark}
  18.  
  19.  
  20. \newcommand{\R}{\mathbf{R}} % The real numbers.he dea
  21. \usepackage{fancyhdr}
  22. \usepackage{graphicx, amssymb}
  23. \graphicspath{ {./images/} }
  24. \usepackage{enumerate}
  25. \usepackage{amsmath}
  26. \usepackage[parfill]{parskip}
  27. \usepackage[export]{adjustbox}
  28. \usepackage[margin=1in]{geometry}
  29.  
  30. \DeclareMathOperator{\dist}{dist} % The distance.
  31.  
  32. \begin{document}
  33.  
  34. \title{x}
  35.  
  36. \author{x}
  37. \address{x}
  38. \email{x}
  39. \urladdr{x}
  40.  
  41.  
  42. \maketitle
Last edited by Stefan Kottwitz on Mon Mar 24, 2014 7:29 pm, edited 1 time in total.
Reason: code marked


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 4 guests