Algebraic curves in Hilbert modular surfaces that are totally geodesic for the Kobayashi metric have very interesting geometric and arithmetic properties, e.g. they are rigid. There are very few methods known to construct such algebraic geodesics that we call Kobayashi curves. We give an explicit way of constructing Kobayashi curves using determinants of derivatives of theta functions. This construction also allows to calculate the Euler characteristics of the Teichmueller curves constructed by McMullen using Prym covers.