Skip to content
Raphael edited this page Mar 9, 2024 · 12 revisions

Installation

Aside from a working LaTeX installation (TeX Live recommended), all you need is a working Ruby installation (version 3.1 or higher).

Then, you need to do the following:

Tips for GNU/Linux

  • These are all the necessary steps:

    git clone https://github.com/reitzig/ltx2any.git /your/path/to/ltx2any
    cd /your/path/to/ltx2any
    gem install bundler
    bundle install
    cd ~/bin # or another directory on your PATH
    ln -s /your/path/to/ltx2any/ltx2any.rb ltx2any
    
  • A convenient way to install Pandoc is with cabal update; cabal install pandoc. You can keep it up to date using the same command.

Tips for Windows

  • Install Ruby 2.3.0 (x64) or later by using the RubyInstaller.

  • Install gnuplot; gp503-win32-mingw.exe works.

    During installation, at "Select Additional Tasks", put a checkmark at "Add application directory to your PATH environment variable" (scroll down at the window).

  • pandoc works if its available in your PATH environment.

  • Having ruby and gnuplot installed, you can run ltx2any by invoking ruby <path-to-clone-of-ltx2any>\ltx2any.rb <file>.

Provided by koppor

Integration with editors, viewers and IDEs

There is plenty of tool support for LaTeX and friends; see here for an extensive list. You'll find some tips on how to configure some tools to work well with ltx2any or its products below; if you have anything to add, please open a ticket!

Evince under Apparmor

Evince (and possibly other PDF viewers) may not have permission to open external programs on some platforms like e.g. Ubuntu that use Apparmor; that includes opening TeX files linked in PDF logs created by ltx2any. Find instructions for allowing Evince to start text editors (or any program) here.

TeXstudio

  1. Open Preferences -> Build.

  2. add a User Command named ltx2any:ltx2any with content /your/path/to/ltx2any/ltx2any -lf raw -synctex %.

    Note: Option -lf raw (raw logfile) enables error/warning display of TeXStudio. If you want to use any of the processed ltx2any logs, change this accordingly.

  3. Change Build & View to txs:///ltx2any | txs:///view-pdf.

Provided by samcarter8

SumatraPDF

Sumatra PDF is a PDF reader for Windows which allows seamless reloading of generated PDFs without the need to reopen them.

To enable opening TeX files via links in .log.pdf files, do the following:

  1. Download sumatrapdfrestrict.ini.
  2. Open the file in a text editor.
  3. Replace the last line with SafeFileTypes = *.
  4. Move the file into C:\Program Files (x86)\SumatraPDF.

Provided by koppor