TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've tough luck with running article(Noweb) in LyX 2.0.0. Could someone guide me how to run article(Noweb) in LyX 2.0.0? Sharing an example will be highly appreciated.

share|improve this question
Could you elaborate a little bit? What do you mean by article(Noewb)? – Sharpie May 9 '11 at 19:25
@Sharpie: article(Noweb) is a Document Class where we can include R code. – MYaseen208 May 9 '11 at 20:36
It's not necessary to sign your questions (as there is already a box with your username below it) or to begin them with a greeting. Just kind of a convention here to keep the questions concise. – doncherry May 9 '11 at 21:37
up vote 1 down vote accepted

Here's a minimal example. Save to a .lyx file and open with LyX 2.0. I suspect that you haven't included the Sweave module in Document -> Settings... -> Modules.

#LyX 2.0 created this file. For more info see http://www.lyx.org/
\lyxformat 413
\textclass literate-article
\use_default_options true
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding auto
\fontencoding global
\font_roman default
\font_sans default
\font_typewriter default
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100

\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry true
\use_amsmath 1
\use_esint 1
\use_mhchem 1
\use_mathdots 1
\cite_engine basic
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\use_refstyle 1
\index Index
\shortcut idx
\color #008000
\leftmargin 1in
\topmargin 1in
\rightmargin 1in
\bottommargin 1in
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false


\begin_layout Chunk

\begin_layout Chunk

\begin_layout Chunk

\begin_layout Chunk


share|improve this answer
@Kevin: Would you like to give me the exact web link of this file. Thanks – MYaseen208 May 10 '11 at 5:03
@Kevin: Would you like to give me the exact web link of this file. When I tried to open sweave.lyx, LyX warned me that the package sweave -> latex is missing. Guide me how I can include this package. Thanks – MYaseen208 May 10 '11 at 5:10
Do you have R installed? – kmm May 10 '11 at 15:31
@Kevin: Yes, I do. – MYaseen208 May 10 '11 at 15:55
Try posting your question to the lyx-users mailing list (lyx.org/MailingLists). Without a lot more information about your setup (i.e., we don't even know what OS you are using), it's hard to know where to start. – kmm May 10 '11 at 17:55

Perhaps this blog post by Yihui Xie will provide a good example and starting point if you are looking to do literate programming with LyX and R:


Disclaimer: I don't actually use LyX myself

share|improve this answer
This is nice but I'm using LyX 2.0.0 which already have every thing in it. – MYaseen208 May 9 '11 at 22:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.