Hi Syelle and Ryan,
Besides adding the latex
and ltx
file extensions to the uploaded file types, you also need to register the mime type for the file type with WordPress.
You can do this with the following snippet in /wp-content/mu-plugins/
:
/**
* Add custom items to mime type array for uploads
*/
function my_mime_types( $types ) {
$types['latex'] = 'application/x-latex';
$types['ltx'] = 'application/x-latex';
return $types;
}
add_filter( 'upload_mimes', 'my_mime_types' );
To find out how to add a mu-plugin, read this article:
https://pantheon.io/docs/mu-plugin
Hope that helps!