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

  • Thread starter Thread starter ehrenfest
  • Start date Start date
AI Thread Summary
The discussion clarifies the difference between [itex] and [tex] in typesetting mathematical expressions, with [itex] being used for inline math that appears within text, while [tex] is for displayed equations. Users express a desire for easier input methods for these tags, similar to features in other forums that allow text highlighting for typesetting. Suggestions include using browser extensions like BBCode for Firefox to streamline the process. Additionally, the conversation touches on formatting code and using tags for proper layout in posts. Overall, the thread emphasizes the importance of clarity and convenience in mathematical typesetting on forums.
ehrenfest
Messages
2,001
Reaction score
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
itex keeps the maths typeset in line with the text so it looks neater in the middle of a sentence.

Example:

blah blah E=mc^2 blah blah
blah blah E = mc^2 blah blah

blah blah \frac{a}{b} blah blah
blah blah \frac{a}{b} blah blah
 
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.
 
Not that I know of. Greg might consider adding a button to do that though.
 
Another thing that helps keep the text clean-looking is to avoid using raising and lowering operations if possible. For example a/b looks better to me as inline text compared to \frac a b.

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}
 
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.
 
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.
 
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])
 
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!
 
Back
Top