This is a plugin for Sublime Text 2 and Sublime Text 3. It decode and encode letters with accents in LaTeX files.
Using Package Control, install "LaTeX Accents".
Or manualy:
1a. open the Sublime Text Packages folder
- for ST2
- OS X: ~/Library/Application Support/Sublime Text 2/Packages/
- Windows: %APPDATA%/Sublime Text 2/Packages/
- Linux: ~/.Sublime Text 2/Packages/
- for ST3
- OS X: ~/Library/Application Support/Sublime Text 3/Data/Packages/
- Windows: %programfiles%/Sublime Text 3/Data/Packages/
- Linux: ~/.Sublime Text 3/Data/Packages/
- clone this repo (
git clone git://github.com/kpym/SublimeLaTeXAccents LaTeXAccents
).
To transform all letters with accents (like é,à,î, ...) to LaTeX accents ('e, \`a, \^\i, ... ) :
- open Command Pannel (
Ctrl+Shift+P
by default); - select "LaTeXAccents: Encode accents" ( hint : you can type something shorter like "ltxenc").
To transform all letters with LaTeX accents ('e, \`a, \^\i, ...) to letters with accents (like é,à,î, ...):
- open Command Pannel (
Ctrl+Shift+P
by default); - select "LaTeXAccents: Decode accents" ( hint : you can type something shorter like "ltxdec" )
To remove accents from all letters (letters é,à,î,... became e,a,i,... ) :
- open Command Pannel (
Ctrl+Shift+P
by default); - select "LaTeXAccents: Remove accents" ( hint : you can type something shorter like "ltxrmv").
Hint : If your file contains accents you should :
- save the file using appropriate encoding (for example
ISO 8859-1
orUTF-8
); - use :
\usepackage[...]{inputenc}
with the corresponding encoding (for examplelatin
orutf8
}.
encode_latex_accents
: Encode all letters with accents to latex accents.decode_latex_accents
: Decode all letters with latex accents to 'normal' letters with accents.remove_accents
: Remove all accents from 'normal' letters with accents.