Skip to content

galacticusorg/galacticus-emacs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

emacs-f90

This repo contains an emacs configuration that can be used for editing Galacticus source code in emacs.

Galacticus source files are modern Fortran, but with embedded sections of XML and LaTeX. It is recommended to use polymode to handle these three separate languages in a single emacs buffer.

Also provided is a a custom f90-mode which has been modified to support these source files, along with a modified outline-mode to allow collapsing/expanding sections of the code.

Finally, texfrag-mode is used to render LaTeX math in the emacs window.

Usage

C-c C-p C-d render all LaTeX math in the buffer.

Example

A screenshot showing an example of LaTeX math rendered in the buffer:

Screenshot_20210603_165908

A screenshow showing mixed Fortran and XML in a single buffer with appropriate syntax highlighting and indentation for each:

Screenshot_20210603_165934

Implementation notes

Rendering LaTeX math

If you use a dark theme in emacs. preview-latex should automatically detect the color theme and render the LaTeX equations with the same background and forground colors. This does not work in some versions of GhostScript, according to this answer. It is recommended to use GhostScript 9.54.0 which renders the colors correctly.

About

F90 tools for emacs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published