typora / typora-issues

Bugs, suggestions or free discussions about the minimal markdown editor — Typora
https://typora.io
1.54k stars 56 forks source link

Can you support vertical setting of types for CJK?能支持竖排吗? #1121

Open iblueer opened 6 years ago

iblueer commented 6 years ago

希望可以在typora上体验到传统文化的魅力。 I hope people can experience the charming point of traditional East Asian Culture.

Just like--this.

2017-12-24 12 25 10
abnerlee commented 6 years ago

It is possible. But code fences and math can not support this perfectly

How-to:

Follow http://support.typora.io/Add-Custom-CSS/

And add custom css:

#write {
 writing-mode: vertical-rl;
-webkit-writing-mode: vertical-rl;
}
iblueer commented 6 years ago

Thank you for teaching me.

But one more question:

I found that before the first sentence, there is a stable space like this. How should I delete it?

2017-12-31 1 03 22
iblueer commented 6 years ago

And I found that quotation marks I deleted still show on screen.

This must be kind of bug, right?

2017-12-31 1 13 56
abnerlee commented 6 years ago

I found that before the first sentence, there is a stable space like this. How should I delete it?

There should be other modification for supporting vertical writing mode.

#write > p:first-child, #write > ul:first-child, #write > ol:first-child, #write > pre:first-child, #write > blockquote:first-child, #write > div:first-child, #write > table:first-child {
    margin-top: 0;
}
abnerlee commented 6 years ago

And I found that quotation marks I deleted still show on screen.

What's your IME?

iblueer commented 6 years ago

Thank you for teaching me.

It is macOS default Japanese IME.

Sorry, I've to edit the question description.

And I found that quotation marks I deleted still show on screen.

In fact I found everything I deleted still show on screen, not only the marks, but also the characters.


And one more question, please:

The direction keys are not adapted for vertical mode. For example, I want to move the cursor up⬆️, but I press the UP key, the cursor moves to the right➡️ side.

abnerlee commented 6 years ago

I see, so vertical writing is not officially supported by Typora yet. We will keep this open before we support editing in vertical order.

mgeorgetw commented 5 years ago

Cursor movements might need to be remapped in vertical writing mode. That aside, when texts overflow the left side of the window, they are hidden and not reachable by default. One needs to enable horizontal scrolling to make it work:

writing-mode: vertical-rl;
-webkit-writing-mode: vertical-rl;
text-orientation: mixed;
overflow-x: auto; /* This enables horizontal scrolling */