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

Automatic latex converison

  1. Nov 3, 2007 #1

    ranger

    User Avatar
    Gold Member

    Is it possible to have some sort of setup where plain text typing can be converted to latex? It can sometimes be annoying to try and analyze posts that have long equations and so on. Most new users to PF probably arent even aware of the latex setup that we currently have. Much less try and learn to use it. It would be pretty convenient to have an automatic conversion done.

    Yea I know. We've been asking for latex preview and we got it. I'm now trying to push my luck with this.
     
  2. jcsd
  3. Nov 3, 2007 #2

    Moonbear

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Is that something that's even possible? Have you seen it done anywhere else? I think it would be great if it's something that CAN be done, and for the same reasons you stated...especially for someone brand new to the forum, who has just arrived for help on his or her high school homework problem, the last thing they're going to do is spend time learning latex before posting their question.

    IF it's possible, I would have just two concerns that might both be addressed with a single solution, and stem from a common problem:
    If a student is making mistakes in typing the problem (i.e., not properly using parentheses to group things when typing an equation on a single line instead of being able to use all the symbols on the written page in front of them), then
    1) If the HW helpers see that they are not using latex, it's an obvious clue that the equation may be transcribed improperly, and they will know to prompt to find out how parts are grouped in the original problem, and
    2) If that problem gets automatically converted/formatted by latex, the student may be equally baffled as to why their equation suddenly appears so strangely.

    Now, in the second case, we might hope that would be a clue to the student that they've mistyped something, but, having spent enough time around here with the variety of students who come and go looking for help, I know that is not realistic with all but the most astute students.

    So, perhaps having something that allows the student to choose whether or not to use latex formatting as an option might help. It would probably be entirely useless to put in a button that reads, "Convert to LaTex" because those who need that won't have a clue what latex is. So, it would have to be something like, "Format Equations" which then brings them to a preview page before posting with an added prompt before submission, like, "Is the formatting correct?" with buttons saying, "Yes, submit" or "No, I need to edit."
     
  4. Nov 3, 2007 #3

    cristo

    User Avatar
    Staff Emeritus
    Science Advisor

    When Greg locked the LaTex typsetting thread, he provided this link to a website where you can copy and paste your code and get a conversion of the code into symbols, so this may be quite useful.
     
  5. Nov 3, 2007 #4

    Kurdt

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Yes PF has a PDF that explains some of the latex typesetting. If that could be expanded slightly and combined with a link to a place to try out latex code it may be better. I know a member here has a latex web site perhaps they could collaborate. The problem with this however remains in that a new user that is a student is unlikely to spend the time doing this when all they want is to post a quick question and receive a quick answer.
     
  6. Nov 3, 2007 #5

    -Job-

    User Avatar
    Science Advisor

    It's a good idea, i think the challenge would be in identifying which text would need to be auto-converted into LaTeX. The parser would need to identify where an expression begins and ends, and since there are a number of ways in which an expression can be written, which may include variable names not necessarily in a single character, it would probably interfere with plain text posts and possibly cause undesired results.

    So i agree with MoonBear that it should probably not be automatic, but instead have it happen on a button-click. Greg & Co, this could be done entirely with Javascript on the client side.

    For visibility i would place the "Format Equations" button near the "Submit" and "Preview" buttons. When the button is clicked it scans the input text for equations, replaces it with LaTeX and automatically submits for preview so that the user can see the end result. The "Format Equations" button would then transform itself into an "Undo" button for enabling the user to undo the changes.
     
    Last edited: Nov 3, 2007
  7. Nov 4, 2007 #6

    Moonbear

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    It might help if there's a way to use forum tags for that, the way someone can format bold or italics or quotes, and then have it up in the toolbar in the advanced reply box. Something like [eq] type your equation here [/eq] and pray the kiddos have learned the meaning of the acronym PEMDAS somewhere in their educational path. :uhh:
     
  8. Nov 4, 2007 #7

    Astronuc

    User Avatar

    Staff: Mentor

    I've never heard of PEMDAS before, but I've known since 6th grade that there is an order of math operations. IIRC, that was related to programming.

    When was the term PEMDAS introduced?
     
  9. Nov 4, 2007 #8

    ranger

    User Avatar
    Gold Member

    I was in the English system for some time during my Junior High days. They used BODMAS (Brackets, Orders, Division, Multiplication, Addition, Subtraction) to remember the order of operations.

    Judging from Job's reply, I'm getting the idea that this conversion thing sounds doable and can be easily integrated into the forum software.
     
  10. Nov 4, 2007 #9

    Moonbear

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I was taught it way back in my first computer class in school...useful for using a calculator properly too, and just writing notation correctly if you are typing it. It's just an acronym for the order of operations that makes it easy to remember. Parentheses Exponents Multiplication Division Addition Subtraction. If something was going to automatically parse text into latex code, you'd have to rely on people getting that right.
     
  11. Nov 4, 2007 #10

    Kurdt

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    The one that I learned was BODMAS. Brackets, others, division, multiplication, addition and subtraction.
     
  12. Nov 4, 2007 #11

    -Job-

    User Avatar
    Science Advisor

    Actually, we're not evaluating the expression, just extracting it, so it wouldn't have to follow PEMDAS for example, just as long as it can be determined where the expression begins and ends.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Automatic latex converison
  1. Automatic post titles (Replies: 9)

  2. Latex broken? (Replies: 2)

Loading...