Showing posts with label editor. Show all posts
Showing posts with label editor. Show all posts

Monday, October 3, 2016

Papeeria News, Oct 3: instant preview of the math formulae

TL;DR: Papeeria shows math formula previews

LaTeX excels at typesetting maths. However, if you make a typo or mistake in non-trivial math equation you get no immediate feedback and have to recompile the document to see if firmula looks good. Papeeria provides live preview of mathematics so you can see how the equation looks like without recompiling the document.

Formula preview shows up at the bottom of the text editor automatically when cursor enters math mode which is either delimited with single or double-dollar symbols, or inside equation environment. If cursor is already at the bottom of the editor, the preview moves to the top edge.

Matrix in the formula preview

Under the hood we use great KaTeX library developed by folks from Khan Academy, so the supported macros are restricted to the subset supported by KaTeX. The subset is prettywide, so chances are that your equations will look fine. KaTeX paints unknown tags with red color, so even if there is something which it can't render, you will still see partial result mixed with unrecognized tags.




Saturday, September 10, 2016

Papeeria News, Sep 10: live autocompletion with snippets

TL;DR: autocompletion now suggests TeX environments and math macros; live autocompletion is turned on by default.

Autocompletion worked in Papeeria since the very early days, however user had to trigger it manually by hitting Ctrl+Space. Besides, it was very basic and suggested words from the opened file as completions.

Today  we updated autocompletion. Now it suggests the most important environments and macros, such as lists and sections. When cursor enters display maths, autocompletion also suggests math macros, from greek letters to sums and integrals.

Autocompletion is now live and doesn't require explicit Ctrl+Space keystroke from user. If you're not the fan of live completion, you can switch it off in the editor settings panel.

Autocompletion popup inside equation suggesting completions for \s

Useful hint for those who want to be autocompletion ninja: Tab key is your friend. It applies the selected completion (just like Enter) and moves cursor between the arguments if there are any in the chosen snippet. Snippet for \sum on the picture above has three arguments, and you can fill in them quickly using Tab key.

Tuesday, August 30, 2016

Papeeria News: tuning spellchecker and autocompletion

If you need to use different spellchecker language for some particular files, you can override this setting per-file.

Spell check with English language globally and Russian in the current file

If you like live word completion or autoinsertion of closing brackets when you type opening one, you can switch them on in the Autocompletion options

Switching on Live autocompletion

Tuesday, August 9, 2016

Papeeria News, Aug 9: Bracket Matcher

TL;DR: use Ctrl+Chift+9 to highlight matching and non-matching brackets closest to the cursor position.

Missing bracket might be a real nightmare when editing LaTeX documents. Should you miss one curly bracket, and your document is not compiling and you see something like this in the logs:

Runaway argument?
{\emph {itemnum} that makes little sense when hyphenated across lines\ETC.
! File ended while scanning use of \mbox.
<inserted text> 
                \par 
<*> main.tex
            
I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.

! Emergency stop.
<*> main.tex
            
*** (job aborted, no legal \end found)

It is not easy to spot the place where missing bracket is supposed to be, despite that TeX tries to give you a clue. Now in Papeeria you can use Bracket Matcher tool which will make your life easier.

Hit  Ctrl+Shift+9  (Cmd+Shift+9 on Mac) to switch Bracket Matcher mode on. When running, Bracket Matcher searches for the closest pair of matching brackets around the cursor. If it finds such pair, it highlights the region between them with light blue color.

Bracket Matcher highlighting matching curly brackets around cursor
However, if it finds a mismatch, e.g. because there is an opening bracket and no corresponding closing bracket or if opening and closing brackets are different (have you ever mistyped square bracket  ]  instead of curly bracket  }  ?), it highlights the region with rose color. 

Bracket Matcher highlighting mismatched region

Bracket Matcher rebuilds the highlight as cursor moves, so you can quickly find where exactly you missed the bracket. You can switch Bracket Matcher off using the same shortcut  Ctrl+Shift+9  

Thanks to our summer intern Mikhail Pochatkin who contributed a lot of energy into the development of this feature!


Friday, June 12, 2015

Papeeria News, June 11

TL;DR: insert math symbols with Math Assistant

Did you ever find yourself trying to recall what command produces long right arrow? You probably googled it or consulted the Comprehensive LaTeX Symbol List. In Papeeria you can now use Math Assistant.

Math Assistant dialog


You can open Math Assistant dialog using Insert Maths... command in the editor context menu (hit Alt+Insert to open context menu or ⌃+N if you're on Mac OSX). Keyboard is fully supported, so you can choose the required symbol without moving hands to mouse.


Friday, May 22, 2015

Text editor settings: word wrapping, font size and spellchecker

If you need to change font size, toggle word wrapping or toggle spellchecker, you can do it from the editor settings.

Open text editor settings by clicking cog icon

Change word wrapping, spellchecker and font size options or toggle discussions


For word wrapping you can also use keyboard shortcut Alt+W.