How to use bibliography in different directory when knitting rmarkdown document to beamer presentation? - knitr

I'm knitting some beamer slides in an RMarkdown script in Rstudio on a Windows 7 PC. The slides are in the directory
C:/me/slides/myslides.Rmd
I have a master bibliography that lives in
C:/me/bib/masterbib.bib
I cannot figure out how to link to the bibliography file from the RMarkdown document. Here's the YAML from my attempt:
---
title: "Slides"
author: "me"
date: "2016-12-20"
bibliography: C:/me/bib/masterbib.bib
biblio-style: "apalike"
output:
beamer_presentation:
citation_package: natbib
---
Here's the error:
! Undefined control sequence.
<write> \string \bibdata {C:\me\bib\masterbib}
l.174 \end{frame}
Error: Failed to compile Slides.tex. See Slides.log for more info.
In addition: Warning message:
running command '"pdflatex" -halt-on-error -interaction=batchmode "Slides.tex"' had status 1
Execution halted
I've tried a couple other ways to specify the directory for masterbib.bib, but none have worked. I would prefer to keep the masterbib.bib file where it is, and not make an extra copy in the C:/me/slides/ directory. Thanks for your help!
Edit
When attempting to pass the following into YAML (quoteed with forward slashes):
bibliography: "C:/LaTeXstuff/BibTexLibrary/BrianBib.bib"
I get a fatal error with log output:
! Undefined control sequence.
<write> \string \bibdata {C:\me
\bib\masterbib}
l.174 \end{frame}
Here is how much of TeX's memory you used:
18047 strings out of 494045
334241 string characters out of 3145937
424206 words of memory out of 3000000
20891 multiletter control sequences out of 15000+200000
31808 words of font info for 44 fonts, out of 3000000 for 9000
715 hyphenation exceptions out of 8191
56i,11n,55p,434b,376s stack positions out of 5000i,500n,10000p,200000b,50000s
! ==> Fatal error occurred, no output PDF file produced!
When passing the following into YAML (quoted with backslashes)
bibliography: "C:\me\bib\masterbib.bib"
I get the following error in the Rstudio console
Error in yaml::yaml.load(enc2utf8(string), ...) :
Scanner error: while parsing a quoted scalar at line 4, column 15found unknown escape character at line 4, column 29
Calls: <Anonymous> ... yaml_load_utf8 -> mark_utf8 -> <Anonymous> -> .Call
Execution halted
When passing the following into YAML (unquoted with backslashes)
bibliography: C:\me\bib\masterbib.bib
I get the following error in the Rstudio console
! Undefined control sequence.
<write> \string \bibdata {C:\me
\bib\masterbib}
l.174 \end{frame}
Error: Failed to compile BibTest.tex. See BibTest.log for more info.
In addition: Warning message:
running command '"pdflatex" -halt-on-error -interaction=batchmode "BibTest.tex"' had status 1
Execution halted

Try unquoted with two backslashes:
...
bibliography: C:\\me\\bib\\masterbib.bib
...

Related

error on csl in R Markdown, using American-statistical-association.csl in my YAML

File american-statistical-association .csl not found in resource path
Error: pandoc document conversion failed with error 99
Execution halted
I keep getting this error message
I was trying to knit an r markdown file.

Xcode - Swift Compiler Error For Bridging header

I'm attempting to use a Bridging header but when I try to run my application I get a swift compiler error, when I remove the bridging header and the header file the app runs.
This is the error message I get:
<unknown>:0: error: generate-pch command failed with exit code 1 (use -v to see invocation)
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
My app has spaces in it's name and I'm denoting that by adding hyphens instead of spaces. I attempted to remove the space by using a backslash and a space like "${SRCROOT}/Project\ Name/headerFile.h" but I got this error message:
<unknown>:0: error: error opening input file '/Users/apple/Documents/Folder/Project Name/Project\ Name/HeaderFile.h' (No such file or directory)
Any advice or pointers would be greatly appreciated.
I just fixed this by using just spaces instead of hyphens or backslash and spaces. Simple enough.

How to build c bindings for zookeeper in windows?

facing errors in opening the solution file ..error unable to convert the solution file vs 2011 Conversion Report - Cli.vcproj:
Converting project file 'D:\zookeeper\zookeeper-3.4.8\src\c\Cli.vcproj'.
Done converting to new project file 'D:\zookeeper\zookeeper-3.4.8\src\c\Cli.vcxproj'.
VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.
Conversion Report - :
The following error has occurred during XML parsing: File: D:\zookeeper\zookeeper-3.4.8\src\c\zookeeper.vcproj Line: 1 Column: 1 Error Message: Incorrect document syntax. The file 'D:\zookeeper\zookeeper-3.4.8\src\c\zookeeper.vcproj' has failed to load.

iReport compile error found when click on the preview

I'm new to iReport and tried to generate a report using iReport. The problem I got was not compiling the jasper file.
This is the error I got. How can I fix this? I have already set the fonts, and cannot preview the report anyway.
Compiling to file... C:\Users\SDU\Desktop\ugc test\report1.jasper
Errors compiling C:\Users\SDU\Desktop\ugc test\report1.jasper!
Compilation exceptions: com.jaspersoft.ireport.designer.compiler.ErrorsCollector#1e398a0
net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
calculator_report1_1442307421307_832861: 192: expecting ''', found '\n' # line 192, column 37.
1 error
at net.sf.jasperreports.compilers.JRGroovyCompiler.compileUnits(JRGroovyCompiler.java:113)
at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:201)
at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:354)
at net.sf.jasperreports.engine.JasperCompileManager.compileToFile(JasperCompileManager.java:270)
at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:563)
at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:528)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
calculator_report1_1442307421307_832861: 192: expecting ''', found '\n' # line 192, column 37.
1 error
at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:302)
at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:149)
at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:119)
at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:131)
at org.codehaus.groovy.control.SourceUnit.addError(SourceUnit.java:359)
at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:136)
at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:107)
at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:236)
at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:161)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:900)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:564)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:540)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:517)
at net.sf.jasperreports.compilers.JRGroovyCompiler.compileUnits(JRGroovyCompiler.java:109)
... 7 more Compilation running time: 32!
Maybe you use Text Field instead of Static Text somewhere.
Text Field accepts only expressions.
It can generate errors like this.

Error in PHP code, Line // Col Non-existent?

WHen I try to run indexer for sphinx.
/usr/bin/indexer --rotate --all
I get this error...
using config file '/etc/sphinx/sphinx.conf'...
ERROR: invalid section type 'Strict' in /etc/sphinx/sphinx.conf line 1617 col 8.
ERROR: invalid section type 'Strict' in /etc/sphinx/sphinx.conf line 1617 col 1.
FATAL: failed to parse config file '/etc/sphinx/sphinx.conf'
When I check sphinx.conf there is no line 1617. The last line of code is 1373. Could someone tell this newb what I'm doing wrong and how do I debug a line that doesn't exist?
Thanks!
It sounds like you have a dynamic config file? ie contains embedded PHP code?
If so try running the config file on its own, and then inspecting that.
php /etc/sphinx/sphinx.conf > /tmp/sphinx.conf
cat -n /tmp/sphinx.conf | grep 1617 -C10
ie sphinx is finding the error in the generated output, not the raw code.