In text typesetting, the text is changed from horizontal to vertical. How to put punctuation marks in the middle between words?

No, I don't know what software you use. There are usually character options when typesetting. One of the options is "superscript" (my own name), which is actually a letter "Aa" with a value of "0". You can enter a "negative" value according to your font size. For example, a vertical symbol like "-2" will move to the left and the value will be.