-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XeLaTeX: Package grffile
Adds Second Part of Filename to PDF
#7
Comments
Yes sorry about that,, there are some internal re-arrangement of the
graphics .def files that mean that grffile's attempt to patch the code
failed.
The intention of the new code is that spaces in file names work (without
needing grfile) but in the case of xetex that's not quite working either.
I think, using the current public versions, it is sufficient to do
\documentclass{article}
\usepackage{grffile}
\makeatletter
\def\Gread@@XeTeX#1{%
\IfFileExists{"\Gin@base".bb}%
{\Gread@eps{\Gin@base.bb}}%
{\Gread@@XeTeX@aux#1}%
}
\makeatother
\begin{document}
\includegraphics{Filename With Spaces}
\end{document}
(which just adds quotes in the call to iffileexists) please let me know if
that fails on your real example, I just tested it with a small test case
here (including `Filename With Spaces.png` )
There will be some further updates to graphics package and then I need to
update to grffile to match the new structure, but it's not quite done yet,
sorry.
David
…On 19 August 2017 at 14:22, René Schwaiger ***@***.***> wrote:
👋 Hi,
thank you for providing this useful bundle!
Recently I discovered thatgrffile does not work correctly anymore, if a
XeLaTeX document includes graphic files with spaces in their name. For
example, if I translate the following file:
% !TEX TS-program = xelatex
\documentclass{article}\usepackage{grffile}
\begin{document}
\includegraphics{Filename With Spaces}\end{document}
, then the resulting PDF includes the text With Spaces.bb. The file below
shows what I mean. If you need any additional information, then please
comment below. Thank you.
XeLaTeX.pdf <https://github.com/ho-tex/oberdiek/files/1236368/XeLaTeX.pdf>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/ho-tex/oberdiek/issues/31>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABNcAmNsI_NEsVrvbljzNI9XRKm_DPhuks5sZuGSgaJpZM4O8VOq>
.
|
It does indeed work flawlessly, I just tested it with a book that includes about 30 PDF files. |
I am still experiencing the same problem in January of 2018. Are there any updates regarding this issue? |
@smalakys sorry no public update yet, does the fix in the earlier comment work for you? |
@davidcarlisle The fix works perfectly! Sorry for not mentioning it. |
sorry about the delay but the issue is raised on grffile but I think I want to fix it in the latex core (that is make IfFileExists by default work with filenames with spaces. But any change to the latex format has "compatibility issues" so rushing isn't a good idea (and other issues meant I had no tex time at the end of last year) |
Sorry, your fix does not work any more. |
My problem is similar to @hannesdorn’s: I’m seeing the .bb text since I upgraded to XeTeX 3.14159265-2.6-0.99999 (TeX Live 2018, Mac). My LaTeX code is:
Before the upgrade, everything worked without a hitch. Since the upgrade, not even your fix helps. I tried wrapping the whole argument in double quotes, I tried escaping the space via |
The casing in the command names is wrong in the patch above, it should be
|
grffile.sty (Package: grffile 2017/06/30 v1.18) as installed with the latest MikTeX version does still not work. Files are not included into the XeLaTeX generated pdf files. In the log-file weird tripple-quotation marks appear in the filenames: |
@uwezi could you please show a complete example that demonstrates how you are trying to include the file? |
@u-fischer well, Ulrike, nothing special, It is just included using a The file is actually located in a separate directory, which is included into the path using Just excluding grffile.sty completely fixes the problem, but as long as it is included the file will not be included and no warning or error will be created. Windows 10, latest MikTeX-bundle. |
Same for Arch Linux.
Log: This is XeTeX, Version 3.14159265-2.6-0.999991 (TeX Live 2019/Arch Linux) (preloaded format=xelatex 2019.11.20) 20 NOV 2019 16:15
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**report.tex
(./report.tex
LaTeX2e <2019-10-01> patch level 1
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/08/27 v1.4j Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2019/08/27 v1.4j Standard LaTeX file (size option)
)
\c@part=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texmf-dist/tex/latex/adjustbox/adjustbox.sty
Package: adjustbox 2019/01/04 v1.2 Adjusting TeX boxes (trim, clip, ...)
(/usr/share/texmf-dist/tex/latex/xkeyval/xkeyval.sty
Package: xkeyval 2014/12/03 v2.7a package option processing (HA)
(/usr/share/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/share/texmf-dist/tex/generic/xkeyval/xkvutils.tex
\XKV@toks=\toks14
\XKV@tempa@toks=\toks15
(/usr/share/texmf-dist/tex/generic/xkeyval/keyval.tex))
\XKV@depth=\count88
File: xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
))
(/usr/share/texmf-dist/tex/latex/adjustbox/adjcalc.sty
Package: adjcalc 2012/05/16 v1.1 Provides advanced setlength with multiple back
-ends (calc, etex, pgfmath)
)
(/usr/share/texmf-dist/tex/latex/adjustbox/trimclip.sty
Package: trimclip 2018/04/08 v1.1 Trim and clip general TeX material
(/usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
(/usr/share/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2019/10/08 v1.3c Standard LaTeX Graphics (DPC,SPQR)
(/usr/share/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(/usr/share/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: xetex.def on input line 105.
(/usr/share/texmf-dist/tex/latex/graphics-def/xetex.def
File: xetex.def 2017/06/24 v5.0h Graphics/color driver for xetex
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
)
(/usr/share/texmf-dist/tex/latex/collectbox/collectbox.sty
Package: collectbox 2012/05/17 v0.4b Collect macro arguments as boxes
\collectedbox=\box27
)
\tc@llx=\dimen105
\tc@lly=\dimen106
\tc@urx=\dimen107
\tc@ury=\dimen108
Package trimclip Info: Using driver 'tc-xetex.def'.
(/usr/share/texmf-dist/tex/latex/adjustbox/tc-xetex.def
File: tc-xetex.def 2019/01/04 v2.2 Clipping driver for xetex
))
\adjbox@Width=\dimen109
\adjbox@Height=\dimen110
\adjbox@Depth=\dimen111
\adjbox@Totalheight=\dimen112
\adjbox@pwidth=\dimen113
\adjbox@pheight=\dimen114
\adjbox@pdepth=\dimen115
\adjbox@ptotalheight=\dimen116
(/usr/share/texmf-dist/tex/latex/ifoddpage/ifoddpage.sty
Package: ifoddpage 2016/04/23 v1.1 Conditionals for odd/even page detection
\c@checkoddpage=\count89
)
(/usr/share/texmf-dist/tex/latex/varwidth/varwidth.sty
Package: varwidth 2009/03/30 ver 0.92; Variable-width minipages
\@vwid@box=\box28
\sift@deathcycles=\count90
\@vwid@loff=\dimen117
\@vwid@roff=\dimen118
))
(/usr/share/texmf-dist/tex/latex/oberdiek/grffile.sty
Package: grffile 2017/06/30 v1.18 Extended file name support for graphics (HO)
(/usr/share/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2018/09/07 v3.3 Provides the ifpdf switch
)
(/usr/share/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
(/usr/share/texmf-dist/tex/latex/oberdiek/kvoptions.sty
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
(/usr/share/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
)
(/usr/share/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
(/usr/share/texmf-dist/tex/generic/oberdiek/infwarerr.sty
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
)
(/usr/share/texmf-dist/tex/generic/oberdiek/etexcmds.sty
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
(/usr/share/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
))))
(/usr/share/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
Package: pdftexcmds 2019/07/25 v0.30 Utility functions of pdfTeX for LuaTeX (HO
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: pdfTeX >= 1.30 not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode not found.
)
Package grffile Info: Option `multidot' is set to `true'.
Package grffile Info: Option `extendedchars' is set to `false'.
Package grffile Info: Option `space' is set to `true'.
Package grffile Info: \Gin@ii of package `graphicx' fixed on input line 494.
) (./report.aux)
\openout1 = `report.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for TU/lmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
File: "./report_files/""report_4_0".png Graphic file (type bmp)
<"./report_files/""report_4_0".png>
[1
] (./report.aux) )
Here is how much of TeX's memory you used:
2120 strings out of 492483
32386 string characters out of 6134978
99314 words of memory out of 5000000
6596 multiletter control sequences out of 15000+600000
3648 words of font info for 15 fonts, out of 8000000 for 9000
1348 hyphenation exceptions out of 8191
43i,4n,36p,338b,262s stack positions out of 5000i,500n,10000p,200000b,80000s
Output written on report.pdf (1 page). |
That is the old version, not the version distributed from this repository (the new version does nothing) |
The current version of grffile does nothing other than include the standard graphicx package, so closing here. |
👋 Hi,
thank you for providing this useful bundle!
Recently I discovered that
grffile
does not work correctly anymore, if a XeLaTeX document includes graphic files with spaces in their name. For example, if I translate the following file:, then the resulting PDF includes the text
With Spaces.bb
. The file below shows what I mean. If you need any additional information, then please comment below. Thank you.XeLaTeX.pdf
The text was updated successfully, but these errors were encountered: