Editor or custom field for Latex source code page

The editor enables you to enter either plain text or HTML content to a post/page body. The content is saved to post_content column on the wp_post database table.

When rendering the content WordPress runs it through a few filters to automatically add <p> tags, capitalize P in WordPress, etc. If the content contains shortcode markup (i.e. square brackets stuff) or block related HTML comments, then WordPress will parse those into HTML – assuming the shortcodes and blocks have been registered properly.

Yes, if you want more control, you can register a custom metabox (or a block) with a plain textarea for the latex code. You can even go wild and disable the default editor completely, register a custom metabox with a textarea named “content” and have the latex code saved automatically to the post_content column instead of a post meta field.