Saturday, July 22, 2017

Using Weavr for online LaTex composing (obsolete, use overleaf.com)

This is not a programming post. instead, it is a LaTeX post in support of Weavr, the on-line service which allows users to use Google Docs for Latex .tex (and .bib) storage and Weavr as a front-end for compiling and generating PDFs.
By being cloud based, one need not maintain a local version of LaTeX nor need one maintain local versions of LaTeX input files.



A special thanks to Neil Crawforth who answered my questions in record time with perfect answers.

I had two major questions concerning Weavr, and cutting and pasting the help from the site proved impossible (for me). The first question concerned including figures, and the solution is shown below:


<<input.tex>>=
\documentclass{article}
\usepackage{graphicx}
\usepackage{xcolor}
\begin{document}
BEFORE
\colorbox{yellow}{<<My pointer>>}
AFTER
\end{document}
@
<<My pointer>>=
\includegraphics[width=4in]{GS.png}
@
<<GS.png>>=
@


The second example uses BibTex, a common tool for academic writing:




<<input.tex>>=
\documentclass[11pt]{article}
\usepackage{cite}
\begin{document}
\title{My Article}
\author{Nobody Jr.}
\date{Today}
\maketitle
Normal text\footnote{taken in part from \url{http://www.bibtex.org/Using/}}
\bibliographystyle{plain}
\end{document}

with a reference: Nobody ~\cite{Nobody06},
which comes out as one expects (hopes?).
For blogging purposes, the bibliography will be maintained on Google Docs so that cutting and pasting this document should refer to the same bibliography.
\bibliography{mybib.bib}{}
@
<<mybib.bib>>=
<<https://docs.google.com/document/d/1JkbtbAcNCNdWSB0x3lx-PAA9P9GIhlAPHzeCmpAmhqo>>
@


Each of these is a complete unit, contained in one file on Google Docs, and compiled by Weavr upon command.


I hope that these are helpful in easing the pain of transitioning to Weavr (which I find incredible).
In both cases, the url's are to actual files which exist on my Google Docs drive. 

Remember, external docs on Google Docs need to he shared with Weavr.co.uk so that it can be remotely accessed.

Be warned that cutting and pasting from this post may require editing of right and left angle brackets (greater than and less than) from HTML to actual representations.

If there is an error (above) or lack of clarity in the material (above), please tell me.

1 comment: