multiple quick builds

  • PatrickT

    Here's my question: can I assign a shortcut to several "quickbuild" ?

    Quickbuild "PdfLaTex+PdfViewer" --> F1
    Quickbuild "LaTeX+DviPs+Ps2Pdf+PdfViewer"-->F2

    I use the former to compile my documents, the latter to compile figures I
    generate with pstricks. And I often switch from one of the other.

    Thanks for your suggestions,


  • Tim Hoffmann
    Tim Hoffmann

    Multiple "Quick Build" settings are currently not possible.

    As a workaround you might define a "User Command" for one of your builds (with
    the slight disadvantage that this does not support advanced quick build
    features like "latex-bibtex-latex if bib-files were changed").

  • PatrickT

    thanks t_hoffmann,

    I can see a "user" command under "Configure" --> "Quick Build", is that what
    you mean?

    my current workaround is to run multiple LaTeX editors. Perhaps it might work
    with two different versions of TeXStudio, though at this time I'm using
    another editor to do this.

  • Tim Hoffmann
    Tim Hoffmann

    No that's not what I meant. It's not in the config dialog. Directly go to the
    menu User -> User Commands. There you can setup calls to arbitrary external

    N.b.: Two versions of TeXstudio would also work, if you use the USB version.
    However, if it's just for an alternative build setting I'd recommend the User
    Commands mentioned above.

  • PatrickT

    Oh I see thanks. I haven't set up user commands before. I didn't realize they

    I have tested on this, which is what is already set up in texstudio by
    default, and it's worked very well:
    pdflatex -interaction=nonstopmode %.tex|bibtex %.aux|pdflatex
    -interaction=nonstopmode %.tex|pdflatex -interaction=nonstopmode
    %.tex|pdflatex -interaction=nonstopmode %.tex|tmx://internal-pdf-viewer

    Would you have examples of similar code for something like: LaTeX+DviPs+Ps2Pdf
    +PdfViewer-external ?

    many thanks!

  • Tim Hoffmann
    Tim Hoffmann

    That depends on your OS. You can generate it when clicking the more-button
    ("...") in the Edit User Commands dialog. For me (Win+AdobeReader) it would
    look like:
    latex -src -interaction=nonstopmode %.tex | dvips -o %.dvi | ps2pdf
    | "C:\Program Files (x86)\Adobe/Reader 10.0/Reader/AcroRd32.exe" "?am.pdf"

    n.b.: The command/tool system is currently under redesign. This will add
    additional functionalities and make it more easy to configure. If you are
    interested or have suggestions, have a look at the mailing list:

  • PatrickT

    magic stuff t_hoffmann, thanks a lot for your help, once again.

    I got it to work this way:

    latex -src -interaction=nonstopmode %.tex | dvips -o %.dvi | ps2pdf
    | "C:\Program Files\PDFXchange\PDF Viewer\PDFXCview.exe" "?am.pdf"

    Double slashes work too, apparently.

    Is there a command I can add to close the viewer if it happens to be already

    Currently, behaviour is the following:

    1. In the defaut build, under PdfViewer, I set:
      "C:/Program Files/PDFXchange/PDF Viewer/PDFXCview.exe" %.pdf
      Result: I need to close the PDF document, otherwise TeXStudio complains.

    2. In the user-defined build, as described above, I set:
      latex -src -interaction=nonstopmode %.tex | dvips -o %.dvi | ps2pdf
      | "C:\Program Files\PDFXchange\PDF Viewer\PDFXCview.exe" "?am.pdf"
      Result: multiple instances of the pdf viewer are opened as many times as I
      compile. This is a bit better than the behaviour in the default build, but the
      best (for me) would be to close opened sessions and open a new one.


    P.S. I stopped using the internal viewer because of some strange behaviour.
    Not sure if it's reproducible, it's very odd.
    On one of my laptops (version 2.3 I think, but maybe 2.2, can't check right
    now, windows), this happens:
    After the internal pdf viewer opens, I can't scroll the document with the
    arrow or page down keys. To do that, I need to either "activate" the pdf
    viewer first, by clicking on it with the mouse pointer or by ALT+TAB back and
    forth once.
    On another laptop (version 2.3, windows), this happens;
    After the internal pdf viewer opens, if I press page-up or page-down to scroll
    the document, instead it switches to TeXStudio and opens a recent document.
    Each time I press page-up or page-down it opens a new .tex document. I have
    checked that the shortcuts for page-up and page-down are assigned to the
    default scrolling.
    To sum up, I have distinct problems with the internal viewer on two setups. I
    haven't checked what happens on my linux setup, as I'm now using an external

  • Tim Hoffmann
    Tim Hoffmann

    Controlling external PDF viewers: You can use DDE commands, if the viewer
    supports them. See TeXstudio manual section 4.9.

    Strange behaviour of internal viewer: In a quick test with the current SVN
    version, could not reproduces this (only tested windows).
    You may try:
    i) to reset your configuration: delete (or better temporarily rename) the
    configuration file: %APPDATA%\texstudio\texstudio.ini
    ii) the last SVN snapshot