Summary: | In Math Formula the spacing around operators, numbers, identifiers etc should be adjustable | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Vladislav Ivanistsev <vi> |
Component: | Formula Editor | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | NEW --- | ||
Severity: | enhancement | CC: | jbfaure, rb.henschel |
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Crash report or crash signature: | Regression By: | ||
Bug Depends on: | |||
Bug Blocks: | 39750 |
Description
Vladislav Ivanistsev
2017-12-16 08:05:50 UTC
(In reply to Vladislav Ivanistsev from comment #0) [...] > Mark that the spacing around operators + and = too small. It's a matter of taste. You can add small or normal spaces around + and = if you want : code : f(2`+`2) `=` 4 or code : f(2~+~2) ~=~ 4 Best regards. JBF Sure, one can use "`" or "~". Yet, take a look on the implementation in mathml. For the mo element there is an "lspace" and "rspace" parameters. Both depend on the form of an element -- prefix (eg "("), infix (eg "+") or postfix (eg ")". Your solution is equivalent of adding manually mspace element in mathml. A more elegant solution rely of the https://www.w3.org/TR/mathml-for-css/#mo, where several types are defined: mi identifier mn number mo operator, fence or separator mtext text mspace space ms string literal Using these types it is possible to define and redefine difference space values in a more flexible way than it is currently done in LO formula editor. Herewith, padding is set only in the following cases: mo[largeop="true"] {font-size:1.3em; vertical-align:-0.1ex;} mo[form="infix"], * + mo {padding:0 0.3ex;} mo[form="prefix"] {padding:0 0 0 0.5ex;} mo[form="postfix"] {padding:0 0.5ex 0 0;} mo[fence="true"], mo[separator="true"] {padding:0;} I propose distinguishing fences and separators from other operators, and allow adjusting space around them in a separate way. Hi Regina, I think you are the right person to evaluate this enhancement request :-) What do you think ? Best regards. JBF This is a valid request. Unfortunately type setting of formulas are not strongly standardized. But the values in the operator dictionary are suitable as default in LibreOffice. https://www.w3.org/TR/MathML3/appendixc.html. There exists some bugs about spacing, e.g. 66279, 107379, 104194. But they are not really duplicate. I think we should keep this issue for the spacing aspects in StarMath and the related UI. Of cause import from and export to MathML has to be implemented at the same time. Thank you very much Regina for your answer. So setting as NEW. Best regards. JBF |