moewew / biblatex-ext

Extensions for the biblatex standard styles
LaTeX Project Public License v1.3c
24 stars 3 forks source link

\oasymbol breaks PDF/A compliance #37

Closed gwater closed 7 months ago

gwater commented 1 year ago

I am preparing a PDF for digital archival with several images in RGB colorspace.

Because \oasymbol is by default CMYK colorspace, PDF/A compliance is lost anytime I insert it. (PDF/A compliant files must not mix RGB and CMYK colorspaces.)

As a workaround I am currently defining my own \oasymbol command which does not use CMYK colorspace.

One possible fix would be a package option to choose between RGB and CMYK.

moewew commented 1 year ago

Hmmm, this is unfortunate. Do you happen to have an MWE I can play with? (Also does the MWE tell me about the mismatched colour schemes itself or do I need an external programme to check for PDF/A compliance?)

Which symbolpackage do you use? l3draw has CMYK hard-coded, but the other two use HTML and xcolor and god knows how that comes out.

gwater commented 1 year ago

As you can imagine, PDF/A compliance is not trivial so I hope you understand why my MWE isn't very short.

\RequirePackage[l2tabu,orthodox]{nag}
\pdfoutput=1
\pdfminorversion=7
\def\mytitle{my title}
\def\authors{my name}
\begin{filecontents*}[overwrite]{\jobname.xmpdata}
\Title{\mytitle}
\Author{\authors}
\Language{en-US}
\Subject{The abstract or short description.}
\Keywords{keyword1\sep keyword2\sep keyword3}
\end{filecontents*}
\documentclass[a4paper,oneside,12pt]{book}

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage{csquotes}
\usepackage{biblatex-ext-oasymb-l3draw}

\usepackage{colorprofiles}
\usepackage[a-2b,mathxmp]{pdfx}[2018/12/22]
\hypersetup{
    pdfstartview=,
    colorlinks=false,
    pdfborder={0 0 0},
    linktoc=all,
    %pdfpagelabels,
    plainpages=false,
    %bookmarks=true,
    hypertexnames=false, % necessary for autonum
    %pdftex,
    %pdfauthor={\authors},
    %pdftitle={\mytitle}
}

\usepackage[rgb,hyperref]{xcolor}

\begin{document}

% when you uncomment the next line, PDF/A compliance breaks
%\oasymbol

hello world

\end{document}

to check for compliance you can use verapdf:

$ verapdf -f 2b --format text -v output.pdf

As you can see I am using l3draw. I don't remember exactly why I chose that; I think I didn't want to depend on tikz or pict2e.

moewew commented 1 year ago

Sorry, I didn't really have time to look into this properly. I switched the color in l3draw to HTML so that all drawing packages use the exact same colour definitions.

Please try the current version of the file https://github.com/moewew/biblatex-ext/blob/dev/biblatex-ext-oasymb-l3draw.sty and see if this passes validation.

moewew commented 1 year ago

I'm hoping to release a new version of biblatex-ext in the near future, because of https://github.com/moewew/biblatex-ext/commit/bfbd1af7824b42d6e637652342a1868a24c855e1.

@gwater If you could check if the changes suggested here help in your case that would be appreciated. (Of course I can help with your testing if you need a hand. Just say what it is you need.) Otherwise I'll probably release this just with my light testing and hope for the best.

gwater commented 1 year ago

Thanks, I actually have no idea how to test the develeopment version of a LaTeX package. I've always relied on the TeXLive distribution to install packages

moewew commented 1 year ago

Ah. Good point. In this case it is enough to download the file https://github.com/moewew/biblatex-ext/blob/dev/biblatex-ext-oasymb-l3draw.sty (direct link to raw download: https://github.com/moewew/biblatex-ext/raw/dev/biblatex-ext-oasymb-l3draw.sty) and drop it in the same folder as your .tex document.

I recommend you run this test in a new, empty folder and with a copy of your test/real-world document. Then you don't have to worry about the test files polluting your actual working environment or masking (updated) package files.

moewew commented 7 months ago

v0.18 with the changes from CMYK to HTML discussed here has been released (give it a few days to arrive in your TeX Live/MikTeX). Hope this helps. Please reopen the issue or open a new one if there are still issues with this.