Re: [gedit-list] pdflatex



Il giorno gio, 28/06/2007 alle 14.11 -0400, jkitz verizon net ha
scritto:
> On Thu, 2007-06-28 at 12:57 +0200, Paolo Borelli wrote:
> 
> > Quite the contrary! You are more than welcome
> 
> Thank you Paolo. The *nix community has imho become more welcoming over
> the last decade.
> 
> > Please attach your external tool script so that we can take a look
> 
> I was being too simplistic using gedit external command plugin. Defining
> and executing a new Run command as:
> 
> pdflatex "$GEDIT_CURRENT_DOCUMENT_NAME"
> 
> gave:
> 
> Running tool: New tool
> /home/crow/.gnome2/gedit/tools/new-tool-2: 8: pdflatex: not found
> Exited: 32512
> 
> I did not expect to have to give the full path to the binary as I can
> run pdflatex in terminal even from directory .gnome2/gedit/tools.
> 
> Giving the full path to the definition of the Run command:
> 
> /usr/local/texlive/2007/bin/i386-linux/pdflatex
> "$GEDIT_CURRENT_DOCUMENT_NAME"
> 
> works, as you might expect. The bonus is that I can use the Input select
> toggle: 'Current document' from the Manager window instead of adding
> "$GEDIT_CURRENT_DOCUMENT_NAME" to the script and it still works (my
> students might say, "No duh!") but the paths question remains.
> 

Maybe pdflatex has been installed in a custom prefix that is added to
$PATH in your .bashrc but not seen by gedit, or something like that. You
may check what does 'which pdflatex' gives.

> Another puzzle to me is why Run command 'evince' (in the pop-up window)
> gives me a blank evince shell, but Run command 'pdflatex' gives:
> 
> Running tool: Run command
> exec: 88: pdflatex: not found
> Exited: 512
> 

as said above evince is probably in the PATH while pdflatex isn't...

> Some commands require an argument but some don't have a null default?
> 
> Anyway, my next wish is to be able to open the .pdf file generated by
> the pdflatex command.
> 
> How does one pass the name of the .pdf file produced by pdflatex to
> evince from within gedit?

well, if I recall correctly "pdflatex foo.tex" outputs a foo.pdf, so you
probably want something like

pdffile=`echo $GEDIT_CURRENT_DOCUMENT_NAME | sed 's/tex$/pdf'`
evince "$pdffile"

or similar (the above quick hack would obviously just work if your file
has a .tex extension), but you get the idea

ciao
	Paolo

> 
> The Run command definitions:
> 
> evince "$GEDIT_CURRENT_DOCUMENT_NAME.pdf"
> or
> evince "$GEDIT_CURRENT_DOCUMENT_NAME".pdf
> 
> each open evince, but give a 'file not found' error.
> 
> Thanks again for any guidance,
> 
> John
> 
> 
> 
> 
> 
> 
> _______________________________________________
> gedit-list mailing list
> gedit-list gnome org
> http://mail.gnome.org/mailman/listinfo/gedit-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]