0

is it possible to import a database from a normal tabular in the same file or subfile? im thinking about something like this:

\documentclass{article}
\begin{document}
\begin{tabular}{ccc}
C1 & C2 & C3
1 & a & A
2 & b & B
\end{tabular}
\end{document}

now adding something to the preamble or just in front of the tabular or so to import this data into a database with datatool so i will be able to use it in the same document or in another document (to be able to sort it). another option would be exporting it in another format (.txt or so) and then use that in another document.

Edit: The thing is: i am trying to create a template for bachelor/master thesis with lyx (for a Prof. i work for, in the University i study), which needs to contain a sorted list of shortcuts and formulaic characters with their units, which should look like this: sorry its in german

i thought to solve this with a table.. but unfortunately there is no sort feature in lyx and i can not trust the students to use complex latex code, however if i set up everything around the table and the students just need to fill it and the sorting will occur automatically, maybe there will be more students working with lyx instead of MS Word, which would be great...

  • 1
    You'd be better off using glossaries than datatool for that kind of data. datatool uses a primitive character code comparison when sorting. An external tool will sort much more efficiently. – Nicola Talbot Nov 27 '17 at 17:03
  • Rather than trying to "import a database from a normal tabular in the same file or subfile" it will almost certainly be easier do define a custom environment, say Tabular, that formats and then prints the data and then stores it for later use. – Andrew Nov 27 '17 at 19:01
  • i kinda did it with nomenclature now because LyX has native support for that, i think i can trust the students to use that... – A.Ston Nov 27 '17 at 19:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.