I have a table like this:
\documentclass[10pt,spanish]{article}
\usepackage[T1]{fontenc}
\usepackage{selinput}
\usepackage{multirow}
\usepackage{tabularx}
\SelectInputMappings{%
aacute={á},
ntilde={ñ},
Euro={€}
}
\usepackage{babel}
\usepackage [left=1.5cm, right=1.5cm, top=1.5cm, bottom=1.5cm]{geometry}
\usepackage{longtable}
\begin{document}
\begin{longtable}{| p{.15\textwidth} | p{.85\textwidth} |}
\hline
Spanish & English \\ \hline
ser & to be (essential/permanent quality) \\ \hline
haber & to have (to do something, auxiliary verb) \\ \hline
estar & to be (health, location, state) \\ \hline
tener & to have \\ \hline
hacer & to do, make \\ \hline
poder & to be able, can \\ \hline
decir & to say, tell \\ \hline
ir & to go \\ \hline
ver & to see \\ \hline
dar & to give \\ \hline
saber & to know (information) \\ \hline
querer & to want, love \\ \hline
llegar & to arrive, come, reach \\ \hline
pasar & to pass, to spend (time), to happen \\ \hline
deber & to owe, must, should, ought to \\ \hline
poner & to put, place, set \\ \hline
parecer & to seem, appear \\ \hline
quedar & to stay, remain \\ \hline
creer & to believe \\ \hline
hablar & to speak \\ \hline
llevar & to carry, bring \\ \hline
dejar & to leave, abandon, to let, allow \\ \hline
seguir & to follow, continue \\ \hline
encontrar & to find, encounter \\ \hline
llamar & to call, to name \\ \hline
% About 1500 rows more
\end{longtable}
\end{document}
I am alway add in this table new words. I would like to order automatically rows by the value of the Spanish
column on alphabetical order (A-Z).
I really like how it was made here. I tried to do the same for my table but I failed.
Could you help me please?
table
functions, includingtable.sort
. However, using LuaLaTeX would seem like overkill for what you say you want to achieve.) You may want to look into (a) placing the tabular material -- without the\hline
stuff -- in a csv file, (b) using an external program to sort the material on the first column, and (c) employing something like thecsvsimple
package to place the tabular material inside alongtable
environment.datatool
package. It can perform sorting, which thecsvsimple
package does not. The downside is that learning how to usedatatool
efficiently will take a bit more effort than does loadingcsvsimple
.