2015-01-26 3 views
2

내가 디스플레이 모드에서 AsciiMath 공식을 표시하기 위해 노력하고 있지만, 무엇이든 내가 시도 '는 여전히 인라인 여기 (MathJax)

내 MathJax 구성입니다 :

MathJax.Hub.Config({ 
    AsciiMath: { 
     fixphi: true, 
     useMathMLspacing: true, 
     displaystyle: true, 
     decimalsign: "." 
    }, 
    extensions: ['asciimath2jax.js'], 
    jax: ['input/TeX', 'input/AsciiMath', 'output/HTML-CSS'] 
}); 

그리고 HTML

<p>Once upon a time ... <span>`f(x) = x^2`</span> which ... </p> 

JSFIDDLE 내가 화장실이야 무엇 인 $$f(x) = x^2$$ 디스플레이 스타일에있는 라텍스 공식을 볼 수 있듯이 왕. 그래서 질문은, 왜 구성 옵션 displaystyle: true이 작동하지 않는 것입니까?

답변

3

AsciiMath에는 <math> 개의 요소를 display="block" (따라서 MathJax도 없음)으로 생성하는 기본 제공 방법이 없습니다.

displaystyle 설정은 displaystyle="true"을 수학에 추가합니다. the MathML specdisplay="block"displaystyle="true"을 수반하지만 그 반대는 아닙니다. 주요 차이점은 전자는 블록 요소로 설정되고 displaystyle은 레이아웃 동작을 제어한다는 것입니다 (따라서 독자적으로 선택할 수 있음).

this MathJax User discussion에는 구분 기호를 추가하는 코드가 있습니다. 이것은 MathJax Third Party extensions repo에 잘 맞을 것입니다.