I've loose some cross-references when exporting a bunch of .Rmd files to a single .doc file, using knitr and bookdown (+ yaml). The method is thesisdown::thesis_word:.
The problem of loosing-references occurred immediately after I've installed a new version of Pandoc. Maybe I miss a step after Pandoc installation ?
The lost references are currently the \#ref(title) ones, which previously return the number of the title indicated by : # My title {#title} and now return (??). Only these anchors are missing, after the install of pandoc. Maybe I have to use another style of anchors for references to a section of the document ?
Pandoc seems ok : all references to .bib dictionary, tables and figures anchors are ok (& env. path variables in Microsoft Windows are ok and pointing to the new pandoc.exe).
Thanks a lot for any advice, excellent day.
PS : I'm using thesisdown (sort of bookdown stuff) and I don't - yet - try a normal bookdown export using knitr... I don't try - yet - another type of exported document (like html or pdf).
It seems that install or reinstall tinytext is the key for solving this problem. If not, just go further with packages update (e.g., bookdown, thesisdown). Sometimes, you need to reinstall Rstudio (solve this kind of problem, or some package update issues).
Related
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.
Sublime Text 3's Clojure syntax highlighting often breaks on/after regular expressions. I see that Anthony Grimes noticed this on the Sublime Text Forum: http://sublimetext.userecho.com/topic/82983-clojure-regexes-are-not-parsed-properly/
This answer was suggested:
Inside Clojure.tmLanguage try changing
<string>source.regexp.oniguruma</string>
to
<string>#string_escape</string>
But where is Clojure.tmLanguage? After I make the change, do I just save it in place? (See Where to put .tmLanguage in sublime text 3?)
I see have this in my Sublime Text 3 directory:
$ tree -L 1
.
├── Cache
├── Index
├── Installed\ Packages
├── Local
└── Packages
Inside Cache I see Clojure/Clojure.tmLanguage.cache but that probably isn't right.
Update: I'm using Mac OS X 10.9.
Update: I'm looking over Where are .tmLanguage files stored for ST3
Update: There are other Clojure syntax issues detailed here, too: http://www.sublimetext.com/forum/viewtopic.php?f=3&t=14077
Update: I've tried uncompressing the Clojure.tmLanguage.cache file by renaming it to Clojure.tmLanguage.zip first. That was bizarre; I get an alternating and endless loop of .cpgz and .zip files as I try to uncompress them. See: discussions.apple.com/thread/1446784
If you're going to be changing items in the default packages in Sublime Text 3, I highly recommend installing PackageResourceViewer by #skuroda. It allows you to open, view, edit, and extract packages from their default storage location (which varies by operating system) and place them in Packages/PackageName, overriding the default.
Once you've installed the plugin, go to Preferences -> Package Settings -> PackageResourceViewer -> Settings - User and paste in the following:
{
"single_command": false
}
This just gives you some extra options in the Command Palette. Next, hit ⌘⇧P and type in prv to bring up the PackageResourceViewer options. Select Edit Package Resource and navigate to Clojure -> Clojure.tmLanguage. Do your search and replace, and save the file, which will now be located in Packages/Clojure/Clojure.tmLanguage in case you need to edit it again - you'll be able to open it like a normal file.
To answer the original question, on OS X the pristine .sublime-package files are located in /Applications/Sublime Text.app/Contents/MacOS/Packages. However, these files should never be modified directly, as a) you could easily break something, and b) they are overwritten upon upgrade, so any changes would be lost.
Good luck!
BTW, a little plug if you're using Clojure and would like some better syntax highlighting: I'm the maintainer of the Neon Color Scheme, and I just released a new version that includes more specific support for Clojure, aside from what was already there. My aim for the color scheme is to make as many languages as possible look as good as possible, taking advantage of as many scopes as I can in the .tmLanguage definition file. I just recently started learning Clojure, and the language definition is fairly rich, so there are a lot of opportunities for context-specific highlighting. Check it out, and please let me know what you think!
I thought i had a simple question, but somehow i cant find a source for the answer....which document formats can be indexed by the Lucene version that is packaged with Railo 4.0?
Somehow .doc and .pdf seem to go well, but docx and rtf just don't seem to get indexed....Is there a list available somewhere? And for all formats that arent supported, what would be the best way to get that info indexed aswell by cfindex?
<cfindex
collection = "#collection#"
action = "update"
type = "file"
key ="#ABSfilepath#"
title="#ABSfilepath#"
>
thanks!
Question also posted to Railo mailing list: web link.
Railo 4 uses Lucene 2.4.1 - how do you tell? Same way you tell the version for all third-party software that Railo uses: locate the JAR file (in the lib/ext directory), open that archive (using 7-zip or equivalent), and look at META-INF/MANIFEST.MF where you find content like this:
Specification-Title: Lucene Search Engine: core
Specification-Version: 2.4.1
Specification-Vendor: The Apache Software Foundation
Implementation-Title: org.apache.lucene
Implementation-Version: 2.4.1 750176 - 2009-03-04 21:56:52
Implementation-Vendor: The Apache Software Foundation
This seems to be a pretty old version and doesn't look like it has any docs on the Apache Lucene website. (It might be possible to upgrade Lucene by replacing the relevant JARs, but this might also cause dependency issues; do at own risk.)
Since the Lucene website doesn't help, a search for "lucene 2.4.1 indexable documents" brings back a pertinent question about v2.3.2 which asks:
Does Lucene java supports parsing of extensions *.docx, *.pptx, *.mpp i.e.
Microsoft Windows 2007 documents?
With the response:
Lucene doesn't actually support any of the document types. What happens
is that some program is used to parse the files into an indexable stream
and that stream is indexed. That used to be POI in the old days.
Ok, so assuming that is still accurate, Lucene doesn't control the filetypes, Apache POI does.
Checking the JARs tells us Railo 4.0 uses Apache POI v3.8 and looking at the POI changelog reveals that .docx support arrived in v3.5
So, your .docx files should be supported along with the other MS Office formats. If it's definitely not being indexed, you probably need to identify if it's a POI issue or a Lucene issue or a Railo issue - creating a simple reproducable test case with both .doc and .docx documents is probably a good first step.
Beyond that, you'll need someone familiar with Lucene/POI to advise - there may or not be log files that will contain details of possible indexing/retrieval errors, or ways to interact with Lucene directly (not via Railo/cfindex) that can help identify where the issue lies.
Is there any library in C++ for creating Epub files, I need to use it with Qt.
My program can export html & css, but I don't know how to convert that to an Epub.
from my googling efforts it appears that most of it is hand written and their isnt a globally accepted SDK. i found a nice tutorial for you which walks you through making epub files. and i did see some other links about using it with QT. maybe someone knows of a good open source project thats somewhere?
epub tutorial
Once you've got the HTML and CSS, you're most of the way there; what remains is the content.opf file, which basically lists all the files in the epub document and the overall metadata (author, publisher, ISBN, etc); and the table of contents. epub 2.0.1 uses the toc.ncx file as a table of contents--it's basically an xml document. epub 3.0 uses the toc.xhtml, which is much more intuitive--it's essentially an ordered list in a nav element. You can do either epub 2.0.1 or epub 3.0; there's enough backwards compatibility built in that older devices will be able to read an epub 3.0 file--as long as you include both a toc.ncx and a toc.xhtml.
You may have to tinker with your CSS; epub doesn't support everything, and the device manufacturers all seem to interpret things differently; it's very "browser wars"-ish.
I find the IDPF's epub spec is the best place to go for formatting info. Here's the relevant bits:
content.opf
toc.xhtml
toc.ncx
I have been using emacs for a while for mainly python programming, and have started C++ coding with it. When I open a c++ file, it opens without problems with c++-mode. The background and foreground colors are normal for the theme I have with color-theme, but keywords and strings are not colored differently. Below is the code in my .emacs to initialize color-theme.
(add-to-list 'load-path "D:\\emacs\\color-theme-6.6.0")
(require 'color-theme)
(color-theme-initialize)
(setq color-theme-is-global t)
(color-theme-hober)
I have not put in any code for c++. Any ideas?
Edit: I tried turning off color-theme to see if at least then there would be some coloring, and there was not, even after ensuring font-lock-mode was on. Also, this is GNU Emacs 23.1.1
Place the cursor over a keyword and do M-x describe-face. The face should be identified as font-lock-keyword-face and the description of the face given. At that point it should be easier to determine whether the keyword has the wrong face, or the face just has a default appearance. You could also double-check that font-lock-mode is on with describe-mode.
I finally got syntax highlighting by removing a folder called site-lisp from the folder d:/emacs. My Emacs installation is in d:/emacs/emacs-23.1, and somehow it was reading from these files. So, removing this folder forced Emacs to use the correct ones, I think.
(font-lock-mode) should help (with non negative argument to make sure it's turned on)
Generally this should work straight out of the box on a standard install - to verify start emacs with the "-q" option to avoid loading stuff from your init file. I have verified this with a quick install (on XP Pro) of the official 23.2 binaries. Here's the output: (apparently can't post images due to low reputation - the link is img444.imageshack.us/img444/2680/46117077.png).
If this displays code as you expect, then there's an issue with your init file - I suggest using the standard approach of commenting everything out and selectively adding things back in, until you come across the offending line(s).