Standalone verweigert die Ausgabe einiger Bilder, die in einem größeren Dokument enthalten sind

Standalone verweigert die Ausgabe einiger Bilder, die in einem größeren Dokument enthalten sind

Ich verwende in meinem Dokument Standalone, um beim Arbeiten an Diagrammen etwas Kompilierungszeit zu sparen pgfplots.

Jetzt gibt es einen Plot, der ein sehr seltsames Verhalten zeigt includestandalone. Er hat lange Zeit funktioniert, aber seit letzter Woche funktioniert dieser und nur dieser Plot von 25 anderen Plots nicht mehr, \includestandalonewenn er in die Hauptdatei aufgenommen wird. Es wird keine Fehlermeldung angezeigt, der Plot wird einfach nicht angezeigt. Das Einbinden tikzpicturein die Hauptdatei funktioniert problemlos und das eigenständige Kompilieren der Datei funktioniert ebenfalls ohne Fehler.

In der Protokolldatei steht:

Paket Standalone Warnung: Die Unterpräambel der Datei „Image.tex“ hat sich geändert. Der Inhalt wird ignoriert. Bitte führen Sie LaTeX erneut aus!

in der Eingabezeile 11.

Nach dem sechsten Durchlauf hat sich nichts geändert. Ist das ein Fehler oder ein Feature? Oder mache ich etwas falsch? Ich verwendeMikTex 2.9_6618aktuell und kompiliert mit lualatex

ich habe das gefundenStandalone-Paket ignoriert mit seiner Option „subpreambles“ den Inhalt einer Standalone-Eingabedatei, wenn diese Akzente im Glossareintrag enthältaber da ich es nicht verwende glossariesoder inputencdie Lösung mir nicht geholfen hat.

Hier ist das Bild:

\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}

Und hier ist ein MWE eines Dokuments, das die Anzeige des Bildes verweigert:

\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}

Bildbeschreibung hier eingeben

Und hier sind die Daten fürseries_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

Hier ist die Dateiliste

*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

Das Standalone-Paket habe ich hierhttps://bitbucket.org/martin_scharrer/standalone

Ich habe es auch mit der Version auf CTAN überprüft und es macht keinen Unterschied.

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

Hier ist die .sta-Datei:

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

Antwort1

Das Problem besteht darin, dass sich hinter dem letzten ein Tabulatorzeichen (ASCII 0D) befindet \usepgfplotslibrary {units}. Bei Luatex 1.07 (von Miktex verwendet) führt dies zu einem zusätzlichen Leerzeichen in der .sta Datei und der Test schlägt fehl.

Dies liegt an einer Änderung, die alle Engines betrifft (bereits Miktex, Texlive in der nächsten Version): Tabulatoren werden nicht mehr von Zeilenenden entfernt – eine strengere Interpretation von Knuths ursprünglicher Spezifikation (die nur besagt, dass Leerzeichen von Zeilenenden entfernt werden).

verwandte Informationen