When writing some journal paper in scientific or mathematical areas, the usage of comma is very confused. For example,
The objective function f is differentiable when the value of the node x is given.
In the above, f is called the objective function, and x represents the value of the node.
In many papers, the above sentence are written as the below.
The objective function, f, is differentiable when the value of the node, x, is given.
Actually, I have seen both of them in papers. However, I want to know whether there is a specific rule or not.