I get an output from tlpdb.tlu, which is unsorted. When I now use table.sort the output as a pdf is still unsorted.

tlpdb = read_tlpdb( kpse.var_value("SELFAUTOPARENT") )

Do I need a compare function for this?

closed as off topic by topskip, Khaled Hosny, Alan Munn, Joseph Wright Dec 19 '11 at 19:20

Questions on TeX - LaTeX Stack Exchange are expected to relate to TeX, LaTeX or related typesetting systems within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.

  • This question belongs on stackoverflow.com, it's a question about the Lua language. – topskip Dec 19 '11 at 10:45
  • The code snippet is part of a tex document! – DanielG Dec 19 '11 at 11:29
  • That's a bit like asking about ls in the following example: \write18{ls}\bye. As far as I understand that question, it is about sorting a Lua table. Which is a Lua question to me. If you disagree, you should expand your example a bit more. Where is read_tlpdb defined? It is not from LuaTeX. Please write more to get better help. – topskip Dec 19 '11 at 11:39
  • 1
    I presume the snippet is from question tex.stackexchange.com/questions/38131, I updated my answer there to show how to get a sorted list of table keys. – Tomek Dec 19 '11 at 12:04

Browse other questions tagged or ask your own question.