Jedna z opcji wymagałaby zbadania lateksu i gumy z ich opcjami czyszczenia.
Ponieważ jednak czyszczenie plików .aux i powiązanych jest zalecane tylko po ostatecznym uruchomieniu kompilacji, poniższe wydają się być bardzo dobrym rozwiązaniem dla użytkowników systemu macOS. Jednym ze sposobów czyszczenia po użyciu TeXShop z ustawieniami domyślnymi jest dodanie tego elastycznego AppleScript do programu:
[cytat]
Rozwiązanie TeXShop
Jak już wspomnieli inni, usuwanie plików pomocniczych oczywiście nie jest dobrym pomysłem, szczególnie w przypadku złożonych dokumentów. Przydaje się jednak możliwość ręcznego usunięcia ich w razie potrzeby.
Korzystam z następującego Applescript (napisanego przez Clausa Gerhardta) zapisanego jako makro w TeXShop. Skrypt można również dostosować do innych edytorów Mac. W tym skrypcie podoba mi się to, że mogę dodawać nowe rozszerzenia plików Aux w razie potrzeby i jest on w stanie poradzić sobie z wieloma rozszerzeniami Aux, takimi jak -blx.bib itp.
--AppleScript
-- Apply only to an already saved file
-- Claus Gerhardt, September 2006
(*This script gets the path of the frontmost (tex) document in TeXShop and removes the corresponding auxilary files the suffixes of which are listed in the list L. Beware of the quotation marks. The list L may contain suffixes to which no corresponding files exist.*)
my remove_auxiliaries()
on remove_auxiliaries()
set L to {".aux", ".synctex.gz", ".fdb_latexmk", ".out", ".toc", ".bbl", ".blg", ".ind", ".sind", ".run.xml","-blx.bib",".log", ".end", ".1"} as list
tell application "TeXShop"
get path of document of window 1
set fileName to result
end tell
set {baseName, texName, pdfName, namePath, dirName, dirNameunquoted, logName, logPath, rtfName, docName} to my setnamebbedit_rootn(fileName)
(*
tell application "TeXShop"
close document docName
end tell
*)
repeat with x in L
try
set shellScript to "cd " & dirName & ";"
set shellScript to shellScript & "rm -f " & baseName & x
do shell script shellScript
end try
end repeat
end remove_auxiliaries
on setnamebbedit_rootn(x)
set n to (number of characters of contents of x)
set fileNamequoted to quoted form of x
set windowName to do shell script "basename " & fileNamequoted
set m to (number of characters of contents of windowName)
set dirName to quoted form of (characters 1 thru (n - m - 1) of x as string)
set dirNameunquoted to (characters 1 thru (n - m - 1) of x as string)
set theText to contents of windowName as string
set n to (number of characters of contents of theText)
set i to n as number
repeat while i > 0
if character i of theText is equal to "." then
set m to i
exit repeat
else
set i to (i - 1)
end if
end repeat
set baseName to (characters 1 thru (m - 1) of theText as string)
set texName to baseName & ".tex"
set namePath to dirNameunquoted & "/" & baseName as string
set pdfName to namePath & ".pdf" as string
set rtfName to namePath & ".rtf" as string
set logPath to namePath & ".log" as string
set logName to baseName & ".log" as string
set theFile to POSIX file x as string
tell application "Finder"
get displayed name of the file theFile
end tell
set docName to result
return {baseName, texName, pdfName, namePath, dirName, dirNameunquoted, logName, logPath, rtfName, docName} as list
end setnamebbedit_rootn
[/ endquote]
skopiowane stąd (zobacz także inne sugestie)
pdflatex -output-directory=/some_temp_dir
?