linguistic:translation, linguistic:voice_change, structural:reformatting
Literature

Up until the 19th century, the al-Qarawiyyin dominated the intellectual life of the city and of the country around it. Literature was focused on religious scholarship, philosophy, and poetry. The city's largest library was located at the Qarawiyyin Mosque, while others were attached to other major mosques. Under Sultan Abd al-Rahman (r. 1822–1859) a new library was created inside the Royal Palace and later in the 19th century the city's wealthy elites began creating their own privates libraries.

The city is also one of the historical centers of Moroccan Sufism and a significant body of written works were devoted to its many Sufi wali s ("saints" or teachers). This type of literature established itself as one of the main literary genres of Morocco by the late 14th century and Sufi written works from Fez are especially abundant from the 17th to 20th centuries. A study by Ruggero Vimercati Sanseverino describes the rise of the Zawiya al-Fasiyya, a Sufi order founded in 1581 by Abu l-Mahasin Yusuf al-Fasi, as the impetus for the development of a tradition of Sufi literature particular to Fez. This literature was a diverse mix of hagiographies (religious biographies), genealogies, and historiographies whose conventions evolved over time. Writers sought to establish a continuity between the teachings of contemporary Sufi masters and those that came before them, with the city of Fez portrayed as the center of this spiritual heritage.

Towards the beginning of the 20th century Moroccan literature began to diversify, with polemic or political works becoming more common at this time. For example, there were Muhammad Bin Abdul-Kabir Al-Kattani's anti-colonial periodical at-Tā'ūn (الطاعون The Plague), and his uncle Muhammad ibn Jaqfar al-Kattani's popular Nasihat ahl al-Islam ("Advice to the People of Islam"), published in Fez in 1908, both of which called on Moroccans to unite against European encroachment.

Fez, along with Cordoba, was one of the centers of a Jewish intellectual and cultural renaissance that took place in the 10th and 11th centuries in Morocco and al-Andalus. Jewish literary figures associated with Fez include the poet Dunash Ben Labrat (d. c. 990), the grammarian Judah ben David Hayyuj (d. c. 1012), the Talmudist Isaac al-Fasi (d. 1103), and the scholar Joseph ben Judah ibn Aknin (d. c. 1220), who were all born in Fez or spent time there. Maimonides (d. 1204), one of the most important Jewish intellectuals of his era, also lived in Fez from 1159 to 1165 after fleeing al-Andalus. The first book printed on the African continent was printed in Fez. A copy of Sefer Abudarham (ספר אבודרהם) was printed in Hebrew in 1516 by Samuel ben Isaac Nedivot and his son, who were Jewish refugees from Lisbon. The press was short-lived and printed 15 copies, one of which is now preserved at the Library of Congress.

Printing in Arabic was introduced to Morocco in 1864–65, on the initiative of a man named Muhammad at-Tayyib ar-Rudani, an Islamic scholar and judge originally from the Sous region. In 1864 Ar-Rudani, while returning from his Hajj pilgrimage, bought an Arabic printing press in Cairo and contracted an Egyptian operator, bringing both back with him to Morocco. The press appears to have been confiscated by the Moroccan authorities when it arrived at port and sent to Meknes, where Sultan Muhammad IV was residing at the time. The first book in Arabic was thus printed in Meknes in June 1865, before the press was moved again to Fez in that same year, where it continued to operate until the 1940s. The press was installed in a central neighbourhood of Fes el-Bali and was managed by the government, which printed traditional scholarly books and made some of the productions available to the Qarawiyyin University free of charge. After 1871 the government transferred management of the press to private citizens and the applications of printing widened. After 1897 it became a regulated industry overseen by officials in Fez. By 1908 there were at least four printing establishments in Fez, while two other Moroccan printers were in Tangier. Hebrew printing presses were reintroduced to Morocco in the 1890s in Tangier and were more firmly established across the country in the 1920s.