I'm using rmarkdown in rstudio and want to knit to pdf. This works well, except for when I use kable. I'm using the following yaml and it used to work in the past, but now I had to reinstall R, Rstudio and MacTex and now it doesn't work anymore.
---
title: "example"
output:
pdf_document:
df_print: kable
latex_engine: xelatex
---
```{r}
cars
```
The error message I get is:
output file: example.knit.md
! LaTeX Error: Environment kable-table undefined.
Error: LaTeX failed to compile example.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Study-1.log for more info.
Does anyone know how to solve this?
This is a bug of rmarkdown (against higher versions of Pandoc), which I just fixed on Github. Please try:
remotes::install_github('rstudio/rmarkdown')
Related
The video tutorial in http://www.kframework.org/index.php/Lesson_4,_LAMBDA:_Generating_Documentation;_Latex_Attributes suggests that we should use kompile lambda --pdf, but when I run it I got the following error:
[Error] Critical: Unknown option: --pdf (Unknown option: --pdf)
The kdoc --help option also result in a Command 'kdoc' not found error.
How do I correctly use this option to generate the formatted K definition?
The kdoc functionality (and --pdf) has not worked for quite some time.
If you want LaTeX ASTs output for given individual terms, you can use --output latex for any of kast, krun, or kprove. Unfortunately this does not work for entire definitions yet, and will not auto-format for you (it only outputs an AST, you'll still need to tell LaTeX how to render the nodes in said AST).
We are using Python-Sphinx to build our end user manuals.
In order to automatically convert our assorted graphic file formats like we are using the Sphinx Extension sphinx.ext.imgconverter, which utilizes ImageMagick to convert our graphic file formats to graphic formats, which the given build target can understand.
For detailed information see: sphinx.ext.imgconverter
Unfortunately, the output of the converted images does not satisfy our needs. A main issue is the low resolution of the converted images, which gives pixelated outcomes.
Therefore I included the following line to my conf.py:
image_converter_args=["-density 300"]
Now, the build process fails and leaves me with the following error message.
Extension error:
convert exited with error:
[stderr]
magick.exe: unrecognized option `-density 300' at CLI arg 1 # fatal/magick-cli.c/ProcessCommandOptions/428.
Can someone please help me?
The arguments should be a list.
image_converter_args=["-density", "300"]
Where "-density" is the operator argument, and "300" is the value argument.
If I run cat("\U001F615") on the command line in RStudio on my Mac, it shows the emoji. But if I knit it (Rmd) into a pdf, I get this error message:
! Package inputenc Error: Unicode char \u8:😕 not set up for use with
LaTeX.
See the inputenc package documentation for explanation. Type H
for immediate help. ...
l.144 \end{verbatim}
Try running pandoc with --latex-engine=xelatex.
pandoc:
Error producing PDF Error: pandoc document conversion failed with
error 43 Execution halted
But if I do latex_engine: xelatex, I don't get an error message, but the knitted pdf still doesn't show the emoji. Can someone help me in how I can knit to PDF with Emoji displaying?
There is a LaTeX package that adds support for emoji here: https://github.com/alecjacobson/coloremoji.sty
I haven't had any luck installing it though, because it's not on CTAN yet and I'm a LaTeX noob!
Once it's installed, you can add something like this to your YAML header:
---
title: "Title"
author: "Me"
header-includes:
- \usepackage{coloremoji}
output:
pdf_document
---
I have made a graphic with inkscape. Now I'm trying to build it in Latex. I' m working with TEXMaker. Therefore I have exported my graphic as *.pdf_tex and *.pdf.
In macros i have added the following
\usepackage{color}
\usepackage{transparent}
\graphicspath{{fileWithPictures/}}
my picture is build in like this:
\begin{figure}
\centering
\def\svgwidth{175pt}
\input{fileWithPictures/pic.pdf_tex}
%\includegraphics[width=2in]{fileWithPictures/pic.pdf_tex}
\end{figure}
Here I'm getting the following error. "!Package pdftex.def Error: File'pic.pdf" not found. See the pdftex.def package.."
I have tryed also to work with includegraphics which not succed. Because there he it doesn't recognize pdf_tex format.
Interesting is that the compiler says that there is not a file called "pic.pdf" and not "pic.pdf_tex". Althought both files are clearly in the file. To be sure i put the pic.svg file in the file. Now i have no more ideas and would be happy to get some help
Thanks
Use resizebox to set the width of your file instead of \def\svgwidth{175pt} it will solve your problem
\resizebox{\textwidth}{!}{
\input{fileWithPictures/pic.pdf_tex}
}
I'm attempting to convert latex to pdf, using doxygen generated latex files. I am using Doxygen 1.8.7. However, I keep getting this error:
!LaTex Error: Unknown float option 'H'.
...
1.6 \begin<figure>[H]
I've narrowed it down to a .tex file, which contains the following:
\hypertarget{group___a_m_s___common}{\section{A\+M\+S\+\_\+\+Common}
\label{group___a_m_s___common}\index{A\+M\+S\+\_\+\+Common#{A\+M\+S\+\_\+\+Common}}
}
Collaboration diagram for A\+M\+S\+\_\+\+Common\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=334pt]{group___a_m_s___common}
\end{center}
\end{figure}
\subsection*{Modules}
\begin{DoxyCompactItemize}
\item
\hyperlink{group___common___error___codes}{A\+M\+S Common Error Codes}
\end{DoxyCompactItemize}
\subsection{Detailed Description}
Where do I go from here? Am I right in saying that it's looking for an image that it can't find?
This does indeed seem to be an issue with the float package. I had the same problem. However, just adding EXTRA_PACKAGES=float didn't fix it for me. I finally found this page which describes a conflict between the fixltx2e package and the float package which generates this error about the unknown H option. So, I commented out line 11 where it says \usepackage{fixltx2e} in the doxygen generated tex file (called refman.tex for me). Then it converted to pdf without any further problems.
As the latex error says, it's not looping for an image it can't find, but rather encountered an option to a floating element it doesn't understand. The 'H' option for float placement forces a figure to appear exactly at the place it appears in the latex code and essentially not to float. It requires the "float" package.
Thus in order to get your code working, add the following to the preamble:
\usepackage{float}
I'm not sure how to tell Doxygen that this package is required so as to not have to touch the automatically generated latex files..
In fact according to the doxygen documentation here adding the following to your configuration file should do the trick:
EXTRA_PACKAGES=float
There's a discussion on the 'H' option over here and a rather detailed discussion on latex float placement in general here.