En todos los archivos de un directorio:
-Cambiar todos los espacios por underscore (todos los archivos, sin importar su extensión):
for f in *; do mv "$f" `echo $f | tr ' ' '_'` ; done
- Cambiar todos los puntos por underscore (todos los archivos, sin importar su extensión):
for f in *; do mv "$f" `echo $f | tr ' ' '_'` ; done
Como lo anterior pudo alterar la extensión de los archivos:
- Cambiar los archivos *_eps a *.eps
for f in *eps; do mv -- "$f" "$(basename "$f" _eps).eps" ; done
jueves, 8 de marzo de 2018
jueves, 18 de enero de 2018
Emacs: backward/inverse search
After install AucTex, turn on the following two modes:
1.- to work with pdf reader (evince for me) instead of dvi:
2.- and activate the backward search:
You may load this modes automatically editing the .emacs file (see (*) at the bottom of this message).
Next, you must to compile the tex file with the option \synctex=1. There are two ways to do this:
1.- running the command
(see (**));
2. or touch the preamble of the tex file:
I think the best option is to always use a Makefile with the first option inside.
After compiling, will be generated a file *.synctex.gz
And... Ready!
- In the tex file, to go to the pdf:
- In the pdf file, to go to the corresponding place in the tex file:
-------------------------------------------------------------------------------------
(*) To choise this option all times you open emacs, add to the ~/.emacs file the following two lines:
(setq TeX-PDF-mode t)
(setq TeX-source-correlate-mode t)
(**) You could automatize this creating an alias, for example adding to your .bash_profile the line:
1.- to work with pdf reader (evince for me) instead of dvi:
M-x TeX-PDF-mode
2.- and activate the backward search:
M-x TeX-source-correlate-mode
You may load this modes automatically editing the .emacs file (see (*) at the bottom of this message).
Next, you must to compile the tex file with the option \synctex=1. There are two ways to do this:
1.- running the command
pdflatex -synctex=1 your-tex-file.tex
(see (**));
2. or touch the preamble of the tex file:
\documentclass{article}
\synctex=1
\begin{document}
...
\end{document}
\documentclass{article}
I think the best option is to always use a Makefile with the first option inside.
After compiling, will be generated a file *.synctex.gz
And... Ready!
- In the tex file, to go to the pdf:
C-c C-v ( or M-x TeX-View )
- In the pdf file, to go to the corresponding place in the tex file:
Control + right click mouse
-------------------------------------------------------------------------------------
(*) To choise this option all times you open emacs, add to the ~/.emacs file the following two lines:
(setq TeX-PDF-mode t)
(setq TeX-source-correlate-mode t)
(**) You could automatize this creating an alias, for example adding to your .bash_profile the line:
alias pdflatex='pdflatex -synctex=1'But I think that the best option is to choise this in a Makefile file.
Etiquetas:
computacion,
emacs,
latex,
Software libre
Suscribirse a:
Entradas (Atom)