Definition of Heat and the requirement of a different temperature - Zemansky In Zemansky's "Heat and Thermodynamics", the concept of thermodynamic heat is defined as:
$$ Q = \Delta U - W_{i \to f}^{dia}$$
where $\Delta U$ is the change in internal energy between the initial state $i$ and the final state $f$ and $W_{i \to f}^{dia}$ is the diathermic work done in any path of integration between the same states for a closed system.
However, another requirement is asked by the author for the definition to make sense: the system and the surroundings must have different temperature.
Now, what I do not understand is why should we require something like that and also in which state should the system and the surroundings be at different temperatures: the initial one or any intermediate one?
My only attempt at explaining this consists of assuming that the requirement is also valid for any intermediate state and that if the temperature were to be the same for the system and the surroundings at each state in the process, then it would be like the process were an adiabatic one beacuse replacing the diathermic walls with adiabatic ones would not change the nature of the process (the system and the surroundings are always in equilibrium).
Unfortunately I am not convinced by my explanation, therefore I would like to hear if anyone has a better one!
 A: At the interface between the system and surroundings, the system and surroundings are always at the same temperature.  For an irreversible process, the temperature within the system can vary with spatial position, with the average system temperature (averaged over the mass of the system) being lower or higher than at the interface.  This temperature difference between the boundary and the interior provides the driving force for heat transfer to occur.  In the case of a reversible process, the temperature difference is very low, and the heat transfer rate is very low (but it can result in a finite amount of heat being transferred if maintained for a long period of time).  In most treatments of elementary thermodynamics, the surroundings are assumed to be at uniform temperature (spatially), so the interface temperature between the system and surroundings is equal to the (uniform) surroundings temperature.
A: In my opinion, Zemansky is trying to save the definition of heat as "energy transfer due to a difference of temperature." I do not think that attempt is consistent with the definition of heat he is discussing, originally due to Caratheodory and assumed by Born and other founding fathers of Classical Thermodynamics.
Indeed, the route to heat introduced by Caratheodory is

*

*start with a subclass of particular processes, the adiabatic processes, defined as those processes such that the work from a state $A$ to a state $B$ depends only on the starting and final point and not on the connecting path;

*through such an adiabatic work, it is possible to introduce internal energy, $U$, as a function of the state;

*for every non-adiabatic process connecting the same states, the work depends on the process and is different from the adiabatic work;

*the difference between adiabatic work $U(B)-U(A)$ and actual work $W_{A \rightarrow B}$ is called heat $Q_{A \rightarrow B}$.

Following such an approach, we have a definition of heat that does not explicitly require introducing a mechanism of temperature difference, making it easier to deal with situations like the isothermal heat exchanges with a thermostat. Instead of introducing infinitesimal temperature differences or similar mechanisms challenging to check directly, one can leave unspecified the microscopic mechanisms underlying such a heat transfer, still keeping a consistent definition of heat. Probably more important, this definition eliminates at the root the problem of non-equilibrium processes where there is no way to assign a temperature to the system in the intermediate states.
In my opinion, difficulties with Zemansky's approach are the typical results of mixing inconsistently different definitions and approaches. Unfortunately, this is not an isolated example in Physics.
A: At the end of this answer I have included quotations from Zemansky’s book to provide more context for your questions and my comments below.

However, another requirement is asked by the author for the definition
to make sense: the system and the surroundings must have different
temperature.

When you say “another requirement” I assume you are referring to the definition in (3) of the second quote.
The difference between the definition in (3) and the thermodynamic definition in the first quote, is (3) is a necessary but not sufficient condition for heat to occur because it doesn't address the opportunity for the transfer, whereas the additional requirement for a diathermic (non adiabatic) boundary in the first quote affords the opportunity for the transfer to occur.
So the first quote almost describes both the necessary and sufficient conditions for energy transfer by heat. I say almost because, in addition to a diathermic boundary, the process cannot occur so quickly such that there is not enough time for energy transfer by heat to occur during the process.

Now, what I do not understand is why should we require something like
that and also in which state should the system and the surroundings be
at different temperatures: the initial one or any intermediate one?

A temperature difference is required between the system and surroundings for all states (initial and intermediate) in order for there to be an opportunity of energy transfer by heat.

My only attempt at explaining this consists of assuming that the
requirement is also valid for any intermediate state...

If by "this" you mean a temperature difference being a necessary condition for energy transfer by heat, then yes it is valid for any intermediate state, keeping in mind it may not be a sufficient condition as previously discussed.

...and that if the temperature were to be the same for the system and
the surroundings at each state in the process, then it would be like
the process were an adiabatic one...

If you mean exactly the same temperature, so that by definition no heat is possible, then yes. However, if there is an infinitesimal temperature difference maintained all during the process, as in a theoretical reversible isothermal process, then there would be heat transfer, so the process would not be considered adiabatic.

...because replacing the diathermic walls with adiabatic ones would
not change the nature of the process (the system and the surroundings
are always in equilibrium).

The only closed system process where you can have diathermic walls with the system and surroundings always being in thermal equilibrium is the theoretical reversible isothermal process discussed above.  Replacing the diathermic walls with adiabatic ones will change the nature of the process.
Hope this helps.
QUOTES FROM 9TH ED, CHAPT 4, HEAT AND THERMODYNAMICS:
"Therefore we give the following as our thermodynamic definition of heat: When a closed system whose surroundings are at a different temperature and on which diathermic work may be done undergoes a process, then the energy transferred by non mechanical means, equal to the difference between the change in internal energy and the diathermic work, is called heat."
Several sentences later-
"It should be emphasized that the mathematical formulation of the first law contains three related ideas: (1)the existence of an internal-energy function; (2) the principle of the conservation of energy; (3) the definition of heat as energy in transit by virtue of a temperature difference."
A: I like the definition for heat (and for work) provided by Obert in the old textbook Thermodynamics.
"Heat is energy transferred, without transfer of mass, across the boundary of a system, because of a temperature difference between system and surroundings."
"Work is energy transferred, without transfer of mass, across the boundary of a system, because of an intensive property difference other than temperature that exists between system and surroundings."
