LaTeX. Пакет pdfx
Пакет для создание документов pdf, соответствующих стандартам PDF/A и PDF/X.
Содержание
1 Проблемы
1.1 2021-07 Совместимость с LaTeX2e, версия от 2021-06-01
- После закрытия ошибки 605 (см. https://github.com/latex3/latex2e/issues/605) пакет pdfx перестал работать.
- В качестве временного решения предложено при компиляции откатиться на состояние до закрытия ошибки 605.
- Предложенный код (см. https://tex.stackexchange.com/questions/605854/error-using-pdfx-on-tex-live-2021):
1\ProvidesPackage{fixpdfx}[2021-07-22 A package that fixes pdfx errors on TeX Live 2021 in a quick and dirty way] 2 3% temporarily reverts https://github.com/latex3/latex2e/commit/5fb2860f2fedc87b213730f06ec1d77bcab4814a 4% resp. https://github.com/latex3/latex2e/commit/dd2ec509ec98e9c359a41e35aea6aade86485ca2 5% as it breaks pdfx (see https://tex.stackexchange.com/questions/605854/error-using-pdfx-on-tex-live-2021) 6 7\@ifpackageloaded{pdfx}{ 8 \PackageError{fixpdfx}{pdfx is loaded}{This package must be loaded before pdfx} 9}{} 10 11\ExplSyntaxOn 12 13% this is the old implementation from base/ltpara.dtx, version 1.0g 14\cs_new_protected:Npn \__old_para_end: { 15 % ltpara v1.0h as well as firstaid/latex2e-first-aid-for-external-files.dtx v1.0o inserted 16 % \scan_stop: here, which breaks pdfx 17 \mode_if_horizontal:TF { 18 \mode_if_inner:F { 19 \tex_unskip:D 20 \hook_use:n{para/end} 21 \@kernel@after@para@end 22 \mode_if_horizontal:TF { 23 \if_int_compare:w 0 < \tex_lastnodetype:D 24 \tex_kern:D \c_zero_dim 25 \fi: 26 \tex_par:D 27 \hook_use:n{para/after} 28 \@kernel@after@para@after 29 } 30 { \msg_error:nnnn { hooks }{ para-mode }{end}{horizontal} } 31 } 32 } 33 \tex_par:D 34} 35 36\PackageWarning{fixpdfx}{Patching~\para_end:~implementation~to~fix~pdfx} 37\cs_set_eq:NN \par \__old_para_end: 38% these two aren't actually required to fix pdfx, so we'll skip them... 39%\cs_set_eq:NN \@@par \__old_para_end: 40%\cs_set_eq:NN \endgraf \__old_para_end: 41 42\AtBeginDocument{ 43 \@ifpackageloaded{pdfx}{}{ 44 \PackageError{fixpdfx}{pdfx~is~not~loaded}{You~did~not~load~pdfx~and~thus~do~not~need~this~package} 45 } 46 % pdfx v1.6.3 from 2019-02-27 is bad, so anything later is hopefully fixed... 47 \@ifpackagelater{pdfx}{2019/02/28}{ 48 \PackageError{fixpdfx}{Please~check~whether~you~really~need~this~package.}{Your~pdfx~package~is~more~recent~than~2019-02-27~and~thus~might~not~require~this~package's~fix.} 49 }{} 50 51 \PackageWarning{fixpdf}{Restoring~old~\para_end:~implementation} 52 53 % restore additional definitions 54 \cs_set_eq:NN \par \para_end: 55 % see above: as we didn't replace them, no need to restore them. 56 %\cs_set_eq:NN \@@par \para_end: 57 %\cs_set_eq:NN \endgraf \para_end: 58} 59 60\ExplSyntaxOff