errors compiling lyx 2.1.2 document with Lyx 2.1.3 - lyx

I have a Lyx document created with Lyx 2.1.2 on Windows 7 and everything compiles well.
After upgrading to Lyx 2.1.3 the same document gives many errors when compiled.
I noticed that they are related to floating figures, for example uder view source I can see:
**
Figure \ref{fig:ErasOfComputingWant (2010)} adopted from \citep{Want2010}
illustrates conceptually three eras of modern computing.
The Internet of Things initially thought of as connecting things to
the Internet for the purpose of remote monitoring and control it is
now moving into the concept of ubiquitous and pervasive computing
as it creates an intelligent, invisible network fabric that can be
sensed, controlled and programmed.
\begin{figure}[th]
\begin{centering}
\includegraphics[scale=0.5]{Images/0-ComputingEras}
\par\end{centering}
\protect\caption{Three eras of modern computing, source\citep{Want2010}{\footnotesize{}\label{fig:ErasOfComputingWant (2010)}}{\footnotesize \par}}
\end{figure}
**
The Lyx 2.1.3 gives corresponding errors:
*****Runaway argument?
{Three eras of modern computing, source\citep {Want2010}{\footnotesize \ETC.
! Paragraph ended before \NR#gettitle was complete.
<to be read again>
\par
l.283 ...mputingWant (2010)}}{\footnotesize \par}}
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.
! Extra }, or forgotten \endgroup.
<argument> ...gWant (2010)}}{\footnotesize \par }}
l.283 ...mputingWant (2010)}}{\footnotesize \par}}
I've deleted a group-closing symbol because it seems to be
spurious, as in `$x}$'. But perhaps the } is legitimate and
you forgot something else, as in `\hbox{$x}'. In such cases
the way to recover is to insert both the forgotten and the
deleted material, e.g., by typing `I$}'.*****
How to fix it?
Jan

Thanks for your help, although my thoughts are that maybe the Lyx version 2.1.3 should be removed from the Lyx download section as problematic. At least I am not able to use it and I stay with 2.1.2

Related

rnotebook latex issue

Apologies in advance because I do not know how to communicate this question via code.
I have an R Notebook document with some latex (maybe not formally latex, but it's mathematical notation). Previously, when the document was in visual mode, I could see my notation inside the notebook. Now, when I compile the document to a pdf the notion appears, however, the notation is no longer visible in visual mode. Does anyone know what is wrong? My first thought was it could be due to an update; however, I am fairly certain that I have not updated anything since.

Indenting VSCode like RStudio

I'm using VS Code and i miss RStudio's ctrl+i to indent lines.
I've read stuff online about LSP and other extensions and formatting with shift+alt+F but all i get is linter.
So, whats the equivalent if is there at all?
Found a solution but there a few things to take note.
First, VSCode notive options are language-agnostic, meaning it can't indent R code 'cause it doesn't understand it. You got to download extensions to make i work.
Extensions required are
Yuki Ueda's R for language support
REditorSupport's R LSP Client
Also, in order to R LSP Client to work, CRAN package {languageserver} is required.
Then, usage. If you're working functions, differently from RStudio in which one can hit ctrl+i and that'd indent that specifically line or selection, this solution works only if one selects the entire function. If you have functions inside another, you gotta indent everything (won't work for just a foo inside another).

minimal working example of tikz usage in bookdown?

i have been trying to implement a tikz chunk in bookdown first by myself, then by following this thread.
unfornutately, i keep running into various errors and incompatibilities, such as this one:
Error in tools::texi2dvi(texf, pdf = !to_svg, clean = TRUE) :
unable to run 'pdflatex' on '.\tikzf702b605920.tex'
(even though by itself tinytex::pdflatex('test.tex') works fine)
on his blog and github Yihui Xie mentioned that it's definitely possible, but i wasn't able to find any working example, so i was hoping if perhaps anyone here could share one, please (or point out what am i doing wrong)
#PaulLemmens, i found what was the problem for me. disclaimer here, i use windows and none of my colleagues who use r on linux/macos have this problem.
issue was arising with knitr when engine=tikz is used in one of the chunks. For it to work installation of imagemagick (https://www.imagemagick.org/script/index.php) and GhostScript (https://www.ghostscript.com/) is needed. as well as that, i had to rewrite knitr (https://github.com/darthaline/knitr) slightly. it's a quick and dirty solution, but it worked for me. on line 281 of R/engine.R the path to imagemagick's convert is hardcoded cause otherwise it seems that windows interprets it as 'convert.exe' from System32 directory (ImageMagick PATH not being recognized with engine = "tikz" in knitr)

R documentation, how to force Rcmd Rd2pdf to automatically break an overfull line in examples R-like section?

My package passed Rcmd check successfully. but in constructed PDF format of R documentation, within the examples section, half of the line (R code) is out of the paper. I also found another CRAN submitted package, ftsa , that suffer from overfulling in a line too, see ftsa Reference manual.
I guess this
problem roots in the behavior of the verbatim environment in Latex. However there are some Latex packages to deal with this, https://tex.stackexchange.com/questions/14342/verbatim-environment-that-can-break-too-long-lines, but I do not know how to use them with Rcmd.
In dealing with these cases, why Rcmd check does not show any error, warnings or note as Latex does?
How can I force line breaking in examples section?
Thank you
R CMD check does not analyze / forward all LaTeX warnings. Yes, in an ideal world it would.
It has been the case, always that you should format the \examples{ ... } section
well, yourself,
notably including sensible line breaks (and leading spaces) for nice alignment of multi -line examples.
Use the sources of R itself or recommended packages (or those authored by me, as I do pay attention to this quite a bit), to see good examples in their *.Rd files.
Remember: The current development sources of R are always web accessible at
R (devel) source tree # svn.r-project.org, i.e. R's standard packages at R sources src/library.

Rreport/LaTeX quality output package

I'm looking for some LaTeX template for creating quality output. On R-bloggers I've bumped on Frank Harrel's Rreport package. Due to my quite modest LaTeX abilities, only a user-friendly (and noob-friendly) interface should suffice. Here's a link to an official website. I'm following the instructions, but I cannot manage to install an app. I use Ubuntu 9.10, R version is 2.10.1 (updated regularly from UCLA's CRAN server), and of course, cvs is installed on my system.
Now, I'd like to know if there is some user-friendly LaTeX template package (Sweave is still to advanced/spartan for me). I'm aware that my question is quite confounding, but a brief glance on examples on Rreport page should give you a hint. I'm aware that LaTeX skills are a must, but just for now I need something that will suit my needs (as a psychological researcher).
Is there any package similar with Rreport?
lyx? http://www.lyx.org/
On Ubuntu:
sudo apt-get install lyx
From the lyx page:
LyX combines the power and flexibility
of TeX/LaTeX with the ease of use of a
graphical interface. This results in
world-class support for creation of
mathematical content (via a fully
integrated equation editor) and
structured documents like academic
articles, theses, and books.
If you want to produce Latex with a simpler markup you could use the ASCII package that has a Sweave driver that can be used with reSTructured text, which can then be converted to Latex. Although I would only use it if you want to be able to convert the same doc also to html or odf. In any case it is a good idea to learn the basic Latex.
The online text processor zoho allows export to latex. Maybe this can be helpful to learn latex, but I do not know how to integrate Sweave/R in this. (I did not work with zoho, by the way).

Resources