
직장에서 Ubuntu 14.04.1 시스템에 작은 백업 스크립트를 설정했습니다. 이 스크립트는 내 컴퓨터를 외부 하드 드라이브에 백업합니다. 이 작업이 완료되면 LaTeX 프로젝트가 내 Dropbox에 복사되어 컴파일됩니다. 이 프로젝트는 일종의 나의 작업 일지입니다.
나는 이것이 상당히 색다른 사용 사례라는 것을 알고 있습니다. 소스 코드를 복사하거나 git 저장소에 푸시할 수 있지만 첫째로 git은 약간 과잉이고 둘째로 내가 할 수 없을 때 기쁘게 생각하는 두 가지 인스턴스가 이미 있습니다. gnome이 시작되지 않기 때문에 tty 쉘을 시작하지 않으면 내 휴대폰에 PDF로 표시됩니다.
이제 문제는 어떤 이유에서든 pdflatex와 lualatex가 모두 파일을 찾을 수 없다고 말하고 있다는 것입니다 .sty
. 백업 스크립트는 다음과 같습니다.
#!/bin/bash
# .... some system backup code ....
## sync linux setup document to Dropbox
# remove .pdf in order to guarantee that project is compiled
rm /home/user/Documents/LaTeX/logBook/logBook.pdf
# compile project in origin
make -C /home/user/Documents/LaTeX/logBook/ >> /home/user/Documents/LaTeX/logBook/makeLog
# copy files to destination
cp -rp /home/user/Documents/LaTeX/logBook/ /home/wright/Dropbox
광산에는 Makefile
다음 줄이 포함되어 있습니다.
SHELL=bash
TARGET=linuxSetup.pdf
FLAGS= --shell-escape
SRC= ./*.tex ./header/*.tex ./chapters/*.tex ./references/*.bib ./titlepage/*.tex
TIKZ= ./tikz/*.tex
LL= pdflatex
all: $(TARGET)
$(TARGET): $(TARGET:%.pdf=%.tex) $(SRC) $(TIKZ)
@$(LL) $(FLAGS) $<
# makeglossaries $(TARGET:%.pdf=%"")
# makeindex -s headingsStyle.ist $(TARGET:%.pdf=%.idx)
# bibtex $(TARGET:%.pdf=%"")
@$(LL) $(FLAGS) $<
@$(LL) $(FLAGS) $<
백업 스크립트는 에 배치되며 /etc/init.d/backup
에 대한 심볼릭 링크를 포함합니다 /etc/rc0.d/S01Backup
.
스크립트는 간단하지만 여전히 파일을 찾을 수 없습니다 .sty
. 문제가 특정 파일에 의해 발생한 것인지 알아보기 위해 해당 파일을 제외해 보았지만 .sty
아무리 많은 파일을 제외해도 컴파일러가 찾을 수 없는 파일이 항상 더 많았습니다. 컴파일러를 바꿨지만 그것도 문제가 되지 않는 것 같습니다. 또한 루트나 루트를 통해 전체 백업 스크립트를 실행했는데 sudo
둘 다 오류 없이 잘 작동했습니다.
내가 무엇을 놓치고 있나요?
편집하다: 이것은 출력의 마지막 비트입니다.
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/share/texlive/texmf-dist/tex/latex/cite/cite.sty)
(/usr/share/texlive/texmf-dist/tex/latex/mh/empheq.sty
(/usr/share/texlive/texmf-dist/tex/latex/mh/mhsetup.sty)
(/usr/share/texlive/texmf-dist/tex/latex/mh/mathtools.sty
(/usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty)))
(/usr/share/texlive/texmf-dist/tex/latex/etex-pkg/etex.sty)
(/usr/share/texlive/texmf-dist/tex/latex/fancybox/fancybox.sty
Style option: `fancybox' v1.4 <2010/05/15> (tvz)
) (/usr/share/texlive/texmf-dist/tex/latex/float/float.sty)
! LaTeX Error: File `floatflt.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name:
문제의 파일은 floatflt.sty
texlive 설치 디렉터리에 있습니다 /usr/local/texlive/2015/texmf-dist/tex/latex/floatflt
. 그러나 위에서 찾은 다른 패키지는 /usr/share/texlive/texmf-dist/tex/latex/<packagename>
.
답변1
두 개의 texlive 설치가 있습니다. 하나는 시스템(Ubuntu) 과 사용자가 /usr/share/texlive/
설치합니다 /usr/local/texlive/2015/texmf-dist/tex/latex
.
종료 스크립트에서는 환경 변수가 조정되지 않으므로 잘못된 texlive 설치가 사용됩니다.
/usr/local/texlive/2015/bin/x86_64-linux/pdflatex
직접 호출하거나 PATH
그에 따라 환경 변수를 조정해 보세요 .
floatflt.sty
과거에는 몇 가지 라이센스 문제가 있었습니다. 이것이 아마도 Ubuntu의 texlive 설치에 포함되지 않은 이유일 것입니다. 으로 변경해 볼 수 있습니다 wrapfig
.