[texworks] Synctex with texi2dvi?
Duncan Murdoch
murdoch.duncan at gmail.com
Tue Aug 10 21:11:15 CEST 2010
On 10/08/2010 2:48 PM, Bruno Voisin wrote:
> On 10 août 2010, at 03:38, Duncan Murdoch wrote:
>
> > I've just installed Ubuntu to try to get Sweave and TexWorks going
> > there. I've got TexLive installed. I had been using texi2dvi in
> > MikTex in Windows, but now the texi2dvi option
> > --tex-options=-synctex=1 doesn't work. Is there some way to tell
> > texi2dvi to pass the synctex option to pdflatex?
>
> This must be a MikTeX-specific extension. Here on the Mac texi2dvi and texi2pdf are part of the OS (they're installed in /usr/bin) and they don't include any option for passing on arguments to (pdf)TeX:
>
> $ texi2dvi --help
> [...]
>
> Operation modes:
> -b, --batch no interaction
> -c, --clean remove all auxiliary files
> -D, --debug turn on shell debugging (set -x)
> -h, --help display this help and exit successfully
> -o, --output=OFILE leave output in OFILE (implies --clean);
> Only one input FILE may be specified in this case
> -q, --quiet no output unless errors (implies --batch)
> -s, --silent same as --quiet
> -v, --version display version information and exit successfully
> -V, --verbose report on what is done
>
> TeX tuning:
> -@ use @input instead of \input; for preloaded Texinfo
> -e, -E, --expand force macro expansion using makeinfo
> -I DIR search DIR for Texinfo files
> -l, --language=LANG specify the LANG of FILE (LaTeX or Texinfo)
> -p, --pdf use pdftex or pdflatex for processing
> -r, --recode call recode before TeX to translate input characters
> -t, --command=CMD insert CMD in copy of input file
> or --texinfo=CMD multiple values accumulate
>
> The values of the BIBTEX, LATEX (or PDFLATEX), MAKEINDEX, MAKEINFO,
> TEX (or PDFTEX), TEXINDEX, and THUMBPDF environment variables are used
> to run those commands, if they are set. Any CMD strings are added
> after @setfilename for Texinfo input, in the first line for LaTeX input.
> [...]
>
> I think they are exactly the same scripts installed on GNU/Linux.
>
> What you could perhaps do is write a script setting first TEX to "tex --synctex=1" and PDFTEX to "pdftex --synctex=1" then calling texi2dvi. Something like
>
> #!/bin/tcsh
> set TEX= ("$TEX --synctex=1")
> set PDFTEX= ("$PDFTEX --synctex=1")
> texi2dvi "$1"
>
> The syntax is certainly wrong as I know nothing about shell scripts, and it is probably safer to add tests on whether TEX and PDFTEX are set in the first place.
>
>
Yes, thanks.
Duncan Murdoch
More information about the texworks
mailing list