A codex is an ancient book, consisting of one or more quires of sheets of papyrus or parchment folded together to form a group of leaves or pages. It is the historical ancestor of the modern book and was used for ancient manuscript books with handwritten contents. The term "codex" comes from the Latin word "caudex," meaning "trunk of a tree," "block of wood," or "book". The codex began to replace the scroll almost as soon as it was invented, offering advantages such as compactness, sturdiness, economic use of materials, and ease of reference. The codex is often used for Scripture, classics, or ancient annals. It is typically handwritten and bound in book form, and it supplanted the scroll in Europe but not in Asia.