The chemistry of astronomical hydrocarbons, responsible for the well-known infrared emission features detected in a wide variety of targets, remains enigmatic. Here we focus on the group of young intermediate-mass Herbig Ae stars. We have analyzed the aliphatic and polycyclic aromatic hydrocarbon (PAH) emission features in the infrared spectra of a sample of 53 Herbig Ae stars, obtained with the Infrared Spectrograph aboard the Spitzer Space Telescope. We confirm that the PAH-to-stellar luminosity ratio is higher in targets with a flared dust disk. However, a few sources with a flattened dust disk still show relatively strong PAH emission. Since PAH molecules trace the gas disk, this indicates that gas disks may still be flared, while the dust disk has settled due to grain growth. There are indications that the strength of the 11.3 mu m feature also depends on dust disk structure, with flattened disks being less bright in this feature. We confirm that the CC bond features at 6.2 and 7.8 mu m shift to redder wavelengths with decreasing stellar effective temperature. Moreover, we show that this redshift is accompanied by a relative increase of aliphatic CH emission and a decrease of the aromatic 8.6 mu m CH feature strength. Cool stars in our sample are surrounded by hydrocarbons with a high aliphatic/aromatic CH ratio and a low aromatic CH/CC ratio, and vice versa for the hot stars. We conclude that, while the overall hydrocarbon emission strength depends on the dust disk's geometry, the relative differences seen in the IR emission features in disks around Herbig Ae stars are mainly due to chemical differences of the hydrocarbon molecules induced by the stellar UV field. Strong UV flux reduces the aliphatic component and emphasizes the spectral signature of the aromatic molecules in the IR spectra.