Converting TeX tokens into characters

Discussion in 'Python' started by Jonathan Fine, Jun 29, 2005.

  1. I'm sort of wishing to convert TeX tokens into characters.

    We can assume the standard (i.e. plain) category codes.
    And that the characters are to be written to a file.

    This proceess to take place outside of TeX.
    Say in a Python program.

    Think of a pretty-printer.
    * Read the TeX in as tokens.
    * Write the TeX out as characters.

    My present interest is in the writer part.

    And I'd very much prefer to have human-editable output.

    So the writer should have methods for
    * Writing a string (not containing control sequences).
    * Writing a control sequence (or control symbol).

    And, like humans, it should also have a line length limit.

    Does anyone know of such a writer? Or something close?

    Or any projects that could use such a writer?


    --
    Jonathan
     
    Jonathan Fine, Jun 29, 2005
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TFc=?=

    string into tokens

    =?Utf-8?B?TFc=?=, Oct 13, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    492
    =?Utf-8?B?TFc=?=
    Oct 13, 2005
  2. Atlas
    Replies:
    2
    Views:
    435
    Alf P. Steinbach
    Oct 1, 2005
  3. Replies:
    5
    Views:
    791
    Stefan Ram
    Feb 7, 2008
  4. Converting a string formula to TeX

    , Feb 3, 2008, in forum: C Programming
    Replies:
    0
    Views:
    339
  5. Hal Fulton

    Breaking Ruby code into tokens

    Hal Fulton, Oct 4, 2003, in forum: Ruby
    Replies:
    2
    Views:
    274
    Hal Fulton
    Oct 5, 2003
  6. John W. Long
    Replies:
    16
    Views:
    616
    Minero Aoki
    Jan 13, 2004
  7. Replies:
    2
    Views:
    246
    Paul Lalli
    Jul 15, 2004
  8. Ivan Shmakov
    Replies:
    0
    Views:
    1,015
    Ivan Shmakov
    Jun 1, 2012
Loading...