Yáñez studied law in the Escuela de Jurisprudencia de Guadalajara and philosophy in the National Autonomous University of Mexico (UNAM). He held several teaching positions throughout his life, he was a professor in the Escuela Normal para Señoritas de Guadalajara from 1923 to 1929, in the Preparatoria José Paz Camacho from 1926 to 1929, in the Preparatoria de la Universidad de Guadalajara from 1931 to 1932, in the Escuela Nacional Preparatoria from 1932 to 1953, in the UNAM from 1942 to 1953 and again from 1959 to 1962.