Thanks Edward,
g.execute_shell_commands('pdflatex latex_test.tex')
Does indeed do the business - my leo file is in the same directory as the
latex files which maybe makes the path stuff easier.
I got greedy though and added the line below
g.execute_shell_commands('"C:\Program Files
(x86)\SumatraPDF\SumatraPDF.exe" latex_test.pdf')
which works but hangs Leo so I guess I need a Sumatra batch file. Can I
execute that with g.execute_shell_commands?
ta
IH
On Sunday, 13 May 2018 21:03:39 UTC+1, Edward K. Ream wrote:
>
>
>
> On Sun, May 13, 2018 at 8:59 AM, Israel Hands <[email protected]
> <javascript:>> wrote:
>
>> Thanks Edward - I hadn't used @clean before and that seems to work just
>> fine.
>>
>
> Good to know.
>
>
> Is it possible to undertake the next step and send commands to the OS
>> command line
>> .
>>
>
> Yes. There are many ways. g.execute_shell_commands is a thin wrapper
> around subprocess.Popen:
>
> g.execute_shell_commands('pdflatex currentfile.tex')
>
>
>> Is it possible to view a pdf from within Leo? I use Sumatra which is cool
>> but thought I better check while on the subject?
>>
>
> On my machine I have a .bat file called acrobat that opens Adobe Reader.
> The following opens any .pdf file without hanging Leo:
>
>
> path = '<full path to .pdf file>'
> command = 'acrobat %s' % path
> g.execute_shell_commands(command)
>
> Edward
>
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.