`\mathbf` produces bolditalic instead of bold (LaTeX vs ISO standard)
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- julia
调研方向
从 _default_font_mapping、_default_font_modifiers、FontFamily 和 generate_tex_elements 开始,使用报告中的 \mathbf{x} 示例。跟踪自定义 FontFamily 如何到达 Makie 标签,然后确定应如何公开 LaTeX 和 ISO 粗体样式选项。完成的标准是:在选定样式下,\mathbf 生成直立粗体字符,并且该行为对标签有效。
由索引模型根据 Issue 内容生成。
描述
Currently, L"\mathbf{x} gets parsed to TeXChar 'x' [index 89 in NewComputerModern - 10 Bold Italic].
This deviates from the standard LaTeX behavior, where we would expect an upright bold character.
In fact, the LaTeX package unicode-math offers options (math-style and bold-style) to conform to different notational standards. MathTeXEngine currently mostly adheres to the "ISO" style (except for Greek letters, as per https://github.com/Kolaru/MathTeXEngine.jl/issues/87).
I guess, this is due to _default_font_mapping[:char]=:italic?
I think, in the long run it would be great to also enable the user to choose either norm (like unicode-math does) or be consistent with the LaTeX style.
I tried
__default_font_modifiers = deepcopy(_default_font_modifiers)
__default_font_modifiers[:bf] = Dict(
:italic => :bold,
:regular => :bold
)
MYFONT = FontFamily(
_new_computer_modern_fonts,
_default_font_mapping,
__default_font_modifiers,
_symbol_to_new_computer_modern,
13,
0.0375
)
as a quick hack, which indead works as expected: generate_tex_elements(L"\mathbf{x}", MYFONT)[1][1]
gives TeXChar 'x' [index 89 in NewComputerModern - 10 Bold].
Unfortunately, it seems that I cannot pass my MYFONT down to be used with labels in Makie.
- 主要语言
- Julia
- 星标
- 106
- 派生
- 25
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Kolaru/MathTeXEngine.jl 的其他 Issue
-
help wanted
难度 3/5 1-2 天 新手友好度 65/100
Kolaru/MathTeXEngine.jl#169 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 68/100
Kolaru/MathTeXEngine.jl#168 ·
-
难度 5/5 一周以上 新手友好度 25/100
Kolaru/MathTeXEngine.jl#160 · 6 条评论 ·
-
难度 3/5 1-2 天 新手友好度 30/100
Kolaru/MathTeXEngine.jl#137 ·
-
bug help wanted parser
难度 4/5 3-5 天 新手友好度 25/100
Kolaru/MathTeXEngine.jl#134 ·
查看 Kolaru/MathTeXEngine.jl 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
FluxML/Metalhead.jl#407 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
lux
难度 2/5 1-3 小时 新手友好度 76/100
JuliaGraphs/GraphNeuralNetworks.jl#732 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
erfinv(::Float16) and erfcinv(::Float16) are wrong for abs(x) <= 0.75 (erfinv(Float16(0)) == 0.2201)未关闭
难度 2/5 1-3 小时 新手友好度 82/100
JuliaMath/SpecialFunctions.jl#571 ·