Standard specification for direction of lateral load for beams

I have always thought that lateral load is horizontal and not vertical in direction. For example, from this MIT notes and many others:

The lateral load resisting systems for earthquake loads are similar to those for wind loads. Both are designed as if they are horizontally applied to the structural system.

But the textbook I have (Mechanics of materials, 7th edition, Gere and Goodno, page 412) shows a vertical load on a beam and says it is lateral load. Here is the page:

Is there a convention for loading directions and the authors happens to use different one or should not Q above be called transverse load?

The nomenclature adopted by the authors is unusual, yes. Usually that load $Q$ would be called a transverse load, as you've mentioned. That being said, there is nothing that distinguishes a lateral load from a transverse load other than traditional nomenclature. As @Chris mentions in his answer (which I saw while writing this), lateral is a perfectly fine term, it's just... not as common in such a case.

The definition of lateral is: of or relating to the side; situated at, proceeding from, or directed to a side.

In beam loading problems lateral refers to the part of the load that is not directed along the length (i.e. axis) of the beam while, axial refers to the load which is directed along the axis of the beam. The lateral load can be horizontal, vertical, or somewhere in-between. Since the weight of the beam is generally insignificant in beam loading problems, horizontal and vertical are indistinguishable.

In the general case, you need to resolve the transverse load into two components, in the planes of the two principal axes of the beam cross-section. Of course when beginning a study of combined loads, one of the two transverse components would probably be zero, which is apparently the case in the quote from the textbook.

In some application areas (e.g. the frames of buildings in civil engineering), the two transverse directions are almost always "lateral" and "vertical", and those names for the directions relate to the origin of the loads - for example wind loads are "lateral" on the sides of the building, but snow loads are "vertical" on the roof.

In other applications, there are no obvious directions to describe the orientation of the principal axes of the beam, and the general term "transverse load" (or "two transverse load components") would be more appropriate.

Without more context from the book, it's not very clear what scenario is being described. If there is an implication that the X-Y plane in the diagrams is horizontal and the Z direction is vertical (if it is relevant at all), then I think using the term "lateral" is sensible.