The making of black inks in an Arabic treatise by al-Qalalūsī dated from the 13th c.: reproduction and characterisation of iron-gall ink recipes

For the first time, this paper systematises the medieval preparation of black writing inks found in the important thirteenth century Andalusian technical treatise written by Muhammad ibn Idrīs ibn al-Qalalūsī (1210–1308). We present the Arabic version of this extraordinary text (‘The gifts of the wise men on the curiosities of the substances’), and its first English translation, as well as discuss key aspects of the processes that remain missing or are unclear indications. In this work, we studied the iron gall inks based on galls, where no other phenolic source is present. In this pedagogical treatise, the recipes for these black iron-gall inks are organised and classified by the gallnuts extraction method used: boiling (decoction), squeezing and infusion, with water being the only solvent used. The inks selected were reproduced and characterised through a multi-analytical approach. Quantification was performed by HPLC–DAD (high performance liquid chromatography with diode array detectors in the UV–VIS), showing that gallic acid is a minor compound in the gall extracts prepared following al-Qalalūsī instructions. In all the recipes, the higher concentration compounds in the gall extracts are the gallotannins pentagalloylglucose and hexagalloylglucose, ranging from 79 to 50% of the phenolic compounds. This supports the results of Raman and infrared spectroscopies. A comparison with medieval Iberian recipes was also done, which served to reinforce our previous results that show water as the sole solvent extracts with much lower yields than mixed solvents (water plus white wine or vinegar).


Medieval black writing inks in context
Medieval writing inks such as iron gall inks are an essential element of our written cultural heritage, threatened with total loss due to degradation. This degradation leads to a loss of the support, particularly cellulose-based support. A large body of literature focuses on their degradation [1][2][3][4][5], but we need to learn more regarding the characterisation of black inks and the materials used in their making [6][7][8][9][10]. In the past few years, this knowledge gap has been addressed within interdisciplinary teams, and major breakthroughs have been achieved, which include a better understanding of the history of these inks between the Late Antiquity and the Middle Ages, through the study of texts written in Greek, Syriac, Arabic and Coptic [11][12][13][14][15][16][17][18][19][20][21][22][23][24] as well as a detailed molecular characterisation of the phenolic extracts and the final formulations [4,[6][7][8][9][15][16][17][18]. In these technical sources, the main classes of black writing inks were: carbon-based inks, iron-gall inks [18,25], and mixed inks (combining both) [25,26].
In this work, we present the first translation into English of an important Arabic treatise, dating from the 13th c., on the art of making writing inks based on the critical edition by Hossam al-ʻAbbādī [11][12][13][14]. The information in this treatise allows for a better understanding of the methods for preparing writing inks in medieval times and then using them to produce reference inks. From this comprehensive and pedagogical treatise that starts by describing black inks, we selected the iron gall inks based on galls and in which no other phenolic source extract is present (QI.2-5, QI.8-9, QI.11). Their reproduction and characterisation will bring new knowledge of the molecular structures of the compounds present in black inks, which will be crucial for devising informed strategies for preserving the world's written heritage [27][28][29][30].

Medieval writing inks in context: advances in molecular characterisation
In medieval written sources [6,7,31], iron-gall ink recipes contain the three basic ingredients depicted in Scheme 1. Plant extracts such as those obtained from Quercus infectoria were mixed with iron salts (e.g., FeSO 4 ) to produce a dark iron-polyphenol complex, to which gum arabic was usually added to keep the pigment in suspension and to make the ink more suitable for writing [2,5,6]. Recent research on medieval Iberian inks shows that polygalloyl esters of glucose (gallotannins) are the main phenolic compounds available in gall extracts to complex Fe 3+ and free gallic acid is a minor component in the extracts and inks, Fig. 1 [6,7]. Overall, it was demonstrated that the percentage of gallic acid is higher for the extraction methods in which only water at room temperature is used. When water is mixed with white wine (even in low amounts) or vinegar, or when wine is used as the sole solvent, the phenolics extraction efficacy is much higher when compared to water, and the major compounds in solution are polygalloyl esters of glucose, Fig. 1. Upon the addition of iron sulfate, these will form Fe 3+ -polygalloyl esters of glucose complexes as dark chromophores. Part thereof may grow until they form insoluble organometallic networks [8,9], resulting in finely dispersed pigments in solution. This network can be based on the catechol or pyrogalloyl ring with 2 or 3 hydroxyl groups, respectively. These phenolic ligands stabilise by complexation with Fe 3+ over Fe 2+ ions [6,32].

Medieval writing inks in context: technical written sources
The publication of critical editions of technical texts and collection of writing ink recipes contained within several Scheme 1 Main ingredients in a medieval iron gall ink Fig. 1 Chemical structures for gallic acid, gallate, monogalloylglucose and pentagalloylglucose. In the first two, the main functional group is based on a carboxylic acid and the other on an ester. The galloyl esters of glucose are also named gallotannins manuscripts and text fragments have allowed for enormous progress to be made into the history of these materials. Recently, Arabic and Syriac sources have become available to a larger scholarly public through English annotated translations [14,18,24]. Within these interdisciplinary environments, in addition to the philological and historical approach to the study of these texts and their intellectual context, including alchemical texts, the replication or reproduction of the recipe is achieved. This systematic work, "will allow us to mention, problematize, and sometimes give a tentative answer to the main issues posed by these kinds of texts: the fluidity of the textual tradition, technical terminology and problems of identification of ingredients, the elusive blur of technical data (weights and measures, for instance)" [21].
Special note should be made on the extraordinary survey work of technical written sources and selection of recipes in Syriac [19,33] and Arabic sources [11-14, 21, 34]. Syriac inks of various colours in 87 recipes were recently edited and commented on in French by Jimmy Daccache and Alain Desreumaux, in extensive research that makes technical information accessible, which is fundamental to the history of the science and technique of these writing inks used in texts and manuscripts that represent a precious cultural heritage [19]. In the words of Raggetti, "a philological and historical approach can offer a solid ground for new scientific approaches to manuscript studies" [21], which will provide the framework for our selection and reproduction of Arabic iron gall inks.
With respect to the Arabic tradition on the arts of the book, we cannot fail to mention Levey's 1962 edition, "Mediaeval Arabic Bookmaking and Its Relation to Early Chemistry and Pharmacology", in which the manuscript of ibn Bādīs, dated from the eleventh century, is translated into English [35]. In the 21st c., two other breakthroughs have improved our knowledge of how these inks were made and their central place in Arabic culture, opening new research perspectives [11][12][13][14]22]. These breakthroughs are based on the PhD projects by Hossam al-ʻAbbādī and Sara Fani [11,13]. Both studied Qalalūsī's texts, whose recipes for iron gall inks will be the subject of the work presented here. The importance of the black writing inks finds its raison d'être in the predilection that Arab culture has always reserved for writing. As early as the 9th c., we find the first treatises relating to the book arts, as well as works reserved for calligraphy, which soon became the primary art among those associated with book culture [10]. Fani studied the treatises that specifically focus on ink making and compared al-Qalalūsī's treatise to other textual traditions to determine which was the original part [13,14]. These are included in manuscripts on the arts of the book more generally, produced during the Islamic golden age (8-13 th c) by al-Rāzī (854-925 or 935); al-Marrākušī (the only known original survived manuscript, which is also an autograph, produced in 1251-2); and al-Qalalūsī (text produced during 1272-1308). The audience for these treatises would have been the kuttāb, the class of secretaries and chancellors who also included famous intellectuals and poets of the time [13,14].
These structured treatises always included the description of inks based on carbon (midād), iron-galls (hibr) as well as coloured inks based on pigments and dyes, metalbased inks and even invisible inks [13,14,30,35,36]. They would also provide advice on how to erase text and keep inks in their best conditions.

The author al-Qalalūsī and his cultural environment
In recent decades, our knowledge of the Iberian Peninsula's scientifical and technological context in the Middle Ages has increased considerably. Among the Jewish, Christian and Arab cultures in medieval Iberian, the latter sought constant technical improvements [10,[37][38][39][40]. A prominent scholar in al-Andalus' Muslim culture, Muḥammad ibn Idrīs ibn Quḍāʽī al-Qalalūsī (1210-1308), was born in a village called Qalalus, which is now part of the municipality of Estepona de la Cora de Rayya, in Malaga, Spain. He wrote essential works on astronomy, poetry and grammar, but his technical treatise for preparing black and coloured inks stands out. Called "Tuḥaf al-ḫawāṣṣ f ī ṭuraf al-ḫawāṣṣ" it is a key to understand the production of Islamic writing inks in the Iberian Peninsula Middle Ages [11][12][13][14]. The author lived to be nearly 100 years old in Andalusia, and he dedicated the work to the kātib at the Nasrid court of Granada, under the sultan Abū ʻAbd Allāh Muḥammad II al-Faqīh (1272-1302) who later became vizier (1302-1309) [13,14].
The text begins with the book's title and the name of the author, and then goes on to give the motive for its composition, stating that it was written for the kuttāb and his students: to be kept in the libraries of "the notable people, the educated class". The introduction concludes with the work's main objectives, divided into three sections. It contains recipes for black, coloured and metallic inks, instructions on their application, and many other pieces of advice [11][12][13][14]. Twenty recipes for black writing inks are given, comprised of thirteen gall extractbased recipes (4 admixed with other phenolic extracts from other natural sources). These inks are all described by al-Qalalūsī as midād, because as argued by Hossam al-Abbâdî, in the Al-Andalus context for the period, this was the generic term for black writing inks [12].

Results and discussion
The making of iron gall inks in al-Qalalūsī: key aspects, missing information and comparison with Iberian recipes All recipes for black writing inks in Arabic with English translation are detailed in Additional file 1. The recipes for black writing inks are presented in Table 2. The inks are organised as either liquid or dry inks (powder). The first type is classified by the extraction method used: by boiling (cooked/decoction), by squeezing and by infusion, and are introduced in the text in this order. Water is the only solvent used and the extraction procedures include: (i) boiling until a certain amount of water has evaporated (cooked/decoction): QI. 1-5, 9, 17 and 21; (ii) pouring hot water on a piece of cloth containing the galls as if preparing tea (squeezed): QI.6, 7 and 20; (iii) extracted at room temperature, over several days (infusion): QI.8 and 9, Table 1. This organisation is extraordinary considering the impact the extraction method and temperature have on the phenolic profile [7]. This treatise is also unique because it starts with gall extract-based inks, unlike many other Arabic treatises mentioned in the introduction such as the manuscript by al-Rāzī and ibn Bādīs; which describes carbon-based inks first. Moroccan scholar al-Marrākušī, also first describes the iron gall inks, calling them hibr.
The function of the three main ingredients is very elegantly described in QI.23 and remains entirely contemporary: "as for the properties of the gallnuts, they strengthen the effectiveness of the ink; as for gum, it makes it bright with its action; the vitriol, instead, fixes its trace to the desired point; these are the levels of their purposes and their effectiveness", Additional file 1. The characteristics and properties of these main ingredients are further developed in QI.25, Additional file 1. The types of extraction methods are also summarised in QI.23, but the proportions described for galls, gum arabic, vitriol and water do not match the recipes described in the text. There may be a symbolic side to it that we presently cannot understand. More simply, it is possible that these proportions have been copied from a previous textual source, and not calculated based on the recipes in al-Qalalūsī's treatise. Table 1 Recipes for iron gall inks in al-Qalalūsī, emphasizing the extraction procedures described in the treatise. Other recipes not included; one recipe based on carbon (soot) admixed with a phenolic solution (QI.13); one based on carbon, QI.14; two prepared with an extract obtained from cork oak (QI.10), anemone (QI. 18

Extraction by boiling until a certain amount of water has evaporated (cooked)
The galls are ground in the first five recipes, QI.1 to QI.5. In QI.2 we know that they are ground "until they become as chickpeas" size. In the medieval Iberian recipes we have previously reproduced [6,7], galls were crushed or broken, and therefore, potentially, in pieces larger than chickpeas. Furthermore, in the Iberian inks studied, we do not have a single recipe where water is added to the galls and immediately brought to a boil. In the Iberian recipes that only use water, the galls were left at room temperature for 3 or 8 days and only after that were boiled and evaporated (Montpellier and Córdoba) [6,7]. The other three Iberian recipes were prepared with solvent mixtures: water:vinegar (Braga) and water:white wine (Guadalupe) or white wine alone (Madrid). The solvent was proven to play a crucial role in the extraction efficiency of the phenolic compounds and in defining the final profile. For the Iberian inks, the best extraction was obtained with the mixture water: wine in the proportion of 1:0.25 (51 ± 4 mg/mL of phenolic compounds), and even the solution water:vinegar 2:1 (26 ± 3 mg/mL) achieved better results than only using wine (17.8 ± 0.6 mg/mL) [7]. The Córdoba recipe, where the galls are left sitting in water for 8 days at room temperature and just brought to a boil afterwards, was the recipe that has the lowest extraction yield of phenolic compounds (7 ± 4 mg/mL) [7]. The major compounds in the solvent mixtures and wine are poly-galloyl esters of glucose which, upon adding iron sulfate, will bind with Fe 3+ as dark chromophores. Whereas, in the Córdoba recipe, the major compound was gallic acid (65%) [7]. Based on this data, we predict that the amount of phenolic compounds extracted using QI1-5 will be similar or lower than the Córdoba recipe. In these Iberian recipes, with the exception of Braga, the gall extracts were filtered before adding vitriol. In certain al-Qalalūsī recipes, filtration is performed using a piece of cloth, but in others, something like "leave it to rest until clarified, then take it and use it" is mentioned. The piece of cloth is described as thin and tightly woven.
What is also very interesting in the al-Qalalūsī recipes is that instructions are given on preparing the desired black colour. For example: QI.3, add "gum and vitriol in the amount to make a satisfying colour"; QI.4, "If it is not black enough and tends to red, add to it some vitriol, while if it is not bright enough, add some gum. What matters in what I said about the weight of the vitriol and the gum is that it is established according to which grade of black and brilliance you want to obtain". So, gum arabic was used for brilliance, but also to protect the support (e.g., QI.22: "If you want to avoid the corrosion of paper by ink, decrease the vitriol and increase the dose of gum arabic inside"). By adding more vitriol, if not black enough, aligns with our previous results [6]. On the other hand, in our reproductions, the red measured using the a* coordinate is around or slightly below 1, with scant significant differences. However, if we look closely at the iron complexes with gallic acid and pentagalloylglucose, the a* colour coordinate is -0.04 and 1.16, respectively. Does this mean that, at that time, they would have been able to distinguish such small differences and, somehow, increase the relative concentration of gallic acid?

Extracted at room temperature (infusion)
Only in the QI.8 recipe is the solution extracted at room temperature. The recommendation is to "leave it to rest for 4 days during the cold season and for 2 days during the warm season and gallnuts will abundantly transfer their tanning agent to the water. " This recipe was one of the most difficult to understand and reproduce, having been published in conference proceedings and reproduced again here with the data added to Table 2 [41]. This recipe has also been prepared by Colini [30].

Extracted using a piece of cloth containing the galls like tea is prepared (squeezed)
This was the first time we came across this type of extraction. In QI.6, QI.7 and QI.20, the gall powder is wrapped  in a thin piece of cloth; where hot water is poured over it to extract the gallotannins that will react with the dissolved vitriol. The piece of cloth with the powder works as a sort of sponge, where the ink is prepared. Afterwards, it is squeezed so that the ink drips into a container. In QI.6 and 7 the galls are ground very finely: "grind them finely in a mortar until they become like antimony powder".

Mixed ink prepared like dry hazelnut-sized spheres (pellets)
For these dry inks, there are two recipes, QI.12 and 13 as well as the description of a procedure to obtain the "best soot" in QI.14. These are mixed inks prepared using carbon black and a phenolic extract with gum arabic (but no iron salts are added). In QI.12, the instructions are very precise: "combine everything, pulverize it and sieve it, then grind it well with egg white and make pellets similar to hazelnuts".

Selection of recipes and commentary
To compare the molecular characterisation with those of the Iberian recipes previously studied, we chose to reproduce the recipes described in Table 2. These include two types of extraction methods: cooked and infusion. Because the instructions for some recipes were unclear or key aspects of the processes were missing, several versions of QI.3, QI.4 and QI.5 were prepared. Furthermore, we also replicated recipes QI.8 and QI.9, which have been previously published [41]. QI.19 was also prepared, from an extract obtained from brazilwood, to compare its fingerprint in the Raman spectrum with that obtained from the gallotannins.
The only recipe that describes the quantities of all the main ingredients is QI.4. But, here too, we do not know if the quantities are converted correctly. Once the galls are extracted, the term "clarify" is often used, which could mean decanting, filtration or another process. Other questions are also raised, such as, what kind of cloth was used for the filtration and bag in the "squeezed process"? When "put it in the sun" is mentioned, does it mean direct sunlight or outdoors? At what temperature 20 ºC, 30 ºC, 40 ºC? It is this "science of use", which made these inks durable and endowed them with the highest possible performance, that we want to recover, and that is why we have been experimenting with these recipes for the last 4 years [42][43][44][45][46]. All steps, processes, weights and ingredients are described in the experimental section and Table 2.
QI.2. Another midād: Take the quantity you desire of gallnuts and grind them as if they were chickpeas; add ten times the same amount of water and put it on a low fire until it becomes two parts; then let it cool and clarify, and add for each part one and a half part of gum and enough green vitriol, then use it. QI.11. Instantaneous midād by al-Rāzī: Take the desired quantity of gallnuts and grind them as fine as the powder of antimony. Pour water over it and grind vigorously in a mortar until it forms a foam; then filter the mixture in a thick piece of cloth into another container and add enough crushed qalqant to it: you will see that Shadings and assignments for iron-gall inks are based on Falcão and Araújo [49,50]: grey shading, characteristic common bands for "tannins"; orange shading, vibrations presented by hydrolysable tannins; blue shading, distinctive bands, marker bands for gallotannins; str stretching the mixture will turn black. Then add some gum arabic and write instantly.

Colour of the black inks by colorimetry
Colour coordinates L*a*b*, in Table 2 show that the inks are characterised by negative b* values (blue) and positive a* values (red); the a* values are close to zero, ranging from 0.4 to 1.7; the b* values are more expressive ranging from −1 to −10. These are perceived as dark bluish colours. Except for QI.4, these inks display similar L*a*b* values, with QI.1, 5, 8 and 9 the darker ones (lower L* values). The L* a* b* values of these darker inks compare well with the values obtained for the previously studied Iberian recipes [6].

Characterisation of the extracts by HPLC-DAD and HPLC-MS
All recipes were reproduced following Table 2. The term "extract" will be used to refer to the final extract of the galls according to each recipe instructions. All phenolic compounds were identified through HPLC-ESI-MS [7]. As predicted, the extraction efficacy was low when compared to the Iberian recipes, Tables 3 and 4; the higher quantity of phenolic compounds was obtained with QI.3 (5 mg/mL), which is lower than the Iberian recipe with the lowest extraction yield of phenolic compounds, Córdoba (7 mg/mL). In addition, in all the recipes, the compounds present in higher concentrations in the gall extracts are pentagalloylglucose and hexagalloylglucose, which range between 79 to 50% of the phenolic compounds. In comparison, gallic acid is a minor compound ranging from 13-19%. This allows us to conclude that boiling, with water evaporation, promotes the extraction of gallotannins over gallic acid.
Analysing the pH values for all extracts and inks allows us to conclude that recipe QI.5Vs2 provides the extract with the highest pH (3.88), and recipe QI.3Vs1 produces the ink with the highest pH value (3.13), Table 2. This shows that adding higher amounts of FeSO 4 does not directly influence the decrease in the final ink pH, since the recipes QI.2 and QI.5 demand the addition of 1.5 more FeSO 4 than galls.
Also, we can see that the extract prepared following recipe QI.5Vs2 shows the highest total phenolic content, while the extract QI.4Vs1 shows the lowest value. When comparing the concentration of phenolic compounds, upon the addition of FeSO 4 in order to prepare each ink and considering that all available phenols reacted with the iron ion, the recipe with the highest reduction of the phenolic compound concentration is QI.5, Fig. 2. This is possibly an indication that more complexes were formed in QI.5. Clearly, the extract preparation using more water, as in the case with recipe QI.4, is less efficient in the phenolic extraction using a lower solvent amount (recipe QI.5). It is important to note that, by analysing the inks by HPLC, only the free phenolic compounds are analysed, and not the phenol-Fe complexes [7].

Characterisation of the writing inks by Raman microscopy
The spectra obtained for the ink reconstructions are represented in Fig. 3, and the bands are detailed in Table 5. All the inks reproduced display the fundamental pattern of an iron-gall ink [6,47]. The inks present the main bands of iron-gall inks, common to historical documents: Interestingly, the recipe QI.19, with brazilwood, presents a few distinctions from the rest of the recipes, including a more resolved spectrum, and the absence of the band between 1425-1438 cm −1 . In particular, the broad band at 490-640 cm −1 is more resolved with four main bands (496, 532, 543 and 579 cm −1 ). Recipe QI.19 also presents a shift towards lower wavenumbers at 1335 and 1553 cm −1 .
Moreover, Ponce et al. attribute the two mediumlow intensity bands, at circa 1430 cm −1 and 1579 cm −1 , to the symmetrical and asymmetrical vibrations of a coordinated -COO − , to a metallic ion in the iron-gallate precipitate [48], which is different in QI.19, the ink made with brazilwood. Although further research is needed to better understand these complex Raman spectra and the effect that ink degradation might have on them, these results show that it is possible to distinguish between iron-gall and iron-brasilein inks by analysing the reproductions.

Characterisation of the writing inks by microFTIR spectroscopy
The infrared spectra of all ink reproductions are presented in Fig. 4 and in Additional file 2. It was possible to assign infrared bands based on the research done by Falcão and Araújo on the characterisation of "tannins", extracted from several vegetal sources, and used to dye leather [49,50]. The main bands for gallotannins are: common strong bands shared with all the other "tannins" (1615-1606 cm −1 ; 1442-1446 cm −1 ; 1211-1196 cm −1 ; 1043-1030 cm −1 ); 2 characteristic bands of hydrolysable tannins (1731-1704 cm −1 ; 1325-1317 cm −1 ); 3 distinctive bands for gallotannins, that are described as marker bands (1088-1082 cm −1 ; 872-870 cm −1 ; 763-758 cm −1 ). It is clear from Table 6 and Fig. 4, that all the ink reconstructions are characterised by these nine bands, displaying bound gallotannins as the main molecular fingerprint. Moreover, it is necessary to consider the relevant amount of iron (II) sulfate, leading to higher intensity of band 1076-92 cm −1 (e.g., compare to spectra in Fig. 6 of [6].) Regarding the different versions of the same recipe, we found no significant spectral changes, see Additional file 2. Nevertheless, we have identified the following exceptions: the band at 1206 cm −1 (C-O str vib (ester)) from QI.4Vs2, has a higher intensity when compared to the other versions. The opposite can be said about the same band from QI.3 version 2. Moreover, in some versions (QI.3Vs1 & 2; QI.4Vs2; QI.5Vs1 & 2) the band at ca. 1088-1082 cm −1 is shifted towards lower wavelengths.
Finally, when compared to the Iberian inks [6], clearly the most similar recipe is Córdoba. In this and the Andalusian recipes, the intensity of the bands corresponding to the "tannins" (grey shading), the hydrolysable tannins (orange shading), and the gallotannins (blue shading) are much lower, when compared to the band at c. 1088-2 cm −1 . This correlates with the HPLC-MS data, where the extraction efficacy was predicted to be low compared to the Iberian recipes.

Conclusions
In this study, we explored the preparation of black writing inks described in an important medieval treatise on the art of writing, "The gifts of the wise men on the curiosities of the substances", written by the renowned For the first time, a group of iron-gall ink recipes was translated from Arabic into English and then reproduced with as much historical accuracy as possible. The seven reproduced inks and their variations were characterised by colourimetry and, at the molecular level, by Raman microscopy and infrared spectroscopy. The concentrations of the phenolic compounds were quantified for each ink by HPLC-DAD. Comparing the results obtained with those previously obtained from medieval Iberian recipes demonstrates that gall extractions using only water produce a much lower concentration of phenolics than those based on wine, vinegar, or their mixture with water. In addition, gallic acid is a minor compound, and pentagalloylglucose and hexagalloylglucose are the major compounds in the analysed gall extracts. This knowledge is essential to understanding the interaction between phenolic and metallic components in forming iron-gall inks.
This work emphasises the importance of cross-disciplinary approaches where the materiality of textual heritage is thoroughly explored by consulting the original texts, experimental reproductions and scientific analyses. This is the best way to recover the knowledge of ancient masters, reconsider technical written sources, and reveal the science and practice behind these texts. This comprehensive approach provides essential data that will facilitate decision-making processes for the conservation of black writing inks profusely employed in written cultural heritage.
Finally, this study retrieved fundamental information on the nature of Islamic inks, thus supporting future characterisations of inks from original Arabic manuscripts and helping comparative studies of inks produced across distinct cultural environments.

Materials and methods
All reagents were analytical grade, except for the gall nuts Quercus infectoria, gum arabic in grains from A. senegal, and brazilwood (Paubrasilia echinata) rasps that were acquired from Kremer. Spectroscopic or equivalent grade solvents and Millipore water were used for all the chromatographic and spectroscopic studies.

Preparation of the writing inks
The inks were prepared according to previously mentioned medieval Islamic recipes, see Table 2. For QI.8 and QI.9 please see [41]. The inks were applied on filter paper, to be analysed by Raman spectroscopy and colourimetry, and on glass slides with the aid of a micropipette (60 μL per 2 cm 2 ), to be analysed by infrared spectroscopy. They were prepared and measured three times each to assess reproducibility. The filter paper used was from FILTER-LAB Filtros Anoia S.A., with 60 g/m 2 grammage, 0,140 mm thickness and 0,444 g/cm 3 , made with a depth filter. This paper was chosen because it has no additives such as fluorescent brightening/whitening agents, causing no interference with the components of our paint.
Recipe QI.2 (14.3 mL/1 g galls): 3.5 g of gall nuts were ground until they were the size of chickpeas. Ten times the same quantity of water (35 mL) was added, and then the solution was slowly heated until 60 ºC. The solution was evaporated 1/3. The solution was then left to rest until it reached room temperature and was filtered using filter paper. At this point, 5.25 g of gum arabic were added until dissolution and 2.78 g of iron sulfate (FeSO 4 ). The ink is ready for use.
Recipe QI.3 (12.1 mL/1 g galls): A mother solution was prepared using 13.2 g of ground galls and 160 mL of water. This solution was heated until 100 ºC, and it was evaporated 1/3. The solution was then left to rest until it reached room temperature and was filtered using filter paper. Then, it was divided into three separate solutions of 33 mL each for the addition of different quantities of iron sulfate and gum arabic: (a) 33 mL of gum arabic (dissolved in water at 20%: 6.6 g in 33 mL) and 2.78 g of Fig. 4 Infrared spectra of the ink reconstructions (for the meaning of the colour bars, please see Table 6) Díaz Hidalgo et al. Heritage Science (2023) 11:7 FeSO 4 dissolved in 10 mL were added to the gall extract; (b) 33 mL of gum arabic (dissolved in water at 20%: 6.6 g in 33 mL) and 5.56 g of FeSO 4 dissolved in 10 mL were added to the gall extract; (c) 15 mL of gum arabic (dissolved in water at 35%: 5.25 g in 15 mL) and 5.56 g of FeSO 4 dissolved in 15 mL were added to the gall extract. The iron sulfate was dissolved in water by beating it vigorously with a glass stirring rod until dissolution. The gum arabic was prepared by dissolving the grounded gum in water and stirring until dissolution, using a magnetic stirrer. The ink is ready for use. Recipe QI.4: Three distinct solutions were prepared: a) (142.8 mL/1 g galls) 3.5 g of ground galls were added to 500 mL of water. This was heated at 100 ºC until it evaporated 1/2. The solution was then left to rest until it reached room temperature and was filtered using filter paper. Iron sulfate (5 g) and gum arabic (7 g) were added; b) (142.8 mL/1 g galls) 3.5 g of ground galls were added to 500 mL of water. This was heated at 70 ºC until it evaporated 1/3. The rest of the recipe was prepared similarly to a); c) (14.3 mL/1 g galls) 3.5 g of ground galls were added to 50 mL of water. This was heated at 100 ºC until it evaporated 1/2. The solution was then left to rest until it reached room temperature and was filtered using filter paper. Iron sulfate (5 g) and gum arabic (7 g) were added. The inks were left in the sun for a couple of days and then used.
Recipe QI.5 (8 mL/1 g galls): Two distinct solutions were prepared: a) 3.5 g of ground galls in 28 mL of water. This was heated at 100 ºC until it evaporated 1/4. The solution was then left to rest until it reached room temperature and was filtered using a handmade filter paper of abaca pulp and cellulose, without glues or additives (Teeli ® ). 2.78 g of iron sulfate was added and dissolved. After, 5.25 g of gum arabic was added and dissolved as well; b) 3.5 g of ground galls in 28 mL of water. This was heated at 100ºC until it reduced 1/4. The solution was then left to rest until it reached room temperature and was filtered using filter paper. 2.78 g of iron sulfate was added and dissolved. After, 5.25 g of gum arabic was added and dissolved as well. The inks are ready for use.
Recipe QI.11 (14.3 mL/1 g galls): 3.5 g of galls were ground into a very fine powder. This was added to 50 mL of water, and using a fork, the solution was beaten until it formed foam. The solution was filtered using a filter paper, and 3.5 g of iron sulfate was added. A solution of gum arabic (3.5 g in 17.5 mL of water) was prepared using a magnetic stirrer to facilitate dissolution of the gum, and then added to the ink. The ink is ready for use.
Recipe QI.19: 1.0 g of brazilwood was placed in a glass container with 10 mL of water and left to boil for 1 hour, stirring continuously ('boil until their properties are released'). The extraction solution was then filtered into another container. Then, having into account the quantities described in the recipe ('three parts of sappanwood and one part of vitriol') 0.33 g of Fe (II) sulfate heptahydrate were added and the solution was stirred for 1 hour. Finally, 1 g of powdered gum arabic was added to the solution, which was again stirred for 1 hour to dissolve the binder properly.

Colourimetry
L*a*b* coordinates were measured using a Microflash mobile colorimeter DataColor International with a Xenon lamp, over an 8 mm-diameter measuring area. CIELAB system was used defining the D65 illuminant and the 10° observer. The instrument was calibrated with a white tile and a black trap, and the measurements were performed on top of filter paper. The described values are the average value of three measurements, which proved to be sufficient to guarantee reproducibility. In the L*a*b* cartesian system, L*, relative brightness, is represented in the z-axis. Variations in relative brightness range from white (L* = 100) to black (L* = 0). In the red-green y-axis, a* is usually found between−60 (green) and + 60 (red). In the yellow-blue x-axis, b* ranges from−60 (blue) to + 60 (yellow). The (a*, b*) pair represents the hue and chroma of the object.

pH measurements
pH measurements were made with a Sartorius Docu-pH Meter. Calibration was performed with pH 4 and 7 buffer solutions (Panreac).

Micro-Fourier transform infrared spectroscopy
Infrared analyses were performed using a Nicolet Nexus spectrophotometer coupled to a Continuμm microscope (15 × objective) with an MCT-A detector. The spectra were collected in transmission mode, in 50 μm 2 areas, resolution setting 8 cm −1 and 128 scans, using a Thermo diamond anvil compression cell. CO 2 absorption at ca 2400-2300 cm −1 was removed from the acquired spectra (4000-650 cm −1 ). To improve the robustness of the results, at least two spectra were acquired from different sample spots.

Raman microscopy
Raman microscopy was carried out using a Horiba Jobin-Yvon LabRAM 300 spectrometer, equipped with a diode laser with an excitation wavelength of 785 nm and a maximum laser power of 37 mW measured at the sample. Spectra were recorded as an extended scan. The laser beam was focused with a 50 × Olympus objective lens, and the spot size was 4 μm. The laser power at the sample surface was between 9.5 and 0.37 mW. No evidence of ink degradation was observed during spectra acquisition.