I must add that there is one difference between my setup and ox-publish : I use PROPERTIES to
parametrize my exports in several ways. I create several html pages and pdf files from subtrees.
These pages need some navigation to be defined and I collect it by scanning the org file. I assemble the menu for the
pages from this information. I'm not sure I could do that with ox-publish.
It seems that if the pub-dir variable is bound at the time of export, then it is taken into account as
the export dir. However I find it by reading the code. I expect that it is something that could change
over time.
Fabrice