2

I have followed the instructions of @Paulo Cereda to configure texlipse (LaTeX in eclipse) to use my batch file when running. But in the process, I have lost forward and inverse search even if the configuration does use my script successfully. QUESTION 1: How do I re-enable searching and still keep my configuration? (I am using the inbuilt viewer pdf4eclipse)

The instructions I followed are here (texlipse builder script configuration.). I also tried adding -syntex=1 under Arguments (see picture)

I am using eclipse in windows 7 with MiKTeX 2.9. here is my configuration enter image description here

Its been suggested that using arara can work. But I have many files that are \included {} and at some point I loop through them to make a chapter by chapter bibliography as you can see from my script (thesis.bat) the contents of which are also pasted. So I am not sure I know how to implement this.

QUESTION 2: In arara, how would I handle the loop for %%X in (*.aux) do bibtex "%%X" and this line (x2 is nls, x3=nlo) makeindex.exe %x2% -s nomencl.ist -o %x3%. See code below

I have tried arara by pasting the following at the top of my main file

% arara: pdflatex: {synctex: yes, action: nonstopmode}
% arara: pdflatex 
% arara: bibtex
% arara: pdflatex
% arara: pdflatex
% arara: makeindex
% arara: nomencl
% arara: pdflatex

and adding % arara: bibtex to the top of each \include{file} but i get enter image description here

QUESTION 4: What is wrong then? Also, will arara keep my forward and inverse search if i successfuly fix this?

Contents of my arara batch script: thesis.bat

@echo off

arara F00_thesis

Contents of my batch script: thesis.bat

:: Run
:: [path_to_bat_file] inp.tex inp.nlo inp.nls

@echo off
rem fake-command /u %1 rem /p %2 rem allows script to take inputs if rem is removed at start
cd c:\DATA\Thesis\ThesisReport

set tx=F00_thesis
set x1=%tx%.tex
set x2=%tx%.nlo
set x3=%tx%.nls
set pd=%tx%.pdf


:: Change Drive and  to File Directory
%~d1
cd %1

:: Run Cleanup
:: call:cleanup

taskkill /im "acrobat.exe" /f  
pdflatex %x1%
pdflatex %x1%
rem bibtex %tx%
for %%X in (*.aux) do bibtex "%%X"
pdflatex %x1%
pdflatex %x1%
makeindex.exe %x2% -s nomencl.ist -o %x3%
pdflatex %x1%
:: start "sumatraPDF" "C:\Program Files (x86)\SumatraPDF\sumatraPDF.exe" %pd% -reuse-instance
:: START "" %pd%
:: START "C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe" %pd% -reuse-instance
:: http://nimal.info/blog/2010/latex-on-windows-with-miktex-and-notepad/
:cleanup
REM del *.log
REM del *.dvi
REM del *.aux
REM del *.bbl
REM del *.blg
REM del *.brf
REM del *.out
goto:eof

The simplest solution for me would be the one that lets me keep my script and still have the sync between .tex and pdf

2
  • @Paulo Cereda when i remove the % arara: makeindex line , the run is successful (although i really need makeindex to be included). However even with {synctex: yes, action: nonstopmode}, there is still no forward or inverse search.
    – jjunju
    Oct 18, 2013 at 12:48
  • Hello! :) I need some time to grasp the whole question, I'll come back to it soon. :) Oct 19, 2013 at 10:19

2 Answers 2

2

Let me see if I can address your questions. :)

:set jack-the-ripper-mode on

Question 1

I'm not versed into SyncTeX, so my answer to your first question will be more of a wild guess. For most of the engines, arara offers the synctex parameter to be added to the directive, as you did in your code. But I believe this feature must be enabled in the last engine run, and not the first, since viewers update their display based on the end of the compilation process. When performing subsequent calls to the engine, the SyncTeX metadata is lost. My answer would be along these lines: try to include

% arara: <engine>: { synctex: yes }

as the last part in the compilation chain. If this doesn't work, then we might have some viewer-specific situation outside the scope of arara.

Question 2

arara doesn't do wildcard searches (long story short: subshell expansion is not allowed), so you have to provide the files you want it to process. When you go with

% arara: bibtex

the rule will run bibtex based on the main file base name + the .aux extension. That's the default behaviour. Virtually, every rule that uses the main file reference supports overriding, done by exploiting the files parameter on their respective directives. If you have

foo.aux
bar.aux
foobar.aux
baz.aux

and want arara to run bibtex on each file, you can go with

% arara: bibtex: { files: [ foo.aux ] }
% arara: bibtex: { files: [ bar.aux ] }
% arara: bibtex: { files: [ foobar.aux ] }
% arara: bibtex: { files: [ baz.aux ] }

or by simply providing all the items in this one-liner:

% arara: bibtex: { files: [ foo.aux, bar.aux, foobar.aux, baz.aux ] }

This will make arara expand the bibtex rule to these four files, replacing the main file reference.

Same concept applies to the nomencl rule. If you have

woof.nlo
quack.nlo
meow.nlo

you can use files again, so either

% arara: nomencl: { files: [ woof.nlo ] }
% arara: nomencl: { files: [ quack.nlo ] }
% arara: nomencl: { files: [ meow.nlo ] }

or go ballistic with

% arara: nomencl: { files: [ woof.nlo, quack.nlo, meow.nlo ] }

and arara will process everything.

Question 3

There's actually no #3 in the original post. :)

Question 4

What is wrong? Perhaps the directives need rewriting, based on the previous discussion. :) Somewhere in the manual, there's something along the lines of that arara does exactly what you tell it to do. Nothing more and nothing less.

Maybe adding --log to the tool configuration might help you to identify the errors raised from the underlying execution (note that the FAILURE message that arara raised is not from the tool itself, but from the underlying command). This flag generates a file named arara.log in the current directory which contains every single output from every call done in the session.

Well, that's as far as I can abstract from your question. It's quite uncommon here to have intermediate questions within a main question, so I'm lost most of the time when trying to establish which subquestion I'm trying to address. :) Oh well, c'est la vie. :)

Hope it helps. :)

2
  • Thanks but changing the answer number 1 did not work to bring back the sync and the bibtex solution also just led to an error message complaining about the line where i call bibtex!!
    – jjunju
    Oct 19, 2013 at 20:26
  • @jjunju: we need to inspect the log then and/or get more details on the problem. Without the precise symptoms, little I can do. :( Oct 19, 2013 at 20:40
1

I managed to get the auto-refresh back using Texlipse and PDF4Eclipse by checking the following box in the custom build.

Hopefully it can help you.

Also, the synctex should be called in the last time pdflatex is invoked.

Best,

Option to re-enable auto-refresh after compiling

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .