Du befindest dich in der Kategorie: Allgemeines

Dienstag, 20. Juni 2006

LATEX-Hilfe Fehlende Fonts

Von drpagel, 14:14

Nach einer ersten von google ins Deutsche versuchten Übersetzung habe ich diese überarbeitet bzw. seine unverständlichen Translationen nochmals aus dem englischen Originaltext "manuell" übersetzt. Hier der Originaltext einer DVIWIN.EXE-Hilfe (er kann in dviwin.exe aufgerufen werden unter: "Help / Contents / The Options submenu / Missing fonts"):

Missing fonts

This entry lets you specify the action that dviwin will take if a font is missing. There are three options: the first one is to take no action. The second option is to execute a command to generate the required font; this command is usually a program or a batch file that calls Metafont to generate the font. After the command is executed, dviwin tries again to locate the required font; if the command was successful, dviwin will find and use the font. This option is very helpful if we do not want to keep most standard TeX fonts on disk; the basic idea is to start with a small set of fonts and generate only the ones that we need as we encounter them. The advantage of the method is that the used fonts are only a small fraction of all the TeX fonts, so we save some disk space; the disadvantage is that Metafont is rather slow, so we may have to wait quite a while if there are many missing fonts in a dvi file. The dviwin distribution contains the sample files "genpk.pif" and "genpk.bat" which demonstrate how you can automatically generate the missing fonts (the corresponding file under Win-OS/2 is "genpk2.cmd"). If you decide to use this option, you will first need to setup Metafont (ie., set the correct environment variables and generate the plain base including the mode information for various devices) and gftopk, and modify the sample file "genpk.bat" (or "genpk2.cmd") to store the generated fonts at the appropriate location, so that dviwin can find them. Some user customization will yield the best results and that's why genpk.bat (or genpk2.cmd) are batch files instead of compiled programs. The program switches to the directory specified by the TEMP environment variable right before executing the specified command (you can override this from the batch file). There is one thing that you should be aware of: after dviwin executes the desired command, it searches again for the font in the PK format only, but it does not re-read any FLI files; if your batch files create or update FLI files, use the "Reset all fonts" command from the "Options" submenu to force dviwin to re-read the FLI files.

The above option may be too slow on some machines; apart from this, it may not work very well under certain circumstances (eg., when running the 16-bit version of the program under NT, or the 32-bit version under regular Windows); in those cases, dviwin does not wait for Metafont to complete, and will spawn multiple copies of Metafont if there are more than one missing fonts. The third option tries to circumvent these problems; you specify a command to be executed as well as the name of a batch file; then dviwin just appends the command to the batch file; in this way, you can collect several font generation requests and run the batch file overnight. Dviwin tries to ensure that there are no duplicate font requests; it is not always successful, but genpk.bat (or genpk2.cmd) performs one more test which should catch any remaining duplicate requests. The last entry field under this method accepts a command to be executed after all the missing font requests for a given document have been collected. If this field is empty, then you will run the batch file manually at your convenience. If this field is non-empty, then dviwin will execute the specified command, and you can still preview the document during the font generation. Here are the appropriate commands for various environments:
Environment Command
Windows 3.x genall.pif $(TEMP)\missing.bat
Windows NT genall.pif $(TEMP)\missing.bat
Win-OS/2 genall2.cmd $(TEMP)\missing.cmd
Under Win-OS/2, you also need to set the "File" field to "$(TEMP)\missing.cmd" instead of "$(TEMP)\missing.bat". After these batch files generate all the fonts, you will want to use the "Reset all fonts" command from the "Options" submenu to read the correct fonts. This can also be done automatically under certain circumstances: the command line switch "-r" instructs dviwin to reset the fonts. Therefore, the batch file can issue the command "dviwin -r" when all fonts have been generated (in theory at least). In practice, this will not work under normal Windows, because DOS batch files cannot invoke Windows programs; it may work however if you rewrite the batch file in one of the Windows scripting languages. NT and OS/2 have no such restrictions, so genallnt.bat and genall2.cmd do the right thing (you may need to run dviwin in seamless mode under OS/2).
The command to be executed in the last two options is actually a template where the following special sequences will be substituted by the appropriate values:
$f Font name (truncated to 8 characters)
$x Horizontal resolution
$r Horizontal resolution (same as above)
$y Vertical resolution
$X Horizontal base resolution
$Y Vertical base resolution
$m Magstep
$(xxx) Contents of environment variable "xxx"
${xxx} Same as $(xxx)
$d Letter of disk drive in the directory containing the dvi file
$p Path (without the drive) of the directory containing the dvi file
$e Extension of Metafont output file (truncated to 3 characters)
When generating fonts synchronously (ie., when using genpk.bat instead of genall.bat) you can interrupt the font generation process by pressing Control-Break. Dviwin will then set the font generation method to "Take no action", so it will not attempt to generate any other fonts; you will still need to wait a bit for Metafont to finish the current font.

[Kommentare (0) | Permalink]

Kostenloses Blog bei Beeplog.de

Die auf Weblogs sichtbaren Daten und Inhalte stammen von
Privatpersonen. Beepworld ist hierfür nicht verantwortlich.