3

I am using Emacs for editing my latex document. Is there any way to make Emacs as WYSIWYG editor so that the editing will be easier. I need to reduce the number of time I compile the document also. I was using Texmaker before for editing the documents but I find Emacs more powerful. In texmaker, I need to compile every time to see the output. This is also same for Emacs in tex mode also.

I use Xelatex for compilation on Ubuntu 12.04. I am expecting a package like Lyx. I am not asking for a complete WYSIWYG editor - I rephrase my question to HOw can I change Emacs as an editor that can show the alignments of margins, displaying text in prescribed fonts, and overall layout without compilation. Together with the text handling capability of Emacs.

karu
  • 440
  • 1
    Do you already use AucTeX? By the way, why did you add the xetex tab? Are you only using XeTeX? – ph0t0nix May 27 '16 at 11:52
  • @ph0t0nix Is it WYSIWYG editor? – karu May 27 '16 at 11:54
  • 1
    Did you click the link? The first line on the page says "AUCTeX is an extensible package for writing and formatting TeX files in GNU Emacs". A bit further down it says: "AUCTeX includes preview-latex which makes LaTeX a tightly integrated component of your editing workflow by visualizing selected source chunks (such as single formulas or graphics) directly as images in the source buffer.". – ph0t0nix May 27 '16 at 11:54
  • I think that the best you get is incremental updates using WhizzyTeX https://www.emacswiki.org/emacs/WhizzyTeX However--"WhizzyTeX is still under development and may contain dangerous bugs. You may wish to save copies of the file (and of the whole directory you are working in) before WhizzyTeX-ing." Bakoma is the only true WYSIWYG editor, https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0ahUKEwiWs-iSmvrMAhUM4SYKHVDZAE4QFggoMAE&url=http%3A%2F%2Fwww.bakoma-tex.com%2F&usg=AFQjCNG25ZBbmO1ifDLtsLpVuatZOm4VUQ&sig2=DW4hD_DSkzSFSBBqZ46n6w – A Feldman May 27 '16 at 11:55
  • This is generally the same for all editors, though some (e.g. Gummi) will/can compile continuously. LyX does something different. But you don't have to compile every time you write a new sentence of course. – Torbjørn T. May 27 '16 at 12:00
  • @TorbjørnT. I have lots of non Latin scripts, it makes the compiler to forget about spacing. – karu May 27 '16 at 12:01
  • However, Bakoma, if I am not mistaken, limits you to LaTeX only. – A Feldman May 27 '16 at 12:02
  • 1
    use org-mode http://orgmode.org/; some swear by it – doed May 27 '16 at 12:17
  • 1
    I just use latexmk running in continuous preview mode, then I just have to save the file, the rest is compiled automatically. Of course I loose C-c ` but for me that has not been that big a deal when I can still use the power full editing tools. I use Evince as preview (with inverse search enabled). If the project is large, then using \include and \includeonly to limit what is being compiles increases the compilation speed. (Note Hadn't seen that Keks had already mentioned latexmk, though I've never used PDF-tools) – daleif May 27 '16 at 14:40

3 Answers3

4

There is no real WYSIWYG possible with LaTeX, because the editor needs to display the commands, sections, environments, whatever.

But there are several steps to provide a clean look on your text and have a real fast compilation.

  1. C-o C-b C-t (as far as I remember) hides most of the commands in Emacs.

  2. Install and use PDF-Tools for viewing the PDF, very fast.

  3. Open the shell of Emacs (M-x eshell) and start »latexmk«, which will compile your *.tex file every time you save it.

  4. Use automatic saving:

    (require 'auto-save-buffers) (run-with-idle-timer 2 t 'auto-save-buffers) (global-set-key [f8] 'auto-save-buffers-toggle)

  5. If you are really done with the preamble, you can even build your own format and use it, it will accelerate compiling very much.

Keks Dose
  • 30,892
2

I strongly suggest you trying spacemacs and it's Latex layer. It offers a 0 configuration way to use latex with emacs. Live preview is also provided by Preview Latex package. If you love both latex and emacs, spacemacs will amaze you.

0

Finally, I got a solution GNU TeXmacs Editor. I installed it from Ubuntu Software center.

http://www.texmacs.org/tmweb/home/welcome.en.html 
karu
  • 440