Pdf&#x2F;A and xml based formats in theory.
And in general use open source software. 
In practice use the Odf format because I support that and it does what you want. And don&#x27;t use pdf&#x2F;A because too many implementations are pretending they produce pdf&#x2F;A while they don&#x27;t.