RE: LyX cannot handle '$' sign in Sweave code chunk

2012-05-31 Thread Lam Phung Khanh
Thank you very much for your response. Sorry because I did not check
carefully my R code. 

I've heard about knitr several weeks ago but haven't tried it yet
because Sweave is somehow more familiar to me; however, I intend to try
it in near future.

Best regards, 

Lam PK

-Original Message-
From: Scott Kostyshak [mailto:skost...@princeton.edu] 
Sent: Thursday, May 31, 2012 11:36 AM
To: Lam Phung Khanh; lyx-users@lists.lyx.org
Subject: RE: LyX cannot handle '$' sign in Sweave code chunk

From: Lam Phung Khanh [la...@oucru.org]
Sent: Wednesday, May 30, 2012 10:54 PM

Note that I used knitr to test this, not Sweave. knitr is newer, has
more features, and can do everything that Sweave can and a lot more. To
use it, add the module Rnw (knitr) instead of Sweave. Is there a reason
you want to use Sweave?

I got error: LyX: cannot convert file when compiled it. My suspect is
LyX cannot handle the '$' sign in Sweave code chunk. When I used
another way to write the last code line, it worked fine:

I don't think this is a LyX or a knitr error but a problem with your R
code. R gives me the following error:

a - c(1:10)
b - c(11:20)
d - cbind(a, b)
d$a
Error in d$a : $ operator is invalid for atomic vectors

The following runs fine for me in R and in LyX + knitr

a - c(1:10)
b - c(11:20)
d - data.frame(a, b)
d$a

Please forgive me if this email disturbs you.
Of course not! Feel free to ask any question about LyX + knitr.

Scott


RE: LyX cannot handle '$' sign in Sweave code chunk

2012-05-31 Thread Scott Kostyshak
From: Lam Phung Khanh [la...@oucru.org]
Sent: Thursday, May 31, 2012 2:37 AM

Thank you very much for your response. Sorry because I did not check
carefully my R code.

An easy way to check your R code is to export it from LyX by file  export  
R/S code

I've heard about knitr several weeks ago but haven't tried it yet
because Sweave is somehow more familiar to me; however, I intend to try
it in near future.

Your Sweave code should work unchanged with knitr. The transition is very easy, 
but I understand your hesitation.

Scott

Re: Problem compiling document to Postscript

2012-05-31 Thread Guenter Milde
On 2012-05-30, Påvel Nicklasson wrote:

 [-- Type: text/plain, Encoding:  --]

 I managed to get a postscript file once from Kubuntu, but then I tried
 again LyX refused. I have converted images to .eps and sometimes back to
 jpg when the log states that it stopped at those images and still no luck
 converting to postscript.

 In Windows I have done the conversion several times without any problems. I
 am beginning to suspect that it is a bug in the software handling the
 process or in how memory is handled by the different systems. The file is
 rather big with many big images so perhaps this is the problem.

 I must be content with the postscript file made in Windows and I don't
 think that I am able to solve the problem on Kubuntu. As I said it is very
 strange since I can convert other very similar big manuscripts that also
 contain a lot of jpg images.

You may also create a PDF file and convert it to PS later.

For the error hunt, try to split the problematic document into two - run
each to see if it works, repeat for the not running one, ...
Or put the images into note boxes until compiling works to find out which
one(s) is/are problematic. Create a minimal¹ example for a problematic file
and post it here

¹ throw out everything not required to (re)create the error.


Günter



Unable to change the page style using Memoir

2012-05-31 Thread Fabio Sobral
Hello,

I'm new to LyX and TeX and while searching for resources about document
styling I came across several tutorials. One of them explained how to use
fancyhdr, which worked perfectly using the book document class.
Later I came across these blog posts:
http://hstuart.dk/2007/05/21/styling-the-chapter/
http://hstuart.dk/2007/06/12/styling-the-page-footer-and-header/

So I started using the document class to book (Memoir) to style the
chapters as described in the fist blog spot, but for some reason I can't
style the page header.
Changing the page layout using Document  Settings  Page layout doesn't
work either, it always end up using the plain header style.

I tried using fancyhdr again, but it doesn't work. Apparently the memoir
document class already includes an implementation of it or something like
that.


I'm using Windows XP SP3 and LyX 2.0.3.

This is my local layout:

Style Chapterstar

Copystyle Chapter

LatexName chapterstar

LabelType Top_Environment

LabelString Unnumbered chapter

LabelFont

Series Bold

Size LARGE

EndFont

End



This is my preamble:
%used by the cover
\usepackage{graphicx}

% T1 Helvetica scaled
\usepackage[T1]{fontenc}
\usepackage[scaled]{helvet}
\renewcommand*{\familydefault}{\sfdefault}

% Chapter style
\usepackage{xcolor,calc}

\makechapterstyle{combined}{
  \setlength{\beforechapskip}{30pt}
  \setlength{\midchapskip}{-60pt}
  \setlength{\afterchapskip}{60pt}
  \renewcommand*{\printchaptername}{}

\renewcommand*{\chapnumfont}{\normalfont\sffamily\bfseries\fontsize{80}{0}\selectfont}

\renewcommand*{\printchapternum}{\flushright\chapnumfont\textcolor[rgb]{.64,.79,.87}{\thechapter}}
  \renewcommand*{\chaptitlefont}{\normalfont\sffamily\Huge\bfseries}
  \renewcommand*{\printchaptertitle}[1]{%
\raggedright\chaptitlefont\parbox[t]{\textwidth-3cm}{\raggedright##1}}
}

\chapterstyle{combined}

% Code listing
\usepackage{listings,color}

\definecolor{dkgreen}{RGB}{63,127,95}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{light-gray}{rgb}{0.925,0.925,0.925}
\definecolor{mauve}{RGB}{127,0,85}

 \lstset{
language=Java,
backgroundcolor=\color{light-gray},
 basicstyle=\footnotesize\ttfamily,
 numbers=left,
 numberstyle=\tiny,
 numbersep=5pt,
 tabsize=2,
 extendedchars=true,
 breaklines=true,
 keywordstyle=\color{mauve}\textbf,
 frame=b,
 commentstyle=\color{dkgreen},
 stringstyle=\color{blue},
 showspaces=false,
 showtabs=false,
 xleftmargin=17pt,
 framexleftmargin=17pt,
 framexrightmargin=5pt,
 framexbottommargin=4pt,
 showstringspaces=false
 }
 \lstloadlanguages{
 %[Visual]Basic
 %Pascal
 %C
 %C++
 %XML
 %HTML
 Java
 }
%\DeclareCaptionFont{blue}{\color{blue}}

%\captionsetup[lstlisting]{singlelinecheck=false, labelfont={blue},
textfont={blue}}
\usepackage{caption}
\DeclareCaptionFont{white}{\color{white}}
\DeclareCaptionFormat{listing}{\colorbox[cmyk]{0.43, 0.35,
0.35,0.01}{\parbox{\textwidth}{\hspace{15pt}#1#2#3}}}
\captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white,
singlelinecheck=false, margin=0pt, font={bf,footnotesize}}

% New style chapter star, so we can have unumbered chapters to show in ToC
\newcommand{\tocchap}[1]{\addcontentsline{toc}{chapter}{\protect\numberline
{}#1}\markboth{\textsc{#1}}{\textsc{#1}}\thispagestyle{plain}}
\newcommand{\chapterstar}[1]{\chapter*{#1}\tocchap{#1}}

% Sections are not numbered
\setcounter{secnumdepth}{0}

% Vertical gap between paragraphs
\setlength{\parskip}{\medskipamount}


Thanks in advance,

Fabio.


Re: R: Re: Re: Help needed

2012-05-31 Thread ajac
Paul A. Rubin rubin at msu.edu writes:

 
 Try using the MiKTeX package manager to install the mathpazo package.
 
 Paul
 
 


Hey I just had the same problem and the missing package was indeed mathpazo. 
Installing it from Miktex package manager fixed it!!

Thanks!
ajac



Re: Unable to change the page style using Memoir

2012-05-31 Thread stefano franchi
Hi Fabio,

On Thu, May 31, 2012 at 5:53 PM, Fabio Sobral flsob...@gmail.com wrote:
 Hello,

 I'm new to LyX and TeX and while searching for resources about document
 styling I came across several tutorials. One of them explained how to use
 fancyhdr, which worked perfectly using the book document class.
 Later I came across these blog posts:
 http://hstuart.dk/2007/05/21/styling-the-chapter/
 http://hstuart.dk/2007/06/12/styling-the-page-footer-and-header/

 So I started using the document class to book (Memoir) to style the
 chapters as described in the fist blog spot, but for some reason I can't
 style the page header.
 Changing the page layout using Document  Settings  Page layout doesn't
 work either, it always end up using the plain header style.

 I tried using fancyhdr again, but it doesn't work. Apparently the memoir
 document class already includes an implementation of it or something like
 that.

Exactly, memoir implements its own version of the fancyhdr package, so
you should use memoir facilities (in the preamble, or in a separate
config file you would load in your preamble). You may want to take a
look at section 7.2 of the memoir manual for a detailed discussion of
pagestyles.
A few pagestyle are predefined, and you can just load them with the
command \pagestyle. For instance, \pagestyle{headings} implements the
headings page style which does the following:

 The footer is empty. The header contains the folio at the outer side
of the page;
on verso pages the chapter name, number and title, in slanted
uppercase is set at the
spine margin and on recto pages the section number and uppercase title
is set by the
spine margin.

If none of the predefined style does what you want, you may define
your own (with the \makepagestyle command) and then load it with the
\pagestyle command. Section 7.3 of the manual provides a detailed
discussion of the \makepagestyle command.

Cheers,

Stefano


-- 
__
Stefano Franchi
Associate Research Professor
Department of Hispanic Studies            Ph:   +1 (979) 845-2125
Texas AM University                          Fax:  +1 (979) 845-6421
College Station, Texas, USA

stef...@tamu.edu
http://stefano.cleinias.org


RE: LyX cannot handle '$' sign in Sweave code chunk

2012-05-31 Thread Lam Phung Khanh
Thank you very much for your response. Sorry because I did not check
carefully my R code. 

I've heard about knitr several weeks ago but haven't tried it yet
because Sweave is somehow more familiar to me; however, I intend to try
it in near future.

Best regards, 

Lam PK

-Original Message-
From: Scott Kostyshak [mailto:skost...@princeton.edu] 
Sent: Thursday, May 31, 2012 11:36 AM
To: Lam Phung Khanh; lyx-users@lists.lyx.org
Subject: RE: LyX cannot handle '$' sign in Sweave code chunk

From: Lam Phung Khanh [la...@oucru.org]
Sent: Wednesday, May 30, 2012 10:54 PM

Note that I used knitr to test this, not Sweave. knitr is newer, has
more features, and can do everything that Sweave can and a lot more. To
use it, add the module Rnw (knitr) instead of Sweave. Is there a reason
you want to use Sweave?

I got error: LyX: cannot convert file when compiled it. My suspect is
LyX cannot handle the '$' sign in Sweave code chunk. When I used
another way to write the last code line, it worked fine:

I don't think this is a LyX or a knitr error but a problem with your R
code. R gives me the following error:

a - c(1:10)
b - c(11:20)
d - cbind(a, b)
d$a
Error in d$a : $ operator is invalid for atomic vectors

The following runs fine for me in R and in LyX + knitr

a - c(1:10)
b - c(11:20)
d - data.frame(a, b)
d$a

Please forgive me if this email disturbs you.
Of course not! Feel free to ask any question about LyX + knitr.

Scott


RE: LyX cannot handle '$' sign in Sweave code chunk

2012-05-31 Thread Scott Kostyshak
From: Lam Phung Khanh [la...@oucru.org]
Sent: Thursday, May 31, 2012 2:37 AM

Thank you very much for your response. Sorry because I did not check
carefully my R code.

An easy way to check your R code is to export it from LyX by file  export  
R/S code

I've heard about knitr several weeks ago but haven't tried it yet
because Sweave is somehow more familiar to me; however, I intend to try
it in near future.

Your Sweave code should work unchanged with knitr. The transition is very easy, 
but I understand your hesitation.

Scott

Re: Problem compiling document to Postscript

2012-05-31 Thread Guenter Milde
On 2012-05-30, Påvel Nicklasson wrote:

 [-- Type: text/plain, Encoding:  --]

 I managed to get a postscript file once from Kubuntu, but then I tried
 again LyX refused. I have converted images to .eps and sometimes back to
 jpg when the log states that it stopped at those images and still no luck
 converting to postscript.

 In Windows I have done the conversion several times without any problems. I
 am beginning to suspect that it is a bug in the software handling the
 process or in how memory is handled by the different systems. The file is
 rather big with many big images so perhaps this is the problem.

 I must be content with the postscript file made in Windows and I don't
 think that I am able to solve the problem on Kubuntu. As I said it is very
 strange since I can convert other very similar big manuscripts that also
 contain a lot of jpg images.

You may also create a PDF file and convert it to PS later.

For the error hunt, try to split the problematic document into two - run
each to see if it works, repeat for the not running one, ...
Or put the images into note boxes until compiling works to find out which
one(s) is/are problematic. Create a minimal¹ example for a problematic file
and post it here

¹ throw out everything not required to (re)create the error.


Günter



Unable to change the page style using Memoir

2012-05-31 Thread Fabio Sobral
Hello,

I'm new to LyX and TeX and while searching for resources about document
styling I came across several tutorials. One of them explained how to use
fancyhdr, which worked perfectly using the book document class.
Later I came across these blog posts:
http://hstuart.dk/2007/05/21/styling-the-chapter/
http://hstuart.dk/2007/06/12/styling-the-page-footer-and-header/

So I started using the document class to book (Memoir) to style the
chapters as described in the fist blog spot, but for some reason I can't
style the page header.
Changing the page layout using Document  Settings  Page layout doesn't
work either, it always end up using the plain header style.

I tried using fancyhdr again, but it doesn't work. Apparently the memoir
document class already includes an implementation of it or something like
that.


I'm using Windows XP SP3 and LyX 2.0.3.

This is my local layout:

Style Chapterstar

Copystyle Chapter

LatexName chapterstar

LabelType Top_Environment

LabelString Unnumbered chapter

LabelFont

Series Bold

Size LARGE

EndFont

End



This is my preamble:
%used by the cover
\usepackage{graphicx}

% T1 Helvetica scaled
\usepackage[T1]{fontenc}
\usepackage[scaled]{helvet}
\renewcommand*{\familydefault}{\sfdefault}

% Chapter style
\usepackage{xcolor,calc}

\makechapterstyle{combined}{
  \setlength{\beforechapskip}{30pt}
  \setlength{\midchapskip}{-60pt}
  \setlength{\afterchapskip}{60pt}
  \renewcommand*{\printchaptername}{}

\renewcommand*{\chapnumfont}{\normalfont\sffamily\bfseries\fontsize{80}{0}\selectfont}

\renewcommand*{\printchapternum}{\flushright\chapnumfont\textcolor[rgb]{.64,.79,.87}{\thechapter}}
  \renewcommand*{\chaptitlefont}{\normalfont\sffamily\Huge\bfseries}
  \renewcommand*{\printchaptertitle}[1]{%
\raggedright\chaptitlefont\parbox[t]{\textwidth-3cm}{\raggedright##1}}
}

\chapterstyle{combined}

% Code listing
\usepackage{listings,color}

\definecolor{dkgreen}{RGB}{63,127,95}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{light-gray}{rgb}{0.925,0.925,0.925}
\definecolor{mauve}{RGB}{127,0,85}

 \lstset{
language=Java,
backgroundcolor=\color{light-gray},
 basicstyle=\footnotesize\ttfamily,
 numbers=left,
 numberstyle=\tiny,
 numbersep=5pt,
 tabsize=2,
 extendedchars=true,
 breaklines=true,
 keywordstyle=\color{mauve}\textbf,
 frame=b,
 commentstyle=\color{dkgreen},
 stringstyle=\color{blue},
 showspaces=false,
 showtabs=false,
 xleftmargin=17pt,
 framexleftmargin=17pt,
 framexrightmargin=5pt,
 framexbottommargin=4pt,
 showstringspaces=false
 }
 \lstloadlanguages{
 %[Visual]Basic
 %Pascal
 %C
 %C++
 %XML
 %HTML
 Java
 }
%\DeclareCaptionFont{blue}{\color{blue}}

%\captionsetup[lstlisting]{singlelinecheck=false, labelfont={blue},
textfont={blue}}
\usepackage{caption}
\DeclareCaptionFont{white}{\color{white}}
\DeclareCaptionFormat{listing}{\colorbox[cmyk]{0.43, 0.35,
0.35,0.01}{\parbox{\textwidth}{\hspace{15pt}#1#2#3}}}
\captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white,
singlelinecheck=false, margin=0pt, font={bf,footnotesize}}

% New style chapter star, so we can have unumbered chapters to show in ToC
\newcommand{\tocchap}[1]{\addcontentsline{toc}{chapter}{\protect\numberline
{}#1}\markboth{\textsc{#1}}{\textsc{#1}}\thispagestyle{plain}}
\newcommand{\chapterstar}[1]{\chapter*{#1}\tocchap{#1}}

% Sections are not numbered
\setcounter{secnumdepth}{0}

% Vertical gap between paragraphs
\setlength{\parskip}{\medskipamount}


Thanks in advance,

Fabio.


Re: R: Re: Re: Help needed

2012-05-31 Thread ajac
Paul A. Rubin rubin at msu.edu writes:

 
 Try using the MiKTeX package manager to install the mathpazo package.
 
 Paul
 
 


Hey I just had the same problem and the missing package was indeed mathpazo. 
Installing it from Miktex package manager fixed it!!

Thanks!
ajac



Re: Unable to change the page style using Memoir

2012-05-31 Thread stefano franchi
Hi Fabio,

On Thu, May 31, 2012 at 5:53 PM, Fabio Sobral flsob...@gmail.com wrote:
 Hello,

 I'm new to LyX and TeX and while searching for resources about document
 styling I came across several tutorials. One of them explained how to use
 fancyhdr, which worked perfectly using the book document class.
 Later I came across these blog posts:
 http://hstuart.dk/2007/05/21/styling-the-chapter/
 http://hstuart.dk/2007/06/12/styling-the-page-footer-and-header/

 So I started using the document class to book (Memoir) to style the
 chapters as described in the fist blog spot, but for some reason I can't
 style the page header.
 Changing the page layout using Document  Settings  Page layout doesn't
 work either, it always end up using the plain header style.

 I tried using fancyhdr again, but it doesn't work. Apparently the memoir
 document class already includes an implementation of it or something like
 that.

Exactly, memoir implements its own version of the fancyhdr package, so
you should use memoir facilities (in the preamble, or in a separate
config file you would load in your preamble). You may want to take a
look at section 7.2 of the memoir manual for a detailed discussion of
pagestyles.
A few pagestyle are predefined, and you can just load them with the
command \pagestyle. For instance, \pagestyle{headings} implements the
headings page style which does the following:

 The footer is empty. The header contains the folio at the outer side
of the page;
on verso pages the chapter name, number and title, in slanted
uppercase is set at the
spine margin and on recto pages the section number and uppercase title
is set by the
spine margin.

If none of the predefined style does what you want, you may define
your own (with the \makepagestyle command) and then load it with the
\pagestyle command. Section 7.3 of the manual provides a detailed
discussion of the \makepagestyle command.

Cheers,

Stefano


-- 
__
Stefano Franchi
Associate Research Professor
Department of Hispanic Studies            Ph:   +1 (979) 845-2125
Texas AM University                          Fax:  +1 (979) 845-6421
College Station, Texas, USA

stef...@tamu.edu
http://stefano.cleinias.org


RE: LyX cannot handle '$' sign in Sweave code chunk

2012-05-31 Thread Lam Phung Khanh
Thank you very much for your response. Sorry because I did not check
carefully my R code. 

I've heard about knitr several weeks ago but haven't tried it yet
because Sweave is somehow more familiar to me; however, I intend to try
it in near future.

Best regards, 

Lam PK

-Original Message-
From: Scott Kostyshak [mailto:skost...@princeton.edu] 
Sent: Thursday, May 31, 2012 11:36 AM
To: Lam Phung Khanh; lyx-users@lists.lyx.org
Subject: RE: LyX cannot handle '$' sign in Sweave code chunk

From: Lam Phung Khanh [la...@oucru.org]
Sent: Wednesday, May 30, 2012 10:54 PM

Note that I used knitr to test this, not Sweave. knitr is newer, has
more features, and can do everything that Sweave can and a lot more. To
use it, add the module Rnw (knitr) instead of Sweave. Is there a reason
you want to use Sweave?

>I got error: "LyX: cannot convert file" when compiled it. My suspect is
LyX cannot handle the '$' sign in Sweave >code chunk. When I used
another way to write the last code line, it worked fine:

I don't think this is a LyX or a knitr error but a problem with your R
code. R gives me the following error:

a <- c(1:10)
b <- c(11:20)
d <- cbind(a, b)
d$a
Error in d$a : $ operator is invalid for atomic vectors

The following runs fine for me in R and in LyX + knitr

a <- c(1:10)
b <- c(11:20)
d <- data.frame(a, b)
d$a

>Please forgive me if this email disturbs you.
Of course not! Feel free to ask any question about LyX + knitr.

Scott


RE: LyX cannot handle '$' sign in Sweave code chunk

2012-05-31 Thread Scott Kostyshak
From: Lam Phung Khanh [la...@oucru.org]
Sent: Thursday, May 31, 2012 2:37 AM

>Thank you very much for your response. Sorry because I did not check
>carefully my R code.

An easy way to check your R code is to export it from LyX by file > export > 
R/S code

>I've heard about knitr several weeks ago but haven't tried it yet
>because Sweave is somehow more familiar to me; however, I intend to try
>it in near future.

Your Sweave code should work unchanged with knitr. The transition is very easy, 
but I understand your hesitation.

Scott

Re: Problem compiling document to Postscript

2012-05-31 Thread Guenter Milde
On 2012-05-30, Påvel Nicklasson wrote:

> [-- Type: text/plain, Encoding:  --]

> I managed to get a postscript file once from Kubuntu, but then I tried
> again LyX refused. I have converted images to .eps and sometimes back to
> jpg when the log states that it stopped at those images and still no luck
> converting to postscript.

> In Windows I have done the conversion several times without any problems. I
> am beginning to suspect that it is a bug in the software handling the
> process or in how memory is handled by the different systems. The file is
> rather big with many big images so perhaps this is the problem.

> I must be content with the postscript file made in Windows and I don't
> think that I am able to solve the problem on Kubuntu. As I said it is very
> strange since I can convert other very similar big manuscripts that also
> contain a lot of jpg images.

You may also create a PDF file and convert it to PS later.

For the error hunt, try to split the problematic document into two - run
each to see if it works, repeat for the not running one, ...
Or put the images into note boxes until compiling works to find out which
one(s) is/are problematic. Create a minimal¹ example for a problematic file
and post it here

¹ throw out everything not required to (re)create the error.


Günter



Unable to change the page style using Memoir

2012-05-31 Thread Fabio Sobral
Hello,

I'm new to LyX and TeX and while searching for resources about document
styling I came across several tutorials. One of them explained how to use
fancyhdr, which worked perfectly using the book document class.
Later I came across these blog posts:
http://hstuart.dk/2007/05/21/styling-the-chapter/
http://hstuart.dk/2007/06/12/styling-the-page-footer-and-header/

So I started using the document class to "book (Memoir)" to style the
chapters as described in the fist blog spot, but for some reason I can't
style the page header.
Changing the page layout using Document > Settings > Page layout doesn't
work either, it always end up using the "plain" header style.

I tried using fancyhdr again, but it doesn't work. Apparently the memoir
document class already includes an implementation of it or something like
that.


I'm using Windows XP SP3 and LyX 2.0.3.

This is my local layout:

Style Chapterstar

Copystyle Chapter

LatexName chapterstar

LabelType Top_Environment

LabelString "Unnumbered chapter"

LabelFont

Series Bold

Size LARGE

EndFont

End



This is my preamble:
%used by the cover
\usepackage{graphicx}

% T1 Helvetica scaled
\usepackage[T1]{fontenc}
\usepackage[scaled]{helvet}
\renewcommand*{\familydefault}{\sfdefault}

% Chapter style
\usepackage{xcolor,calc}

\makechapterstyle{combined}{
  \setlength{\beforechapskip}{30pt}
  \setlength{\midchapskip}{-60pt}
  \setlength{\afterchapskip}{60pt}
  \renewcommand*{\printchaptername}{}

\renewcommand*{\chapnumfont}{\normalfont\sffamily\bfseries\fontsize{80}{0}\selectfont}

\renewcommand*{\printchapternum}{\flushright\chapnumfont\textcolor[rgb]{.64,.79,.87}{\thechapter}}
  \renewcommand*{\chaptitlefont}{\normalfont\sffamily\Huge\bfseries}
  \renewcommand*{\printchaptertitle}[1]{%
\raggedright\chaptitlefont\parbox[t]{\textwidth-3cm}{\raggedright##1}}
}

\chapterstyle{combined}

% Code listing
\usepackage{listings,color}

\definecolor{dkgreen}{RGB}{63,127,95}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{light-gray}{rgb}{0.925,0.925,0.925}
\definecolor{mauve}{RGB}{127,0,85}

 \lstset{
language=Java,
backgroundcolor=\color{light-gray},
 basicstyle=\footnotesize\ttfamily,
 numbers=left,
 numberstyle=\tiny,
 numbersep=5pt,
 tabsize=2,
 extendedchars=true,
 breaklines=true,
 keywordstyle=\color{mauve}\textbf,
 frame=b,
 commentstyle=\color{dkgreen},
 stringstyle=\color{blue},
 showspaces=false,
 showtabs=false,
 xleftmargin=17pt,
 framexleftmargin=17pt,
 framexrightmargin=5pt,
 framexbottommargin=4pt,
 showstringspaces=false
 }
 \lstloadlanguages{
 %[Visual]Basic
 %Pascal
 %C
 %C++
 %XML
 %HTML
 Java
 }
%\DeclareCaptionFont{blue}{\color{blue}}

%\captionsetup[lstlisting]{singlelinecheck=false, labelfont={blue},
textfont={blue}}
\usepackage{caption}
\DeclareCaptionFont{white}{\color{white}}
\DeclareCaptionFormat{listing}{\colorbox[cmyk]{0.43, 0.35,
0.35,0.01}{\parbox{\textwidth}{\hspace{15pt}#1#2#3}}}
\captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white,
singlelinecheck=false, margin=0pt, font={bf,footnotesize}}

% New style chapter star, so we can have unumbered chapters to show in ToC
\newcommand{\tocchap}[1]{\addcontentsline{toc}{chapter}{\protect\numberline
{}#1}\markboth{\textsc{#1}}{\textsc{#1}}\thispagestyle{plain}}
\newcommand{\chapterstar}[1]{\chapter*{#1}\tocchap{#1}}

% Sections are not numbered
\setcounter{secnumdepth}{0}

% Vertical gap between paragraphs
\setlength{\parskip}{\medskipamount}


Thanks in advance,

Fabio.


Re: R: Re: Re: Help needed

2012-05-31 Thread ajac
Paul A. Rubin  msu.edu> writes:

> 
> Try using the MiKTeX package manager to install the mathpazo package.
> 
> Paul
> 
> 


Hey I just had the same problem and the missing package was indeed mathpazo. 
Installing it from Miktex package manager fixed it!!

Thanks!
ajac



Re: Unable to change the page style using Memoir

2012-05-31 Thread stefano franchi
Hi Fabio,

On Thu, May 31, 2012 at 5:53 PM, Fabio Sobral  wrote:
> Hello,
>
> I'm new to LyX and TeX and while searching for resources about document
> styling I came across several tutorials. One of them explained how to use
> fancyhdr, which worked perfectly using the book document class.
> Later I came across these blog posts:
> http://hstuart.dk/2007/05/21/styling-the-chapter/
> http://hstuart.dk/2007/06/12/styling-the-page-footer-and-header/
>
> So I started using the document class to "book (Memoir)" to style the
> chapters as described in the fist blog spot, but for some reason I can't
> style the page header.
> Changing the page layout using Document > Settings > Page layout doesn't
> work either, it always end up using the "plain" header style.
>
> I tried using fancyhdr again, but it doesn't work. Apparently the memoir
> document class already includes an implementation of it or something like
> that.

Exactly, memoir implements its own version of the fancyhdr package, so
you should use memoir facilities (in the preamble, or in a separate
config file you would load in your preamble). You may want to take a
look at section 7.2 of the memoir manual for a detailed discussion of
"pagestyles."
A few pagestyle are predefined, and you can just load them with the
command \pagestyle. For instance, \pagestyle{headings} implements the
"headings" page style which does the following:

 The footer is empty. The header contains the folio at the outer side
of the page;
on verso pages the chapter name, number and title, in slanted
uppercase is set at the
spine margin and on recto pages the section number and uppercase title
is set by the
spine margin.

If none of the predefined style does what you want, you may define
your own (with the \makepagestyle command) and then load it with the
\pagestyle command. Section 7.3 of the manual provides a detailed
discussion of the \makepagestyle command.

Cheers,

Stefano


-- 
__
Stefano Franchi
Associate Research Professor
Department of Hispanic Studies            Ph:   +1 (979) 845-2125
Texas A University                          Fax:  +1 (979) 845-6421
College Station, Texas, USA

stef...@tamu.edu
http://stefano.cleinias.org