Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Latex into html

  1. Jun 27, 2008 #1
    Hi

    I am first time user of LATEX. I have LyX editor where I am able to create LATEX documents. But I couldn't find any clear solution for pasting that LATEX content into my posts in the forum. Is there any simple way to copy LATEX document from the editor to forum posts?
     
  2. jcsd
  3. Jun 27, 2008 #2

    cristo

    User Avatar
    Staff Emeritus
    Science Advisor

    You can put latex code in between [ tex ] and [ /tex] tags (without the spaces inside the square brackets):

    i.e. [tex]y=7x[/tex]
     
  4. Jun 27, 2008 #3

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    [noparse]

    Hi cristo! :smile:

    You can type [noparse][tex] and [/tex] (without any spaces!) by surrounding them with [noparse] and [/noparse][/noparse]. :smile:
     
  5. Jun 27, 2008 #4

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    here's a perl script that turns valid LaTeX files* into forum LaTeX.

    This script comes with no warranties, etc. If you hose your machine that's your fault.

    usage: save file to script.pl, chmod it to executable, then do ./script.pl file

    #!/usr/bin/perl -i
    $_=@ARGV[0];
    while(<>){
    s/\$\$([^\$]*)\$\$/\[tex\]$1\[\/tex\]/g;
    s/\$([^\$]*)\$/\[itex\]$1\[\/itex\]/g;
    print;
    }


    * this assumes that you use $ $ to denote inline LaTeX and $$ $$ for display math. Although the usage of $$ $$ should be discouraged (in favour of \[ \]) I chose to do it this way for no good reason. Change the regexps if you want.
     
  6. Jun 27, 2008 #5
    Just testing

    [tex] $ V_{bw} $ = $ V_{b} $ - $ V_{w} $ [/tex]

    *********************************************

    Thanks guys. But Seems like LyX doesn't generate correct source. I had to put spaces and some dollars my self. What do you people use to generate latex source.
     
  7. Jun 27, 2008 #6

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    Hi vijay! :smile:

    I've copied what you typed, and left out the spaces and dollars, and it works fine:

    [tex] V_{bw}=V_{b}-V_{w} [/tex]

    Click "QUOTE" to see what I typed.

    (and generally click "QUOTE" to see other people's LaTeX typing, and just steal it! :smile:)
     
  8. Jun 27, 2008 #7

    Redbelly98

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper

    I only use Latex in here, and either type it in by hand or use the menu available when you click the "Go Advanced" button under the Quick Reply window.

    Click the capital Sigma icon in advanced mode to get the Latex menu. Unfortunately, this feature is not enabled in every sub-forum (like this one). Not sure why that is.
     
  9. Jun 28, 2008 #8

    malawi_glenn

    User Avatar
    Science Advisor
    Homework Helper

    I use Texmaker as IDE (Interactive developmend environment), you must know the language of TeX to use it.
     
  10. Jun 28, 2008 #9

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    You don't put the dollar signs in. They're the things that would tell the LaTeX program to interpret the contained text as mathematics if you were compiling the source on your machine at home. That isn't what happens in the forum. In this forum's implementation the $ and $$ are are replaced by the tex and itex tags.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Latex into html
  1. Graphs in LaTeX (Replies: 3)

  2. LaTeX in PowerPoint (Replies: 2)

  3. Latex Help (Replies: 9)

  4. LaTeX help (Replies: 2)

Loading...