Texstudio24 setup with Texlive2012 on Windows

PatrickT
2012-09-24
2012-10-17
  • PatrickT
    PatrickT
    2012-09-24

    I'm a new user of texstudio (about one year). I've adopted it because it's
    cross-platform and I switch between windows and linux all the time. I like it
    a lot. Until now I've had texstudio set up with miktex on windows and with
    texlive on linux. Now I'd like to have it set up to work with texlive on
    windows too. Here's what I did:

    I have texlive 2012 installed on windows. It works. I had texstudio23 set up
    with miktex and, call it lack of courage, I kept it. I installed texstudio24
    in a separate folder and would like to connect it with texlive. First,
    texstudio24 copied all my preferences from texstudio23 without asking for
    permission. As it happens it saves me a lot of tweaking. However, it
    automatically connected to miktex, whereas I would like to use texlive.

    In "Commands" I changed this:

    pdflatex -synctex=1 -interaction=nonstopmode %.tex

    to this:

    "C:\texlive\2012\bin\win32\pdflatex.exe" -synctex=1 -interaction=nonstopmode
    %.tex

    but that produces the following error:

    pdflatex: C:\texlive\2012\bin\win32\pdflatex.exeC:\Program Files (x86)\MiKTeX
    2.9\miktex\bin\pdflatex.exe

    What shall I do to get the path right?

    I noticed that in texstudio24 the syntax for the "Builds" is along the lines
    of:

    txs:///pdflatex

    so I'm guessing that txs:/// defines some sort of shortcut for the default
    path? can that be changed?

    I did google, couldn't find an answer.

    many thanks.

    Suggestion for future installer: interact with user about which latex to use,
    e.g. miktex v. texlive.

    An annoying windows7 feature: when I change file associations, whether I point
    to texstudio23 or texstudio24, it will always associate the extension to
    texstudio23. To use texstudio24 I need to launch it and open the documents
    from within. Double-clicking will always send me to texstudio23. So it would
    seem to be quite inconvenient to have two versions simultaneously installed.

     
  • Tim Hoffmann
    Tim Hoffmann
    2012-09-25

    txs:/// is just a prefix for TXS-internal commands. Some of them, like
    txs:///pdflatex, directly translate to external calls as definded in the
    options.

    pdflatex: C:\texlive\2012\bin\win32\pdflatex.exeC:\Program Files
    (x86)\MiKTeX 2.9\miktex\bin\pdflatex.exe
    looks like a bug to me. AFAIK we didn't really perfrom tests with multiple
    installed tex environments.

    In general, it's not intended to have multiple versions of TXS installed in
    parallel. They all share one settings file
    (%APPDATA%\TeXstudio\texstudio.ini). Consider using the USB-Version instead if
    you need multiple versions. It stores texstudio.ini with the program files.

    An annoying windows7 feature: when I change file associations, whether I
    point to texstudio23 or texstudio24, it will always associate the extension to
    texstudio23. To use texstudio24 I need to launch it and open the documents
    from within. Double-clicking will always send me to texstudio23. So it would
    seem to be quite inconvenient to have two versions simultaneously installed.
    Appars to be a windows issue. if you rename one executable, e.g. to
    texstudio24.exe, it works.

     
  • PatrickT
    PatrickT
    2012-09-25

    thanks t_hoffmann,

    Good tip about the usb version, that would seem to be the way to go.

    Good tip about renaming the executable.

    It's only during a transition period that I intend to keep newer and older
    versions alongside, in case something goes wrong.

    For the same reason I'd like to keep MikTeX working, because that's the system
    I have been using until now. I'll let it go when I'm confident that I know how
    to make TeXlive work just as well.

    Now to the main issue I'm having. You write:

    txs:/// is just a prefix for TXS-internal commands. Some of them, like
    txs:///pdflatex, directly translate to external calls as defined in the
    options.

    Can I have access to these options and change the "path" from MikTeX to
    TeXlive?

    If MikTeX weren't such a huge and tedious install, I'd remove it and have
    TeXstudio set itself up with TeXlive, and then reinstall MikTeX but as it is
    getting MikTeX to work is several hours of work. So if there's a workaround,
    I'd love to give it a try!

    many thanks,

    Patrick.

     
  • Tim Hoffmann
    Tim Hoffmann
    2012-09-25

    These options are just the settings in Configure -> Commands

    If you get

    pdflatex: C:\texlive\2012\bin\win32\pdflatex.exeC:\Program Files
    (x86)\MiKTeX 2.9\miktex\bin\pdflatex.exe
    there may be a bug in our code.

    Can you please post the output of Help -> Check Latex Installation?

     
  • PatrickT
    PatrickT
    2012-09-25

    Hi t_hoffmann,

    In the meantime I deleted both versions 23 and 24, deleted every instance of
    texstudio in the windows7 registry (regedit.exe) and in the windows
    Users/Patrick/AppData/Roaming/texstudio and
    Users/Patrick/AppData/Local/texstudio accounts and then installed texstudio24
    afresh. I then copy-pasted my ini file in the roaming/texstudio folder.

    Well, guess what: this time it picked texlive rather than miktex!

    I had a plan to temporarily rename the miktex folders to something else while
    installing texstudio, but it never came to that in the end (may have to try on
    my other computers though).

    Now why texstudio picked texlive this time and miktex the time before that is
    a riddle.

    I'm not sure if I'll ever need miktex again but, just in case, I'm still
    interested in having texstudio work with both miktex and texlive, if there's a
    way.

    My newest install is based on the same .exe file as before. I don't think the
    output of Check Latex Installation is of any use now that texstudio has found
    texlive, but just in case I copy-paste below.

    Remark: Now for something weird, what I see in the window and what gets pasted
    is different: I don't see the first two lines below (they clearly reference
    texlive), also I deleted a huge list of extra stuff at the bottom that also
    does not get printed in the window, a list of just about everything installed
    on my pc!

    where pdflatex: C:\texlive\2012\bin\win32\pdflatex.exe
    C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\pdflatex.exe

    PDFLATEX: pdflatex -v
    pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012/W32TeX)
    kpathsea version 6.1.0
    Copyright 2012 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
    There is NO warranty. Redistribution of this software is
    covered by the terms of both the pdfTeX copyright and
    the Lesser GNU General Public License.
    For more information about these matters, see the file
    named COPYING and the pdfTeX source.
    Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
    Compiled with libpng 1.5.11; using libpng 1.5.11
    Compiled with zlib 1.2.7; using zlib 1.2.7
    Compiled with xpdf version 3.03

     
  • PatrickT
    PatrickT
    2012-09-25

    I can't seem to be able to edit my previous message, so here are some
    clarifications:

    I couldn't see what I was copy-pasting because I was selecting from the "log"
    window, but the text being copy-pasted (for some reason) was the text in the
    main window.

    The top two lines that don't appear in the "log" window but do appear at the
    very top of the main window show that, even after a clean install and all
    that, there is a reference to both pdf with texlive and with miktex, so miktex
    has not completely disappeared from texstudio.

    Note that in my "Commands" I reverted to the default:

    pdflatex -synctex=1 -interaction=nonstopmode %.tex

    I know that texstudio is using texlive/pdflatex for 2 reasons: because I see
    the paths to texlive in the log files and because I know my document generates
    errors with miktex but not with texlive. (the documents were written by my co-
    author, a Mac user, using texlive, and they produce errors with miktex but not
    with texlive, for some unknown reason, so to maximize compatibility between
    his system and mine I wish to use texlive, at least while we get this project
    written up, but I've never been unhappy about miktex for my own writing).

     
  • PatrickT
    PatrickT
    2012-09-25

    I followed the same steps on my other laptop, but there texstudio picked up
    miktex rather than texstudio...

     
  • Here is how it searches pdflatex:

    1. Search pdflatex in all directories mentioned in %PATH% and take the
      first pdflatex it finds

    2. Search MikTeX und use its pdflatex

    3. Search TeXlive und use its pdflatex

    As soon as it finds a pdflatex in a step, it uses that and skips the
    later steps

    On 09/25/2012 08:45 PM, SourceForge.net wrote:

     
  • Tim Hoffmann
    Tim Hoffmann
    2012-09-25

    also I deleted a huge list of extra stuff at the bottom
    Part of the information given there probably explains why texlive of miktex is
    used. To be precise it's the order of miktex and texlive directories in the
    PATH. But you can verify it yourself as Benito has posted the search sequence.

    In itself, the dependend choice of mikex or texlive is correct. It's basically
    the same you get when running pdflatex from the command line (plus 2. and 3.
    as fallback).

    If you want to have a specific version, you can modify the PATH environment
    variable or alternatively specify the full path to pdflatex.exe in Configure
    -> Commands -> pdflatex. If I understand correctly you did the latter before
    resetting the configuration.

    Up to here, everything is fine. The only strange thing is, you got this double
    command

    C:\texlive\2012\bin\win32\pdflatex.exeC:\Program Files (x86)\MiKTeX
    2.9\miktex\bin\pdflatex.exe

    However I cannot reproduce this. Does it still happen if you set an explicit
    path now that you started from a clean config?

     
  • PatrickT
    PatrickT
    2012-09-26

    Thanks to both of you,

    from a clean config, on the laptop that has texstudio cum miktex, the answer
    is ... it works as expected!

    I have this as the pdflatex command:

    "C:\texlive\2012\bin\win32\pdflatex.exe" -synctex=1 -interaction=nonstopmode
    %.tex

    and it does pick up texlive even though the default is miktex!

    Thanks a lot for your help. I really cannot say what may have been interfering
    earlier. I guess it's just not a good idea to have two versions of texstudio
    installed at the same time ;-)

    How can I modify the PATH environment variable? I looked in the manual but
    didn't see it. Thanks!

    http://texstudio.svn.sourceforge.net/viewvc/texstudio/trunk/utilities/userman
    ual_en.html

     
  • I have also texlive and miktex. What I did it is to add the path for all
    commands and save it as a profile, texlive profile and miktex profile.

     
  • PatrickT
    PatrickT
    2012-09-26

    thanks t_hoffmann, so that's where the PATH is located on windows 7. I had
    this:

    C:\texlive\2012\bin\win32;C:\Program Files (x86)\ImageMagick-6.7.7-Q8;C:\watco
    m-1.3\binnt;C:\watcom-1.3\binw;C:\windows\system32;C:\windows;C:\windows\Syste
    m32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program
    Files\Intel\WiFi\bin\;C:\Program Files\Common
    Files\Intel\WirelessCommon\;C:\Program Files
    (x86)\Intel\Services\IPT\;C:\Program Files (x86)\Calibre2\;C:\Program
    Files\MiKTeX 2.9\miktex\bin\x64\;C:\Perl\strawberry\c\bin;C:\Perl\strawberry\p
    erl\site\bin;C:\Perl\strawberry\perl\bin

    well, at this time the PATH has texlive listed before miktex, but we will
    never know if it was the reverse when texstudio decided to pick miktex...

    I'll also follow up on the suggestion to make profiles associated with texlive
    and miktex.

    thanks to all for your help, since I'm able to run both systems now I'll
    consider this issue solved.