Tuesday, July 25, 2017

RevTex and Weavr and included figures

Weavr is a logical successor to SpartanTex which was a free LaTeX service using a cloud installation of LaTex rather than maintaing one’s own version.

The following text which constitutes a complete file, compiles properly using Weavr into a document. This means one can store one's LaTeX manuscripts (including RevTex based manuscripts) on Google Drive (Docs) and use Weavr to process them. However, one does not obtain intermediate files which have to be submitted with or inside LaTeX submissions for journal publication.

In any case, here is the Google file:

==================BEGIN OF COMPLETE WEAVR FILE==================

<<input.tex>>=
\documentclass[eqsecnum,aps]{revtex4-1}
\usepackage{graphicx,cancel,framed,ulem,braket}
\begin{document}
\title{Weavr Illustration and Bibliography using RevTex}
\author{it doesn’t matter}


\affiliation{University t\\
Department of Something, Emeritus\\
}
\date{\today}
\maketitle


\section{Poems}
\begin{quotation}
Be not sad because all men\\
Prefer a lying clamour before you:\\
Sweetheart, be at peace again -- - \\
Can they dishonour you?\\
\\
They are sadder than all tears;\\
Their lives ascend as a continual sigh.\\
Proudly answer to their tears: \\
As they deny, deny
\cite{joyce}.
\end{quotation}


Or\\
\begin{figure[h]}
\fbox{<<pointer1>>}
\caption{An illustration.}
\label{fig1}
\end{figure}


Or


\begin{quotation}
Twas brillig, and the slithy toves\\
Did gyre and gimble in the wabe; \\
All mimsy were the borogoves, \\And the mome raths outgrabe. \\
Beware the Jabberwock, my son \\
The jaws that bite, the claws that catch\cite{Carroll}!
\end{quotation}





\bibliographystyle{apsrev4-1}
\bibliography{abib.bib}

\end{document}
@


<<abib.bib>>=


@article{joyce,
  author = "Joyce, J.",
  journal = "Reprtinted Everywhere",
  volume = "18",
  year =1905
}
@article{Carroll,
  author = "Carroll, L.",
  journal = "Through the Looking Glass",
  volume = "Jabberwocky",
  year =1871
}


@


<<pointer1>>=
\includegraphics[width=5in]{fig1.png}
@
<<fig1.png>>=
@





==================END OF COMPLETE WEAVR FILE==================

Almost all of the above can be cut and pasted into a Weavr created file on Google Drive and it should compile properly into a pdf-file. The pictures will not work, I think. Of course, the greater than and less than symbols may need editing. And don't forget that files referenced which reside on Google Drive need to have their permissions set properly for "remote" access.

Notice that this is easier than the WEAVR documentation method (for figures) which ceased working during my last efforts. This method imports the documents directly into the WEAVR file for submission to the LaTeX engine. Also, it seems to me that this method allows verification that the figures are the ones intended (compared to a web address).

If there is any error here, please contact me. Thanks.




====================================NEXT=====================


1 comment: