Mostrando entradas con la etiqueta emacs. Mostrar todas las entradas
Mostrando entradas con la etiqueta emacs. Mostrar todas las entradas

lunes, 26 de diciembre de 2022

Syllabus usando org-mode de emacs para obtener el tex y pdf

 Mi versión en org-mode (emacs) y latex del syllabus de un curso de la Universidad de Concepción, versión 2022.

https://github.com/ramrebol/syllabus

Como la institución sólo provee de la versión MS-Word del syllabus, comparto mi versión para generar el syllabus de un curso en la Universidad de Concepción:

  • syllabus.tex y syllabus.org es la versión minimal (el mismo ejemplo dado por la institución).

  • syllabus_algebra.tex y syllabus_algebra.org es una versión para el curso de Álgebra y Trigonometría del segundo semestre del 2022.

  • *.pdf son las salidas pdf de ambos archivo.

Los archivos *.tex están listos para compilar. Obviamente, también puedes editarlos como necesites.

Notar que los archivos LaTeX fueron generados usando org-mode de emacs (que si no lo conoces te recomiendo mirar de qué se trata: https://orgmode.org/), lo que hace que la generación del tex y pdf sea mucho más sencilla (incluso podemos saltarnos mirar el tex). Si usas emacs, puedes descargar los *.org y para generar el tex basta escribir los shorcuts

C-x-e l-p

pero si sólo quieres usar los tex no es necesario saber nada sobre emacs y org-mode.

Notar que usar los archivos *.org tiene la ventaja de poder escribir tablas (por ejemplo, de la sección de la Planificación) en una forma más natural, usando C-c' (notar el apóstrofe luego del Control c).

 


martes, 18 de mayo de 2021

etags: an useful tool to generate tags in Emacs

etags is an useful tool to generate tag tables for Emacs (ctags is the same but for vi). This allows us to jump to a function defined in some file in the code, without having to remember in which file is it. As could be expected, this tool understand the syntax of a lot of programming languages, like C, C++, Fortran, HTML or LaTeX.

 

To use it, in the folder where the code is run

     etags *.f90

 

This generates a file called TAGS with the information (a tag table) about in which .f90 is each function and subroutine of the code.


Then, in Emacs move the cursor on the subroutine/function what you want, and ATL+. (ALT and dot) opens the .f90 file where the subroutine/function is with the cursor on the definition of it. To go back, hit ALT+, (ALT and comma).


For more tips related with emacs visit papitas emacs.

domingo, 23 de julio de 2017

Papitas emacs


Interesting stuff coming by default
  • org-mode
  • speedbar
  • imenu (M-x f90-add-imenu-menu): añade un tab con todas las subrutinas y funciones dentro del buffer actual.
  • Wich function mode (M-x which-function-mode) Supported only in f90 mode.
  • Mark (light) the the current line: (M-x hl-line-mode)
Checking and Correcting Spelling: (see this link). In particular, flyspell-mode (see manual) and ispell


Some useful add-ons that can be installed
  • yasnippet: It allows to type an abbreviation and automatically expand it into function templates written in plain text, so they are easy to create and edit shortcuts.
  • corfu: small package, which relies on the Emacs completion facilities and concentrates on providing a polished completion UI.
  • AUCTeX: package for TeX files. In particular, allows backward/inverse search
  • Minimap: It shows a smaller "minibar", highlights the portion of the buffer that is currently visible in the main window. Particularly useful when the file is too big. You can install it from MELPA: M-x list-packages
  • Sublimity: Smooth-scrolling and minimap, like (the non-free) Sublime editor.
  • ellama:  is a tool for interacting with large language models from Emacs

 

etags is an useful tool to generate tags for Emacs. For details visit this post on this blog.

 

MELPA is a package repository that contains an enormous amount of useful Emacs packages, en particular you can install gnuplot-mode. With ALT-X install-package it is easy to install several modes, like the matlab or minimap.


 To autoload gnuplot-mode on any file with gp extension, put this in ~/.emacs file:

(setq auto-mode-alist (append '(("\\.gp$" . gnuplot-mode))
                  auto-mode-alist))


To begin using octave-mode for all .m files you visit, add the following lines to ~/.emacs file:

(setq auto-mode-alist
      (cons '("\\.m$" . octave-mode) auto-mode-alist))


More details about octave-mode in this link.



A list with links and useful software.

jueves, 18 de abril de 2013

Emacs para todo

Hace un par de años publiqué gedit para todo, y ése fue el último año que usé gedit. Ahora soy un fiel miembro de la iglesia de Emacs.

Lo negativo de Emacs -al contrario de gedit- puede ser la curva de aprendizaje, al ser muy versátil hay que dedicar tiempo al principio para descubrir su potencial (ej: org-mode). Pero para quien edite archivos de texto plano a menudo puede valer la pena invertir tiempo por un bien mayor.


Lo positivo:
  • Está disponible para los OS más populares. Con esto, si me cambio a otro computador puedo seguir trabajando con el mismo editor.
  • Es una de las joyita del software libre creado en los 70' por el mismísimo gurú del software libre Richard Stallman y ha estado en continuo desarrollo hasta hoy.

¿ y qué me importa que lo haya hecho un geek hace años?
En que muchos geeks lo han usado por décadas, por lo que si queremos hacer algo con Emacs seguramente muchos ya lo pensaron, alguno de esos geeks lo implementó y otros lo mejoraron.

- Por ejemplo, tiene coloreado para freefem, y es el único editor que conozco para esto. -


Una lista (en eterna construcción) de cosas que me han resultado interesantes sobre emacs: papitas emacs.