frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Ask HN: Who wants to be hired? (March 2026)

117•whoishiring•1d ago•320 comments

I lost my ability to learn anything new because of AI and I need your opinions

4•dokdev•1h ago•8 comments

Ask HN: What prompt do you use to get Claude to consistently render LaTeX?

3•TobyTheCamel•4h ago•5 comments

Facebook Appears to Be Down

13•Molitor5901•2h ago•14 comments

Ask HN: Who is hiring? (March 2026)

233•whoishiring•1d ago•314 comments

Ask HN: What's your experience self-hosting in 2026?

15•rustcore•4h ago•0 comments

Ask HN: Best use / examples of agents / OpenClaw that you saw recently?

3•simonebrunozzi•4h ago•0 comments

Ask HN: How is Claude agent experience in Xcode 26.3?

7•malshe•8h ago•0 comments

Ask HN: What will OpenAI employees do now who have signed notdividedorg petition

12•Imustaskforhelp•12h ago•15 comments

Google violates its 14-day deprecation policy for Gemini 3 Pro Preview

4•goolulusaurs•7h ago•1 comments

I have $10k+ in cloud credits and want to turn them into a real business

3•Palominocoq•8h ago•3 comments

Ask HN: How are you all staying sane?

136•throwaway53463•1d ago•134 comments

Tell HN: MitID, Denmark's digital ID, was down

141•mousepad12•4d ago•181 comments

Ask HN: What Online LLM / Chat do you use?

11•ddxv•22h ago•15 comments

Ask HN: What sources like HN do you consume?

50•DavidHaerer•1d ago•33 comments

Whats Up with Claude Lately?

17•mech422•21h ago•14 comments

Ask HN: How are you structuring Markdown-based context for AI coding agents?

2•lepuski•12h ago•0 comments

Ask HN: Would engineers be interested in a technical prep consultant?

8•TechPrepper•1d ago•8 comments

Ask HN: How Do Emergency Alerts on Phone Work?

5•rishikeshs•18h ago•4 comments

Ask HN: Who still works async and has a 'no meetings' work policy in 2026?

6•RaulOnRails•14h ago•4 comments

Ask HN: Codex CLI error reveals "GPT-5.4-ab-arm2" string

8•quantisan•23h ago•1 comments

Aura-State: Formally Verified LLM State Machine Compiler

4•rohanmunshi08•2d ago•2 comments

A timeline of cyber attacks:home users, contractors, and SMBs are now targets

4•EricAUS•23h ago•2 comments

BlackTape – open-source music discovery built on MusicBrainz and Discogs

8•Blacktape•1d ago•2 comments

Ask HN: How did you figure out what research field you were passionate about?

7•aabiji•1d ago•6 comments

Ask HN: How to approach new people in 2026?

10•tavro•2d ago•17 comments

Tell HN: My daily game won a Players Choice Award

20•paulhebert•3d ago•4 comments

I used 2D Base64 to bypass Gemini and expose Google's moderation flaws

7•MissMajordazure•2d ago•1 comments

Ask HN: Billions of dollars in funding, but what's changed for robotics?

9•ajax33•1d ago•3 comments

Ask HN: How do we solve the bot flooding problem without destroying anonymity?

14•txrx0000•2d ago•20 comments
Open in hackernews

Ask HN: What prompt do you use to get Claude to consistently render LaTeX?

3•TobyTheCamel•4h ago
I currently have subscriptions to both Claude and ChatGPT. I generally prefer the former but find I can't fully commit to it for my maths-heavy workload as it often struggles to correctly render LaTeX.

An example of this failed rendering is here [1]. If I use Claude for all of my work, I come across issues like this or worse at least once a day. Instead, I find it easier just to ask any maths questions to ChatGPT which seems to have a much more robust system for outputting LaTeX.

I would love to merge my subscriptions though, so I'm here to ask whether anyone has a system prompt that has been effective in guiding Claude towards producing valid LaTeX. I've tried a few prompts myself but struggled to find anything that it consistently followed.

[1] https://imgur.com/yzlluOA

Comments

verdverm•3h ago
Some things are just too hard for them to do reliably
ontouchstart•2h ago
LLMs only produce markdown [1], usually Math is wrapped with KaTeX [2]. The rendering happens in the Web UI. If some math failed to render, you can copy the code and paste to latex-sandbox [3] and fix yourself.

[1] https://docs.github.com/en/get-started/writing-on-github/wor...

[2] https://katex.org

[3] https://latex-sandbox.vercel.app

ontouchstart•2h ago
It seems that GitHub gist can renders some of \LaTeX, but not perfect.

https://gist.github.com/ontouchstart/bcffb186a753c5b75522fc8...

Johnny_Bonk•2h ago
When you say consistently render what do you mean? Like without any sort of formatting issue? If thats the case I would lower your expectations a bit almost always as with any bit of copy editing regardless of using ai or not theres going to be issues to review. I have a claude skill using tectonic I believe and it works pretty well, and then I wrote hooks to make sure if certain things are going to be written it does it in a certain way.
jlongo78•1h ago
honestly the magic phrase ive found is "use aligned LaTeX delimiters and assume the renderer supports MathJax." that one line cuts 80% of the inconsistency.

also: put it in your CLAUDE.md, not the system prompt. Claude reads that per-session and it sticks way better than hoping your prompt survives context compression. learned that the hard way after losing formmating mid-session one too many times.