rubber does not support synctex

Bug #414431 reported by Daniel on 2009-08-16
74
This bug affects 16 people
Affects Status Importance Assigned to Milestone
Rubber
Wishlist
Unassigned
rubber (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: rubber

Since texlive 2008 there is support for synctex in texlive.
Thus there is no need to compile tex-files to .dvi first and later to convert them to .pdf,
to have feature like forward and backwards search.

It would be nice if this will work using rubber, too.

Changed in rubber:
status: New → Confirmed
importance: Undecided → Wishlist
Tobias Wolf (towolf) wrote :

Now that Evince supports SyncTex and Gedit gained a SyncTeX plugin (to be in Ubuntu Maverick) this should be put in.
It’s only a parameter to pdflatex, lualatex and xelatex. Namely » -synctex=1 «

As a workaround, it would be cool if this worked as a modeline:

% rubber: set program xelatex -synctex=1

It doesn’t now.

Smeuuh (smeuuh) wrote :

 Yes, this bug is annoying. A nice thing to have would be to be able to specify extra command-line options for the tools involved. As a workaround, I have

#!/bin/sh
/usr/bin/pdflatex -synctex=1 $@

in ~/bin/pdflatex

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in rubber (Ubuntu):
status: New → Confirmed
joenix (woutersj) wrote :

As a workaround I have edited the file "/usr/share/rubber/rubber/rules/latex/pdftex.py" and have added the following line before the if statement:

doc.cmdline.insert(0, "\\synctex=1")

Xavier (xpucel) wrote :

Thanks joenix, with your fix, both forward and backward Ctrl+clic work for me. I did not alter anything else.

Ubuntu 12.04, gedit 3.4.1, evince 3.4.0, gedit-plugins 3.3.4, tex compilation via this external tool :
#!/bin/sh
rubber -d "$GEDIT_CURRENT_DOCUMENT_PATH"
PDF_NAME=$(echo $GEDIT_CURRENT_DOCUMENT_PATH | sed s/tex$/pdf/)
gnome-open "$PDF_NAME" > /dev/null 2>&1

Hannes Ovrén (kigurai) wrote :

Is there any development going on in rubber?
I am considering using it in a small project I have, and I really need synctex for that.

I looked at the code and I am not quite sure what the best way to do it is.
If I get some pointers I could probably write the patch.

Should it be a top level argument (rubber --synctex paper.tex)?
Or some kind of special directive?

I am personally only interested in making it work for pdflatex, but if adding support for multiple engines is easy I could probably fix that as well.

So, any input from the devs?

Sebastian Kapfer (caci) wrote :

Is it possible to automatically detect whether a .tex file uses synctex? I'm not an active user of synctex, but I seem to recall that synctex documents include a \usepackage{synctex}.

In that case, automatic detection might be preferrable over a command-line flag to Rubber.

Yannick Voglaire (yannickv) wrote :

Using synctex can either be decided at compile time using the flag "-synctex=1" when calling pdflatex, or in the .tex file itself with the line "\synctex=1" in the preamble. Either option suffices to generate synctex data, it is not needed to have both.

So in general it is impossible to detect from the .tex file only whether the user wants to use synctex or not, and when the information is present in the .tex file (i.e. the line "\synctex=1" is present), it is actually useless for rubber since synctex data is then automatically generated by pdflatex anyway.

Hence it seems that it would be best to have a "-synctex=1" flag for rubber that would just get transferred directly to pdflatex.

NB: to be more precise about the syntax, "pdflatex --help" yields:
    [...]
    -synctex=NUMBER generate SyncTeX data for previewers if nonzero
    [...]

Sebastian Kapfer (caci) wrote :

SyncTeX support has just landed in rubber/trunk. This will be in Rubber 1.3.

Please test and report any problems!

It can be triggered by the directive % rubber: synctex, or via the --synctex command-line option.

Changed in rubber:
milestone: none → 1.3
status: Confirmed → Fix Committed
Tobias Wolf (towolf) wrote :

Thanks, will test soon

Sebastian Kapfer (caci) on 2015-10-19
Changed in rubber:
milestone: 1.3 → none
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rubber - 1.3-1

---------------
rubber (1.3-1) unstable; urgency=medium

  New upstream release
  * all Debian specific modules / patches are now obsolete.
    --> removed

  List only features/bugs, which close Debian/LP bugs. For full
  list see changelog of upstream.

  Features:
  * Support for SyncTeX: (LP: #414431)
  * Support for ltxtable, glossaries and biblatex now in upstream
    (LP: #860661)
  * Support for bibtopic (Closes: #460670)
  * Support for use of bibtex8 (Closes: #471185)

  Fixes:
  * Fix handling of absolute pathnames by not having absolute
    pathnames for the most part. (Closes: #798829) (Closes: #798991)
  * Fix bibtex.path directive. (Closes: #694265) (LP: #686187)
  * Fix ntheorem support. (Closes: #328107)
  * Fix TeX parser to handle spaces and comments between the macro
    and its arguments. More radical than #725355. (LP: #1049883)
  * Fix \includegraphics* (LP: #1478034)
  * Fix elatex being called when etex.sty is used (LP: #856449)

  A few suggestions from Nicolas Boulenguez <email address hidden>
  (Closes: #797517)
  * switch compat to 9 (no changes).
  * add some packages to Suggests, document why they are needed.
  * copyright is machine-readable now.
  * package is again lintian-clean without override.
  * completely overhauled debian/rules, use dh now. Thanks!

  Upstream thinks that a specific command line parser is not necessary
  and no reaction from submitter for about 5 months. (Closes: #336323).

  Add debian/watch file

 -- Hilmar Preuße <email address hidden> Wed, 21 Oct 2015 21:16:42 +0200

Changed in rubber (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers