True WYSIWYG LaTeX System
Windows     Mac     Linux  

BaKoMa TeX Intrinsics
Device Parameters

This description is related only for BaKoMa TeX 11.0 or later.

Reimplementation of setdevparams/currentdevparams

Previous versions (before V 11.0) have dummy definitions of setdevparams and currentdevparams operators as follwing:

%* currentdevparams/setdevparams
systemdict begin
/currentdevparams { << exch /DeviceName exch >> } bind def % List is NONSTD.
/setdevparams { pop pop } bind def % It is always O'K.

Beginning from V 11.0: currentdevparams returns dictionary of related driver.
For example, under windows you should see following output:

(Display) currentdevparams ->
  /TextOutMode 0
  /MaxChars 3
  /Clip 1 
  /Graph_NT 0 
  /Graph_Warn 1 
  /DeviceName (Display)

(Printer) currentdevparams ->
  /TextOutMode 0 
  /MaxChars 128
  /PrintSetup 0 
  /Print_via_Bitmap 0 
  /Print_Mirror 0 
  /Print_Negative 0
  /DeviceName (Printer) 
  /FromPage 0 
  /ToPage 0

This output reflects real parameters whose will be used by driver for output on display and printer. Using setdevparams operator you can alternate any of these parameters from PostScript.

However, in common/TeXView.ctr we create convenient wrappers for all these options such that they may be observed and controlled from 'Options/Viewer Preferences' dialog under Display and Printer tabs in the box mrked as 'Advanced Display|Printer Driver Parameters'.

NOTE: Previous approach of handling MaxChars and TextOutMode via calling 'settextoutmode' at begin of every page is not obsolete.

Standard way for retrieving list of all supported devices is enumerating IODevice resource:

[ (*) { dup length string copy } 64 string /IODevice resourceforall pstack cleartomark

Under BaKoMa TeX may return on stack:

-mark- (Display) (Printer) (PDF) (SVG)

When a device may be supported by several drivers, IODevice enumeration will duplicate devices with different driver suffixes:

-mark- (Display.Win32) (Display.Direct2D) (Printer) (PDF) (SVG)

This list is returned on stack by intrinsic '.devlist' operator. However, using IODevice resource is more standard way for PostScript.

Display.Driver option allows to switch between different display drivers.

Strings returned by IODevice may be used to access parameters of different drivers:

(Display.Win32) currentdevparams
(Display.Direct2D) currentdevparams

Access Device Parameters from GUI
Display tab of Options / Viewer Preferences dialog allows to select current display driver and allow to control options separatly for every driver.

Changes in Page Device Dictionary implementation.

In previous versions currentpagedevice was used for passing MaxChars and TextOutMode parameters into currently used driver. In this way, parameters are kept in device-dependent subdictionaries and was setup into driver at begin of every page.

In V 11.0 (set|current)devparams handles MaxChars and TextOutMode. So, codes related with handling them in page device dict are just commented out.