Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better line breaking around inline math #32

Open
cben opened this issue Jan 15, 2015 · 0 comments
Open

Better line breaking around inline math #32

cben opened this issue Jan 15, 2015 · 0 comments

Comments

@cben
Copy link
Owner

cben commented Jan 15, 2015

KaTeX has this clever tweak which IIUC avoids breaks between math & adjacent punctuation:

white-space: nowrap;

.katex-inner {
    // Making .katex inline-block allows line breaks before and after,
    // which is undesireable ("to $x$,"). Instead, adjust the .katex-inner
    // style and put nowrap on the inline .katex element.
    display: inline-block;
}

Will it work with CodeMirror?
CM's markText() requires widgets to be inline; I'm currently passing inline-block, which works fine, so this should also work.
Just need to check that nowrap doesn't confuse CM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant