The only real difference with the diesel is that the hydrocarbons are longer, which is why diesel is thicker and less volatile. Diesel needs to be hotter to break down these longer hydrocarbons and this is achieved via a higher compression ratio (14:1 instead of 10:1). That extra heat is an issue for N0x production if the mixture gets too lean. But if the mix is too rich, with not enough 02 for all the H and C, then you get incomplete combustion. That black soot is essentially just carbon that couldn't find any oxygen to bond with.
To avoid soot, so-called clean diesels run slightly lean and then rely on a catalytic converter to turn any N0x back into N2 and O2, but a dry cat can only go so far. BMW and others inject urea into the cat where it become ammonia (NH3). The O in the NOx grabs the H from the NH3 and the two Ns form N2. NOx + NH3 = N2 + H20.