简体   繁体   English

Delphi Word方程式自动化

[英]Delphi Word Equation automation

Can anyone show me an example of automating an equation? 谁能给我看一个自动化方程式的例子吗? I need to obtain something like in the following 我需要获得以下内容 图片

How can I do that? 我怎样才能做到这一点? Of course the values are dynamic Or is there a better approach? 当然,这些值是动态的,还是有更好的方法? I have a word document generated from delphi code, containing text, tables and I need a formula to be entered for display. 我有一个从delphi代码生成的word文档,其中包含文本,表格,并且需要输入公式才能显示。 So I do not need the result (I know math :)) 所以我不需要结果(我知道数学:))

Thank you 谢谢

So far, my solution is to create the ecuation in LaTeX format, like this: 到目前为止,我的解决方案是以LaTeX格式创建引用,如下所示:

Nrg1 = \frac{\sum_{i=1}^{15} riRi }{\sum_{i=1}^{15} ri } = \frac{2(4x4)+5(3x3)+3(2x2)+5(1x1)}{2x4+5x3+3x2+5x1} = \frac{94}{34} = 2,76

then copy it to clipboard, then paste it to http://formulasheet.com/#r%7Ced , "Render" it, then click on "Save Word", return to the word document and paste where I need my equation to be shown. 然后将其复制到剪贴板,然后将其粘贴到http://formulasheet.com/#r%7Ced中 ,“渲染”它,然后单击“保存Word”,返回到word文档,然后粘贴到需要我的方程式的位置如图所示。

It works even if it is not completely "automatic". 即使它不是完全“自动”的,它也可以工作。

If any of you have a better way I am waiting for your input. 如果您有更好的方法,我正在等待您的输入。 I would love to have a solution that does not force the user to make "manual" stuff. 我很想拥有一个不会强迫用户制作“手动”东西的解决方案。

perhaps you can use ArtFormulas, unit that i use in my project to calculate sample formule you can find it at 也许您可以使用ArtFormulas(我在我的项目中用来计算样品配方的单位),您可以在以下位置找到它

http://artsoft.nm.ru/works.html#formula http://artsoft.nm.ru/works.html#formula

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM