`\mathbf` produces bolditalic instead of bold (LaTeX vs ISO standard)

Đang mở
#94 1 bình luận 3 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
julia
Lĩnh vực
computer-graphics

Hướng nghiên cứu

Bắt đầu với _default_font_mapping, _default_font_modifiers, FontFamily và generate_tex_elements bằng ví dụ \mathbf{x} đã được báo cáo. Theo dõi cách một FontFamily tùy chỉnh có thể đi tới các nhãn của Makie, sau đó xác định cách cung cấp các lựa chọn kiểu chữ đậm của LaTeX và ISO. Được xem là hoàn tất khi \mathbf tạo ra các ký tự đậm đứng theo kiểu đã chọn và hành vi này hoạt động với các nhãn.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Julia
Star
106
Fork
25
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Kolaru/MathTeXEngine.jl

Tất cả issue của Kolaru/MathTeXEngine.jl

Issue tương tự

Thêm issue về Julia

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.