Standalone se recusa a exibir algumas imagens incluídas em um documento maior

Standalone se recusa a exibir algumas imagens incluídas em um documento maior

Estou usando o autônomo em meu documento para economizar tempo de compilação enquanto trabalho em pgfplotsgráficos.

Agora há um gráfico que mostra um comportamento muito estranho com includestandalone. Funcionou há muito tempo, mas desde a semana passada este e apenas este enredo de 25 outros parou de funcionar \includestandalonequando incluído no arquivo principal. Não aparece nenhuma mensagem de erro, o gráfico simplesmente não aparece. Incluir tikzpictureo arquivo principal funcionará sem problemas e compilar o arquivo independente por conta própria também funcionará sem erros.

O arquivo de log diz:

Aviso independente do pacote: O subpreâmbulo do arquivo 'Image.tex' foi alterado. O conteúdo será ignorado. Execute novamente o LaTeX!

na linha de entrada 11.

Após a sexta repetição, nada mudou. isso é um erro ou uma característica? Ou estou fazendo algo errado? estou usandoMikTex 2.9_6618atualizado e compilando com lualatex

Eu achei istopacote independente, com sua opção de subpreâmbulos, ignora o conteúdo de um arquivo de entrada independente se ele contiver acentos na entrada do glossáriomas como não estou usando glossariesou inputenca solução não me ajudou.

Aqui está a foto:

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

E aqui está um MWE de um documento que se recusa a mostrar a imagem:

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

insira a descrição da imagem aqui

E aqui estão os dados paraseries_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

Aqui está a lista de arquivos

*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

O pacote independente que recebi daquihttps://bitbucket.org/martin_scharrer/standalone

Verifiquei também com a versão no CTAN e não faz diferença.

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

Aqui está o arquivo .sta:

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

Responder1

O problema é que existe um caractere de tabulação (ASCII 0D) atrás do último arquivo \usepgfplotslibrary {units}. Com o luatex 1.07 (usado pelo miktex) isso leva a um espaço adicional no .sta arquivo e então os testes falham.

Isto se deve a uma mudança que afeta todos os motores (já o miktex, texlive na próxima versão): as tabulações não são mais removidas dos finais das linhas - uma interpretação mais estrita da especificação original de Knuth (que apenas diz que os espaços são removidos dos finais das linhas )

informação relacionada