The Formulary Book of Somogyvár (, ) is a codex or formulary from the Kingdom of Hungary, which was written mainly in the second half of the 15th century and was expanded in the 16th century. Beside legal texts, the manuscript contains three annals which date back to the time of the Árpádian era, a genealogy of the Hungarian monarchs from Béla III to Ladislaus of Naples, a rhythmic list of kings and a record of events regarding the Ottoman–Habsburg wars in Hungary. The codex is kept in the Teleki Library in Târgu-Mureş, Romania.

Background According to legal historian György Bónis, the 272-page document was written mainly between the 1460s and the end of the 1480s by an unidentified legal scholar of the royal court of King Matthias Corvinus. After his retirement, this scholar settled down in Somogyvár Abbey, an important place of authentication in the Kingdom of Hungary, where he copied and compiled his work with his own records from the royal court and his subsequent local legal practice. It is possible that this scholar is identical with jurist John Izsó de Kékcse, who acted as secular notary and lawyer of the abbey in 1488. Following that, the formulary book and its three annales were extended and completed by two another unidentified authors who also resided in Transdanubia. Lastly, a fourth person possessed the text, who recorded some events of the Ottoman wars in the 16th century, and acknowledged the legitimacy of John Zápolya during the civil war, while omitted to mention Ferdinand of Habsburg.

The document went Transylvania in some way. Historian Dániel Bácsatyai considered the Transylvanian Saxon pastor Michael Siegler possibly used the text when wrote his historical work Chronologia rerum Hungaricum in the 1560–1570s, since both authors know John Sigismund Zápolya's date of birth as an hour exactly, beside other similarities regarding the 16th century notes. Contrary to this, based on two attached copies of charters (issued in 1579 and c. 1592), Bónis argued that Hungarian prelate István Szuhay brought the codex to the Principality of Transylvania, when he was sent as envoy to the court of Stephen Bocskai in the 1590s. The fate of the formulary book is unknown for the upcoming two centuries. By 1794, lawyer József Batz de Zágon possessed the codex. He donated it to the library of the Rerformed Protestant High School in Marosvásárhely (legal predecessor of the Teleki Library) in 1811. György Bónis was the first historian, who analyzed the manuscript and determined the circumstances of its origin in 1957, but he did not describe the text itself. László Solymosi provided certified photocopy to the Diplomatic Photo Collection (DF) of the National Archives of Hungary. In the coming decades, only the footnote of Palatine Thomas' death (from the 16th-century fourth author) received attention. Adrien Quéret-Podesta was the first scholar, who analyzed the texts of the three annals in her 2009 study. Dániel Bácsatyai published and translated the texts concerning history – annals, genealogy, rhythmic list of kings and the 16th-century records – of the formulary book into Hungarian in 2019.

Content Legal texts The codex contains altogether 486 sections (copies of 446 charters, 3 clauses, a law text, 10 historical records and 24 notes and 2 additional charters from the 16th century). In terms of scope, two-fifths of the work consists of the publication of royal diplomas between the pages 119 verso and 226 verso (no. 223–374 formulas). Another sections contain charters from both the royal chancellery and the places of authentication: from 1 recto to 119 recto (no. 1–222 formulas), and from 227 recto to 272 verso (no. 375–456), which covers three-fifths of the scope of the formulary book. The collection of charters does not follow a chronological order, the author copied all newly added diplomas to the next blank page. Based on the dates, György Bónis considered the first original author compiled the vast majority of his work in the years between 1480 and 1486, just before the passing of the so-called Decretum maius, when Matthias Corvinus ordered to replace many previous contradictory decrees with a systematic law-code. Bónis argued the formulary book is a valuable resource for presenting pre-Tripartitum legal life in Hungary, regarding private law, criminal law and litigation.

Bónis, after examining the content and form elements, defined the chapters of the formulary book as follows:

+ 1 recto – 117 verso 1–221 First section of documents from places of authentication (newer part), collected from mid-1470s to early 1480s 118 recto – 119 recto 222 Fees and daily allowances of the notaries 119 verso – 226 verso 223–374 Collection of royal charters (older part), collected in 1460–1470s 227 recto – 249 verso 375–417 Continuation of documents from places of authentication (newer part) with legal relatio 249 verso – 250 verso 418–419 Two attached copies of late 16th-century charters (István Fejérkövy, István Szuhay) 251 recto – 257 verso 420–427 Additional relatio and fassio from the 1480s (newer part) 258 recto – 267 verso 428–437 Historical records (see below) 268 recto – 272 verso 438–456 Additional relatio and fassio from the end of the 1480s, complementing the newer part

The author collected the documents to educate students and novice professionals, he also provided the texts with a number of useful remarks, similarly to the 14th-century Ars Notarialis. The author tried to gather the entire material of a single lawsuit, thus, the apprentice was able to trace all documents at all stages of the proceedings in a single case (for instance, investigation stage, requests for postponement, sentencing after a long absence despite the summons and applications for retrial). The author presents cases useful from the point of view of jurisprudence, which appear as many ad hoc possibilities as possible (e.g. postponement of litigation due to the litigant's minority or participation in a military campaign, out-of-court settlement). For the primary purpose of the case law illustration, the author frequently modified in the texts of the original diploma, the identity of the persons concerned (often deleted or changed). Multiple grammatical errors can be found in texts as a result of multiple copying. György Bónis emphasized the lack of logical organization and consistency of the texts too. Regarding the newer section, which contains documents from the places of authentication, represents less instructor intent. Instead of education, law practice mattered after his retirement to the Somogyvár Abbey, so he collected and compiled a sample library for himself. Here can be found some system organizing principles: lawyer advocates, last wills and testaments, pledges, petitions and omissions are found in roughly a subchapter.

Historical texts Of the 272 pages, 10 pages – between 258 recto and 267 verso – are related to historical and genealogical narratives, while the vast majority of the manuscript contains legal aids (for instance, a guide to recognizing non-authentic charters), texts and copies of authentic diplomas.

First annales The first annales (called as "Christian Annals" by Quéret-Podesta), are between 260 recto and the top of the 262 recto (altogether five pages). Its first section contains Biblical events from the creation of the world (possibly based on Bede's chronica maiora) to the Acts of the Apostles and the subsequent history of the Roman Catholic Church (based on Regino of Prüm's Chronicon), thus placing Hungarian history in a universal context. The Biblical history contains 11 notes (5 are from Old Testament, 6 are from New Testament) while the history of the Catholic Church and early medieval Europe (until the reign of Charlemagne) are made of 17 notes (altogether 28 notes). Hungarian events last from 993 (Stephen I's ascension to the Hungarian throne, which, in fact, occurred in 997) to 1291 (Andrew III's campaign against the Duchy of Austria). In the mid-16th century, the first annales were supplemented by a single footnote from the fourth author – the death and burial of Palatine Thomas in 1186.

Short notes of the events of the 11th century – mostly deal with Hungarian saints – are related to the Annales Posonienses in their core material, according to Bácsatyai. The text does not refer to kings Stephen I and Ladislaus I as "saints", when it mentions their coronation and death, which testifies to the early origin of the annales. The annales accuse the "Hungarians" of killing Bishop Gerard of Csanád, thus, the original text could have been written in an ecclesial community where foreign priests lived. Only two notes narrate events from the 12th century: Stephen II's invasion of Dalmatia (1124) and the canonization of Ladislaus I ("1113", in fact 1192). Two-third part of the Hungarian-related notes depict events from the 13th century. Dániel Bácsatyai considered that this section is the most valuable part of the entire formulary book. The text provides detailed genealogical data of Béla IV and his family. It uniquely gives the exact dates of the death of Queen Maria Laskarina (23 July 1270) and Béla, Duke of Slavonia (11 June 1269), while in the case of the king it gives a day's earlier mortality – Friday, 2 May 1270, which was also confirmed by the necrologium of the Oberalteich Abbey. Bácsatyai claimed the Hungarian chronicles put the date of his death to 3 May (also "Friday", which is, however, wrong) in retrospect, because of the feast of the Finding of the Holy Cross. A note also contains the date of the death of Francis of Assisi, as a single non-Hungarian event in this period. Therefore, Bácsatyai argued that this section of the first annales was originally written in the church of the Franciscans in Esztergom, where Béla IV and his family were also buried, so the exact date of their death was known to the local friars. Historian Attila Zsoldos accepted this argument and, consequently, the reliability of the dates of death of the aforementioned royalties.