texstudio-org / texstudio-org/texstudio

[Feature Request] SyncTex when using --output_directory

Open
#672 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
3.6k
Forks
403
Avg merge
3h 14m
Merged PRs (30d)
12

Description

I like to keep all the mess that are the auxiliary files in a directory called __tex__. However, I noted that synctex only works when the %.synctex.gz, %.pdf and %.tex file are all in the same directory. I was able to get it working via setting

Build & View:

txs:///compile | txs:///copy_sync | txs:///move_pdf | txs:///view | txs:///rm_sync

where

  • copy_sync is cp -f __tex__/%.synctex.gz %.synctex.gz
  • move_pdf is cp -f __tex__/%.pdf %.pdf
  • rm_sync is rm %.synctex.gz

apart from that I use precompile: mkdir -p __tex__ to create the __tex__ directory and compile with
pdflatex -synctex=1 -interaction=nonstopmode --output-directory=__tex__ %.tex

Now while this works it seems like quite a hassle considering that synctex allows to specify the directory of the sync file explicitly. Maybe one could simply expose synctex in the commands list as well?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Build & View chain around txs:///compile, txs:///copy_sync, txs:///move_pdf, txs:///view, and txs:///rm_sync, along with pdflatex's --output-directory=__tex__ option. Done means SyncTeX works with auxiliary files in __tex__ without the copy, move, and removal workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, latex
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.