TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A Few years back we have created fmt format through PDFTEX. Now we have need to update some points in the class file. It is possible again to create fmt to .cls or .dtx files?

share|improve this question
Is your goal to have a class file or a format? If the latter, it might be possible to load the current format, make the changes on top, and compile into a new format. (I should add that I know nothing about this, but it occurred to me that that might be easier than recreating the class file.) – Loop Space Feb 18 '13 at 9:03
up vote 3 down vote accepted

I believe it is possible to extract the information from format files into a form that can be turned into a TeX script, but this is likely to be a lot of work for you to turn into something you can use as a class file.

The issue is that format files characterise the initial state of the engine when it is given a document - there is no good semantics for combining two formats, (for you, your format and the Latex format), and quite possibly unresolvable conflicts. Furthermore, the contents as you get them automatically will be the contents as they are represented internally by TeX, and so will not be particularly easy to understand (think of macros defining macros, \edefs and the like).

You can extract much of the most important content of a format file using the following steps (which can be automated, but I know of no script that does so):

  1. Get a list of csnames defined in the format file, using -debug-format as described in What macros are defined in a Web2c format file?
  2. Create a program based on the format that \shows the contents of these csnames.
  3. Scrape the log file to create a TeX script.

It would be easier to work with the sources you used to prepare the format.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.