@@ -236,13 +236,13 @@ type MathpixRequest struct {
// 输出格式列表: text, data, html, latex_styled
Formats [ ] string ` json:"formats" `
// 数据选项
DataOptions * MathpixDataOptions ` json:"data_options" `
DataOptions * MathpixDataOptions ` json:"data_options,omitempty " `
// 返回检测到的字母表
IncludeDetectedAlphabets bool ` json:"include_detected_alphabets" `
IncludeDetectedAlphabets * bool ` json:"include_detected_alphabets,omitempty " `
// 允许的字母表
AlphabetsAllowed * MathpixAlphabetsAllowed ` json:"alphabets_allowed" `
AlphabetsAllowed * MathpixAlphabetsAllowed ` json:"alphabets_allowed,omitempty " `
// 指定图片区域
Region * MathpixRegion ` json:"region" `
Region * MathpixRegion ` json:"region,omitempty " `
// 蓝色HSV过滤模式
EnableBlueHsvFilter bool ` json:"enable_blue_hsv_filter" `
// 置信度阈值
@@ -264,11 +264,11 @@ type MathpixRequest struct {
// 图表文本提取
IncludeDiagramText bool ` json:"include_diagram_text" `
// 页面信息, 默认true
IncludePageInfo * bool ` json:"include_page_info" `
IncludePageInfo * bool ` json:"include_page_info,omitempty " `
// 自动旋转置信度阈值, 默认0.99
AutoRotateConfidenceThreshold float64 ` json:"auto_rotate_confidence_threshold" `
// 移除多余空格, 默认true
RmSpaces * bool ` json:"rm_spaces" `
RmSpaces * bool ` json:"rm_spaces,omitempty " `
// 移除字体命令, 默认false
RmFonts bool ` json:"rm_fonts" `
// 使用aligned/gathered/cases代替array, 默认false
@@ -719,6 +719,9 @@ func (s *RecognitionService) processMathpixTask(ctx context.Context, taskID int6
IncludeLatex : true ,
IncludeTsv : true ,
} ,
MathInlineDelimiters : [ ] string { "$" , "$" } ,
MathDisplayDelimiters : [ ] string { "$$" , "$$" } ,
RmSpaces : & [ ] bool { true } [ 0 ] ,
}
jsonData , err := json . Marshal ( mathpixReq )