简体   繁体   中英

Latexing within iCloud Drive

This is a question relative to these two posts ( this one and this one ) found on Apple discussion.

I am using Sublime Text 3 to write and compile my latex documents. It works like a charm when I'm working on a local tex file, but it doesn't work when the file is stored on iCloud Drive: it returns directly an emergency stop. Here is the log file:

This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=pdflatex 2016.4.19)  29 APR 2016 23:26
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**"/Users/myname/Library/Mobile Documents/com~apple~CloudDocs/tex/paper-1.tex"

! Emergency stop.
<to be read again> 
                   \protect 
<*> "/Users/myname/Library/Mobile Documents/com~
                                                 apple~CloudDocs/tex/paper-1...
*** (job aborted, file error in nonstop mode)


Here is how much of TeX's memory you used:
 6 strings out of 493089
 278 string characters out of 6134842
 53199 words of memory out of 5000000
 3590 multiletter control sequences out of 15000+600000
 3640 words of font info for 14 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 3i,0n,0p,1b,6s stack positions out of 5000i,500n,10000p,200000b,80000s
!  ==> Fatal error occurred, no output PDF file produced!

Maybe it is related to the way iCloud automatically organizes the files by type...

Did anyone get rid of this issue?

You could try creating a symlink to the cloud directory, eg

ln -s ~/Library/Mobile\ Documents/com~apple~CloudDocs Documents/CloudDocs

and run the command from ~/Documents/CloudDocs instead.

In my experience, the simplest solution was to configure my iCloud Drive to sync "Desktop & Documents Folders" and then locate my TeX files somewhere within one of these. Then, the default file path (if synced with iCloud) does not include the ~ character.

I am not working on a mac, but tried to solve the same issue for my boss. I found this solution. On my linux pc it worked with a path, that included a '~'.

I realize this is an old thread but I just ran into this issue with an \include (or \input) using a regular file name, which is in fact stored in iCloud and thus the name is substituted by Mac OS as a name like /Users/rossiter/Library/Mobile Documents/com~apple~CloudDocs/MyDocs/<something.tex>, with those ~ in the path name.

As noted above, PDF LaTeX can not deal with these. So I had to move the MyDocs folder back into the regular file system, after deleting the alias I had placed there to point to iCloud.

Maybe this will be useful to someone.

To add to the other answers, and in case you are using VS Code with LaTeX Workshop, you can solve this issue by going into the settings under "Latex: Tools" and opening the.json file linked. Then replace every instance of %DOC% to %DOCFILE% , as mentioned in their wiki .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM