Is bookdown's math render down? - latex

I have working .Rmd files that contain latex syntax (rendering correctly). However, when I render using the bookdown package, I have experienced that the latex output is incorrect.
I went to check in the source (aka https://bookdown.org/yihui/bookdown/markdown-syntax.html#math-expressions) and I see that the render is not correct there either!
I see similar behavior for bookdown's preview_chapter() rendering but not for Rmarkdown knit of a toy example. I see similar behavior changing web browser.
Is this something on my end? Are there updates I need to do?

It is not an issue on your end, but a server problem (the default MathJax CDN server in bookdown was down). I just changed the server, and the problem should be gone if you
devtools::install_github('rstudio/bookdown')

I can confirm that Yihui Xie's answer is helpful. I didn't have devtools installed in RStudio, so I used:
install.packages('devtools')
After this, I duly followed Yihui's recommendation and ran:
devtools::install_github('rstudio/bookdown')
After this, the problem was solved and maths were rendered correctly in the gitbook format.

Related

Unicode characters incorrect or missing with Puppeteer within Docker

When I use puppeteer locally and produce a pdf, stock settings and headless, this character
🌐
is drawn correctly on the resulting pdf. When I try to run the same within Docker, the character renders incorrectly. This happens with many unicode chars within Docker, they render incorrectly or not at all.
I've read the posts about this, and it seems like it's a font problem? I have puppeteer running within docker, using node:16 as a base. Is it just that my base image doesn't have enough fonts? I've tried installing chrome and the other suggestions from the puppeteer docker file and related posts, they don't work. Using puppeteer 18.0.2 on node:16.
If it's a font issue, does somebody know how to get fonts installed that will work and produce the characters generally found in the headed browsers? Or is it something else? Ok, just posting this in 2022 since many of the answers from the past are old and outdated. Thanks for any help.
Try using the official Docker image that pre-installs many fonts: https://github.com/puppeteer/puppeteer/blob/main/docker/Dockerfile#L11

bookdown cross-reference links pointing below figures

In reports generated using bookdown, when clicking the cross-reference hyperlinks pointing toward figures, it brings me below the figure so I end up only having the caption of the Figure at the top of my screen and I need to scroll up to see the Figure.
This problem only occurs when using a web browser to view the generated output. It does not occur with RStudio integrated viewer for which the whole Figure is correctly displayed on my screen.
This happens with any bookdown html generated output, even with the unmodified bookdown demo files.
Any clue about what may cause this behavior ?
Edit : The problem seems to be browser-related. It occurs with both Chrome and Edge, but not with Firefox, Safari (thanks jtbayly) or Internet Explorer.
This has been reported on Github also https://github.com/rstudio/bookdown/issues/1155 and this is fixed in next version of bookdown (0.23)
For now only a dev version
remotes::install_github("rstudio/bookdown")

OpenLayers that is not minified?

I'm trying to find an OpenLayers3.js file that is not minifed, it is a pain debugging stuff that is minified, can anyone help me find it?
Im using this address now: http://openlayers.org/en/v3.0.0/build/ol.js
By the way, it is a special thingy at the top. See the website: http://ol3.js.org/ ? Made me laugh.
Help?
If you need the unminified ol, you can use the one from ol:
http://openlayers.org/en/v3.0.0/build/ol-debug.js
It's a file of 3.5M so don't use this in production ;)
Have you tried the Download link on the main page?
https://github.com/openlayers/ol3/releases/download/v3.0.0/v3.0.0.zip
If you want a hosted version, upload one here:
https://cdnjs.com
Yes, http://openlayers.org/en/v3.0.0/examples/loader.js will load all the raw files -- basically by writing out a bunch of script tags. As #lexicore has already said, you can get the source from github, though this involves setting up nodejs locally to run (which actually isn't that painful, but more so than just debugging from a hosted source). Take a look at package.json to get a feel for how much has gone into OpenLayers 3.
If you go to the OpenLayers 3 examples, for example animation, change production to development in the drop down, and then do view source, you will get the link above. You can also see all the raw js files in the Javascript console.
EDIT: I put some instructions, following the official OL dev page, on how to build/run locally, which will also get you the unminified OL source code

Rendering equations with Doxygen and MathJax in CHM file

I've got doxygen configured so that I can get MathJax to render equations nicely in the HTML output. I had hoped that things would magically work with output to a CHM file (which is what I distribute), but unfortunately I was wrong.
Has anyone tried to do this before, and if so, how did you do it?
Anyway, use a tool (search for chmlib or "chm decompressor") to look inside the CHM, and check all relevant JS scripts and other files are there.
If Doxygen doesn't add all relevant files to the .hhp, it might be possible that the outdates html scanning of HTML help doesn't find and package all references to external files.

Why does LaTeX not render my gantt-diagram into pdf

is there anybody out there, with experiences about how to do a gantt-diagram / chart using latex.
I tryed it for a lot of hours today, lastly it worked switching outpout from pdf to dvi.
Maybe someone can tell me what to include, besides pst-gantt, and the normal pstricks stuff.
It showed more than 100 errors for 4 Tasks.. after switching to dvi there was a big 0.
i am using the whole distribution mitex .. upgradet to the newest version. stupidly i have the error log not avaible on this computer. but it was always the same error. i was using pst-gantt, outload missing packages.. hm errors will follow tomorrow morning
Reading the pst-gantt README it looks like this depends on the pstricks package. I believe that the "ps" is for postscript and the functionality is implemented by generating DVI "special" commands; which means that you can't produce output pdf directly using pdflatex. You can get to PDF output, but you must go by way of DVI. Either source->DVI->PDF or even source->DVI->PS->PDF.
I came across this question when having trouble with pst-gantt and pdflatex. As others have pointed out you need to go via DVI, which honestly sucks if you have used pdflatex all the time.
So I did some search, and found this phantastic replacement written by Martin Krumm: http://www.martin-kumm.de/tex_gantt_package.php

Resources