1

More an annoying itch than a problem …

\documentclass{article}
\usepackage[a-1b]{pdfx}
\begin{document}
hello
\end{document}

produces an empty .out file. It is always empty — I have not yet figured out how to populate it with anything, either. Could the LateX executables remove files at the end if they have created them, but not written anything to them (or not create them to begin with)?

PS: Since I am annoying everyone about the pdfx package, is "a-1b" the best most conforming pdf document that LuaLaTeX can generate? This is even more of a curiosity, only — a1-b seems to be accepted by amazon kdp and lulu printing so I am quite happy with it.

Ingmar
  • 6,690
  • 5
  • 26
  • 47
ivo Welch
  • 3,766
  • tex has no mechanism to remove a file – David Carlisle Aug 28 '22 at 05:09
  • If you turn on shell-escape you could use that to delete the file, but otherwise maybe configure latexmk to delete it later is easier. – user202729 Aug 28 '22 at 06:05
  • 4
    @Gaussler pdfx is not considered deprecated by us, and it is not unmaintained. It is "only" not compatible with the new pdf management, so you shouldn't use it if you want to use packages like tagpdf or features like expl3-spotcolors which require the pdf management. – Ulrike Fischer Aug 28 '22 at 09:24
  • you would get content in the out file if you use a \section command or similar. – Ulrike Fischer Aug 28 '22 at 09:29
  • @ulrike --- should I ask a separate question on what one should use for pdf printer prep? since latex is so well structured to begin with, would it make sense to use a different and stricter conformance than "a-1b" ? – ivo Welch Aug 29 '22 at 06:57
  • pdf/A standards are for "archiving", they should ensure that the pdf can processed later on, see the introduction section of the pdfx documentation for more info. Be aware that pdfx or LaTeX can't enforce every aspect of a standard. If you claim that your document follows a standard, you must use a validator like verapdf or acrobat to check if there is a problem. – Ulrike Fischer Aug 29 '22 at 07:06
  • I just ran my pdf file through verapdf (PDF/A-1B validation profile). my pdf produces plenty of errors. I don't think they are primarily from my document or me doing something surreptitious, but from how luatex produces pdf; and some from my fonts. are you sure that luatex should be able to produce valid A-1B? – ivo Welch Aug 30 '22 at 20:36
  • you should ping people. pdf/a-1b requires a maximum pdfversion of 1.4 and imho doesn't allow the use of open type fonts. As the default pdfversion is now normally 1.5 I would use a-2b or a-3b. – Ulrike Fischer Sep 03 '22 at 14:35
  • @ ulrike : who would you ping and how? – ivo Welch Sep 05 '22 at 01:41
  • @ivoWelch if you want to ping me you should use @UlrikeFischer (without spaces, the @ ulrike above didn't reach me). If you type to start a name you normally get suggestions of people that you can ping. – Ulrike Fischer Sep 09 '22 at 08:38
  • The problem seems to be that as soon as one graphics is inserted that is not pdf/a compliant, the pdf output is no longer compliant, too. of course, few graphics are pdf/a compliant, including files created by R's Cairo. I will drop them a request. – ivo Welch Sep 11 '22 at 00:35

1 Answers1

3

The pdfx package loads the hyperref package. Hyperref creates the .out file for pdf bookmarks (see Understanding all output files when compiling a LaTeX document). The following MWE creates a bookmark (which is not actually shown in the sidebar, but it would be if \tableofcontents would have been used):

\documentclass{article}
\usepackage[a-1b]{pdfx}
\begin{document}
\section{hello}
\end{document}

The .out file contains the following line:

\BOOKMARK [1][-]{section.1}{hello}{}% 1

You can disable bookmarks in hyperref, in which case the .out file is not created.

\documentclass{article}
\PassOptionsToPackage{bookmarks=false}{hyperref}
\usepackage[a-1b]{pdfx}
\begin{document}
\section{hello}
\end{document}
Marijn
  • 37,699
  • xcolor doesn't load hyperref, pdfx does it. – Ulrike Fischer Aug 28 '22 at 09:27
  • @UlrikeFischer maybe my sentence "pdfx loads xcolor with the hyperref package option, which loads the hyperref package" wasn't clear - "which" refers to "the hyperref package option", not to xcolor itself. – Marijn Aug 28 '22 at 11:01
  • xcolor is not relevant here, so I think you should simply drop the reference to it. "pdfx loads hyperref" is quite enough and much clearer. – Ulrike Fischer Aug 28 '22 at 11:06
  • @UlrikeFischer from looking at the log and the package code it seems that pdfx does not load hyperref itself, pdfx tells xcolor to load hyperref through the package option. While xcolor itself is not directly relevant, the question seemed to be prompted by curiosity about the .out file, which is why I thought it was interesting to add some detail on the chain of package loading that causes the .out file to be created. – Marijn Aug 28 '22 at 11:15
  • I swear you, xcolor doesn't load hyperref. Try out without pdfx. Also if you add \makeatletter \disable@package@load{xcolor}{} before documentclass to your example, then the log will show you that xcolor is not loaded at all, but hyperref is as pdfx contains lots of \RequirePackage[xxxx]{hyperref} lines. – Ulrike Fischer Aug 28 '22 at 11:34
  • @UlrikeFischer It seems I was mistaken, I thought that loading xcolor with the hyperref package option would cause xcolor to load hyperref but this is not the case, it just defines some color names for links but leaves the actual loading of the package to the calling code, which is there in pdfx.sty shortly after the \RequirePackage[cmyk,hyperref]{xcolor} line. I'll edit. – Marijn Aug 28 '22 at 11:53