problem using texmaker (latex path trouble?)

Discussion in 'Mac Applications and Mac App Store' started by adammcd, Nov 15, 2007.

  1. macrumors member

    Joined:
    Nov 15, 2007
    #1
    I have a new mac, using os x leopard. I first installed texmaker, this seemed to go well. I next downloaded i-installer, and then followed the instructions from the guide (http://guides.macrumors.com/Installing_Latex_on_a_Mac) under the "second (more difficult) option" paragraph, which had me install & configure the package 'gwTeX based on TeX Live' and then install & configure 'Ghostscript 8'. All downloads & installations went smoothly.

    At first, texmaker would not work at all. So, I changed the latex path (under preferences) from its default to my directory's 'pdftex' file (it would not let me choose the 'latex' file, since it is an alias pointing to the 'pdftex' file. So I chose the alias's target instead). Now when I hit the quickbuild button, something does happen. I get some errors (printed below) and it created a PDF file with the exact text that is in the .tex file (for example, the first line, "\documentclass[10pt,letterpaper]{article}" appears in my PDF)

    Here are examples of the types of errors I get:
    ---------------------------------
    line 1 -> ! Undefined control sequence. \documentclass
    line 2 -> ! Undefined control sequence. \usepackage
    ...

    ! Undefined control sequence.
    l.1 \documentclass
    [10pt,letterpaper]{article}
    The control sequence at the end of the top line
    of your error message was never \def'ed
    ...
    ----------------------------------

    I'm not sure what the problem is. Should I not be using pdftex? If not, what do I use ('latex' is an alias that points to 'pdftex'!) Any suggestions would be appreciated.
     
  2. macrumors G4

    Joined:
    Jul 17, 2002
    Location:
    USA
    #2
    I am curious why you went with the second (more difficult) option rather than the first (easier) option for installing TeX. The real problem is not that Gerben's i-Installer is harder; it is that it is no longer supported. My recommendation to you is to download and install MacTeX, the first (easier) option. Then you won't have the issue of gwTeX and how and where to install it.
     
  3. macrumors 6502

    Am3822

    Joined:
    Aug 16, 2006
    Location:
    Groningen, The Netherlands
    #3
    The problem is that you're trying to use 'pdftex' with a LaTeX file. You should be using pdflatex, and not pdftex. (pdf)LaTex adds a layer of macros (I think) on top of the more basic (pdf)TeX, so LaTeX commands, such as \documentclass, would not compile using TeX.

    While you're at it, if you're planning to use pdfLaTeX, I think that you should add the parameter "pdftex" to \documentclass -- something like that:

    \documentclass[pdftex,letterpaper,12pt]{article}

    Also, as the previous poster had said -- it's easier to download TUG's MacTeX.dmg (the whole 741 megs of it..) and install from there.
     
  4. thread starter macrumors member

    Joined:
    Nov 15, 2007
    #4
    Wow -- very helpful replies. I went with the "harder" option because it really didn't look very hard at all & also because the "easy" install is a huge download with lots of extra stuff I do not need. However, I will go ahead with the easy install this time... thanks!
     
  5. thread starter macrumors member

    Joined:
    Nov 15, 2007
    #5
    Here is the author of the original post saying, "everythings works fine now."

    A note to future readers of this thread (or perhaps to the author of texmaker if he/she happens to read this):

    In addition to downloading and installing the correct (up to date, supported) TeX package, one of my problems in getting texmaker to work properly was that, by default, none of the paths were set correctly under 'preferences'. In addition to this, it was not possible to navigate through folders (via clicking the folder icon) and select the 'latex' file because the file itself is an alias, and the program does not allow an alias to be selected. Instead one must type the path in correctly for each of the commands listed (there are a dozen of them). Only then will it correctly compile (is compile the right word to use for LaTeX?)
     
  6. macrumors G4

    Joined:
    Jul 17, 2002
    Location:
    USA
    #6
    I cannot account for your experience, but it is not the general experience of texmaker users. On my system, texmaker worked out-of-the-box.
     
  7. macrumors newbie

    Joined:
    Dec 3, 2007
    #7
    texmaker problem

    I am using TexMaker on a Mac under Leopard. My TeX installation is done via MacTeX. I am having a problem that I cannot find a solution to:

    - When I run ps2pdf, it quits with the message
    Process started
    /usr/local/bin/ps2pdf: line 5: exec: ps2pdfwr: not found
    Process exited with errors


    I have fixed the paths in the preferences as follows (and confirmed that
    these are the right paths):

    Latex, dvips, bibtex, makeindex, pdflatex, dvipdfm, and Metapost are
    all in /usr/texbin/
    ps2pdf and gs are in /usr/local/bin

    In /usr/local/bin, there is the ps2pdfwr file as well. Therefore, I don't
    really understand the "not found" error. I hope someone can shed some light on this.
     
  8. macrumors 6502a

    yeroen

    Joined:
    Mar 8, 2007
    Location:
    Cambridge, MA
    #8

    You can try doing a systrace (or ktrace or whatever the mac os x equivalent is ..i've used it before but I forget what it's called) on the process and grepping the output for exec calls on ps2pdfwr. I hope it's not the case, but the path to ps2pdfwr may be hardcoded in the exec call (I've seen this happen before).

    I remember having to jump through alot of hoops like this when I installed TeX on my mac (I wish I had written them down).
     
  9. macrumors newbie

    Joined:
    Dec 3, 2007
    #9
    Hi, I have installed mactex 2007, and now I would like to try texmaker.

    I installed it, but now I need to configure all the paths, considering I'm a newbie, is there anyone so nice to write down the correct entry I should put in the configuration panel?

    Something like

    Makeindex "/usr/texbin/makeindex" %.idx


    I know to be a bit lazy, but I don't have the time right now, I need to start to write some stuff and I'm going to understand a bit better what's behind in the near future.


    Thank's for any help
     
  10. macrumors newbie

    Joined:
    Dec 3, 2007
    #10
    Thanks much. I can't find systrace or ktrace, but I'll keep looking. The interesting thing is that if I do a ps2pdf from the terminal window, it runs to completion without problem. However, running ps2pdf from within TexMaker causes problems. Annoying...

    The call inside ps2pdf is as follows, in case this helps:

    exec ps2pdfwr -dCompatibilityLevel=1.3 "$@"
     
  11. macrumors newbie

    Joined:
    Dec 3, 2007
    #11
    Open your terminal and type

    which makeindex

    and use the path that it reports back.
     
  12. macrumors newbie

    Joined:
    Dec 3, 2007
    #12
    Thanks for the quick answer.

    Searching around I have found almost every commands and put the right path

    I didn't find a command for latex and Pdflatex, and i'm not sure about ghostscript


    I write down all I have done

    LaTeX -> "Latex" -interaction=nonstopmode %.tex
    dvips -> "/usr/local/texlive/2007/bin/powerpc-darwin/dvips" -o %.ps %.dvi
    Bibtex -> "/usr/local/texlive/2007/bin/powerpc-darwin/bibtex" %.aux
    Makeindex -> "/usr/local/texlive/2007/bin/powerpc-darwin/makeindex" %.idx
    Dvi Viewer -> open %.dvi
    PS Viewer -> open %.ps
    PdfLaTeX -> "pdflatex" -interaction=nonstopmode %.tex
    Dvipdfm -> "dvipdfm" %.dvi
    ps2pdf -> "/usr/local/bin/ps2pdf" %.ps
    Pdf Viewer -> open %.pdf
    metapost -> "/usr/local/texlive/2007/bin/powerpc-darwin/mpost" --interaction nonstopmode
    ghostscript -> "/usr/local/bin/gs-noX11"

    If I click on quick build I get: Log File not found !

    If I start latex from terminal something append, but I'm not able to find were the "latex" command is.

    Please could you have a check at my config. and give me any help to get it right?
     
  13. macrumors newbie

    Joined:
    Dec 3, 2007
    #13
    If nothing is returned when you do "which latex" from the terminal, then you probably do not have a latex system installed. "which latex" and "which pdflatex" should return a path if they are installed.
     
  14. macrumors newbie

    Joined:
    Dec 3, 2007
    #14
    After a while :D

    I try different things, starting from the beginning I installed MacTeX and texmaker.
    I use TexShop without any problem.

    When I try to use TexMaker with the most simple document

    I obtain this


    The PDF file is created and if I open it there is all I write in the tex file

    I have configured the preferences of texmakare as follow:


    I tried all the combinations for the "Quick build command"

    I don't have installed aspell.



    The Latex and pdflatex commands are just alias that point to pdftex

    I try to write

    but nothing changes

    I installed all this in two different macs (a Powermac G5 and an ibook G4 both with Leopard) having the same problem.

    If I start the commands "latex" and "pdflatex" from the terminal it seems to be all fine


    Please every things is welcome.
     
  15. macrumors newbie

    Joined:
    Mar 12, 2008
    #15
    Same problem with Texmaker configuration

    I have the same problem as "mperuffo"

    I installed MacTeX 2007 and everything works with TeXShop, however since I do a lot of mathematical proofs and I prefer to have a more "advance-looking" (use colors for different sections of the document) editor I installed Texmaker, but it does not seem to be well-configured.

    I think it cannot find the TeX commands. The Texmaker website says to type in the correct paths in the "Preferences" -- but a newbie like me does not have any idea what these could be.

    I would really appreciate if anyone could help.
     
  16. macrumors G4

    Joined:
    Jul 17, 2002
    Location:
    USA
    #16
    Why do you think that MacTeX was improperly configured and that texmaker cannot find the TeX commands? For me--and I presume--most users, it just works. texmaker also just works. Did you do a custom installation or something?
     
  17. macrumors newbie

    Joined:
    Mar 12, 2008
    #17
    Hi MisterMe, many thanks for your prompt reply!

    I don't think that MacTeX was improperly configured.

    I do think that texmaker was not configured correctly because I cannot "texify" my saved files that work with TeXShop.

    So, I guess my question would be what are the correct configurations (under "Preferences") for texmaker knowing that I have correctly configured MacTeX 2007?

    Many, many thanks once again for your time and kindness.
     
  18. macrumors member

    Joined:
    Dec 19, 2003
    Location:
    Athens, Georgia
    #18
    Found something that worked for me!

    After about a week of searching, I found something that works for me.

    From the macuser.de forum
    http://www.macuser.de/forum/showthread.php?t=255416


    LaTeX: "/usr/local/texlive/2007/bin/i386-darwin/latex" -interaction=nonstopmode %.tex
    dvips: "/usr/local/texlive/2007/bin/i386-darwin/dvips" -o %.ps %.dvi
    Bibtex: "/usr/local/texlive/2007/bin/i386-darwin/bibtex" %.aux
    Makeindex: "/usr/local/texlive/2007/bin/i386-darwin/makeindex" %.idx
    DVI Betrachter: open %.dvi
    PS Betrachter: open %.ps
    PdfLateX: "/usr/local/texlive/2007/bin/i386-darwin/pdflatex" -interaction=nonstopmode %.tex
    Dvipdfm: "/usr/local/texlive/2007/bin/i386-darwin/dvipdfm" %.dvi
    ps2pdf: "/usr/local/texlive/2007/bin/i386-darwin/ps2pdf" %.ps
    PDF Betrachter: open %.pdf
    metapost: "/usr/local/texlive/2007/bin/i386-darwin/mpost" --interaction nonstopmode
    ghostscript: /usr/local/bin/gs


    I hope this helps!
     
  19. macrumors newbie

    Joined:
    Mar 12, 2008
    #19
    ^^^^^^^^^^
    Yep, this works!

    Perfect, thanks a million Indiana Mac and wish you the best for the future.
     

Share This Page