Seperating the content from its form, or better its visual representation means that you declare the functions of a certain formatting element logically (i.e. logical markup is the basic principle involved here -- that not only (La)TeX employs!).
There is no compelling reason for doing so, but it is very convenient, as I try to point out later. First, consider that TeX was written by a mathematician and that logical markup somehow reflects the basic principle of mathematical definitions that you don't specify what the defined object is, rather than what it does. In analogy logical markup does not inform you about how a typographical element looks like, but instead which role it plays in the document.
A few examples:
- You mark up logically by writing
\section{Some Title}
instead of {\centering\Large\bfseries Some Title}
, or
\begin{proof} <proof body> \end{proof}
instead of {\itshape Proof.} <proof body> \unskip\hspace*{1em plus 1 fill}\nolinebreak[3]\hfill\mbox{\blacksquare}
, or
\tableofcontents
instead of ... well ...
(And the first counterexample still lacks in vertical spacing and ensuring that the section heading does not remain alone in the last line of a page.)
The obvious advantage is directly concluded from the notion how the examples and their counterexamples differ in length. You save time! Consider furthermore a scenario in which you need to change the formatting of every section heading. If you would have used hard-coding -- the "opposite" of marking up logically -- in this scenario you would be cycling through your whole document and change every instance by hand. But, if you had seperated the section titles from its formatting, you would just go to the original definition of \section
and just change it to your needs. This procedure is less error-prone (obious why!?), you are less likely to get frustrated and again you save time. And the famous argument for it "that you can focus on the content alone" holds to a certain degree because you are using simple utf8-chars of 1 byte lenght (basically ASCII), and thus are forced to focus on what you say -- the pure content and its logical development, which is not too bad sometimes.
Now, you are right that content and its visual representation are correlated. That's why I would limit the impact of the last mentioned argument. However, let's be honest. Do you really have in mind the final formatting when you start composing your paper, book or whatever? And additionally you need to keep in mind that in TeX you are able to change the layout while or even before writing your content. By seperating the layers you gain the freedom to delay certain descisions. That does not prevent you from taking those before the content is finalised.
What are the downsides then? A light one clearly is that a small set of actions is performed way slower if you don't hard-code or don't manually draw them. (Think about tables; some of them can be a nightmare.) The main drawback is, in my opinion, that the original definitions of the markup instructions are not easily accessable in general. Most of them are quite easy to reach and manipulate (which also depends on how deep you want to dip into the TeX universe), but some are undoubtedly not. So, you must be willing to spend time studying documentations, asking friends or puting questions on TeX.SX.
In conclusion you can say that you save time and avoid annoyance when seperating content and form because you don't have to deal with torturous mechanical work. Moreover it will incentivise a certain behaviour that can be regarded as beneficial for writing content. On the other hand you will most likely lose some of the scooped time by tweaking your document to your needs. In the end it's up to you to decide how exactly you want to spend your time.
In Figure 3,
toIn Figure~\ref{fg:myimg}
. The former (bad) has you accounting for the formatting when you enter the content (it has you counting prior figures in the document), whereas the latter (good) avoids specifying the formatting. A late-edit figure addition will screw up the former, but not the latter approach.\section{...}
and not\vspace*{2\baselineskip} \bfseries\fontsize{14}{17}\selectfont \refstepcounter{section} ... \vspace*{\baselineskip}
.\textbf{some fact}
but use instead\newcommand\important[1]{\textbf{#1}}
and\important{some fact}
. By separating the visual from the meaning it is easier to adjust the visual later, e.g. to make everything important in red instead of bold.