What is the Difference Between [itex] and [tex]?

  • Thread starter ehrenfest
  • Start date
In summary: It displays the code in a nice, highlighted format.for writing very long code blocks without making your post too long and messing up the horizontal page layout by adding some scrollbars.
  • #1
ehrenfest
2,020
1
[SOLVED] itex

Sometimes when I click on tex blocks, I see the quote surrounded by [ itex] [/itex] instead of [ tex] [/tex]. What is that about?

There is really not a space between the [ and next character but I had to put one in or else it does not show up.
 
Last edited:
Physics news on Phys.org
  • #2
itex keeps the maths typeset in line with the text so it looks neater in the middle of a sentence.

Example:

blah blah [tex] E=mc^2[/tex] blah blah
blah blah [itex] E = mc^2 [/itex] blah blah

blah blah [tex]\frac{a}{b} [/tex] blah blah
blah blah [itex]\frac{a}{b} [/itex] blah blah
 
  • #3
That's convenient. Also, is there any way I can avoid actually typing in [ tex] and [ /tex] all the time? In other forums I have visited, you can just highlight the text that you want typeset and click some button.

There is really not a space between the [ and next character but I had to put one in or else it does not show up.
 
  • #4
Not that I know of. Greg might consider adding a button to do that though.
 
  • #5
Another thing that helps keep the text clean-looking is to avoid using raising and lowering operations if possible. For example [itex]a/b[/itex] looks better to me as inline text compared to [itex]\frac a b[/itex].

If you use LaTeX outside of PF (e.g., you use it to write papers), think of [ itex ] simple math [ /itex ] as equivalent to $ simple math $ and
[ tex ] hairy math [ /tex ]
as equivalent to
\begin {equation} hairy math \end{equation}
 
  • #6
ehrenfest said:
Also, is there any way I can avoid actually typing in [ tex] and [ /tex] all the time? In other forums I have visited, you can just highlight the text that you want typeset and click some button.

If you use Firefox, add the BBCode extension. (Scroll down the page to Miscellaneous.) Apart from being VERY handy on internet forums, it also let's you add custom tags. For PF, I have added the superscript, subscript, tex and itex tags.

I know that the link I provided leads you to a Third-party site, instead of AMO, but I've been using this extension for a year (since the release of Fx 2) and it has not given me a problem.
 
  • #7
Could anyone please tell me what is the button for wrapping
Code:
 tags around selected text? And also the [php] tag?

Also, is there any [B]existing[/B] way, without using firefox, to write the oft used suffix, powers etc without tex? Like you do I am ms-word.
 
  • #8
Shooting star said:
Could anyone please tell me what is the button for wrapping
Code:
 tags around selected text? And also the [php] tag?[/quote]
[In advanced mode] Select the text and click on the [B]#[/B] button for [code], and the one next to it for [php].

[quote]Also, is there any [B]existing[/B] way, without using firefox, to write the oft used suffix, powers etc without tex? Like you do I am ms-word.[/QUOTE]
[ sup ] [ / sup ]  for superscripts.
[ sub ] [ / sub ]  for subscripts.
(no spaces, of course )

Examples: y=x[sup]2[/sup]; A = (a[sub]ij[/sub])
 
  • #9
neutrino said:
[In advanced mode] Select the text and click on the # button for
Code:
, and the one next to it for [php].
[/QUOTE]

Thank you, but I meant what do they do?
 
  • #10
Code:
Is for 
   computer code
 that you 
           want to layout
  properly (keeping         indentation)

and for writing very long code blocks without making your post too long and messing up the horizontal page layout by adding some scrollbars.

PHP tags do the same thing but automatically add highlighting for PHP code, compare
Code:
<?
$diary_directory = opendir(".");
  while($filename = readdir($diary_directory))
{
    $filesplit = explode(".", $filename);
    $check_filename = $filesplit[0];
       if(ereg("[0-9]{6}", $check_filename))
      {
         $check_filename .= ".$filesplit[1]";
         $valid_filename[] = $check_filename;
      }
  }
closedir($diary_directory);
for($index = 0; $index < count($valid_filename); $index++)
{
  print("$valid_filename[$index]<br>");
}
?>
to
PHP:
<?
$diary_directory = opendir(".");
  while($filename = readdir($diary_directory))
{
    $filesplit = explode(".", $filename);
    $check_filename = $filesplit[0];
       if(ereg("[0-9]{6}", $check_filename))
      {
         $check_filename .= ".$filesplit[1]";
         $valid_filename[] = $check_filename;
      }
  }
closedir($diary_directory);
for($index = 0; $index < count($valid_filename); $index++)
{
  print("$valid_filename[$index]<br>");
}
?>
 
  • #11
Code:
Thank you!
 

What is the Difference Between [itex] and [tex]?

The main difference between [itex] and [tex] is the type of mathematical notation they represent. [itex] is used to represent inline mathematical expressions in LaTeX, while [tex] is used to represent standalone mathematical expressions. [itex] is often used in text or within a sentence, while [tex] is used for equations or formulas that are separated from the text.

How do I use [itex] and [tex]?

To use [itex], you must first have a LaTeX editor installed on your computer. You can then use the [itex] command to enclose your mathematical expression within dollar signs ($). For example, $x^2 + y^2 = z^2$. To use [tex], you must have a full LaTeX distribution installed, and you can then use the [tex] command to enclose your equation within double dollar signs ($$). For example, $$x^2 + y^2 = z^2.$$

Can I use [itex] and [tex] in any document?

Yes, you can use [itex] and [tex] in any document that supports LaTeX formatting, such as scientific papers, presentations, and documents created in LaTeX. However, if you are using a word processor like Microsoft Word, you may need to install a plugin or add-on to support LaTeX formatting and the use of [itex] and [tex].

Is there a difference in formatting between [itex] and [tex]?

Yes, there is a difference in formatting between [itex] and [tex]. [itex] is used for inline expressions, so it will be displayed within the text of your document. [tex], on the other hand, is used for standalone equations, so it will be centered on its own line, with more space around it. Additionally, [tex] can support more complex formatting, such as multiple lines and symbols, while [itex] is primarily used for simple equations and symbols.

Do I need to know LaTeX to use [itex] and [tex]?

To use [itex] and [tex], you do not need to be an expert in LaTeX, but some basic knowledge of the language may be helpful. It is important to understand the basic syntax for [itex] and [tex], such as using dollar signs to enclose your expression and how to use different symbols and commands. You can also use online resources or templates to help you create equations using [itex] and [tex].

Similar threads

  • Quantum Physics
Replies
7
Views
1K
Replies
15
Views
2K
  • Introductory Physics Homework Help
Replies
25
Views
2K
  • Feedback and Announcements
Replies
3
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
9
Views
1K
  • Feedback and Announcements
Replies
2
Views
832
Replies
8
Views
919
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
Replies
4
Views
802
  • Linear and Abstract Algebra
Replies
2
Views
2K
Back
Top