LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Joseph Wright <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Tue, 20 Apr 2021 14:13:12 +0100
text/plain (65 lines)
On 20/04/2021 12:35, LARONDE Thierry wrote:
>>> \outfmtlist: a series of ASCII tokens identifying the output format
>>> 	supported by the engine. Ex.: DVI1.0 (traditional DVI), PDF1.3 etc.
>>> 	The default format shall be listed first. (Note: I plan, some day,
>>> 	to extend DVI.)
>> pdfTeX already defines \pdfoutput, which is 0 for DVI and 1 for PDF. LuaTeX
>> renames that to \outputmode but with the same numerical values. The version
>> of PDF written by pdfTeX/LuaTeX is set separately using (in pdfTeX)
>> \pdfminorversion/\pdfmajorversion, as this is really a separate concept to
>> whether PDF or DVI is in use.
>> There is very little use at the macro level for the DVI level.
> For now ;-) Since I plan to add code pages (256 blocks) extensions to be
> able, at least, to have a MetaDVI and be able to bypass PostScript and
> PDF...

It only becomes relevant at the macro level if there is something to do. 
I can only imagine some difference in specials? Usually that's pushed to 
PostScript so we can test there.

>> The PDF level
>> does have some impact on output features but in a simply 'Sorry, not doable'
>> sense.  Note that XeTeX uses XDV, which is a version of DVI dedicated to
>> this engine. It's not necessary to test the DVI version at the macro level:
>> what's important is for example which method to include imagines, which uses
>> an engine test.
>>> \outfmtset: setting the output format, that shall be amongst the formats
>>> 	supported. If not, it returns an error and set the output format to
>>> 	the default one. Shall be set before \shipout and errors if used
>>> 	after output has started.
>>> \outfmt: a token identifying the current output format.
>> See above: data in the same format as other engines is strongly preferred.
> Well, since there is no real consensus and these are not amongst the
> required---and with the identification of the engine, one could \input
> ad hoc macros---I will for now stick to my proposal.

Currently we can do something like


then can use \pdf@output as a one-shot to know if we are in PDF or DVI 
mode, and if we are using pdfTeX/LuaTeX we can also set it. With a 
token-based indicator, we can of course set up something similar but it 
gets longer. However, this is of course your call, and as you are not 
making PDF, it's not so important (it's most useful for pdfTeX and 
LuaTeX where both DVI and PDF are possible).