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 Spanishcolumn 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?


tablefunctions, 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\hlinestuff -- in a csv file, (b) using an external program to sort the material on the first column, and (c) employing something like thecsvsimplepackage to place the tabular material inside alongtableenvironment. – Mico May 31 '17 at 17:25datatoolpackage. It can perform sorting, which thecsvsimplepackage does not. The downside is that learning how to usedatatoolefficiently will take a bit more effort than does loadingcsvsimple. – Mico May 31 '17 at 17:51\spanishverb{árbol}{tree}and look what happen (with and without utf8+inputenc). If your example stay so simple you can use his code, but if words with accents etc are involved too it would be better to use some tool which has the relevant unicode libraries like biber. – Ulrike Fischer Jun 01 '17 at 07:00glossaries, I think. (Withxindy, you could also sort with non-ASCII.) Or some other wrapper formakeindexorxindy. – cfr Jun 02 '17 at 12:51