Text FormattingAlphabetize Sections

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
wastvedt
Posts: 1
Joined: Mon Oct 25, 2010 3:34 am

Alphabetize Sections

Post by wastvedt »

Hi.
I'm trying to create a sort of journal, where each entry is a body of text and/or figures, each with a date and time. These entries are coming from multiple sources, so it isn't so easy to order them by hand. Is there a way to get Latex to order, say, sections, by some keyword? I looked briefly at the datatool package, but it seems to only accept single lines of text, as in a simple list. I'd like for each section to be potentially many pages, with multiple paragraphs. Any thoughts? Thanks.

Trygve

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

Alphabetize Sections

Post by nlct »

Perhaps you could put the contents of each section in a file and just have the file name in the database or maybe the file name could be derived from the date and time. In order to get datatool to sort it according to date, you'd need to use yyyy-mm-dd format as it will try to sort it alphabetically. Once you've sorted it, you could iterate through the database and load the relevant file using \input.

Regards
Nicola Talbot
Post Reply