lyx

Insert programming code in a Lyx document

浪子不回头ぞ 提交于 2019-12-20 08:01:39
问题 What is the best way of inserting python/C++ code in a Lyx document? The code is small examples less than 20 lines. My Lyx document is using the Book document class. Orjanp 回答1: There should be an Insert -> Program Listing option. That uses listings Latex package, so you should have that installed. The support seems to have been added in Lyx 1.5, and from their screenshot, it seems it gives you a lot of customization options. 回答2: I prefer to insert the listings as a child document, so the

How to draw a graph in LaTeX?

亡梦爱人 提交于 2019-12-18 09:54:58
问题 First of all, let me say I'm using LyX, though I have no problem using ERT. Secondly, what is the most simplest way to draw a simple graph like this in Latex? I've seen some documents with graphs and I've seen some examples, but I couldn't figure out how to just draw a simple graph - what packages do I need, etc? 回答1: TikZ can do this. A quick demo: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} [scale=.8,auto=left,every node/.style={circle,fill=blue!20}] \node

Knitr Lyx Problems

眉间皱痕 提交于 2019-12-13 08:28:18
问题 I'm working on getting knitr and LyX re-installed and working on my fresh OS setup. I had it working previously. I installed the latest version of R (3.0.1), Knitr is ver 1.3.3, LyX 2.0.6 including the MiKTex 2.9 distribution, and RStudio 0.97.551 on a Windows 7 Enterprise computer. I can get pdflatex output if I open up Lyx and simply view the tutorial, so the basic system is working. I've tried running old LyX files I had with Knitr, but now they fail. Initially there appeared to be a path

knitr, lyx, mac, Korean

感情迁移 提交于 2019-12-13 02:06:58
问题 Dear Friends in the knitr community with lyx and Apple Mac Hello! I am using Apple Mac for Reproducible research of R. Currently, I enjoy knitr in lyx for writing some R scripts. The problem I have is related non-English characters, specially Korean in the knitr chunk. When I type any Korean Character in a Chunk for typing file name or some extra explanations in #, the pdf output of the file does not print Korean properly. No matter of choosing or not choosing the option "eval=FALSE", R in

hmisc::latex tables open in external xdvik window instead of being inserted into the pdf output document

纵饮孤独 提交于 2019-12-11 12:46:46
问题 Since our update to R2.15.1, the tables in my lyx documents that result from calls to the latex function (package Hmisc) open in an external xdvik-window instead of being inserted in the pdf-document that I am compiling. On the contrary, the tables produced with xtable and the graphs produced with ggplot do appear where they belong in the document. The chunk header for the latex call is <<Specs,tidy=F,results='asis',eval=F>>= and the chunk is then referred to multiple times with e.g. <

LyX — Title, Abstract, Keywords Missing When Using Elsevier Class in View

江枫思渺然 提交于 2019-12-11 03:34:33
问题 I'm pretty new to using LyX, but have looked around this forum, as well as others and haven't found anyone else who has encountered this problem. The issue is that, when I click on the 'eyes' to preview my document in .pdf form, there are the two numbered sections with the corresponding body text, but my title, abstract, and keywords, as well as the 'new page' formatting, are all missing; the two sections are at the top of the page as though they had never been included. Some pertinent

Lyx cannot find knitr module

这一生的挚爱 提交于 2019-12-11 02:36:16
问题 I am migrating/branching from sweave to knitr and can run @yihui's minimal example in Rstudio but am having trouble making it run with Lyx (2.06). I get the message The module knitr has been requested by this document but has not been found in the list of available modules. My PATH is /usr/bin/Rscript (per which Rscript , as per @yihui's suggestion here) so that appears visible, but lyx doesn't seem to see it. I also did upgrade to R version 3.0.1 (Good Sport) today as a part of a larger

knitr installation in Lyx

拜拜、爱过 提交于 2019-12-10 13:18:42
问题 I was trying to install Knitr package in Lyx but I encountered the following error. "The module knitr requires a package that is not available in your Latex installation or a converter that you have not installed. Latex output may not be possible. Package missing Knitr>latex." I would greatly appreciate if you could please help me to fix this problem. I checked the Lyx module but couldn't figure out exactly what to do. I am a new user to Lyx and Knitr. Thank you in advance 回答1: That is often

Syntax highlighting Javascript in LyX, insert child -> program listing

旧时模样 提交于 2019-12-08 09:43:36
问题 Im writing my masters thesis, which includes alotta javascript. Im including it as a child file, as a program listing with the following options: breaklines=true captionpos=b frame=tb language=Python There is no javascript language/listing file, which is why Im trying python. Also tried Java, but neither did much good. Is there any way to get some js syntax highlighting here? It really is alot of code, so its not very easy to read when its all black. Thanks 回答1: There is no JavaScript

Missing text in PDF after R chunk in Lyx/knitr

折月煮酒 提交于 2019-12-08 06:21:12
问题 I'm using Lyx 2.1.2 with knitr on a Fedora 20 x86_64 system. I'm not sure how to determine the version of knitr, but it is certainly working, generally providing very good results. However I see two problems: (1) If I include the final @ in any of the chunks, it appears literally in the text. Naturally I don't mind if I don't have to add the final @. It's implied by the end of the chunk, anyway. However (2) if I do NOT include the final @ in Chunk 3 (see below), then all of the document text