TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: CalcuLaTeX, a pretty-printing calculator language

230 点作者 fish45大约 4 年前

19 条评论

fish45大约 4 年前
Hey HN, I created CalcuLaTeX because I was frustrated with my workflow for chemistry and physics homework. Generally, I&#x27;d use the Python REPL as a calculator and type each problem into LaTeX to turn it in. CalcuLaTeX merges these two steps and makes it easier to reason about calculations by real time visual feedback.<p>I&#x27;ve posted on r&#x2F;rust as well (<a href="https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;rust&#x2F;comments&#x2F;lqn5aa&#x2F;calculatex_a_pretty_printing_calculator_language&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;rust&#x2F;comments&#x2F;lqn5aa&#x2F;calculatex_a_p...</a>), and there seems to be interest in using it for scientific papers and such.<p>The only alternative I know of is PTC MathCAD, which is quite powerful and definitely worth looking into. However, it&#x27;s quite expensive and Windows only.<p>The main repo (a Rust library and basic CLI) can be found here: <a href="https:&#x2F;&#x2F;github.com&#x2F;mkhan45&#x2F;CalcuLaTeX" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mkhan45&#x2F;CalcuLaTeX</a><p>The website repo using WASM and very hacky JS can be found here: <a href="https:&#x2F;&#x2F;github.com&#x2F;mkhan45&#x2F;CalcuLaTeX-Web" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mkhan45&#x2F;CalcuLaTeX-Web</a>
formerly_proven大约 4 年前
FYI you might find the GNU units(1) tool useful, which has a huge catalog of units and understands about the same set of math operations as a scientific calculators. From the demo I actually thought this was using GNU units in the background.
评论 #26269269 未加载
FabHK大约 4 年前
This is awesome!<p>Is there a way to get the LaTeX source with the completed calculation (so that you can copy&#x2F;paste the whole thing in your local LaTeX installation and, well, hand in your homework)? (sort of a &quot;middle&quot; tab)
评论 #26269257 未加载
a0-prw大约 4 年前
Wordmat is a free, open source extension to MS Word which gives you access to a full CAS from Word.<p><a href="http:&#x2F;&#x2F;www.eduap.com&#x2F;wordmat&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.eduap.com&#x2F;wordmat&#x2F;</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;Eduap-com&#x2F;WordMat" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Eduap-com&#x2F;WordMat</a>
kccqzy大约 4 年前
That&#x27;s wonderful! When I used to do my math and physics homework, I used Mathematica as a calculator. It has built-in LaTeX formatting available (right click, Copy As &gt; LaTeX). But likewise Mathematica is expensive and proprietary software so it doesn&#x27;t appeal to everyone.
评论 #26272954 未加载
RandomWorker大约 4 年前
This is awesome! Does it do other conversions than weight? mol&#x2F;lengths&#x2F;surface&#x2F;volume&#x2F;energy?
评论 #26267783 未加载
Jakobeha大约 4 年前
This is cool! I think it can be really useful.<p>My main suggestion is better error handling: make it so that when a calculation is invalid, it shows the error where the result would be (e.g. red text with the error message) instead of failing to compile the whole script.
评论 #26267836 未加载
SamBam大约 4 年前
Very cool!<p>What made you choose LaTeX for the tool?<p>It seems like it wouldn&#x27;t be too hard (maybe?) to get a proper algebra engine to assign variables. Currently you can do `x = 10` but you can&#x27;t do `x &#x2F; 2 = 5`. I feel like this would be very helpful since you&#x27;re using this for scientific calculations.<p>It could then be possible to extend that further and leave the variable undefined if it doesn&#x27;t (yet) have enough information to solve it. Then it could theoretically be used to solve simultaneous equations.
评论 #26269070 未加载
irgeek大约 4 年前
This is very cool. It looks much easier to use than the collection of Makefiles and build scripts I cobbled together in college.<p>One thing that’d make this even more awesome is the ability to drop in a data table and have it show up as a graph. The scripts I built in college allowed me to drop a CSV file into a directory and have it automatically turned into an EPS graph that I could use in LaTeX. It made for pretty easy, but very good looking reports.
croddin大约 4 年前
This is awesome. It reminds me of the iOS app Calca[1], which is similar.<p>[1] <a href="http:&#x2F;&#x2F;calca.io&#x2F;" rel="nofollow">http:&#x2F;&#x2F;calca.io&#x2F;</a>
评论 #26268500 未加载
评论 #26269075 未加载
hamaluik大约 4 年前
I&#x27;m so glad you made this! I&#x27;m also very upset that this didn&#x27;t exist 10 years ago when I really needed it. Well done!
评论 #26268059 未加载
评论 #26267283 未加载
hardmath123大约 4 年前
You might like Frink! <a href="https:&#x2F;&#x2F;frinklang.org" rel="nofollow">https:&#x2F;&#x2F;frinklang.org</a>
ducttapecrown大约 4 年前
I think an alternative would be Sympy in a Jupyter notebook.
8note大约 4 年前
Ti-89 is a great option, since you can also get the nice formatting while you&#x27;re doing exams
breck大约 4 年前
This is really fun. Nicely done! I love the output of LaTeX but never liked writing it.
prezjordan大约 4 年前
Very cool! The output looks nice, will definitely give this a whirl for some blog posts.
评论 #26267236 未加载
frankenst1大约 4 年前
Very cool, auto-conversion is really awesome, I think I found a bug though:<p>5 kg + 5 kg = 10 kg<p>but<p>5 kg + 6 kg = 11.000 kg
评论 #26269980 未加载
评论 #26270437 未加载
drran大约 4 年前
I use Marker markdown editor + MathJax + embedded JavaScript to achieve similar results.
celebrimbor7大约 4 年前
Hey, definitely check out Blockpad (<a href="https:&#x2F;&#x2F;blockpad.net" rel="nofollow">https:&#x2F;&#x2F;blockpad.net</a>). It does calculations with units, integrated with documents, spreadsheets, and drawing. Speaking from the Blockpad team here, would love to hear your experience.<p>We have Windows app and beta web app. Also Mac app coming soon. It&#x27;s free for students and otherwise still inexpensive.
评论 #26271513 未加载
评论 #26275494 未加载
评论 #26274299 未加载