On 03.12.2017 21:13, Tom Robinson wrote:

...

> 
> A workaround is to turn on iCloud Drive for Desktop & Documents folders, and 
> store your file there, and you’ll have a standard path :]
> 
> 


Thank you Tom!


I activated iCloud Drive already. From there I am opening the TeX-file.
Probably I did not understand, what you meant with "for Desktop &
Documents" ...

I installed the latex package for BBEdit from github.com
(https://github.com/nathangrigg/Latex.bbpackage), which is unfortunately
not supported any more. But the applescript "Typeset" seems to cope with
the path to a TeX.file on iCloud Drive (mind the line breaks):

-- by Nathan Grigg

on main()
        set typeset_lib_file to path_to_contents() & 
"Resources/typeset-lib.scpt"
        set typeset_lib to load script POSIX file typeset_lib_file
        tell typeset_lib to typeset without synctex and gitinfo
end main


-- Catch and display custom errors; exit silently on cancelled dialogs
try
        main()
on error eStr number eNum partial result rList from badObj to exptectedType
        if eNum = 5033 then
                display dialog eStr buttons {"OK"} with title "Error" default 
button 1
        else if eNum = 5088 then
                beep
        else if eNum is not -128 then
                error eStr number eNum partial result rList from badObj to 
exptectedType
        end if
end try

on path_to_contents()
        --- Returns path to "Contents" folder containing the current script
        local delims, split_string
        set delims to AppleScript's text item delimiters
        set AppleScript's text item delimiters to "/Contents/"
        set split_string to text items of POSIX path of (path to me)
        set AppleScript's text item delimiters to delims
        if length of split_string = 1 then error "This script must remain
inside the Latex BBEdit package because it depends on other scripts in
that package." number 5033
        return (item 1 of split_string) & "/Contents/"
end path_to_contents


But the Preview of the script "Open pdf" is not working.

        1. My question to this mailing list again: How to typeset
           TeX-files on iCloud in BBEdit? Open the pdf with Preview
           automaticly.

        2. How to typeset in Terminal (Path!) the TeX-file from iCloud?
           What is doing this Apple Script with the path to reproduce it
           with the Terminal?

Finally I will stick with MacVim, if you are not suggesting a working
solution for BBEdit.


Best greetings



marek

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" 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/bbedit.

Reply via email to