簡體   English   中英

在 iCloud Drive 中進行乳膠化

[英]Latexing within iCloud Drive

這是一個與 Apple 討論中發現的這兩個帖子(這個這個)相關的問題。

我正在使用 Sublime Text 3 編寫和編譯我的 latex 文檔。 當我處理本地 tex 文件時,它就像一個魅力,但當文件存儲在 iCloud Drive 上時它不起作用:它直接返回緊急停止。 這是日志文件:

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!

也許這與 iCloud 按類型自動組織文件的方式有關......

有沒有人擺脫這個問題?

您可以嘗試創建指向雲目錄的符號鏈接,例如

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

並從~/Documents/CloudDocs運行命令。

根據我的經驗,最簡單的解決方案是將我的 iCloud Drive 配置為同步“桌面和文檔文件夾”,然后將我的 TeX 文件定位在其中一個中的某個位置。 然后,默認文件路徑(如果與 iCloud 同步)不包含 ~ 字符。

我不是在Mac上工作,但試圖為老板解決相同的問題。 我找到解決方案。 在我的Linux PC上,它使用了一個路徑,其中包含一個'〜'。

我意識到這是一個舊線程,但我只是使用常規文件名的 \include (或 \input)遇到了這個問題,該文件名實際上存儲在 iCloud 中,因此該名稱被 Mac OS 替換為 / Users/rossiter/Library/Mobile Documents/com~apple~CloudDocs/MyDocs/<something.tex>,在路徑名中帶有 ~。

如上所述,PDF LaTeX 無法處理這些。 所以我不得不將 MyDocs 文件夾移回常規文件系統,在刪除我放置在那里指向 iCloud 的別名之后。

也許這對某人有用。

要添加其他答案,並且如果您將 VS Code 與 LaTeX Workshop 一起使用,您可以通過進入“乳膠:工具”下的設置並打開鏈接的.json 文件來解決此問題。 然后將%DOC%的每個實例替換為%DOCFILE% ,如他們的wiki中所述。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM