-
Notifications
You must be signed in to change notification settings - Fork 4
Home
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:
- Clone this repository.
- Install the dependencies.
- Put
ltx2any.rb
on the PATH.
-
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.
-
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>
.
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 (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.
-
Open
Preferences -> Build
. -
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. -
Change
Build & View
totxs:///ltx2any | txs:///view-pdf
.
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:
- Download sumatrapdfrestrict.ini.
- Open the file in a text editor.
- Replace the last line with
SafeFileTypes = *
. - Move the file into
C:\Program Files (x86)\SumatraPDF
.