Latest news 2026-07-03: Ebook Sale July 2026. Cybercrime fiction short stories Unsocial Media and Smile for the Camera free; crime fiction short story The Briefcase free; short story noir crime fiction I’ve Heard the Mermaid Sing free; crime fiction novel The Private Enemy US$1.99; illustrated children’s story The Foolish Hedgehog US$0.99.

Bug Tracker RSS feed

ID 154🔗
Submitted by: Nicola Talbot 🦜
Date: 2020-03-15 18:59:36
Status Closed (Not a Bug)
Category datatool
Version 2.32
Summary \switchargs isn't taken into account when sorting

Return to Search Results

Sign in to subscribe to notifications about this report.

Description

The datatool user manual provides an example that uses a custom command called \switchargs to alter the sorting. This no longer produces the desire order.

MWE

Download (566B)

% arara: pdflatex
\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage{datatool}

\newcommand*{\switchargs}[2]{#2#1}
\DTLloaddb{scores2}{scores2.csv}

\begin{document}
\begin{table}[htbp]
\caption{Student Scores (sorting ignores \texttt{\textbackslash switchargs})}\centering
\DTLsort*{Surname,FirstName}{scores2}%
\begin{tabular}{llr}
\bfseries Surname &
\bfseries First Name &
\bfseries Score (\%)%
\DTLforeach*{scores2}{%
\firstname=FirstName,\surname=Surname,\score=Score}{%
\\
\surname & \firstname & \score}
\end{tabular}
\end{table}


\end{document}

Evaluation

This change in behaviour was caused by the bug fix strange behavior of \dtlcompare. It's now necessary to use \dtlcompareskipcstrue for this example to work. The user manual will be corrected in the next version.

Comments

0 comments.


Add Comment

Name (optional):

Are you human? Please confirm the bug report ID (which can be found at the top of this page) or login if you have an account. All guest comments have to be manually checked before they appear on the page. There are too many bots trying to spam the site to allow unauthenticated users to post without verification.

Comment:


You can use the following markup:

Block:

[pre]Displayed verbatim[/pre]
[quote]block quote[/quote]

In line:

[tt]code[/tt]
[file]file/package/class name[/file]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url] [sup]superscript[/sup]
[sub]subscript[/sub]

Ordered list:
[ol]
[li]first item[/li]
[li]second item[/li]
[/ol]

Unordered list:
[ul]
[li]first item[/li]
[li]second item[/li]
[/ul]

You can use the Preview button to review your message formatting before submitting.

Page permalink: https://www.dickimaw-books.com/bugtracker.php?key=154

Return to Search Results