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

  • Thread starter Thread starter ehrenfest
  • Start date Start date
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 [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
 
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 [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}
 
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!
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 25 ·
Replies
25
Views
4K
  • · Replies 2 ·
Replies
2
Views
1K