Good news is that it's possible! Theoretically, you could create a tagged PDF with package tagpdf
. But the code will be hard to read and you would need a tremendous amount of time to generate the tags in your LaTeX document, similar to writing a HTML document in a text editor.
The easier way is to do the tagging in Acrobat Pro.
Here are the neccessary steps:
Step 1: Create a PDF with relevant metadata and OutputIntent
Small working example
\documentclass{scrartcl}
\usepackage{lipsum}
\usepackage[pdfa,bookmarks=false]{hyperref}
\usepackage[latin]{babel}
\usepackage{hyperxmp}[2020/03/01]
\usepackage[cmyk,hyperref]{xcolor}
\usepackage{embedfile}
\embedfile[mimetype=application/x-tex,afrelationship=/Source,ucfilespec=\jobname.tex]{\jobname.tex}
% Which paper did the authors have in mind when they created the document?
\immediate\pdfobj stream attr{/N 4} file{PSO_Uncoated_ISO12647_eci.icc}
\edef\iccobj{\the\pdflastobj}
\pdfcatalog{%
/OutputIntents [ <<
/Type /OutputIntent
/S /GTS_PDFX
/DestOutputProfile \iccobj\space 0 R
/Info(PSO Uncoated ISO12647 (ECI))
/OutputCondition(Offset printing, according to ISO 12647-2:2004/Amd1, OFCOM, paper type 4 = uncoated white, 115 g/m2, tone value increase curves C (CMY) and D (K))
/OutputConditionIdentifier (Uncoated FOGRA47)
/RegistryName(http://www.color.org)
>>
<<
/Type /OutputIntent
/S /GTS_PDFA1
/DestOutputProfile \iccobj\space 0 R
/Info(PSO Uncoated ISO12647 (ECI))
/OutputCondition(Offset printing, according to ISO 12647-2:2004/Amd1, OFCOM, paper type 4 = uncoated white, 115 g/m2, tone value increase curves C (CMY) and D (K))
/OutputConditionIdentifier (Uncoated FOGRA47)
/RegistryName(http://www.color.org)
>> ]
}
\makeatletter
% Bugfix of hyperref to produce CMYK links
\let\HyColor@HyperrefBorderColor\HyColor@XZeroOneThreeFour
\makeatother
\makeatletter
%we need to tell PDF/X the final format of the paper. This needs adjustment if you want graphics on the page border, called bleeding
\@tempdima=0.99626400996264009962\paperwidth
\edef\boxwd{\strip@pt\@tempdima}
\@tempdima=0.99626400996264009962\paperheight
\edef\boxht{\strip@pt\@tempdima}
\makeatother
\edef\next{%
\protect\pdfpageattr{
/TrimBox[0.0 0.0 \boxwd\space \boxht]
}%
}
\next
\hypersetup{%
pdflang={la},
pdftrapped=False,
pdfkeywords={key1,key2},
pdfsubject=text,
pdfaconformance=A,
pdfapart=3,
pdfuapart=1,
pdfversionid=1,
pdfxstandard={PDF/X-4},
pdfdisplaydoctitle=true,
pdfstartpage={},
urlbordercolor=red,
}
\author{anonymus}
\title{Multistandard PDF document}
\begin{document}
\begin{NoHyper} %comment out to produce clickable links
\maketitle
\lipsum
\href{https://tex.stackexchange.com/questions/545903/creating-a-pdf-a-pdf-x-and-pdf-ua-multistandard-compliant-thesis-or-paper}{Stackexchange}
\end{NoHyper}
\end{document}
This intermediate PDF is somewhat dangerous because it claims to be compliant to PDF/A-3a and /UA while it does not. Do not send it to anyone! The sole standard that should validate at this stage is PDF/X-4. There is an OutputIntent for coated paper in the example. Use the appropriate OutputIntent for your printing condition. Ask your print shop/publisher if in doubt.
You can include images but they should be PDFs conforming to PDF/A-Nb and PDF/X. You can achieve this by converting JPG images in Acrobat Pro.
The example above should work with pdfTeX and LuaTeX.
Step 2: Tag the document
Open the PDF in Acrobat Pro, enable editing and automatically tag your document.

Then, make sure the top tag is of type Document
and the first heading is of type H1
. Make sure not to skip headings, i.e. after H1
the next heading must be either H1
or H2
. At this stage you should also provide meaningful alternative text to your images and links. You can do that in the tags tree.
Step 3: Add PDF/A metadata again
When you choose to enable editing the PDF Acrobat removed PDF/A metadata. If you would save as PDF/A now Acrobat would remove PDF/X and PDF/UA metadata. So save this code as an .xmp
file and append it to your PDF under File->Properties->Additional Metadata->Advanced. I copied the code from my PDF before editing it in Acrobat.
Important: Do not save your PDF at this stage! Acrobat would delete metadata.
Step 4: Apply a custom conversion in Preflight
Create a new Preflight set. This screenshot shows where to click:

Put the following custom fixups in your profile:
1. Embed fonts (even if text is invisible)
2. Remove CIDset if incomplete
3. Remove XMP Metadata if not compliant
4. Substitute characters using .notdef Glyph
5. Set Trapped key to false
Instead of creating your custom profile you can save this ready made profile as a .kfp
file and import it in preflight.
Choose Analyze and fix
with your custom profile. By applying a fix Acrobat does not do the secret «optimisations» it would do under Save as. Done!

Proof
You should check everything worked well. Do the following checks:
1. PDF/A conformance in Preflight
2. PDF/X conformance in Preflight
3. Reflowing in Acrobat (Ctrl+4)
4. Accessibility in PAC3

A few notes on successful standard combinations
The above example is for PDF/A-3a, PDF/X-4 and PDF/UA. Embedded .tex
files only work for PDF/A-3. If you renounce that feature the example could also work with PDF/A-2a or A-1a. You may need additional fixups. On the PDF/X side you could use PDF/X-3 as well. But PDF/X-1a is not recommended together with PDF/A because it forces CMYK conversion of RGB images that may look better on screen. Forget PDF/X-1.
Hyperlinks and even worse bookmarks are forbidden in all current PDF/X. I consider this a bug in the standards since bookmarks can make life easier in prepress. The standards commitee is aware of this but unfortunately they don't send a clear signal that these features will be available in the upcoming PDF/X-6. But you can be bold and knowingly send a PDF/X document with links and bookmarks to the print shop.