The mediaeval codex as a complex container: the Greek and Latin tradition