[tex-live] texdoc under windows

Taco Hoekwater taco at elvenkind.com
Sun Jun 10 15:17:35 CEST 2007


Frank Küster wrote:
> 
> b) kpse* in luatex?

I was going to say 'the reference manual' but I have done stuff in
the past weeks that is not in the manual yet. Because there are
only a few functions involved, here is the relevant documentation
(most have a 1-to-1 relationship  with the kpathsea C functions):

kpse.set_program_name("name" [, "progname"])
  * This initializes the search library.

kpse.init_prog("name", basedpi, "mfmode" [, "fallbackfont"])
  * This does roughly the same, but for progams that do
    PK/GF lookups (and creation), because that needs some
    default values.

"file" = kpse.readable_file("file_name")
  * Returns either the actual filename, or nil, depending on the
    readability of the absolute (!) file_name. The return
    value is a string because in some cases the used filename is
    not identical to the requested filename (think MSDOS)

"var" = kpse.expand_var("varname")
  * expand a texmf variable (== kpsewhich --expand-var)

"path" = kpse.expand_path("path")
  * expand a search path (== kpsewhich --expand-path)

"variable" = kpse.expand_braces("variable")
  * expand a braced set (== kpsewhich --expand-braces)

"file" == kpse.find_file("file" [, "type" [, must_exist] ] )
  * finds a file, or returns nil. The "type" argument is the
    stringified form of the file type, as for kpsewhich --format="",
    and defaults to 'tex'.
    The must_exist argument is a lua boolean value that maps to
    --must-exist, and defaults to false (but see the next paragraph).

"file" == kpse.find_file("file" , "type" , wanted_dpi )
  * In this second form, 'wanted_dpi' is a bitmap resolution. This
    value variant is used when 'type' is one of 'pk', 'gf', or
    'bitmap font'.

If this is not good enough, let me know. Adding an interface to other
existing kpathsea functionality takes no more than a few minutes.

Best wishes,
Taco






More information about the tex-live mailing list