There are a couple of ways to fix up/down stairs without ramps or adjacent stairs...
First example:
You dug straight down into the cavern roof, and you want to construct stairs downwards to the cavern floor. You have
X <-- z 2, the up/down stairs that opened up the cavern roof
<-- z 1, empty cavern
_ <-- z 0, cavern floor
and you want
X <-- z 2
X <-- z 1
< <-- z 0, cavern floor
You need to dig out an orthogonal floor tile at z=2, then construct the stairs over those three tiles. But you also want the stairs to go straight down from there, so you channel an orthogonal tile at z=0, then 'm'ine s't'airs from z=0 downwards, and when z=-1 is dug into up/down stairs, the stairs at z=0 will convert from a constructed up-stairs to up/down stairs.
Second example:
If you were digging up/downs and but you have
X <-- z 2
> <-- z 1
X <-- z 0
and you want
X <-- z 2
X <-- z 1
X <-- z 0
You need an orthogonal floor tile at z-levels 0, 1, and 2 (natural or constructed floor), then you will be able to construct the stairs over those three tiles.
Third example:
You built stairs on the surface and you want them to go up to z=6, so you have
> <-- z 2
X <-- z 1
< <-- z 0
Construct stairs from z=1 to z=6 and z=2 will be replaced with an up/down.
It costs extra building material when you build over older stairs and you may want to build walls in each orthogonal tile you dug out, so it is not ideal. It is easy.