Comments on: Let’s Learn LaTex: Part 3 http://www.terminally-incoherent.com/blog/2010/04/22/lets-learn-latex-part-3/ I will not fix your computer. Tue, 04 Aug 2020 22:34:33 +0000 hourly 1 https://wordpress.org/?v=4.7.26 By: Chris http://www.terminally-incoherent.com/blog/2010/04/22/lets-learn-latex-part-3/#comment-64968 Thu, 27 Feb 2014 21:25:46 +0000 http://www.terminally-incoherent.com/blog/?p=5124#comment-64968

Someone MUST have invented this wheel already in LaTeX, but I can’t seem to figure it out. I’m looking to sort a comma-separated list of items, INLINE, with LaTeX.

For instance, these data could be Iowa City, Ames, Story City, Des Moines

In this example, I’d want the section to print the sorted list [of, here, city names]: Ames, Des Moines, Iowa City, Story City

How might I do this?

Reply  |  Quote
]]>
By: Jamie http://www.terminally-incoherent.com/blog/2010/04/22/lets-learn-latex-part-3/#comment-23147 Fri, 14 Sep 2012 16:37:51 +0000 http://www.terminally-incoherent.com/blog/?p=5124#comment-23147

@ Luke Maciak,@ Stefanie:
Take a look at the datatool package. It allows you to do many database operations in Latex, including sorting lists. Also cool stuff like plots and tables directly from csv files!

Reply  |  Quote
]]>
By: Rhapsodyine http://www.terminally-incoherent.com/blog/2010/04/22/lets-learn-latex-part-3/#comment-15202 Sat, 24 Apr 2010 20:54:13 +0000 http://www.terminally-incoherent.com/blog/?p=5124#comment-15202

Love these. Posted because I’ve just started reading these and running it- you mentioned you may stop these if you didn’t get much feedback, but these are great, you really help making it easy to learn.
I redid an engineering report I did in Word a couple of weeks ago in LaTeX, and its insane how much better it looks.

Reply  |  Quote
]]>
By: Deltaway http://www.terminally-incoherent.com/blog/2010/04/22/lets-learn-latex-part-3/#comment-15201 Sat, 24 Apr 2010 20:33:20 +0000 http://www.terminally-incoherent.com/blog/?p=5124#comment-15201

This series is great! Thanks so much!

Reply  |  Quote
]]>
By: Luke Maciak http://www.terminally-incoherent.com/blog/2010/04/22/lets-learn-latex-part-3/#comment-15165 Thu, 22 Apr 2010 20:26:58 +0000 http://www.terminally-incoherent.com/blog/?p=5124#comment-15165

Stefanie wrote:

Nice work, maybe you can link to this series of posts on your “LaTeX reference page”? That way a new visitor may be more likely to find them.

Good idea. :)

Stefanie wrote:

About lists, lately I’ve been searching for a way to make LaTeX sort my description lists alphabetically, but I couldn’t find an easy way to do it.

Yeah, that may be difficult. LaTex is not very good at sorting things. Pretty much the only thing you can sort quite readily are your bibliography references. But that actually requires you to run a separate executable, generate bunch of temp files and requires you to run l;atex twice over the source to integrate all of that stuff.

I will let you know if I find a way to do this. So far I haven’t seen anything that would do that.

It seems that mcai8sh4’s suggestion below is the simplest thing to do: use a tool to sort the list for you prior to compiling.

mcai8sh4 wrote:

Another nice post Luke, will there be a Terminally Incoherent LaTeX cheat sheet on the horizon?

That is actually a good idea. I think my LaTex reference page was an attempt at something just like that, but I got lazy and never finished it. :)

Reply  |  Quote
]]>
By: Scott http://www.terminally-incoherent.com/blog/2010/04/22/lets-learn-latex-part-3/#comment-15163 Thu, 22 Apr 2010 18:56:49 +0000 http://www.terminally-incoherent.com/blog/?p=5124#comment-15163

Meant to post last week after your ‘How many lurkers do I have’ post. I’ve been following your blog for over a year (all but the game reviews….just not my thing :) ).

Love the Latex posts!! You’re making it much more clear than most other references out there! Keep ’em coming!!

Reply  |  Quote
]]>
By: Alex http://www.terminally-incoherent.com/blog/2010/04/22/lets-learn-latex-part-3/#comment-15161 Thu, 22 Apr 2010 17:57:23 +0000 http://www.terminally-incoherent.com/blog/?p=5124#comment-15161

A much better explanation of both how and why than I’ve found elsewhere. Can’t wait for the table talk!

Reply  |  Quote
]]>
By: mcai8sh4 http://www.terminally-incoherent.com/blog/2010/04/22/lets-learn-latex-part-3/#comment-15159 Thu, 22 Apr 2010 16:46:35 +0000 http://www.terminally-incoherent.com/blog/?p=5124#comment-15159

“And even longer description that will probably wrap to the next line, because that’s what we want to show. Actually, this one may not be as long. Whatever.” Haha, sounds like something I would write (although I’d have to include something in parenthesis)

Stefanie : If you’ve followed some of Lukes other posts and use Vim, you could simply select the range you want to sort, then use the command ‘:sor’ or to remove duplicates ‘:sor u’ (for unique, I think). It’s basic, but does work (for simple lists).

Another nice post Luke, will there be a Terminally Incoherent LaTeX cheat sheet on the horizon?

Reply  |  Quote
]]>
By: Hector http://www.terminally-incoherent.com/blog/2010/04/22/lets-learn-latex-part-3/#comment-15155 Thu, 22 Apr 2010 15:06:48 +0000 http://www.terminally-incoherent.com/blog/?p=5124#comment-15155

You have to love how contextual ads work. :-)

As a result of your posts on this topic I started using latex for documents at work. So please, keep on! ;-p

Reply  |  Quote
]]>
By: Stefanie http://www.terminally-incoherent.com/blog/2010/04/22/lets-learn-latex-part-3/#comment-15154 Thu, 22 Apr 2010 15:02:49 +0000 http://www.terminally-incoherent.com/blog/?p=5124#comment-15154

Nice work, maybe you can link to this series of posts on your “LaTeX reference page”? That way a new visitor may be more likely to find them.

About lists, lately I’ve been searching for a way to make LaTeX sort my description lists alphabetically, but I couldn’t find an easy way to do it. The best alternative I could think about was writing a perl script to modify my .tex document before compiling, but I still hope there’s a more elegant solution for this.

Reply  |  Quote
]]>