I get an error when trying to do TexInfo PDF output - texinfo

https://www.gnu.org/software/texinfo/manual/texinfo/texinfo.html#Short-Sample-Texinfo-File
In the sample code of the above URL, using TexInfo, I am trying to output PDF, but the following error occurs.
$ makeinfo --pdf sample.texinfo
sample.texinfo:28: #menu seen before first #node
sample.texinfo:28: perhaps your #top node should be wrapped in #ifnottex rather than #ifinfo?
Is there a way to solve this problem?

I was also having this problem, and found an email about this issue which explains mainly that either you can put the #menu within the #ifnottex block (which I find strange that the official sample docs wouldn't), or you can run texi2pdf on the file directly by writing
texi2pdf <FILE>
which works perfectly for me, so I suppose it goes through less validation. Although again it's strange since makeinfo --pdf is supposed to just be a wrapper for texi2pdf from what I understand. texi2dvi --pdf works also.

Related

How to force rstudio/knitr/rmarkdown to use alternative pandoc binary (scholdoc)

scholdoc (see scholarlymarkdown.com) is a fork of pandoc that has !FINALLY! easy referencing of figures/code blocks etc. build in - a central missing piece in pandoc.
Is there any straight forward way to force usage of scholdoc instead of the shipped pandoc binary when using knitr/rmarkdown in rstudio?
When I set in .Rprofile
options(
rstudio.markdownToHTML = function(inputFile, outputFile) {
system(
paste(
"~/.cabal/bin/scholdoc",
shQuote(inputFile),
"-o", shQuote(outputFile)))
})
as indicated here, this seems to work, but, as it is missing all manner of command line options used by the internal pandoc, produces HTML out of the box and will lead me down a painful way of getting all the CLI options right.
After studying some rmarkdown code, I have also tried to set the environment variable RSTUDIO_PANDOC to contain the path of scholdoc - to no avail.
Can anyone point out an easy way to do this with up-to-date rstudio/scholdoc installations?
I asked this long ago an thought that for completeness sake, I'd point out, that bookdown has stepped into the arena to provide cross referencing of figures etc. within rmarkdown documents.
after issuing install.packages('bookdown'), RStudio may be coerced to use it by adding the following to the YAML header of a document:
output:
bookdown::pdf_document2:

How to make Compass/Sass compilation command generate parsable output

I’d like to automate the compilation of Compass projects and be able to get output that I can parse so I can take only what I need (the errors) and further format them how I want.
The issue is that Compass output is not in a format that can be easily parsed (it has error messages on multiple lines).
Is there any reliable way to parse this output? Or… any idea what would need to be changed and where in Compass’s code to allow a new param that would allow you to specify the output format (e.g. JSON, XML)?
I’m asking this because I don’t know Ruby, so I would need a starting point. Their current code is not easy to understand (due to the fact that I don’t know Ruby), but if I at least have a starting point I would try to see what I can do and hopefully create a pull request with this if I get it working.
I think, there is another way to solve this problem, what you think about to parse the output css and do not touch compass.
There is a good framework for creating postproccesor for css:
https://github.com/postcss/postcss
You can do what you want with output css and send message to console or send email or other things, and many other things.

make error latex

make -C doc html latexpdf
yields this:
Package hyperref Message: Driver (autodetected): hpdftex.
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty))
(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/hypcap.sty))
(/usr/share/texlive/texmf-dist/tex/latex/multirow/multirow.sty)
Writing index file Arakoon.idx
(./Arakoon.aux)
Runaway argument?
{{1.10.3}{9}{Client side support\relax }{subsection.1.10.
! File ended while scanning use of \#newl#bel.
<inserted text>
\par
l.113 \begin{document}
?
If someone is still looking for this: For me usually, when a prior build had failed due to an error, subsequent builds would fail with this error. Solved it by deleting the main .aux file and building it again.
It is impossible to say with any confidence, but it looks like a fragile (non-robust) command in a subsubsection heading or a maths label (would be label 10.1.3), because:
It occurs at \begin{document}, when the .aux files are loaded,
The error indicates a malformed directive in the .aux file, and the presence of a \relax there - typically what command reduce to after having performed their side effect.
Two suggestions:
Generate an MWE by making a new document from this with all the body of your document except that heading/ equation (and perhaps the sentence following) deleted. Does this create the same error? If so, post it here. You might need some trial and error to find out which Lat3ex command is responsible, but it should contain the text Client side support.
Do read https://tex.stackexchange.com/questions/4736/what-is-the-difference-between-fragile-and-robust-commands - if I am right, you have a fragile command where it shouldn't be. Figure out what should be there instead.

How to debug Octopress markdown source files?

I use Octopress for blogging. Generally it works well except one occassion -- after typing rake generate, I got depressing output which says something like:
psych.rb:203:in `parse': (<unknown>): mapping values are not allowed in this context at line 3 column 6 (Psych::SyntaxError)
I can't remember how many times I've encounterd this situation. Every time I google the key words above, but got nothing help.
What I can do is to exclude all the source files (*.mkd) from _posts, and add them one by one to check which one goes wrong. I keep checking, and finally it turns out that a minor grammer mistake makes octopress angry.
Life should NOT be that hard. So is it possible to debug a octopress source file to show which line of file is incorrect in grammer? The outputs from rake generate don't make sense at all.
The reason could be wrong JAML in the top part of the post (e.g. ':' in the title), see https://github.com/jekyll/jekyll/issues/549 for more info.
I've seen a similar error ("mapping values are not allowed in this context") when I try to convert markdown files, using Pandoc. Perhaps your error message is coming from pandoc somehow?
Don't bother to debug Octopress. Please migrate to Pelican -- a Python-powered static site generator. It is full-featured, easy to use, and no doubt, generating useful debug information.

How to export scrubyt extractor?

I've written a scrubyt extractor based on the 'learning' technique - that is, specifying the current text on the page and getting it to work out the XPath expressions itself. However, I now want to export the extractor so that it can be used even when the page has changed.
The documentation for scrubyt seems to be all over the place now, but from what I can find I should be able to put the line extractor.export(__FILE__) and it should work. It doesn't - I just get an error saying that there is the wrong number of arguments for export, it should have 0. I've tried it without any arguments and it still fails.
I would ask on the scrubyt forum, but it seems like no-one's been there for ages!
Any ideas what to do here?
Just had the same problem and tried "puts google_data.export()" (trying to get some stuff from google)
This gave me the following:
=== Extractor tree ===
export() is not working at the moment, due to the removal or
ParseTree, ruby2ruby and RubyInline.
For now, in case you are using examples, you can replace them by hand
based on the output below.
So if your pattern in the learning extractor looks like
book "Ruby Cookbook"
and you see the following below:
[book] /table[1]/tr/td[2]
then replace "Ruby Cookbook" with "/table[1]/tr/td[2]" (and all the
other XPaths) and you are ready!
[link] /body/div/div/div/div/div/ol/li/h3/a
which gave me the xpath I was looking for
scrubyt version is 0.4.06

Resources