Text FormattingTrying to use "align" environment

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
User avatar
Stefan Kottwitz
Site Admin
Posts: 10330
Joined: Mon Mar 10, 2008 9:44 pm

Re: Trying to use "align" environment

Post by Stefan Kottwitz »

{} is an empty word. Sometimes this is useful to place a superscript without an object. Here it's dispensable.

Stefan
LaTeX.org admin

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

itsmereally
Posts: 32
Joined: Sun Jul 25, 2010 11:15 pm

Re: Trying to use "align" environment

Post by itsmereally »

Ah. Makes sense. I'll keep a note of that.

Sorry to keep pestering, but I'd like to ask another question, still related to the align environment.

In a text environment, we can use $...$ to enable a math environment. In a math environment, we can use \text{...} to enable a text environment.

Is there a symbol, like with the $s, that could replace the "\text{...}", and is there a list available showing what each of these special symbols do?

I'm really getting into it all now, thanks to your goodself. My document looks exactly the way I wanted it. :)

That will probably change when I start learning the siunitx package though.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10330
Joined: Mon Mar 10, 2008 9:44 pm

Trying to use "align" environment

Post by Stefan Kottwitz »

itsmereally wrote:I'd like to ask another question, still related to the align environment.
So it's fine to append it to this topic. If it comes to a different subject, like siunitx, just open a new topic.
itsmereally wrote:In a text environment, we can use $...$ to enable a math environment. In a math environment, we can use \text{...} to enable a text environment.
Is there a symbol, like with the $s, that could replace the "\text{...}", and is there a list available showing what each of these special symbols do?
$...$ is not really LaTeX, it's TeX. The corresponding LaTeX command (environment) ist \(...\), though $...$ is commonly used. It's shorter. (see perhaps: inline math)

There's no counterpart regarding text mode. \text is a macro from the amsmath package. There's no shourtcut for it, but we could define one analogous to $.

Characters like $ act as commands, like $ for inline math, ~ for a non-breakable space, % for beginning a comment etc. A LaTeX book or TeX book would tell more. But you will get to know them as time goes by.

Stefan


Stefan
LaTeX.org admin
itsmereally
Posts: 32
Joined: Sun Jul 25, 2010 11:15 pm

Re: Trying to use "align" environment

Post by itsmereally »

I didn't realise there was a difference between LaTeX and Tex. This calls for some googling.

Thanks again for all your help. I'm now well underway in my document. :)

I'll probably be pestering you again in the near future.
itsmereally
Posts: 32
Joined: Sun Jul 25, 2010 11:15 pm

Trying to use "align" environment

Post by itsmereally »

Stefan_K wrote: All inside the align environment is considered as math. \text has been used to temporarily switch back to text mode.
Sorry to bring this up again.

Is there any way to have the align command use a text environment instead of math, which would then allow me to use the $...$ structure within it?
torbjorn t.
Posts: 162
Joined: Wed Jun 17, 2009 10:18 pm

Re: Trying to use "align" environment

Post by torbjorn t. »

What exactly are you trying to do?
itsmereally
Posts: 32
Joined: Sun Jul 25, 2010 11:15 pm

Re: Trying to use "align" environment

Post by itsmereally »

I'm typing Physics notes, and am using alot of fractions and calculations within sentences. I find it much neater to use the $...$ structure for maths in a text environment, rather than \text{...} for text in a maths environment.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10330
Joined: Mon Mar 10, 2008 9:44 pm

Trying to use "align" environment

Post by Stefan Kottwitz »

itsmereally wrote:Is there any way to have the align command use a text environment instead of math, which would then allow me to use the $...$ structure within it?
You could use a tabular environment in text mode and $...$ within.

Stefan
LaTeX.org admin
itsmereally
Posts: 32
Joined: Sun Jul 25, 2010 11:15 pm

Re: Trying to use "align" environment

Post by itsmereally »

I can't get information in a tabular environment to "line up" with text that isn't in a particular environment.

I think I tried this before. I'll keep experimenting. :)
User avatar
Stefan Kottwitz
Site Admin
Posts: 10330
Joined: Mon Mar 10, 2008 9:44 pm

Trying to use "align" environment

Post by Stefan Kottwitz »

The tabbing environment is a simple alternative. It's even able to cross page boundaries.

Stefan
LaTeX.org admin
Post Reply