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!


Saturday, July 30, 2016

Papeeria News, Jul 30: new PDF viewer

TL;DR: new PDF viewer keeps viewport position and scaling

There have been two PDF viewer options in Papeeria: one can view PDF files with "native" viewer or with Google Docs viewer. They work great, but suffer from a major drawback: they are "black boxes" to our web app and are not controllable through the API. We cannot set zooming scale or scroll to some specific region, we don't know which page user is looking at. All that we can do with our viewers is to open some concrete page after loading, and we do our best to find out what page corresponds to the cursor in the editor, so that after recompilation the viewer showed something more meaningful than just the first page.

Our new viewer is based on Mozilla's PDF.JS library. This library is also used in "native" viewer in Firefox, and our viewer is essentially the same base library with a different UI. PDF.JS library has an API, and it allows us to preserve the viewport after recompilation. If you opened some page in your document, zoomed to 400% scale, scrolled to some particular region on the page and recompiled the document, you will see exactly the same region of the same page at the same zooming scale after recompilation, provided that you document compiles fine of course. This is especially handy when you're working on small details in a big math formula or in a complex table.

You can switch between all three viewers with a dropdown in the panel above the viewer pane.

PDF.JS viewer showing a page at 400% scaling scrolled to some math formula
Sliding navigation bar and viewer switcher are visible in the top part.


PDF.JS viewer is currently in beta, with the plan to promote it to default viewer when we finish working on a few missing features:

  • There is no continuous scroll. You can use a navigation bar which slides from the top side of the viewer to navigate through the pages or mouse wheel/touchpad if page has no scrollbars.
  • There is no sync between editor and PDF viewer.
  • Keyboard is not yet supported



Thursday, June 9, 2016

Papeeria News, June 9: TeX Live 2016

TL;DR: you can optionally use TeX Live 2016 to compile your projects

TeX Live 2016 which was officially released a few days ago is now available as an option in Papeeria. You can opt-in into using TeX Live 2016 by choosing it in the Compile dropdown or in the project settings on your Dashboard page.

We're going to keep TeX Live 2015 as the default distro for a while, but we encourage you to try the new distro right away!

TeX options in the Compile dropdown
TeX options in the dashboard



Tuesday, April 26, 2016

Papeeria News, Apr 25: easier to join and easier to leave

Immediate joining

If Bob want to invite Alice to collaborate on his project, and Alice is already registered and has verified her email, Bob can just add Alice's email into the list of collaborators. Access will be granted immediately (page refresh may be required for Alice), although Alice will still get a notification email.

Immediate leaving

If Alice no more wants to collaborate in Bob's project, she can select the project in the "Shared Projects" section in the dashboard and leave it using Trash icon in the right pane.

Tuesday, April 12, 2016

Papeeria News, Apr 12: secure connection and word count

TL;DR: 55 years ago a spacecraft with Yury Gagarin aboard was launched into space! And oh, yes, we just've launched word count feature and switched our server to secure connection.

Word count

Word count statistics
This small feature sometimes may turn out pretty useful. Now we count words and some other statistics in your document and show it in the log pane. We use texcount utility which basically makes a simple parsing of the source code. It should work fine for straightforward documents where text is not widely generated by custom macros. Please refer to texcount docs for the details of counting and tuning.

Secure connection

Secure connection everywhere
Until today we've been using secure connections for the most sensitive requests like authentication. Now we have completely switched to secure protocol. If you have an open session, you need to sign in again.

Wednesday, March 16, 2016

Papeeria News, Mar 16: meet LaTeX-powered Markdown!

TL;DR: you can now create documents using Markdown syntax with built-in LaTeX

LaTeX is very good at processing complex documents with maths and cross-references, but very often we need just a simple document with minimal markup, no more than sections, lists and bold text. Markdown and other wiki-style languages are perfect for that, but what if you also want to insert a math formula? In this case a mix of Markdown and LaTeX could be the solution and we just've launched Markdown support in Papeeria.

You can collaboratively edit simple Markdown code and compile it into high-quality PDF. Just create an empty document with .md extension, type some Markdown code and click Compile. Here is an example:

# Hola!

Testing **Markdown** in Papeeria.

Behind the scenes we convert Markdown to LaTeX using great Pandoc tool and then compile LaTeX as usually, which means that you get most of the benefits which come with LaTeX compiler: automated typography, hyphenations, etc., and yes, you can use maths! Pay attention that translated LaTeX file is added to the project next to the original Markdown. You can edit it if you want to the next time you compile the original Markdown your edits will be overwritten.

We compile using XeTeX engine and use Droid Serif font by default because of its comprehensive support of many languages. You can change the font and use your favorite one with \setmainfont command. Refer to Markdown Cheatsheet document (which of course is written in Markdown) for the details.

Markdown support is in Preview stage which means there may be glitches and missing bits. Here is a brief overview of restrictions:

  • you can only use ".md" file extension for Markdown documents
  • spellchecking and discussions are not yet ready to work with Markdown docs
  • there is no quick preview: you pass the whole cycle of compiling to get the result. 
  • Markdown is not supported in anonymous demo projects

We'll be working on improving Markdown in Papeeria. Stay tuned!