Hi all, for a large ancestor-project I defined a set of informations for a lot of persons like you can see below. QUESTION: how many synonyms can I max. define? I need about 4000 defs. or has someone a better idea to handle those informations. thanks for help! Bernd % --> snip % \definesynonyms[PID][PIDs][\doGetPID] \PID{Fam268} {Rudolph} \PID{Nam268} {Rudluffen} \PID{Vor268} {Adam} \PID{Ruf268} {Adam} \PID{Geb268} {k.A.} \PID{GebOrt268} {Oberkoskau} \PID{Tau268} {19. Mai 1725} \PID{TauOrt268} {Unterkoskau} \PID{Hei268} {17. November 1755} \PID{HeiOrt268} {Willersdorf} % \PID{Amt268} {} % \PID{AmtOrt268} {} \PID{Tod268} {14. Februar 1781} \PID{TodOrt268} {Oberkoskau} \PID{Alt268} {55 Jahre, 9 Monate, 3 Tage} \PID{Urs268} {nach dreitägiger Krankheit} \PID{Grab268} {14. Februar 1781} \PID{GrabOrt268} {Unterkoskau} \PID{Ber268} {Müller} \PID{Zus268} {Besitzer der Obermühle} % \PID{Fam2112} {Militzer} \PID{Nam2112} {Mielitzer} \PID{Vor2112} {Adam} \PID{Ruf2112} {Adam} \PID{Geb2112} {k.A.} \PID{GebOrt2112} {Unterkoskau} \PID{Tau2112} {16. November 1670} \PID{TauOrt2112} {Unterkoskau} \PID{Hei2112} {21. Mai 1694} \PID{HeiOrt2112} {Unterkoskau} % \PID{Amt2112} {} % \PID{AmtOrt2112} {} \PID{Tod2112} {27. Juni 1699} \PID{TodOrt2112} {Unterkoskau} \PID{Alt2112} {28 Jahre, 6 Monate, 21 Tage} \PID{Urs2112} {k.A} \PID{Grab2112} {k.A.} \PID{GrabOrt2112} {Unterkoskau} \PID{Ber2112} {k.A.} \PID{Zus2112} {Epidemie im Jahr 1699, da viele Todesf‰lle} % % % Familienname, Vorname(n) (000) \def\getPID#1{\doGetPID{Fam#1}, \doGetPID{Vor#1}~(#1)} \def\titPID#1{{\it \doGetPID{Fam#1}, \doGetPID{Vor#1}~(#1)}} % für Überschriften \def\getPIDGeb#1{\doGetPID{Fam#1}, \doGetPID{Vor#1}~(#1) -- Geburt} \def\getPIDHei#1{\doGetPID{Fam#1}, \doGetPID{Vor#1}~(#1) -- Heirat} \def\getPIDTod#1{\doGetPID{Fam#1}, \doGetPID{Vor#1}~(#1) -- Tod} % \def\getGeburt#1{\doGetPID{Geb#1}} % Geburtsdatum \def\getGebOrt#1{\doGetPID{GebOrt#1}} \def\getTaufe#1{\doGetPID{Tau#1}} % Taufdatum \def\getTauOrt#1{\doGetPID{TauOrt#1}} \def\getHeirat#1{\doGetPID{Hei#1}} % Kirchliche Heirat \def\getHeiOrt#1{\doGetPID{HeiOrt#1}} \def\getAmt#1{\doGetPID{Amt#1}} % Standesamtliche Heirat \def\getAmtOrt#1{\doGetPID{AmtOrt#1}} \def\getTod#1{\doGetPID{Tod#1}} % Sterbedatum \def\getTodOrt#1{\doGetPID{TodOrt#1}} \def\getUrsache#1{\doGetPID{Urs#1}} % Todesursache \def\getAlter#1{\doGetPID{Alt#1}} % Alter bei Tod \def\getGrab#1{\doGetPID{Grab#1}} % Datum des Begräbnisses \def\getGrabOrt#1{\doGetPID{GrabOrt#1}} \def\getBeruf#1{\doGetPID{Ber#1}} % Beruf \def\getZusatz#1{\doGetPID{Zus#1}} % Zusatzinformation % % Vorname(n) Familienname \def\getNamen#1{\doGetPID{Vor#1}~\doGetPID{Fam#1}} \def\titNamen#1{{\it \doGetPID{Vor#1}~\doGetPID{Fam#1}}} % \def\getNameN#1{\doGetPID{Vor#1}~\doGetPID{Fam#1}~(#1)} \def\titNameN#1{{\it \doGetPID{Vor#1}~\doGetPID{Fam#1}}~(#1)} % % % Familienname \def\getFamilie#1{\doGetPID{Fam#1}} \def\titFamilie#1{{\it \doGetPID{Fam#1}}} % Geburtsname (exakte Schreibweise) \def\getExakt#1{\doGetPID{Nam#1}} \def\titExakt#1{{\it \doGetPID{Nam#1}}} % Vorname \def\getVor#1{\doGetPID{Vor#1}} \def\titVor#1{{\it \doGetPID{Vor#1}}} % \def\getRuf#1{\doGetPID{Ruf#1}} \def\titRuf#1{{\it \doGetPID{Ruf#1}}} % % \starttext Testtext\crlf \getNamen{2112}\ starb am \getTod{2112} im Alter von \getAlter{2112}n in \getTodOrt{2112}. \stoptext
Bernd Militzer wrote:
Hi all,
for a large ancestor-project I defined a set of informations for a lot of persons like you can see below.
QUESTION: how many synonyms can I max. define? I need about 4000 defs.
If you need only 4000 separate PIDs, that should work ok.
or has someone a better idea to handle those informations.
But it is probably easier to write a small database interface layer. Somewhat like this (note that I had to change \doGeTPID as well). \def\PID[#1][#2]{\getparameters[PID#1][#2]} \def\doGetPID#1#2{\getvalue{PID#2#1}} \def\getPID#1{\doGetPID{Fam}{#1}, \doGetPID{Vor}{#1}~(#1)} \PID[268] [Fam=Rudolph, Nam=Rudluffen, Vor=Adam] Cheers, Taco
Am 24.07.2006 um 11:11 schrieb Taco Hoekwater:
But it is probably easier to write a small database interface layer. Somewhat like this (note that I had to change \doGeTPID as well).
\def\PID[#1][#2]{\getparameters[PID#1][#2]}
\def\doGetPID#1#2{\getvalue{PID#2#1}}
\def\getPID#1{\doGetPID{Fam}{#1}, \doGetPID{Vor}{#1}~(#1)}
\PID[268] [Fam=Rudolph, Nam=Rudluffen, Vor=Adam]
Thanks Taco for that example, but sorry it dos not work. Runaway argument? 268] [Fam=Rudolph, Nam=Rudluffen, Vor=Adam] ! Paragraph ended before \PID was complete. <to be read again> \par l.57 I have no idea. Bernd
Thanks a Taco! with PID[268]% ^ [Fam=Rudolph, Nam=Rudluffen, Vor=Adam] all is ok. Bernd
On Mon, 24 Jul 2006, Bernd Militzer wrote:
Thanks a Taco!
with PID[268]% ^ [Fam=Rudolph, Nam=Rudluffen, Vor=Adam]
You can also do \def\PID[#1]#2[#3]{\getparameters[PID#1][#3]} % #2 is to gobble spaces \def\doGetPID#1#2{\getvalue{PID#2#1}} \def\getPID#1{\doGetPID{Fam}{#1}, \doGetPID{Vor}{#1}~(#1)} with this both \PID[268] [Fam=Rudolph, Nam=Rudluffen, Vor=Adam] and \PID[268][Fam=Rudolph,Nam=Rudluffen,Vor=Adam] work. Aditya
Bernd Militzer wrote:
Am 27.07.2006 um 07:54 schrieb Aditya Mahajan:
You can also do
\def\PID[#1]#2[#3]{\getparameters[PID#1][#3]} % #2 is to gobble spaces
thanks for that hint Aditya!
There is also this (more formal) solution: \def\PID{\dodoubleempty\doPID} \def\doPID[#1][#2]{\getparameters[PID#1][#2]} The core internal macro \dodoubleempty creates empty [] groups if they are not provided in the input. There is also \dosingleempty etc, upto \doseventupleempty Cheers, Taco
Bernd Militzer wrote:
Hi all,
for a large ancestor-project I defined a set of informations for a lot of persons like you can see below.
QUESTION: how many synonyms can I max. define? I need about 4000 defs.
a lot (as much as tex's hash + mem permits; the hash can be > 100K) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (4)
-
Aditya Mahajan
-
Bernd Militzer
-
Hans Hagen
-
Taco Hoekwater