Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [sorting]

{sorting} is about sorting document elements. Use this tag in addition to other tags specifying what should be sorted.

0
votes
0answers
25 views

BibLaTeX - Sort bibliography by firstpage

I need to create a bibliography where journal articles within a volume and issue are sorted by the first page number. I can use \mkfirstpage{pages} to print the first page of the page range but cannot ...
1
vote
0answers
42 views

sorting text file in plain TeX

I have seen Latex sort macros (for an index, which is precisely what I want, the index having several thousand entries); but I haven't seen one in plain (or AmS-TeX, for that matter; either is OK). ...
0
votes
1answer
37 views

In-text citation sorted according to publication year with apalike bibliography style

I am using the natbib bibtex package with the [authoryear,compress] options and the bibliographystyle apalike. Is it possible to modify the natbib package options so that in-text citations are ordered ...
1
vote
0answers
22 views

Custom BST (based on apalike) with following sorting mechanism: (1) First author only, (2) Year, (3) All (other) authors, (4) Title

Following https://tex.stackexchange.com/a/484079/ I have created a custom BST, based on the apalike bibliographystyle of the natbib package in bibtex. This custom BST orders references in the ...
2
votes
1answer
60 views

Apalike but sort by last name of first author and year

I would like to use the natbib package in bibtex with the bibliographystyle apalike with a specific type of author-year ordering in the bibliography. I want items to generally be sorted/ordered ...
1
vote
1answer
14 views

Index entries sorted by text of macro instead of value

A related question was asked here seven years ago, but I couldn't manage to make that solution work in my case. I am using macros in various instances of my text to have a shorthand for often used ...
1
vote
1answer
37 views

Apply a numeric bubble-sort to output strings, which are specified by names/codes

Edit: My objective is to sort a group of output strings, which are specified through names/codes. There are effectively 3 components, the 'memorable codes' (names like Xenia, Alex, etc), the '...
0
votes
0answers
49 views

Sort bibliography with the order of appearance into .bib file (EDITED)

I work with natbib and \bibliographystyle{abstract}. I use this style because the ordering is done with respect to the key. Is it possible achieve a sorting with respect the order of appearance into ...
1
vote
1answer
58 views

Keep sorting local to groups for symbols in glossaries-extra with bib2gls

Consider this example: \documentclass{article} \usepackage[record,style=alttreegroup,nomain,symbols]{glossaries-extra} \begin{filecontents}{symbols.bib} @symbol{alpha, name = {\ensuremath{\alpha}}, ...
0
votes
1answer
27 views

Xindy seems to ignore sort-rules in custom .xdy file

So I am trying the change the way xindy is sorting umlauts in an index file by prescribing custom sort-rules. This is the myfile.xdy that I use: (require "lang/german/duden-utf8-lang.xdy") (sort-...
1
vote
1answer
46 views

natbib same author same year with a & b references wrong order

I'm working with the natbib package and the aa bibliography style for the Astronomy & Astrophysics journal. One author wrote two papers in the same year. The problem is with how the references and ...
2
votes
2answers
28 views

Automatic sorting of environments by parameters (e.g. by date)

I desire for some sort of easy system for manipulating "sections" or environments based on additional data such as dates. I did a preliminary google search and couldn't come up with anything because I ...
0
votes
0answers
19 views

Sorting entries by page number in a single index (out of multiple indices) made with imakeidx

I am trying to make two indices with imakeidx: an index of terms and an index of symbols. Since I am using mathematical symbols, I would like the symbols index to be sorted by page number rather than "...
3
votes
2answers
145 views

Sort list of elements created from a custom command

In order to have this result I wrote this command: \newlength{\boldAcrwidth} \setlength{\boldAcrwidth}{2cm} \NewDocumentCommand{\boldAcr}{m >{\SplitList{ }}m}{% \makebox[\boldAcrwidth][l]{\...
0
votes
0answers
11 views

Sorting acronyms that start with a number? [duplicate]

In my thesis I have an acronym that start with the number 4. In the list of abbreviations it gets sorted under the F for four. How can I sort it so it comes in the list before A? \documentclass[...
0
votes
0answers
17 views

Nomenclature sorting problem: it starts sorting again in a new page

I have the nomenclature sorted in an alphabetical order, but it starts over on the next page. See attached picture. Does anyone know how I can make so it doesn't start over when after a page shift? ...
1
vote
1answer
63 views

Sort all citations from one year automatically under a heading with the year number

I would like to ensure that all entries in the bibliography are sorted by year. In addition, a separate heading should be generated for each year. The whole should run as automatically as possible, i....
1
vote
1answer
30 views

Automatically refer to n-th author

I'm writing a paper with many people, and to be honest, at this point I'm not even sure who will be listed as an author in the final version. In the text, I would like to write things like "the forty-...
1
vote
1answer
52 views

Unsorted bibliography but locally sorted using biblatex

I'm trying to solve a rather odd sorting of the bibliography. I want to have the numeric citations appear in order of citation. However, I want to sort the group of references by another style. I ...
4
votes
1answer
37 views

Sort symbol index by page occurence

SE, I have a problem ordering items in symbol index. MWE: \documentclass[oneside,12pt,a4paper]{memoir} \renewcommand{\baselinestretch}{1.15} \let\memoldbibsection\bibsection \let\bibsection\relax %...
2
votes
1answer
34 views

Order items using their references

I try to sort enumerated lists in latex. All I found is how to sort items by their ordinal number (see Order items in enumerate environment automatically): \documentclass{article} \usepackage{pgffor}...
1
vote
0answers
44 views

Sort grouped citations on unsorted style with bibtex

I'm trying to get sorted citations when they are in a group, that is, within a \cite{}, but unsorted or in order of appearance when they are called from different \cite macros. Basically, what I want ...
0
votes
1answer
31 views

How to subdivide and group a bibliography by year of publication?

Consider this MWE \documentclass{article} \usepackage[style=archaeologie]{biblatex} \addbibresource{biblatex-examples.bib} \newcounter{BIBnumberYEARcount} \setcounter{BIBnumberYEARcount}{1} \...
1
vote
0answers
37 views

Sorting a description [duplicate]

I want to sort a description list in an alphabetical order. \documentclass{article} \begin{document} \begin{description} \item[bb] \hfill \\ something bb \item[aa] \hfill \\ something aa \item[...
1
vote
1answer
68 views

Two different bibliographies with different styles and sortings, Vol.2

The answer of moewe appearing in this question is almost what I want to achieve: one bibliography containing online references which are numbered and sorted in order of appearence (nothing to change ...
0
votes
0answers
23 views

Regex replacement with lowercase monthnames for biblatex/biber to eliminate the warning “month not integer…” [duplicate]

I had already asked a nearly identical question here I am using biblatex with biber from TL2018 for my PhD thesis. Due to various reasons, I am forced to use Mendeley for citation managements and ...
1
vote
0answers
17 views

How to change the sorting of the last author name in the bibliography [duplicate]

How is it possible to change the name sorting for every last author in the bibliography? In the following WME it should be ... and N. Tesla instead of ... and Tesla, N. I'm using biblatex with ...
0
votes
1answer
56 views

Ordering an index lexicographically

I need to use a custom sort order (T, K, m, C, P, M, N, SA) and that's implemented in the lua function Bsort below. When I generate two indexes of the same length this works e.g. in the attached the ...
0
votes
0answers
17 views

BibLaTeX doesn't sort my bib (using a custom style) [duplicate]

Problem: I want to sort my bib entries by author (a...z), year (ascending), month (ascending), day (ascending), title (a...z). I customized my bib style with the help of @moewe and I think we broke ...
4
votes
1answer
151 views

Sorting biblatex bibliography by last name beginning with “Al-”

I would like to sort my biblatex bibliography by last name. Unfortunately, names beginning with "Al-" are not sorted as expected. MWE: \documentclass{article} \usepackage[ backend=biber, ...
2
votes
1answer
74 views

Sorting a list of items with underscores

I am trying to alphabetically sort a bunch of items (for a coding base), and naturally many of the method names have underscores. Normally I can sort any number of items in LaTeX using a sortedlist ...
3
votes
1answer
274 views

Regex replacement for biblatex/biber to eliminate the warning “month not integer…”

I am using biblatex with biber from TL2018 for my PhD thesis. Due to various reasons, I am forced to use Mendeley for citation managements and cannot switch to another tool now. Mendeley is capable of ...
1
vote
0answers
51 views

Disable sorting in texindy

I'm trying to establish a workflow for a LaTeX project and haven't figured out how to use makeidx or imakeidx packages to sort UTF-8 encoded index by languages not covered in the section supported ...
1
vote
1answer
70 views

glossaries-extra autoindex, manual sorting of entry

(Kind of a follow up question to this one.) The following example contains a definition of an abbreviation which requires some extra care: [Śatika-]Kālajñāna is supposed to be sorted, both in the list ...
1
vote
1answer
64 views

Problem with sorting, alpha-style bibliography

When I compile this MWE: \documentclass[numbers=noendperiod, fontsize=11pt, twoside, a4paper]{scrbook} \usepackage[backend=biber, autolang=hyphen, ...
0
votes
0answers
162 views

Sorting symbols in 'List of Symbols'

Is there a way I can sort the symbols (in some logical order) automatically in my LaTeX draft? Presently they come in the order I am defining them. \clearpage % Start a new page \lhead{\emph{Symbols}}...
5
votes
1answer
61 views

Biblatex, sorting references in a specific manner

I need to order my bibliography on alphabetical order. However, the works headed by the same first author must be ordered as follows: 1º Works with one authors, in chronological order. 2º Works with ...
2
votes
1answer
91 views

Biblatex reference sorting in same-first author, different-year entries

I'm using the biblatex bibliography package and I need the references to be sorted first by name, and references with the same first author to be sorted then by ascending year. In my preamble, the ...
5
votes
1answer
89 views

Biblatex: sorting by title if no author

I would like to sort my bibliography by title in the case there is no author but just the editor. Now it is sorting by editor. So in my example I would like to have first "Concilium Foroiuliense" and ...
1
vote
1answer
66 views

How to add custom letter groups to an index, e.g. for greek letters or brackets?

I have an index of symbols made using makeindex: \documentclass{article} \usepackage{makeidx} \makeindex \begin{document} Text \index{sin@$\sin$} % just some examples of index entries \index{...
1
vote
1answer
200 views

Sorting references in alphabetical order but with misc entries at the end

I am using \bibliographystyle{plain} \bibliography{my_bibliography} to sort the references in my document alphabetically. In this context, the misc entries that have no author appear all the way ...
2
votes
2answers
128 views

automatically sort superscripts alphabetically

I would like to sort the superscripts of the following mwe alphabetically. Automatically. \documentclass{article} \usepackage[utf8]{inputenc} \newcommand{\x}[1]{\textsuperscript{#1}} \newcommand{\...
0
votes
1answer
69 views

Articles and books sorted separately - BibTeX

Recently I have encountered a problem with sorting of the content of my Bibliography. See the picture. The first two items are articles, the rest are some books. Somehow, my BibTeX is forced to sort ...
1
vote
1answer
74 views

Sort stacked bar chart according to total height

I would like to sort stacked bar chart in descending order after stacking up all numbers. In other words, I want to sort according to total height. I am aware of \pgfplotstablesort but in my case ...
0
votes
0answers
258 views

Sorting problem with umlauts

I have a problem with a self-generated index of authors. If I have a name with umlaut, the sorting fails. In My MWE, the two entries should be inverted. How could I fix the issue? I'm including also ...
3
votes
2answers
567 views

Using Bibtool to sort a bib file by types and keys alphabetically

I am trying to sort a bib file alphabetically using Bibtool, but I am looking for sorting the entries by types then by keys. For instance, first all the articles, then the books, etc... With, all the ...
1
vote
1answer
1k views

Alphabetical sorting of the bibliography using natbib and unsrtnat

I'm writing a thesis report and I'm using natbib and unsrtnat for my bibliography. My problem is the bibliography is sorted by order of citation, and I would like to have it sorted by alphabetical ...
5
votes
1answer
93 views

expl3 — sort a token list

L A TEX3 comes with a facility to sort list variables (sequences, token lists, or comma-lists) according to some user-defined comparison. I try to adapt the interface3 manuel example to a token list, ...
2
votes
1answer
159 views

How to sort alphabetically a custom list defined with tocloft?

I have defined a "list of definitions" using the following code: \documentclass[a4paper, 12pt]{report} \usepackage{subcaption} \usepackage[subfigure]{tocloft} \usepackage{blindtext} \newcommand{\...
2
votes
0answers
179 views

How to group the bibliography alphabetically, if some surnames start with “accented” characters?

I have one problem with this code and special characters: \documentclass{book} \usepackage[utf8]{inputenc} \usepackage[semicolon]{natbib} \usepackage{har2nat} \newcommand{\avec}{\qquad \text{avec} \...