독립 실행형은 큰 문서에 포함된 일부 사진의 출력을 거부합니다.

독립 실행형은 큰 문서에 포함된 일부 사진의 출력을 거부합니다.

플롯 작업 중 컴파일 시간을 절약하기 위해 문서에서 독립 실행형을 사용하고 있습니다 pgfplots.

이제 매우 이상한 동작을 보여주는 하나의 플롯이 있습니다 includestandalone. 오랫동안 작동했지만 지난 주부터 이 플롯과 25개의 다른 플롯 중 이 플롯만 \includestandalone기본 파일에 포함될 때 작업이 중단되었습니다. 오류 메시지가 나타나지 않고 플롯이 표시되지 않습니다. 을 기본 파일에 포함하면 tikzpicture문제 없이 작동하며 독립 실행형 파일을 자체적으로 컴파일하는 경우에도 오류 없이 작동합니다.

로그 파일은 다음과 같이 말합니다.

패키지 독립형 경고: 'Image.tex' 파일의 하위 프리앰블이 변경되었습니다. 내용은 무시됩니다. LaTeX를 다시 실행해주세요!

입력 라인 11에서.

여섯 번째 재방송 이후에는 아무것도 바뀌지 않았습니다. 이것은 버그입니까 아니면 기능입니까? 아니면 내가 뭔가 잘못하고 있는 걸까요? 나는 사용하고있다미크텍스 2.9_6618최신 상태이며 lualatex로 컴파일 중

나는 이것을 찾았다하위 프리앰블 옵션이 있는 독립 실행형 패키지는 용어집 항목에 악센트가 포함된 독립 실행형 입력 파일의 내용을 무시합니다.하지만 사용하지 않거나 솔루션이 도움이 되지 않았기 때문 glossaries입니다 inputenc.

사진은 다음과 같습니다.

\documentclass{standalone}
\onlyifstandalone{%
\usepackage{luatex85}
\usepackage[ngerman]{babel}
\usepackage{standalone}}
\usepackage{pgfplots}
\usepackage{siunitx}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{units}  

\begin{document}
\begin{tikzpicture}
    \begin{axis}[
        grid=major,
        xlabel= Spannung $U$,
        x unit=\si{\volt},
        unit markings=slash space,
        ylabel= Strom $O$,
        y unit=\si{\milli\ampere},
        minor x tick num={4},      
        xmin=0,
        ymin=0,
        xmax=3.0,
        ymax=0.9,
        xtick={0,0.50,...,3.0},
        legend cell align=left,
        legend plot pos =none,
        legend pos=outer north east,
        width=0.60\textwidth
        ]
        \addplot[smooth,very thick] table[x=X, y=Y, col sep=semicolon] {Images/Vektorgrafik/StromSpannung/series_c.csv};
        \addlegendentry{a) GaAs $E_g\approx1.4$ \si{\electronvolt} }
        \node at(axis cs:1.17,0.65){$(a)$};
    \end{axis}

\end{tikzpicture}
\end{document}

다음은 사진 표시를 거부하는 문서의 MWE입니다.

\RequirePackage{luatex85,shellesc} % Alias für luatex Kommandos an altes PDFlatex und Modul für altes shell escape
\documentclass[
    english,
    ngerman, %Spracheinstellung, wird an Pakete weitergegeben (Hauptsprache Dok)
    paper=a5, %Seitenformat a5
    twoside=on, %Zweiseitiges Dokument
    DIV=calc, %Seitenteilung, Ränder
    BCOR=4mm, %Bindekorrektur 12mm für Buchbindung
    fontsize=10pt, %Schriftgröße eigentlich 9
    toc=listof, %Verzeichnisse ins Inhaltsverzeichnis
    toc=bibliography, %Literaturverzeichnis ins Inhaltverzeichnis
    toc=flat, %Literaturverzeichnis wird linksbündig gesetzt und tabellarisch (flat),
    listof=flat, %Macht aus dem Abbildungsverzeichnis eine Tabelle, die automatisch den Raum für Nummern ermittelt
%   draft, %Entwurfsmodus
    numbers=auto, %kein abschnließender Punkt hinter Nummerierungen
    headings=small, %kleinere Überschriften
    titlepage=true, %mit Titelseite
    headinclude=true, %Kopfzeile in die Seitenberechnung aufnehmen
    footinclude=false, %Fußzeile nicht in die Seitenberechnung aufnehmen
    captions=tableheading, %Abstand der Tabellenüberschrift angepasst
    pagesize=auto, %Automatische Seitenkorrektur für Ausgabetreiber
    appendixprefix, %Nummerierung für den Anhang
    open=any %Kapitel auf jeder neuen Seite beginnen
]{scrbook}


\usepackage[subpreambles=true,sort=true,print=false,mode=tex]{standalone}


\usepackage{ifluatex}
\ifluatex
\usepackage{fontspec} 
\usepackage{babel}
\addto\extrasenglish{\useshorthands{"}\languageshorthands{ngerman}}
%\setmainfont{Latin Modern Roman}
%\setsansfont{Latin Modern Sans}
%\setmonofont{Latin Modern Mono}
%\setmainfont{Linux Libertine O}
%\setsansfont{Linux Biolinum O}
%\setmonofont{Droid Sans Mono}
\usepackage{selnolig}
\else
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{babel}
\addto\extrasenglish{\useshorthands{"}\languageshorthands{ngerman}}
\fi

\usepackage{import}
\usepackage{standalone}
\usepackage{siunitx}

\begin{document}
                \begin{figure}[htb]
                \includestandalone[mode=tex]{Images/Vektorgrafik/StromSpannung/StromSpannung}
                \caption{Image \label{fig:Image}}
                \end{figure}
\end{document}

여기에 이미지 설명을 입력하세요

그리고 여기에 대한 데이터가 있습니다series_c.csv

X;Y
1.055046e+00  ; 0.000000e+00
1.220183e+00  ; 4.854369e-03
1.311927e+00  ; 4.368932e-02
1.330275e+00  ; 1.456311e-01
1.348624e+00  ; 3.543689e-01
1.366972e+00  ; 6.165049e-01
1.385321e+00  ; 8.300971e-01
1.394495e+00  ; 9.951456e-01

파일 목록은 다음과 같습니다

*File List*
luatex85.sty    2016/06/15 v1.4 pdftex aliases for luatex
shellesc.sty    2016/06/07 v0.02a unified shell escape interface for LaTeX
 scrbook.cls    2017/09/07 v3.24 KOMA-Script document class (book)
scrkbase.sty    2017/09/07 v3.24 KOMA-Script package (KOMA-Script-dependent basi
cs and keyval usage)
 scrbase.sty    2017/09/07 v3.24 KOMA-Script package (KOMA-Script-independent ba
sics and keyval usage)
  keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
scrlfile.sty    2017/09/07 v3.24 KOMA-Script package (loading files)
tocbasic.sty    2017/09/07 v3.24 KOMA-Script package (handling toc-files)
scrsize10pt.clo    2017/09/07 v3.24 KOMA-Script font size class option (10pt)
typearea.sty    2017/09/07 v3.24 KOMA-Script package (type area)
standalone.sty    2099/01/01 develop Package to include TeX sub-files with pream
bles
ifluatex.sty    2016/05/16 v1.4 Provides the ifluatex switch (HO)
   ifpdf.sty    2017/03/15 v3.2 Provides the ifpdf switch
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
 xkeyval.sty    2014/12/03 v2.7a package option processing (HA)
 xkeyval.tex    2014/12/03 v2.7a key=value parser (HA)
currfile.sty    2015/04/23 v0.7c Provides the file path elements of the current 
input file
kvoptions.sty    2016/05/16 v3.12 Key value format for package options (HO)
 ltxcmds.sty    2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
kvsetkeys.sty    2016/05/16 v1.17 Key value parser (HO)
infwarerr.sty    2016/05/16 v1.4 Providing info/warning/error messages (HO)
etexcmds.sty    2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
filehook.sty    2011/10/12 v0.5d Hooks for input files
filehook-scrlfile.sty    2011/01/03 v0.1 filehook patch for scrlfile package
Testfile.sta
gincltex.sty    2011/09/04 v0.3 Include external LaTeX files like graphics
svn-prov.sty    2010/04/24 v3.1862 Package Date/Version from SVN Keywords
adjustbox.sty    2012/05/21 v1.0 Adjusting TeX boxes (trim, clip, ...)
 adjcalc.sty    2012/05/16 v1.1 Provides advanced setlength with multiple back-e
nds (calc, etex, pgfmath)
trimclip.sty    2012/05/16 v1.0 Trim and clip general TeX material
graphicx.sty    2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg    2016/06/04 v1.11 sample graphics configuration
  luatex.def    2018/01/08 v1.0l Graphics/color driver for luatex
collectbox.sty    2012/05/17 v0.4b Collect macro arguments as boxes
  tc-pgf.def    2012/05/13 v1.0 trimclip fall-back clipping driver using PGF
     pgf.sty    2015/08/07 v3.0.1a (rcs-revision 1.15)
  pgfrcs.sty    2015/08/07 v3.0.1a (rcs-revision 1.31)
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
  pgfrcs.code.tex
 pgfcore.sty    2010/04/11 v3.0.1a (rcs-revision 1.7)
  pgfsys.sty    2014/07/09 v3.0.1a (rcs-revision 1.48)
  pgfsys.code.tex
pgfsyssoftpath.code.tex    2013/09/09  (rcs-revision 1.9)
pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)
  xcolor.sty    2016/05/11 v2.12 LaTeX color extensions (UK)
   color.cfg    2016/01/02 v1.6 sample color configuration
 pgfcore.code.tex
pgfcomp-version-0-65.sty    2007/07/03 v3.0.1a (rcs-revision 1.7)
pgfcomp-version-1-18.sty    2007/07/23 v3.0.1a (rcs-revision 1.1)
ifoddpage.sty    2016/04/23 v1.1 Conditionals for odd/even page detection
varwidth.sty    2009/03/30 ver 0.92;  Variable-width minipages
filemod-expmin.sty    2011/09/19 v1.2 Get and compare file modification times (e
xpandable; minimal)
pdftexcmds.sty    2018/01/21 v0.26 Utility functions of pdfTeX for LuaTeX (HO)
fontspec.sty    2017/11/09 v2.6g Font selection for XeLaTeX and LuaLaTeX
  xparse.sty    2017/12/16 L3 Experimental document command parser
   expl3.sty    2017/12/16 L3 programming layer (loader) 
expl3-code.tex    2017/12/16 L3 programming layer 
l3pdfmode.def    2017/03/18 v L3 Experimental driver: PDF mode
fontspec-luatex.sty    2017/11/09 v2.6g Font selection for XeLaTeX and LuaLaTeX
 fontenc.sty
   tuenc.def    2017/04/05 v2.0i Standard LaTeX file
fontspec.cfg
   babel.sty    2018/01/24 3.17 The Babel package
 bblopts.cfg    2005/09/08 v0.1 add Arabic and Farsi to "declared" options of ba
bel
 english.ldf    2017/06/06 v3.3r English support from the babel system
 ngerman.ldf    2016/11/02 v2.9 German support for babel (new orthography)
selnolig.sty    2015/10/26
luatexbase.sty    2015/10/04 v1.3 luatexbase interface to LuaTeX 
ctablestack.sty    2015/10/01 v1.0 Catcode table stable support
selnolig-english-patterns.sty    2015/10/26
selnolig-english-hyphex.sty    2015/10/26
selnolig-german-patterns.sty    2015/10/26
selnolig-german-hyphex.sty    2015/10/26
  import.sty    2009/03/23  v 5.1
 siunitx.sty    2017/11/26 v2.7k A comprehensive (SI) units package
 amstext.sty    2000/06/29 v2.01 AMS text
  amsgen.sty    1999/11/30 v2.0 generic functions
   array.sty    2016/10/06 v2.4d Tabular extension package (FMi)
l3keys2e.sty    2017/12/16 LaTeX2e option processing using LaTeX3 keys
translator.sty    2018/01/04 v1.12 Easy translation of strings in LaTeX
Testfile.sta
pgfplots.sty    2017/06/05 v1.15 Data Visualization (1.15)
    tikz.sty    2015/08/07 v3.0.1a (rcs-revision 1.151)
  pgffor.sty    2013/12/13 v3.0.1a (rcs-revision 1.25)
 pgfkeys.sty    
 pgfkeys.code.tex
 pgfmath.sty    
 pgfmath.code.tex
  pgffor.code.tex
    tikz.code.tex
supp-pdf.mkii
epstopdf-base.sty    2016/05/15 v2.6 Base part for package epstopdf
  grfext.sty    2016/05/16 v1.2 Manage graphics extensions (HO)
kvdefinekeys.sty    2016/05/16 v1.4 Define keys (HO)
translator-basic-dictionary-English.dict    
translator-basic-dictionary-German.dict    
siunitx-abbreviations.cfg    2017/11/26 v2.7k siunitx: Abbreviated units

여기에서 얻은 독립형 패키지https://bitbucket.org/martin_scharrer/standalone

CTAN 버전에서도 확인해 봤는데 별 차이가 없습니다.

standalone.sty    2015/07/15 v1.2 Package to include TeX sub-files with preambles

.sta 파일은 다음과 같습니다.

\standalonepreambles
\subpreamble{Images/Vektorgrafik/StromSpannung/StromSpannung.tex}
\onlyifstandalone {\usepackage {luatex85}\usepackage [ngerman]{babel}}\usepackage {pgfplots}\usepackage {siunitx}\usepgfplotslibrary {units} 
\endsubpreamble
\endstandalonepreambles

답변1

문제는 마지막 \usepgfplotslibrary {units}. luatex 1.07(miktex에서 사용)을 사용하면 파일에 추가 공간이 생기고 .sta 테스트가 실패합니다.

이는 모든 엔진에 영향을 미치는 변경 사항 때문입니다(이미 miktex, 다음 버전에서는 texlive): 탭은 더 이상 줄 끝에서 제거되지 않습니다. -- Knuth의 원래 사양을 더 엄격하게 해석한 것입니다(줄 끝에서 공백만 제거된다고 함). )

관련 정보