How to render LaTeX in local Gorilla worksheet - clojure

I am trying to embed LaTeX formulas inside Markdown cell in a locally running Gorilla worksheet. For example, the following Markdown text should render an inline formula and a standalone formula:
This is an inline formula, ##\sin(x)##, and this is on its own line:
$$\int_0^{2\pi}\sin^2(x) \textrm{d}x$$
However, when I run Gorilla locally (using lein gorilla) what I see is the raw code. Markdown itself is rendered absolutely fine. On the other hand, when pushing the worksheet to GitHub and using an online viewer LaTeX formulas are rendered as expected.
Gorilla's documentation is saying the following, which I'm not sure I fully understand:
Note: currently you will need to be online in order for LaTeX to render properly.
What I thought is that it means that I have to have a network connection while trying to render LaTeX, but, if this is indeed the meaning, than I do not understand why it is not working. Another meaning I could think about is that currently LaTeX can only be rendered with the online viewer, but this interpretation dose not make much sense to me.
Any ideas? Thanks to any one pointing me to the right direction!

With some help I have found the solution to this problem—I was using an outdated version of lein-gorilla plugin. With version 0.5.3 LaTeX is rendered just fine[1]. The exact plugins line in project.clj should be similar to
:plugins [[org.clojars.benfb/lein-gorilla "0.5.3"]]
Also, it seems I was not aware that I could use the app-gorilla template for creating gorilla projects (I was using lein new app and then manually edited project.clj to add the plugins line). The command
$ lein new gorilla-app <project-name>
generates a project.clj file with the right version of the lein-gorilla plugin already in the file.
I guess this is the right way for creating gorilla apps, and that it ensures that the plugin will always be up to date.
[1] Some very specific LaTeX formulas seems to have rendering problems, but it needs some more testing and maybe a separate question.

Related

How to organize a R project structure in interaction with using R-markdown

I've been reading everywhere about the need to organize your R projects and also to use Rmarkdown.
I see an incoherence I can't solve.
Suppose I set for the following standard organization:
Project
data
raw-data
code
docs
out
reports
and also home of setwd().
Now I want to use Rmarkdown with my main project file called My_project.Rmd
I create it at the root project level, then I get at every knit rendition 2 directories created My_project_cache and My_project_files on to of every .hml file rendered that conflicts with the above structure.
This is very impractical.
I tried setting the options of output to avoid this, per this tip, but it fails on the cache directory, and I did not succeeded in setting Knit options to bypass it. And no-one seems to be bothered by this question making the solution look like a dead-end.
The other solution is to put My_project.Rmd directly in reports/ but it feels a little awkward and on top of that it breaks the above project structure by imposing ../ paths everywhere.
The third solution is to work with Rmd format, only at the end of a project, but this seems a little defeating the purpose of documenting everything neatly in the first place.
There may be a 4th solution using R Notebook feature, but it works until you decide to try to finalize your "final" document , which of course is never really final.
What am I missing here ?
For reference, I'm using RStudio on a Mac.

Is there a way to write to a file in online CMS from a local C++ program?

I created a very customized leaflet map on a Bitrix website (they forced me to, not my choice). Now other coworkers who are basically "afraid" of code need to be able to add markers to that. I already created a C++ program where they can simply enter all the details they want (what category, whats the popupcontent etc.) and it spits out the geoJSON code for the marker for them to copy and paste into the website.
To make it even more easy for them I am wondering if there is a way to basically have my program connect to the internet, go to the backend of my website and, after asking for login, adds the code to the respective .js file that contains only the marker code.
I have been googling the problem but unfortunately couldnt find any other related posts.
Okay I finally found the I guess easiest way, I will force my colleagues to install python and write a little thingy to concatenate the code and upload it using Selenium. Thanks for your help guys!

Robot framework log not generating properly

Screen of the log file which has failed
Screen of the log file which has Passed
I have been working on RobotFramework. As I am new to it, got these problem.
My Test has 17 Test Cases. I Tested it and got log file as shown in image.
Initially it was showing perfect log with all description of each test cases but now I don't know what exactly I have done. It's showing incomplete log with no any description of test case.
How can it might happen:
Related to Browser (I'm using Chrome).
Or some problem with either Test Suite setup/tear down.
Please point out the exact issue.
I was facing the similar issue with the Robot framework. I tried to remove the robotframework.jar file from my environmental variable CLASSPATH. It worked like a charm.
This jar is necessary if you are using robot keyword annotations in your project. Turns out it wasn't necessary at all in my project. If it is in your case, try to update the Jar file by using latest release.

Clojure: Marginalia: Multi Page Documentation

Question
(run-marginalia {})
produces a single file, docs/uberdoc.html
I would prefer it to produce many files in docs/*, one per *.clj file
Motivation:
I really like marginalia. I have recently started using it, and it's causing me to want to write documentation, as impossible as that sounds.
However, I have this problem that whenever I write docs, and refresh, and reload uberdoc.html, I lose the part of the doc I was previously looking at. Thus, I would prefer a system where each *.clj file had it's on *.html file for documentation. Is this possible with marginalia 0.7.0?
Thanks!
There was a mutlidoc functionality in a previous version, but it is not at command line in the latest version. However, by running something like (multidoc! "./docs" (find-processable-file-paths "./src" #"\.clj$") {}) you should get directory of individual files.
https://github.com/weavejester/codox is another Clojure documentation tool (which gives separate pages - see http://number23.github.com/commons-lib/)

How do I create skeleton files, or templates, for MacVim

I have seen instructions about creating a "skeleton" file in vim. This involves creating the file, naming it "tmpl" plus the extension of the file type you are targeting (ex: tmpl.html), saving it to the "skeleton" directory, and then editing the vimrc file.
But, in MacVim, I don't see a "skeleton" directory anywhere. Googling, etc., has returned no helpful information.
Can someone point me to a helpful tutorial/white paper/whatever to walk me through this process for MacVim?
I am determined to develop some skills with Vim/MacVim!
Thanks
I feel dirty giving this as an answer (because I've never done it), but googlin' gave me this: Vim Recipes: Using Templates.
Seems like you make your own skeleton directory and point the line for your .vimrc file to it.
There are a multitude of vim plugins that can handle this task. I use snipMate to perform tasks like this. You can define snippets for each file type or globally. The best part about the snippets is that you can keep hitting tab while it takes you to each "variable" within the snippet so that you can fill in the missing information quickly.