Posts

Showing posts from October, 2026

From latin grammar to Prolog programming: a comparison of two worlds

Image
This article examines a striking parallel between the logic programming language Prolog and the structure of the Latin language. Just as the flexibility of Latin grammatical cases preserves the logical meaning of a sentence regardless of word order, in Prolog the truth of a relation and the structure of the data are independent of the syntactic form or the order of the variables used in queries. This comparison thus highlights how formal logic and classical linguistics share a common focus on structural relationships.

Automatic TOC in BLOGGER articles via HTML code

Image
This article illustrates a practical solution for dynamically generating a table of contents within Blogger posts using HTML, JavaScript, and CSS. Starting with an empty container div, the script analyzes the page headings and automatically builds an interactive index equipped with custom styles. It also demonstrates how to visually format the structure through a dedicated stylesheet to highlight the hierarchy of sections. Finally, the article explains the simple modification needed to make the code work seamlessly on other platforms or stand-alone files.