I have a long number of people to acknowledge in my thesis, and I was wondering if it would be possible to sort their names automatically, rather than doing it by hand. In other words, I would like a macro, say \sorted, which would take \sorted{Gauss, Carl Friedrich and Riemann, Bernhard and Euler, Leonhard}  and output  Leonard Euler, Carl Friedrich Gauss and Bernhard Riemann  To be clear, I am not looking to sort the items in a list environment. Rather, I would like to output a sentence that contains the various names, in alphabetical order. All names but the last two should be separated by a ,, while the last two should be separated by and.
10682
I am wondering whether it is possible to display the items alphabetically regardless of the order we type on the backend? For example I am using itemize as follows:  \begin{itemize}     \item ISDYNSTP:  Is dynamic time step used?     \item ISCDCA:     \item MVAR     \item IS2TL_ \end{itemize}   But I want to display the items in the alphabetical order. I don't know whether it is possible or not. I have like hundreds of itemize items. Actually I am trying to create a glossary for the different parameters.
121870
I'm using a Query in Google Sheets to pull data from another sheet. That query looks something like this:  =QUERY('Raw Data'!A2:AB,"SELECT E, A, C, D, Y, R, S WHERE S = 'New York'",1 )   What I'd like to do, though, is build a custom sort order within the function so that the Query automatically sorts by rows that have "string1" in column E, followed by those that have "string2" in column E, etc etc. The desired order is not alphabetical so I can't use a clause to sort in ascending or descending order.  I'd also prefer to do this without having to create another sheet where I rank my sort order in a table.
66923
I am new to LaTeX, just a beginner, basically a Perl developer.  I have created a LaTeX file  \begin{document}  \cont{\iname{\isurname{Name1}\ifname{K. C. G.}}\iname{\isurname{Name11}\ifname{Y. Q.}}\iname{\isurname{Name111}\ifname{C.-Z.}}\ititles{Some title Text}\ipage{995}}  \end{document}   Now my need is to define LaTeX commands so that the output should appear as below     Name1 K. C. G., Name11 Y. Q. and Name111 C.-Z. Some title Text - 995.   \iname - Person Name will repeat several times \isurname - Surname of a person \ifname - First Name of a person    \iname will repeat any number of times, say 1 to ...  If only one \iname found inside \cont, display should be like the below     Name1 K. C. G. Some title Text - 995.   If only two \iname found inside \cont, display should be like the below     Name1 K. C. G. and Name11 Y. Q. Some title Text - 995.   If more than two \iname found inside \cont, display should be like the below (and should come after last \iname)     Name1 K. C. G., Name11 Y. Q. and Name111 C.-Z. Some title Text - 995.   I can define input for \iname separated by commas, but I don't know how to write a macro to define \iname with different outputs based on the if condition.  I hope to have clearly explained my doubt.
19008
I have a few hundred files named hortstu01-01-14 then hortstu01-02-14... Do you get the idea?  Well half of the files are named hortstu_01-03-14 then hortstu_01-04-14.  This messes up sorting the files by name and getting them in the order I'd prefer them to be.  So I'd like to rename the ones without the underscore to hortstu_    Is it possible to do this in a batch operation?  If so how?
62506
Using alphabetical ordering for authors' names is a long established tradition in mathematics. In the situations of extremely unequal contributions, is it reasonable to break from this tradition?  Has there been any examples?  If it is common, what is the threshold for breaking from alphabetical ordering?
110886
I have multiple blocks of text, or in other words, multiple functions like this:  def ==(other)   ... end  def to_s(full=false)   ... end  def to_a   ... end  def to_hash   ... end  def inspect   ... end   I want to sort the functions alphabetically by the function signature. How can this most easily be done in Vim?
16056
I have a ton of files, all named stuff like 1.jpg, 2.jpg, 3.jpg, and so on up to 1439.jpg, however, I have a problem with one of my projects and alphabetizing. It will usually go in the order 1.jpg, 10.jpg, 11.jpg and so on.  What I need is some way to name the files so they are in the format such as 00001.jpg all the way up to 01439.jpg.  How would I be able to do this quickly and efficiently?
85770
I just spotted someone use \newcommand* in an answer and realised that I'd never quite sorted out in my head what the star (asterisk) was there for.  (This one is practically impossible to search for on the internet so this is a good place to record the answer!)
31950
I have a Google Sheets with a long list of names and amounts. Many of the names are duplicates. For example:  John  | 10 Bill  | 2 Susan | 3 Frank | 4 Sally | 10 John  | 2 Susan | 2 John  | 3   Is there any automated way to combine all of the values so I get a list without any duplicate names and a single sum of all of each person's entry?  For example:  John  | 15 Bill  | 2 Susan | 5 Sally | 10
118809
I've got two columns of data I need to sort: the first column(A) needs to be sorted lexicographically and for any rows which then contain the same column A string, I need them to be sorted numerically according to what's in the second column(B).   I was thinking    'sort -f' , but that would make a '12' in column B come before a '2'.   Edit: Accidentally typed column in place of row.
16967
Is there an elegant way to have performant, natural sorting in a MySQL database?  For example if I have this data set:   Final Fantasy Final Fantasy 4 Final Fantasy 10 Final Fantasy 12 Final Fantasy 12: Chains of Promathia Final Fantasy Adventure Final Fantasy Origins Final Fantasy Tactics   Any other elegant solution than to split up the games' names into their components    Title: "Final Fantasy" Number: "12" Subtitle: "Chains of Promathia"   to make sure that they come out in the right order? (10 after 4, not before 2).  Doing so is a pain in the a** because every now and then there's another game that breaks that mechanism of parsing the game title (e.g. "Warhammer 40,000", "James Bond 007")
118982
I know that Umlaute have to be avoided in BibTeX and I am using {\"a}, in fact I use BibDesk and it produces the correct LaTeX code. The sorting works for small characters, but I have one name starting with Ö. Although I use {{\.I}nci {\"O}zkarag{\"o}z}, the item is sorted after all authors with O. What can I do?  Apart from this Ø should be sorted last, but is sorted in the middle of O.  Edit: I want to have the German ordering, that is, Ö should be sorted as Oe not as O. The Ø-sorting is Danish.
95874
I have a bibliography in which a particular author wrote two papers in the same year. Bibtex is sorting them alphabetically by title, but I want them listed chronologically. (So in the example below 'universal grammar' should precede 'English as a formal language'.) What's the appropriate way to flip the order?  MWE:  \documentclass{article} \usepackage{natbib} \begin{document}  ... formal semantics in the  Montagovian tradition \citep{montague1970aug,montague1970befl,montague1973ptq}.   \bibliographystyle{harvard} \bibliography{test} \end{document}   This generates the text 'formal semantics in the Montagovian tradition (Montague, 1970b,a, 1973)' whereas I actually want '1970a,b,1973'.  test.bib file for MWE:  @incollection{montague1973ptq,   title={The proper treatment of quantification in ordinary {English}},   author={Montague, Richard},   booktitle={Approaches to natural language},   editor={Hintikka, K. Jaakko J. and Moravcsik, Julius M.E. and Suppes, Patrick},   pages={221--242},   year={1973},   publisher={Dordrecht} }  @article{montague1970aug,   title={Universal grammar},   author={Montague, Richard},   journal={Theoria},   volume={36},   number={3},   pages={373--398},   year={1970},   publisher={Blackwell Synergy} }  @incollection{montague1970befl,   title={English as a formal language},   author={Montague, Richard},   booktitle={Linguaggi nella Societa e nella Tecnica},   editor={Visentini, Bruno and others},   publisher={Edizioni di Comunità},   pages={189--224},   year={1970} }
14399
I wonder how we can list author names in the following format in LaTeX.   I have 5 authors with 3 different affiliations. I am trying to list all author names with refmark in one row, and 3 affiliations with refmark in another row, but each in one separated column. It should look like this:          author1{1} author2{2} author3{1} author4{2} author5{3}            {1}department      {2}department        {3}department               school              school              school               email                email              email   I did saw some papers that have the above format, but cannot search for any guideline. IEEE guideline suggests another way to list authors, but sadly it does not look that neat          author1{1} author2{2} author3{1} author4{2} author5{3}                         {1} department, school                               email                         {2} department, school                               email                         {3} department, school                               email
30670
I am able to sort a table using the following code:SELECT * FROM Persons ORDER BY LastName  But I wanted to get the ranking/position of a person using that order.  For example when I sort Person table by age, I want to get the rank/position of a person named Antinio Trias.  How will I do it?
80829
I've got a bilingual bibliography (Russian and German). I want to sort the entries alphabetically. The Russian entries have to appear alphabetically as well. Unfortunately, since the authors names are written in Russian using the \cyr command (for cyrillic), the Russian entries are sorted by the first name of the author, not the second. Is there any possibility to change my .bst file? In plain.bst I deleted the sorting function. But now it sorts by the text citation order, which I don't need.  It would be best if there was a style (looking like plain style) which sorts after the source file, i.e. how the entries are made by hand in my myliterature.bib file.
63313
This is the data what I want to sort. But sort treats the numeric to string, the data it no sorted as I expected.     /home/files/profile1   /home/files/profile10   /home/files/profile11   /home/files/profile12   /home/files/profile14   /home/files/profile15   /home/files/profile16   /home/files/profile2   /home/files/profile3   /home/files/profile4   /home/files/profile5   /home/files/profile6   /home/files/profile7   /home/files/profile8   /home/files/profile9       I want to sort this to,     /home/files/profile1   /home/files/profile2   /home/files/profile3   /home/files/profile4   /home/files/profile5   /home/files/profile6   /home/files/profile7   /home/files/profile8   /home/files/profile9   /home/files/profile10   /home/files/profile11   /home/files/profile12   /home/files/profile14   /home/files/profile15   /home/files/profile16     Is there a good way by bash script? I can't use ruby or python script in here.