Its sometimes hard to type it if logarithm is not natural and base is not 10, especially if base is variable. So anyone know rules how to type?
Two ways I just checked:

Typing log(a,b) gives $\log_a(b)$.

You can also use change-of-base to represent $\log_a(b)$ by log(b)/log(a).
