Closed dcwise closed 1 year ago
Further to my last message, It was this line thrown by the DITA OT process as follows: "no render configured for vladsch.flexmark.superscript.Superscript" that led to the publishing failure.
LwDITA Markdown doesn't support LaTeX extension for input or output. That LaTeX uses a ^
character that is interpreted as a superscript delimiter. LwDITA Markdown support superscript, but maybe file is parsed as MDITA that doesn't.
It's very unlikely that support for LaTeX will be added, because the underlying Markdown parser doesn't have an extension for it, and we would need to convert LaTeX into MathML.
@jelovirt maybe the processing could attempt to just extract the Latex code and generate a DITA "foreign" element containing it with a certain outputclass attribute, in this way a simple publishing plugin like this one could process it further in the publishing stages: https://blog.oxygenxml.com/topics/adding-latex-equation-support-dita.html Looking at the wiki for flexmark: https://github.com/vsch/flexmark-java/wiki/Extensions they seem to have some support for this in GitHub flavored markdown:
Math, inline via $``$ or as fenced code with math info string requiring inclusion of Katex in the rendered HTML page.
@jelovirt any feedback for my previous remark? How about if we would use the "GitLabExtension" when parsing with flexmark?
GitLab actually does a better job when parsing a Latex enabled expression.
On 7/3/23, Radu Coravu @.***> wrote:
@jelovirt any feedback for my previous remark? How about if we would use the "GitLabExtension" when parsing with flexmark?
-- Reply to this email directly or view it on GitHub: https://github.com/jelovirt/org.lwdita/issues/181#issuecomment-1617451832 You are receiving this because you authored the thread.
Message ID: @.***>
-- Keep an Exacting Eye for Detail
GitHub also has support for embedding Latex equations in markdown: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/writing-mathematical-expressions
Hi there, We run into a problem when publishing Markdown documents using the Oxygen-enabled DITA OT. Specifically, in case there are formula in use as shown below,publishing always fails. Use Case 1
功能
$$ y = \frac{e^{x} - e^{-x}}{e^{x} + e^{-x}} $$
Use Case 2
功能
$$ Y[n_i][c_j][yh_m][ywn] = \max^{kh-1}{h=0} \max^{kw-1}_{w=0} X[n_i][c_j][sh yh_m + h][sw yw_n + w] $$
二维最大池化正向传播过程。根据输入、池化核、步长(stride)等参数计算输出特征图的大小,NCHW数据格式可用以上公式表示。
Please can you advise how to make this embeded Latex work from within Markdown documents so that the DITA OT enabled publishing will work without a problem?