LaTeX How to Type Formulas Without LaTeX?

  • Thread starter Thread starter alexepascual
  • Start date Start date
  • Tags Tags
    Formulas Latex
AI Thread Summary
For displaying simple mathematical formulas and Greek letters without using LaTeX, users can utilize HTML codes and forum-specific vB codes. HTML entities can be employed to represent Greek letters, such as using "α" for alpha, while superscripts and subscripts can be formatted using vB codes like [sup] and [sub]. The forum's engine replaces brackets with angle brackets to interpret these codes correctly. While some users find HTML cumbersome, it is suggested for simpler expressions, whereas LaTeX remains a more powerful option for complex equations. Compatibility issues with different browsers may affect the display of symbols, making LaTeX a more reliable choice overall. For better aesthetics, using the "symbol" font is recommended for Greek letters, although not all users may have access to this font.
alexepascual
Messages
371
Reaction score
1
Let's say I have some simple formulas I want to type -maybe inline- and I don't want to go through the trouble of using latex. Let's say I just want to type mainly symbols that are on the keyboard + some greek letters and subscripts. How can I do this?
I'll appreciate your suggestions.
 
Physics news on Phys.org
Where do you want the results displayed? On a Web page? Then MathML is probably the answer. But I doubt it is much easier than LateX.

But why not LaTeX? It is probably the simplest way to display simple math symbols and formulas in existence.
 
Yup, but if all you want are greek super/subscripts, then tags along with using charactermap (assuming you are on a unicode system) it will work.
 
Sorry if I didn't explain in detail. I would like to display those symbols in my posts to this forum.
I have used latex to do this and I am looking for an alternative. There are people on the threads to which I post that routinely type formulas that are clearly not in latex and they still are able to include greek letters, superscripts, and subscripts.
I could ask them, but I was trying not to include questions on those threads that are not related to the subject of the thread.
If you are familiar with this I'll appreciate your help.
 
HTML codes

alexepascual said:
There are people on the threads to which I post that routinely type formulas that are clearly not in latex and they still are able to include greek letters, superscripts, and subscripts.
I think you are looking for HTML codes that allow you to write things like Δ and θ. Go here: https://www.physicsforums.com/showpost.php?p=170713&postcount=14
 
For superscripts and subscripts in this forum, you can use [ sub ] and [ /sub ] and [ sup ] and [ /sup ] (without the spaces inside the tags). With that, you can do things like this:

a2 + b2 = c2

For greek letters, I think you can use HTML entities. This page has a list of them:

http://www.htmlhelp.com/reference/html40/entities/symbols.html

Look at the "Entity" column. For example, Pi is "& pi;" (without the space and the quotes, and make sure to include the semicolon). With that, you can do some things like this:

c = 1/√(ε0μ0)

Personally, I think LaTeX is a lot easier than doing all of that, and it's much more powerful. Furthermore, all of this HTML stuff won't necessarily work in older browsers, whereas LaTeX is guaranteed to work in this forum.
 
Doc Al , TALewis and Goalie,
Thanks for your responses. From what you say and a little experimentation I did, I gather that while html tags are enclosed in the delimeters "<" and ">", on this forum you can use the same tags but enclosing them in "[" and "]".
So the forum's engine replaces all the "["s by "<"s.
This makes sense since otherwise we would not be able to write in Dirac notation as it would be interpreted as html tags.
About greek letters, I typed an alpha using "&" "alpha" ";" and it looked like an "a" on my computer screen.
Ok, I'll do some testing

Supescripts: E=mc² This works.
More superscripts (different method): A=b1/2
Subscripts: a&sub1;+a&sub2; + a&sub3; (this didn't work)
Try a different method:
Subscripts: a1+a2+a3+a4
Let's see if I can show the html using the "code" tag:
Subscripts:
Code:
  a<sub>1</sub>+a<sub>2</sub>+a<sub>3</sub>+a[sub]4[/sub]

I hope the forum doesn't send email everytime I edit! If it did, you must be kind of angry by now!

I don't understand what "[ code ]" is for as if I type using "["s it still translates it. Only when I use "<"s they remain intact. But that is the way it would work even if I didn't use "[ code ]"
 
Last edited:
alexepascual said:
From what you say and a little experimentation I did, I gather that while html tags are enclosed in the delimeters "<" and ">", on this forum you can use the same tags but enclosing them in "[" and "]".
So the forum's engine replaces all the "["s by "<"s.

Not exacly. The tags enclosed by [ ] are vB codes used by this forum. See this page:

https://www.physicsforums.com/misc.php?do=bbcode

It doesn't work for general HTML tags. That's why things like
didn't work in your post. I think HTML might be disabled on this forum.

About greek letters, I typed an alpha using "&" "alpha" ";" and it looked like an "a" on my computer screen.

Make sure you type the entities exactly as shown on the page I sent you. The codes are, for example:

& alpha;
& beta;
& gamma;
& delta;

Including semicolon, without the space. These show up fine for me:

α
β
γ
δ

Do you see Greek alpha, beta, gamma, and delta? If not, let's try the decimal entities in the next column of the page I sent you:

& #945;
& #946;
& #947;
& #948;

Once again, no space. Test:

α
β
γ
δ

If none of those show up as Greek characters, then you've come across one of the many frustrations about doing this sort of thing on the WWW: some browsers implement standards differently, poorly, or not at all. You will find that LaTeX always works, without any of this hassle.

Edit: I agree with you -- the [ code ] [ /code ] tags weren't very helpful in formatting my post either.
 
Last edited by a moderator:
TALewis'
Thanks for clariffying the difference between vbcode and html. I had tried the buttons in the edit menu for bold, italic and underline and had noticed that the codes were the same as the corresponding html codes, except for the delimiters. This led me to the wrong conclusion.
On the other hand, probably you would agree with me that in those cases where the code is the same in vbcode and in html, the end result is that the furum's engine will make the replacement I mentioned. I understand that there may be very few tags for which this applies.
With respect to the "alpha", it still looks very close to an "a" in your post. When I tried it, I though it was actually being displayed as an "a". (my vission is not as good as it used to be). As I didn't try the other greek letters I thought they were being displayed incorrectly. But I guess it just was the alpha.
For big equations I am planning on using latex, but for small things I'll use the vbcode tags. Oh! by the way, the way to display greek letters in vbcode is exactly the same as in html.
Thanks again,
-Alex-
 
  • #10
This webpage seems to have quite a comphrehensive list of html symbols for maths:

http://www.webreference.com/html/reference/character/symbols.html#HEAD-2

One word of warning, whether you or others can see the symbols or not is dependent on the version of html you have.
 
  • #11
TALewis said:
& alpha;
& beta;
& gamma;
& delta;

While that is a quick way to do it, you get much nicer looking letters if you use the "symbol" font, as follows:

[ font=symbol ]put letters in here[ /font ]

(but don't put the spaces in the tags).

Compare:

α
β
γ
δ


a
b
g
d
 
  • #12
Assuming you have the same Symbol font, which not all of us have.
 

Similar threads

Replies
8
Views
3K
Replies
1
Views
2K
Replies
5
Views
3K
Replies
11
Views
5K
Replies
6
Views
3K
Replies
3
Views
2K
Replies
14
Views
2K
Replies
3
Views
2K
Back
Top