Does semantics matter in latex? If not, why not?

When I ask questions about achieving a specific LaTeX layout, I get answers that suggest that I should use constructs that do not make sense for their semantics. For example, I wanted to intend to make one paragraph, and I was told to make it a list without bullets. It works, but this is not the semantic meaning of the list, so why is it permissible to abuse it like that.

We stopped doing this in HTML more than ten years ago. Why are we still making the equivalent of a table layout, supposedly the best typing system?

Don't I understand, but isn't it too hard? Everyone says LaTeX is elegant and you don’t have to worry about the layout, but then I find that I am distorting the tables, lists and other semantic markup to put things where I want it. Does the emperor have no clothes, or I don’t understand?

+6
latex
source share
2 answers

When such a problem arises, and the answer is to use something that doesn't really make sense, what you need to do is create a new environment or command that wraps the functionality in a way that makes semantic meaning.

Each layout language has this problem - somewhere along the line you need to move on to a physical, not semantic solution. In HTML, the non-semantic parts of the solution are now pretty well covered by CSS and JavaScript (which are different languages ​​from HTML). You create <div> and <span> that capture the semantics, and then you use CSS and JavaScript to define the physical layout for this semantics.

In LaTeX, you simply use the same language for this purpose: LaTeX (or simple TeX, which is often difficult to distinguish from LaTeX).

+4
source share

I would say that you need to know all this or find the right semantics. You are talking about one example, and you are not providing your semantics, you are talking about how to compose it. Thus, depending on what you want to indent, there may be better tricks, for example. quote, formula, etc.

-one
source share

All Articles