On 08/02/2011 04:08 PM, Johan Sandblom wrote:
Thank you for your suggestions!
Jaroslav, having the numbers in a separate file and sorting there, while possible, would increase overhead in managing the document and make it impossible to enter phone numbers at other places in the text.
Ultimately, it is of course your decision what you want to do, but I think you were a bit quick to reject Jaroslav's suggestion. TeX isn't meant to store databases. Having the information in some external file will actually make things much easier in the middle and long run. It's easier to manage, it scales better, and it will allow you to reuse this information in other ways. And ConTeXt is excellent in that it can handle many different input formats. I wrote something about using databases in xml or sql format in the latest MAPS issue; csv is easy to produce (libreoffice calc can produce csv). You could even store the information in a raw lua table and then retrieve it via some macros. I think the sorting itself should be done in ConTeXt because language support for the other solutions is probably not as straightforward (if it exists at all), but I would definitely store the information in some other format. Again, it is your decision, and of course we don't know what special requirements you have, but using some sort of well-known format would make your solution much more future-proof. Good luck Thomas