Re: Chinese Characters in Lyx 2.02

2012-03-25 Thread Nicholas Martin
OK, I've now figured out how to write Chinese in Lyx 2.02. Apologies for all 
who have no interest in this whatsoever, but since a brief perusal of the forum 
shows that many have struggled with the same problem, and that much of the 
advice given in the forum is now outdated (due to the improvements since Lyx 
1.4, 1.5 etc.), I thought it might be helpful to share the instructions:

1. Write the following code into the Latex Preamble (Document -- Settings -- 
Latex Preamble ):
 
\usepackage{CJKutf8}
\usepackage[overlap, CJK]{ruby}
\newenvironment{SChinese}{%
\CJKfamily{gbsn}%
\CJKtilde
\CJKnospace}{}
\newcommand{\cntxt}[1]{\begin{CJK}{UTF8}{}\begin{SChinese}#1\end{SChinese}\end{CJK}}
 
 
2. Then, when you want to write Chinese in the text, do the following:
 
Open a Tex Box (in menu, 6th button from right). Into the Tex box then write 
the following command [replacing the characters below with whatever Chinese you 
want to write].
 
\begin{CJK}{UTF8}{}\begin{SChinese}整治\end{SChinese}\end{CJK}

Nicholas

On Mar 24, 2012, at 7:23 PM, Vincent van Ravesteijn wrote:

 Op 24-3-2012 11:02, Nicholas Martin schreef:
 
 Dear Lyx Community
 
 I'm currently using Lyx version 2.02 and am trying to create a text document 
 (mainly in English) that also contains a few Chinese characters. However, 
 having written my text, whenever I clicked on pdf viewer, the program said 
 it Could not find LaTeX command for character '整' (code point 0x548c) and 
 suggested I selected utf8 [i.e., Unicode] in Document -- Settings -- 
 Language -- Encoding and then try again. So I set Encoding to “Unicode 
 (utf8), but to no avail. I got exactly the same message. I then tried 
 Unicode (CJK) (utf8) and successively all the different unicode settings, 
 all without success. I also tried playing around with the various other 
 settings under Document -- Language (i.e., setting Language to Chinese, 
 choosing the different Language packages [default, automatic, always babel, 
 custom, none]), but all without success. Any suggestion what I could do? 
 
 Many thanks! 
 Nicholas
 
 
 Does this help you ? 
 
 http://wiki.lyx.org/LyX/Chinese
 
 Vincent




RE: Chinese Characters in Lyx 2.02

2012-03-25 Thread Scott Kostyshak
From: Nicholas Martin [nm...@mit.edu]
Sent: Sunday, March 25, 2012 3:23 AM

OK, I've now figured out how to write Chinese in Lyx 2.02. Apologies for all 
who have no interest in this whatsoever, but since a brief perusal of the 
forum shows that many have struggled with the same problem, and that much of 
the advice given in the forum is now outdated (due to the improvements since 
Lyx 1.4, 1.5 etc.), I thought it might be helpful to share the instructions:

1. Write the following code into the Latex Preamble (Document -- Settings -- 
Latex Preamble ):

\usepackage{CJKutf8}
\usepackage[overlap, CJK]{ruby}
\newenvironment{SChinese}{%
\CJKfamily{gbsn}%
\CJKtilde
\CJKnospace}{}
\newcommand{\cntxt}[1]{\begin{CJK}{UTF8}{}\begin{SChinese}#1\end{SChinese}\end{CJK}}


2. Then, when you want to write Chinese in the text, do the following:

Open a Tex Box (in menu, 6th button from right). Into the Tex box then write 
the following command [replacing the characters below with whatever Chinese 
you want to write].

\begin{CJK}{UTF8}{}\begin{SChinese}整治\end{SChinese}\end{CJK}

Great, thank you for posting the solution Nicholas!
If you have some time could you update the wiki page?
http://wiki.lyx.org/LyX/Chinese
It was last updated more than a year ago.
You don't need to sign up for a user name or anything.

Best,

Scott


memoir book templates

2012-03-25 Thread Artimess
Hi all,

I do appreciate if one can tell me if there exist a Lyx template for memoir
book  class and if yes, where can I find it.

Thanks

AB


Difficulty viewing pdf output

2012-03-25 Thread Art Edwards
I receive the following error message:

Could not display /tmp/lyx_tmpdir.T25823/lyx_tmpbuf2/MRS_2012.pdf

The location is not a folder.

The pdf file exists and is viewable, just not using the view button in lyx.

I tried using the -dgb debug switch from the command line, but this
introduced what appeared to be spurious errors.. no generation of pdf.

Any help would be appreciated.

Art Edwards


Re: memoir book templates

2012-03-25 Thread stefano franchi
On Sun, Mar 25, 2012 at 4:51 AM, Artimess artim...@gmail.com wrote:
 Hi all,

 I do appreciate if one can tell me if there exist a Lyx template for memoir
 book  class and if yes, where can I find it.

I don't believe so, but why would you need one? What are you trying to do?
I use memoir all the times, and I always start with a new document and
set the class to book(memoir) in DocumentSettings.

Is there any specific memoir configuration you would have to use a template for?

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: Chinese Characters in Lyx 2.02

2012-03-25 Thread Vincent van Ravesteijn

Op 25-3-2012 9:23, Nicholas Martin schreef:
OK, I've now figured out how to write Chinese in Lyx 2.02. Apologies 
for all who have no interest in this whatsoever, but since a brief 
perusal of the forum shows that many have struggled with the same 
problem, and that much of the advice given in the forum is now 
outdated (due to the improvements since Lyx 1.4, 1.5 etc.), I thought 
it might be helpful to share the instructions:


1. Write the following code into the Latex Preamble (Document 
--Settings --Latex Preamble ):

\usepackage{CJKutf8}
\usepackage[overlap, CJK]{ruby}
\newenvironment{SChinese}{%
\CJKfamily{gbsn}%
\CJKtilde
\CJKnospace}{}
\newcommand{\cntxt}[1]{\begin{CJK}{UTF8}{}\begin{SChinese}#1\end{SChinese}\end{CJK}}
2. Then, when you want to write Chinese in the text, do the following:
Open a Tex Box (in menu, 6^th button from right). Into the Tex box 
then write the following command [replacing the characters below with 
whatever Chinese you want to write].

\begin{CJK}{UTF8}{}\begin{SChinese}整治\end{SChinese}\end{CJK}

Nicholas

On Mar 24, 2012, at 7:23 PM, Vincent van Ravesteijn wrote:


Op 24-3-2012 11:02, Nicholas Martin schreef:

Dear Lyx Community

I'm currently using Lyx version 2.02 and am trying to create a text 
document (mainly in English) that also contains a few Chinese 
characters. However, having written my text, whenever I clicked on 
pdf viewer, the program said it Could not find LaTeX command for 
character '整' (code point 0x548c) and suggested I selected utf8 
[i.e., Unicode] in Document -- Settings -- Language -- Encoding 
and then try again. So I set Encoding to “Unicode (utf8), but to no 
avail. I got exactly the same message. I then tried Unicode (CJK) 
(utf8) and successively all the different unicode settings, all 
without success. I also tried playing around with the various other 
settings under Document -- Language (i.e., setting Language to 
Chinese, choosing the different Language packages [default, 
automatic, always babel, custom, none]), but all without success. 
Any suggestion what I could do?


Many thanks!
Nicholas



Does this help you ?

http://wiki.lyx.org/LyX/Chinese

Vincent




I tried again the instructions from this wiki page (which I wrote myself 
by the way), and it still works for me.


On which platform are you ?  If you are at Windows, you need to make 
sure that MikTeX has installed the packages has installed cjk and 
arphic. Then you need to refresh the filename database of MikTeX.


I'll try cjk-fonts and XeTeX as well.

Vincent



lyx change environment with keyboard

2012-03-25 Thread John Carbone
Much in the way that the tab key iterates over section levels:

Part - Chapter - Section - Subsection - Subsubsection - Paragraph
- Subparagraph

I would like to do the same thing for my requirements, see code below.
For example, pressing a key or key sequence on keyboard Requirement1
would change the level to Requirement2, and so on. 

Is this possible? Or, is it possible to change a key binding dependant
on the Style within a .layout file?

 

 

Counter requirementCnt
LabelString  Requirement: \arabic{requirementCnt}.
End

Counter subrequirementCnt
Within   requirementCnt
End

Counter subsubrequirementCnt
Within   subrequirementCnt
End

Counter subsubsubrequirementCnt
Within   subsubrequirementCnt
End

Style RequirementList
  Category  Requirement
  KeepEmpty 1
  MarginDynamic
  LatexType Command
  LatexName listofrequirement
  ParIndent MM
  Align Block
  AlignPossible Block
  LabelType Static
  LabelString   --- Requirement List ---
  LabelFont
SizeNormal
Color   Blue
  EndFont
End

AddToPreamble
%%%
% Preamble
%%%
\usepackage{tocloft}
\usepackage{nameref}
\usepackage{refstyle}
\newcommand{\listrequirementname}{List of Requirements}

\newref{req}{%refcmd={#1~Requirement:~\ref{#1},~`\nameref{#1}'}
name = {Requirement~},
names = {Requirement~},
Name = {Requirement~},
Names = {Requirement~},
rngtxt = \RSrngtxt,
lsttwotxt = \RSlsttxt,
lsttxt = \RSlsttxt
}

\newlistof{requirement}{req}{\listrequirementname}
EndPreamble

Style Requirement1
Category  Requirement
RefPrefix req
TocLevel  0
LatexType Command
LatexName requirement
LabelType Counter
LabelCounter  requirementCnt
LabelString   Requirement \arabic{requirementCnt}: 
OptionalArgs 1

LabelSep  xxx
ParSep0.7
MarginDynamic
Font
Series  Bold
EndFont
Preamble
\makeatletter
\newcommand{\requirement}[1]{%
 \def\@currentlabelname{#1}
 \refstepcounter{requirement}
 \par\noindent\textbf{Requirement \therequirement: #1}
 
\addcontentsline{req}{requirement}{\protect\numberline{\therequirement}#
1}
}
\makeatother

\setcounter{reqdepth}{1}
EndPreamble
End

Style Requirement2
Category  Requirement
RefPrefix req
TocLevel  1
LatexType Command
LatexName subrequirement
LabelType Counter

LabelCounter  subrequirementCnt
LabelString   Requirement
\arabic{requirementCnt}.\arabic{subrequirementCnt}: 
OptionalArgs 1

LabelSep  xxx
ParSep0.7
MarginDynamic
Font
Series  Bold
EndFont
Preamble
\makeatletter
\newlistentry[requirement]{subrequirement}{req}{1}
\newcommand{\subrequirement}[1]{%
 \def\@currentlabelname{#1}
 \refstepcounter{subrequirement}
 \par\noindent\textbf{Requirement \thesubrequirement: #1}
 
\addcontentsline{req}{subrequirement}{\protect\numberline{\thesubrequire
ment}#1}
}
\makeatother

\setcounter{reqdepth}{2}
EndPreamble
End


Style Requirement3
Category  Requirement
RefPrefix req
TocLevel  2
LatexType Command
LatexName subsubrequirement
LabelType Counter

LabelCounter  subsubrequirementCnt
LabelString   Requirement
\arabic{requirementCnt}.\arabic{subrequirementCnt}.\arabic{subsubrequire
mentCnt}: 
OptionalArgs 1

LabelSep  xxx
ParSep0.7
MarginDynamic
Font
Series  Bold
EndFont
Preamble
\makeatletter
\newlistentry[subrequirement]{subsubrequirement}{req}{1}
\newcommand{\subsubrequirement}[1]{%
 \def\@currentlabelname{#1}
 \refstepcounter{subsubrequirement}
 \par\noindent\textbf{Requirement \thesubsubrequirement: #1}
 
\addcontentsline{req}{subsubrequirement}{\protect\numberline{\thesubsubr
equirement}#1}
}
\makeatother

\setcounter{reqdepth}{3}
EndPreamble
End

Style Requirement4
Category  Requirement
RefPrefix req
TocLevel  3
LatexType Command
LatexName subsubsubrequirement
LabelType Counter

LabelCounter  subsubsubrequirementCnt
LabelString   Requirement
\arabic{requirementCnt}.\arabic{subrequirementCnt}.\arabic{subsubrequire
mentCnt}.\arabic{subsubrequirementCnt}: 
OptionalArgs 1

LabelSep  xxx
ParSep0.7
MarginDynamic
Font
Series  Bold
EndFont
Preamble
\makeatletter
\newlistentry[subsubrequirement]{subsubsubrequirement}{req}{1}
\cftsetindents{subsubsubrequirement}{1.5em}{3.0em}

Re: Difficulty viewing pdf output

2012-03-25 Thread Paul A . Rubin
Art Edwards edwardsa at icantbelieveimdoingthis.com writes:

 
 Could not display /tmp/lyx_tmpdir.T25823/lyx_tmpbuf2/MRS_2012.pdf
 
 The location is not a folder.
 
 The pdf file exists and is viewable, just not using the view button in lyx.
 

Just to be clear, you're saying that if you do View  PDF or View  PDF
(pdflatex) in LyX, you find the aforenamed PDF file in the LyX buffer directory,
and you can open it manually in your preferred viewer, but LyX reports the
quoted error message?  That being the case, if you look at Tools  Preferences 
File Handling  File Formats and select the appropriate (say, PDF (pdflatex)),
is the Viewer field set correctly?

Paul



Re: Chinese Characters in Lyx 2.02

2012-03-25 Thread Nicholas Martin
OK, I've now figured out how to write Chinese in Lyx 2.02. Apologies for all 
who have no interest in this whatsoever, but since a brief perusal of the forum 
shows that many have struggled with the same problem, and that much of the 
advice given in the forum is now outdated (due to the improvements since Lyx 
1.4, 1.5 etc.), I thought it might be helpful to share the instructions:

1. Write the following code into the Latex Preamble (Document -- Settings -- 
Latex Preamble ):
 
\usepackage{CJKutf8}
\usepackage[overlap, CJK]{ruby}
\newenvironment{SChinese}{%
\CJKfamily{gbsn}%
\CJKtilde
\CJKnospace}{}
\newcommand{\cntxt}[1]{\begin{CJK}{UTF8}{}\begin{SChinese}#1\end{SChinese}\end{CJK}}
 
 
2. Then, when you want to write Chinese in the text, do the following:
 
Open a Tex Box (in menu, 6th button from right). Into the Tex box then write 
the following command [replacing the characters below with whatever Chinese you 
want to write].
 
\begin{CJK}{UTF8}{}\begin{SChinese}整治\end{SChinese}\end{CJK}

Nicholas

On Mar 24, 2012, at 7:23 PM, Vincent van Ravesteijn wrote:

 Op 24-3-2012 11:02, Nicholas Martin schreef:
 
 Dear Lyx Community
 
 I'm currently using Lyx version 2.02 and am trying to create a text document 
 (mainly in English) that also contains a few Chinese characters. However, 
 having written my text, whenever I clicked on pdf viewer, the program said 
 it Could not find LaTeX command for character '整' (code point 0x548c) and 
 suggested I selected utf8 [i.e., Unicode] in Document -- Settings -- 
 Language -- Encoding and then try again. So I set Encoding to “Unicode 
 (utf8), but to no avail. I got exactly the same message. I then tried 
 Unicode (CJK) (utf8) and successively all the different unicode settings, 
 all without success. I also tried playing around with the various other 
 settings under Document -- Language (i.e., setting Language to Chinese, 
 choosing the different Language packages [default, automatic, always babel, 
 custom, none]), but all without success. Any suggestion what I could do? 
 
 Many thanks! 
 Nicholas
 
 
 Does this help you ? 
 
 http://wiki.lyx.org/LyX/Chinese
 
 Vincent




RE: Chinese Characters in Lyx 2.02

2012-03-25 Thread Scott Kostyshak
From: Nicholas Martin [nm...@mit.edu]
Sent: Sunday, March 25, 2012 3:23 AM

OK, I've now figured out how to write Chinese in Lyx 2.02. Apologies for all 
who have no interest in this whatsoever, but since a brief perusal of the 
forum shows that many have struggled with the same problem, and that much of 
the advice given in the forum is now outdated (due to the improvements since 
Lyx 1.4, 1.5 etc.), I thought it might be helpful to share the instructions:

1. Write the following code into the Latex Preamble (Document -- Settings -- 
Latex Preamble ):

\usepackage{CJKutf8}
\usepackage[overlap, CJK]{ruby}
\newenvironment{SChinese}{%
\CJKfamily{gbsn}%
\CJKtilde
\CJKnospace}{}
\newcommand{\cntxt}[1]{\begin{CJK}{UTF8}{}\begin{SChinese}#1\end{SChinese}\end{CJK}}


2. Then, when you want to write Chinese in the text, do the following:

Open a Tex Box (in menu, 6th button from right). Into the Tex box then write 
the following command [replacing the characters below with whatever Chinese 
you want to write].

\begin{CJK}{UTF8}{}\begin{SChinese}整治\end{SChinese}\end{CJK}

Great, thank you for posting the solution Nicholas!
If you have some time could you update the wiki page?
http://wiki.lyx.org/LyX/Chinese
It was last updated more than a year ago.
You don't need to sign up for a user name or anything.

Best,

Scott


memoir book templates

2012-03-25 Thread Artimess
Hi all,

I do appreciate if one can tell me if there exist a Lyx template for memoir
book  class and if yes, where can I find it.

Thanks

AB


Difficulty viewing pdf output

2012-03-25 Thread Art Edwards
I receive the following error message:

Could not display /tmp/lyx_tmpdir.T25823/lyx_tmpbuf2/MRS_2012.pdf

The location is not a folder.

The pdf file exists and is viewable, just not using the view button in lyx.

I tried using the -dgb debug switch from the command line, but this
introduced what appeared to be spurious errors.. no generation of pdf.

Any help would be appreciated.

Art Edwards


Re: memoir book templates

2012-03-25 Thread stefano franchi
On Sun, Mar 25, 2012 at 4:51 AM, Artimess artim...@gmail.com wrote:
 Hi all,

 I do appreciate if one can tell me if there exist a Lyx template for memoir
 book  class and if yes, where can I find it.

I don't believe so, but why would you need one? What are you trying to do?
I use memoir all the times, and I always start with a new document and
set the class to book(memoir) in DocumentSettings.

Is there any specific memoir configuration you would have to use a template for?

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: Chinese Characters in Lyx 2.02

2012-03-25 Thread Vincent van Ravesteijn

Op 25-3-2012 9:23, Nicholas Martin schreef:
OK, I've now figured out how to write Chinese in Lyx 2.02. Apologies 
for all who have no interest in this whatsoever, but since a brief 
perusal of the forum shows that many have struggled with the same 
problem, and that much of the advice given in the forum is now 
outdated (due to the improvements since Lyx 1.4, 1.5 etc.), I thought 
it might be helpful to share the instructions:


1. Write the following code into the Latex Preamble (Document 
--Settings --Latex Preamble ):

\usepackage{CJKutf8}
\usepackage[overlap, CJK]{ruby}
\newenvironment{SChinese}{%
\CJKfamily{gbsn}%
\CJKtilde
\CJKnospace}{}
\newcommand{\cntxt}[1]{\begin{CJK}{UTF8}{}\begin{SChinese}#1\end{SChinese}\end{CJK}}
2. Then, when you want to write Chinese in the text, do the following:
Open a Tex Box (in menu, 6^th button from right). Into the Tex box 
then write the following command [replacing the characters below with 
whatever Chinese you want to write].

\begin{CJK}{UTF8}{}\begin{SChinese}整治\end{SChinese}\end{CJK}

Nicholas

On Mar 24, 2012, at 7:23 PM, Vincent van Ravesteijn wrote:


Op 24-3-2012 11:02, Nicholas Martin schreef:

Dear Lyx Community

I'm currently using Lyx version 2.02 and am trying to create a text 
document (mainly in English) that also contains a few Chinese 
characters. However, having written my text, whenever I clicked on 
pdf viewer, the program said it Could not find LaTeX command for 
character '整' (code point 0x548c) and suggested I selected utf8 
[i.e., Unicode] in Document -- Settings -- Language -- Encoding 
and then try again. So I set Encoding to “Unicode (utf8), but to no 
avail. I got exactly the same message. I then tried Unicode (CJK) 
(utf8) and successively all the different unicode settings, all 
without success. I also tried playing around with the various other 
settings under Document -- Language (i.e., setting Language to 
Chinese, choosing the different Language packages [default, 
automatic, always babel, custom, none]), but all without success. 
Any suggestion what I could do?


Many thanks!
Nicholas



Does this help you ?

http://wiki.lyx.org/LyX/Chinese

Vincent




I tried again the instructions from this wiki page (which I wrote myself 
by the way), and it still works for me.


On which platform are you ?  If you are at Windows, you need to make 
sure that MikTeX has installed the packages has installed cjk and 
arphic. Then you need to refresh the filename database of MikTeX.


I'll try cjk-fonts and XeTeX as well.

Vincent



lyx change environment with keyboard

2012-03-25 Thread John Carbone
Much in the way that the tab key iterates over section levels:

Part - Chapter - Section - Subsection - Subsubsection - Paragraph
- Subparagraph

I would like to do the same thing for my requirements, see code below.
For example, pressing a key or key sequence on keyboard Requirement1
would change the level to Requirement2, and so on. 

Is this possible? Or, is it possible to change a key binding dependant
on the Style within a .layout file?

 

 

Counter requirementCnt
LabelString  Requirement: \arabic{requirementCnt}.
End

Counter subrequirementCnt
Within   requirementCnt
End

Counter subsubrequirementCnt
Within   subrequirementCnt
End

Counter subsubsubrequirementCnt
Within   subsubrequirementCnt
End

Style RequirementList
  Category  Requirement
  KeepEmpty 1
  MarginDynamic
  LatexType Command
  LatexName listofrequirement
  ParIndent MM
  Align Block
  AlignPossible Block
  LabelType Static
  LabelString   --- Requirement List ---
  LabelFont
SizeNormal
Color   Blue
  EndFont
End

AddToPreamble
%%%
% Preamble
%%%
\usepackage{tocloft}
\usepackage{nameref}
\usepackage{refstyle}
\newcommand{\listrequirementname}{List of Requirements}

\newref{req}{%refcmd={#1~Requirement:~\ref{#1},~`\nameref{#1}'}
name = {Requirement~},
names = {Requirement~},
Name = {Requirement~},
Names = {Requirement~},
rngtxt = \RSrngtxt,
lsttwotxt = \RSlsttxt,
lsttxt = \RSlsttxt
}

\newlistof{requirement}{req}{\listrequirementname}
EndPreamble

Style Requirement1
Category  Requirement
RefPrefix req
TocLevel  0
LatexType Command
LatexName requirement
LabelType Counter
LabelCounter  requirementCnt
LabelString   Requirement \arabic{requirementCnt}: 
OptionalArgs 1

LabelSep  xxx
ParSep0.7
MarginDynamic
Font
Series  Bold
EndFont
Preamble
\makeatletter
\newcommand{\requirement}[1]{%
 \def\@currentlabelname{#1}
 \refstepcounter{requirement}
 \par\noindent\textbf{Requirement \therequirement: #1}
 
\addcontentsline{req}{requirement}{\protect\numberline{\therequirement}#
1}
}
\makeatother

\setcounter{reqdepth}{1}
EndPreamble
End

Style Requirement2
Category  Requirement
RefPrefix req
TocLevel  1
LatexType Command
LatexName subrequirement
LabelType Counter

LabelCounter  subrequirementCnt
LabelString   Requirement
\arabic{requirementCnt}.\arabic{subrequirementCnt}: 
OptionalArgs 1

LabelSep  xxx
ParSep0.7
MarginDynamic
Font
Series  Bold
EndFont
Preamble
\makeatletter
\newlistentry[requirement]{subrequirement}{req}{1}
\newcommand{\subrequirement}[1]{%
 \def\@currentlabelname{#1}
 \refstepcounter{subrequirement}
 \par\noindent\textbf{Requirement \thesubrequirement: #1}
 
\addcontentsline{req}{subrequirement}{\protect\numberline{\thesubrequire
ment}#1}
}
\makeatother

\setcounter{reqdepth}{2}
EndPreamble
End


Style Requirement3
Category  Requirement
RefPrefix req
TocLevel  2
LatexType Command
LatexName subsubrequirement
LabelType Counter

LabelCounter  subsubrequirementCnt
LabelString   Requirement
\arabic{requirementCnt}.\arabic{subrequirementCnt}.\arabic{subsubrequire
mentCnt}: 
OptionalArgs 1

LabelSep  xxx
ParSep0.7
MarginDynamic
Font
Series  Bold
EndFont
Preamble
\makeatletter
\newlistentry[subrequirement]{subsubrequirement}{req}{1}
\newcommand{\subsubrequirement}[1]{%
 \def\@currentlabelname{#1}
 \refstepcounter{subsubrequirement}
 \par\noindent\textbf{Requirement \thesubsubrequirement: #1}
 
\addcontentsline{req}{subsubrequirement}{\protect\numberline{\thesubsubr
equirement}#1}
}
\makeatother

\setcounter{reqdepth}{3}
EndPreamble
End

Style Requirement4
Category  Requirement
RefPrefix req
TocLevel  3
LatexType Command
LatexName subsubsubrequirement
LabelType Counter

LabelCounter  subsubsubrequirementCnt
LabelString   Requirement
\arabic{requirementCnt}.\arabic{subrequirementCnt}.\arabic{subsubrequire
mentCnt}.\arabic{subsubrequirementCnt}: 
OptionalArgs 1

LabelSep  xxx
ParSep0.7
MarginDynamic
Font
Series  Bold
EndFont
Preamble
\makeatletter
\newlistentry[subsubrequirement]{subsubsubrequirement}{req}{1}
\cftsetindents{subsubsubrequirement}{1.5em}{3.0em}

Re: Difficulty viewing pdf output

2012-03-25 Thread Paul A . Rubin
Art Edwards edwardsa at icantbelieveimdoingthis.com writes:

 
 Could not display /tmp/lyx_tmpdir.T25823/lyx_tmpbuf2/MRS_2012.pdf
 
 The location is not a folder.
 
 The pdf file exists and is viewable, just not using the view button in lyx.
 

Just to be clear, you're saying that if you do View  PDF or View  PDF
(pdflatex) in LyX, you find the aforenamed PDF file in the LyX buffer directory,
and you can open it manually in your preferred viewer, but LyX reports the
quoted error message?  That being the case, if you look at Tools  Preferences 
File Handling  File Formats and select the appropriate (say, PDF (pdflatex)),
is the Viewer field set correctly?

Paul



Re: Chinese Characters in Lyx 2.02

2012-03-25 Thread Nicholas Martin
OK, I've now figured out how to write Chinese in Lyx 2.02. Apologies for all 
who have no interest in this whatsoever, but since a brief perusal of the forum 
shows that many have struggled with the same problem, and that much of the 
advice given in the forum is now outdated (due to the improvements since Lyx 
1.4, 1.5 etc.), I thought it might be helpful to share the instructions:

1. Write the following code into the Latex Preamble (Document --> Settings --> 
Latex Preamble ):
 
\usepackage{CJKutf8}
\usepackage[overlap, CJK]{ruby}
\newenvironment{SChinese}{%
\CJKfamily{gbsn}%
\CJKtilde
\CJKnospace}{}
\newcommand{\cntxt}[1]{\begin{CJK}{UTF8}{}\begin{SChinese}#1\end{SChinese}\end{CJK}}
 
 
2. Then, when you want to write Chinese in the text, do the following:
 
Open a Tex Box (in menu, 6th button from right). Into the Tex box then write 
the following command [replacing the characters below with whatever Chinese you 
want to write].
 
\begin{CJK}{UTF8}{}\begin{SChinese}整治\end{SChinese}\end{CJK}

Nicholas

On Mar 24, 2012, at 7:23 PM, Vincent van Ravesteijn wrote:

> Op 24-3-2012 11:02, Nicholas Martin schreef:
>> 
>> Dear Lyx Community
>> 
>> I'm currently using Lyx version 2.02 and am trying to create a text document 
>> (mainly in English) that also contains a few Chinese characters. However, 
>> having written my text, whenever I clicked on pdf viewer, the program said 
>> it "Could not find LaTeX command for character '整' (code point 0x548c) and 
>> suggested I selected utf8 [i.e., Unicode] in Document --> Settings --> 
>> Language --> Encoding and then try again. So I set Encoding to “Unicode 
>> (utf8)", but to no avail. I got exactly the same message. I then tried 
>> "Unicode (CJK) (utf8)" and successively all the different unicode settings, 
>> all without success. I also tried playing around with the various other 
>> settings under Document --> Language (i.e., setting Language to Chinese, 
>> choosing the different Language packages [default, automatic, always babel, 
>> custom, none]), but all without success. Any suggestion what I could do? 
>> 
>> Many thanks! 
>> Nicholas
>> 
>> 
> Does this help you ? 
> 
> http://wiki.lyx.org/LyX/Chinese
> 
> Vincent




RE: Chinese Characters in Lyx 2.02

2012-03-25 Thread Scott Kostyshak
From: Nicholas Martin [nm...@mit.edu]
Sent: Sunday, March 25, 2012 3:23 AM

>OK, I've now figured out how to write Chinese in Lyx 2.02. Apologies for all 
>who have no interest in >this whatsoever, but since a brief perusal of the 
>forum shows that many have struggled with the same >problem, and that much of 
>the advice given in the forum is now outdated (due to the improvements since 
>>Lyx 1.4, 1.5 etc.), I thought it might be helpful to share the instructions:

>1. Write the following code into the Latex Preamble (Document --> Settings --> 
>Latex Preamble ):

>\usepackage{CJKutf8}
>\usepackage[overlap, CJK]{ruby}
>\newenvironment{SChinese}{%
>\CJKfamily{gbsn}%
>\CJKtilde
>\CJKnospace}{}
>\newcommand{\cntxt}[1]{\begin{CJK}{UTF8}{}\begin{SChinese}#1\end{SChinese}\end{CJK}}


>2. Then, when you want to write Chinese in the text, do the following:

>Open a Tex Box (in menu, 6th button from right). Into the Tex box then write 
>the following command >[replacing the characters below with whatever Chinese 
>you want to write].

>\begin{CJK}{UTF8}{}\begin{SChinese}整治\end{SChinese}\end{CJK}

Great, thank you for posting the solution Nicholas!
If you have some time could you update the wiki page?
http://wiki.lyx.org/LyX/Chinese
It was last updated more than a year ago.
You don't need to sign up for a user name or anything.

Best,

Scott


memoir book templates

2012-03-25 Thread Artimess
Hi all,

I do appreciate if one can tell me if there exist a Lyx template for memoir
book  class and if yes, where can I find it.

Thanks

AB


Difficulty viewing pdf output

2012-03-25 Thread Art Edwards
I receive the following error message:

Could not display "/tmp/lyx_tmpdir.T25823/lyx_tmpbuf2/MRS_2012.pdf"

The location is not a folder.

The pdf file exists and is viewable, just not using the view button in lyx.

I tried using the -dgb debug switch from the command line, but this
introduced what appeared to be spurious errors.. no generation of pdf.

Any help would be appreciated.

Art Edwards


Re: memoir book templates

2012-03-25 Thread stefano franchi
On Sun, Mar 25, 2012 at 4:51 AM, Artimess  wrote:
> Hi all,
>
> I do appreciate if one can tell me if there exist a Lyx template for memoir
> book  class and if yes, where can I find it.

I don't believe so, but why would you need one? What are you trying to do?
I use memoir all the times, and I always start with a new document and
set the class to book(memoir) in Document>>Settings.

Is there any specific memoir configuration you would have to use a template for?

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


Re: Chinese Characters in Lyx 2.02

2012-03-25 Thread Vincent van Ravesteijn

Op 25-3-2012 9:23, Nicholas Martin schreef:
OK, I've now figured out how to write Chinese in Lyx 2.02. Apologies 
for all who have no interest in this whatsoever, but since a brief 
perusal of the forum shows that many have struggled with the same 
problem, and that much of the advice given in the forum is now 
outdated (due to the improvements since Lyx 1.4, 1.5 etc.), I thought 
it might be helpful to share the instructions:


1. Write the following code into the Latex Preamble (Document 
-->Settings -->Latex Preamble ):

\usepackage{CJKutf8}
\usepackage[overlap, CJK]{ruby}
\newenvironment{SChinese}{%
\CJKfamily{gbsn}%
\CJKtilde
\CJKnospace}{}
\newcommand{\cntxt}[1]{\begin{CJK}{UTF8}{}\begin{SChinese}#1\end{SChinese}\end{CJK}}
2. Then, when you want to write Chinese in the text, do the following:
Open a Tex Box (in menu, 6^th button from right). Into the Tex box 
then write the following command [replacing the characters below with 
whatever Chinese you want to write].

\begin{CJK}{UTF8}{}\begin{SChinese}整治\end{SChinese}\end{CJK}

Nicholas

On Mar 24, 2012, at 7:23 PM, Vincent van Ravesteijn wrote:


Op 24-3-2012 11:02, Nicholas Martin schreef:

Dear Lyx Community

I'm currently using Lyx version 2.02 and am trying to create a text 
document (mainly in English) that also contains a few Chinese 
characters. However, having written my text, whenever I clicked on 
pdf viewer, the program said it "Could not find LaTeX command for 
character '整' (code point 0x548c) and suggested I selected utf8 
[i.e., Unicode] in Document --> Settings --> Language --> Encoding 
and then try again. So I set Encoding to “Unicode (utf8)", but to no 
avail. I got exactly the same message. I then tried "Unicode (CJK) 
(utf8)" and successively all the different unicode settings, all 
without success. I also tried playing around with the various other 
settings under Document --> Language (i.e., setting Language to 
Chinese, choosing the different Language packages [default, 
automatic, always babel, custom, none]), but all without success. 
Any suggestion what I could do?


Many thanks!
Nicholas



Does this help you ?

http://wiki.lyx.org/LyX/Chinese

Vincent




I tried again the instructions from this wiki page (which I wrote myself 
by the way), and it still works for me.


On which platform are you ?  If you are at Windows, you need to make 
sure that MikTeX has installed the packages has installed "cjk" and 
"arphic". Then you need to refresh the filename database of MikTeX.


I'll try "cjk-fonts" and XeTeX as well.

Vincent



lyx change environment with keyboard

2012-03-25 Thread John Carbone
Much in the way that the tab key iterates over section levels:

Part -> Chapter -> Section -> Subsection -> Subsubsection -> Paragraph
-> Subparagraph

I would like to do the same thing for my requirements, see code below.
For example, pressing a key or key sequence on keyboard "Requirement1"
would change the level to "Requirement2", and so on. 

Is this possible? Or, is it possible to change a key binding dependant
on the "Style" within a ".layout" file?

 

 

Counter requirementCnt
LabelString  "Requirement: \arabic{requirementCnt}."
End

Counter subrequirementCnt
Within   requirementCnt
End

Counter subsubrequirementCnt
Within   subrequirementCnt
End

Counter subsubsubrequirementCnt
Within   subsubrequirementCnt
End

Style RequirementList
  Category  Requirement
  KeepEmpty 1
  MarginDynamic
  LatexType Command
  LatexName listofrequirement
  ParIndent MM
  Align Block
  AlignPossible Block
  LabelType Static
  LabelString   "--- Requirement List ---"
  LabelFont
SizeNormal
Color   Blue
  EndFont
End

AddToPreamble
%%%
% Preamble
%%%
\usepackage{tocloft}
\usepackage{nameref}
\usepackage{refstyle}
\newcommand{\listrequirementname}{List of Requirements}

\newref{req}{%refcmd={#1~Requirement:~\ref{#1},~`\nameref{#1}'}
name = {Requirement~},
names = {Requirement~},
Name = {Requirement~},
Names = {Requirement~},
rngtxt = \RSrngtxt,
lsttwotxt = \RSlsttxt,
lsttxt = \RSlsttxt
}

\newlistof{requirement}{req}{\listrequirementname}
EndPreamble

Style Requirement1
Category  Requirement
RefPrefix req
TocLevel  0
LatexType Command
LatexName requirement
LabelType Counter
LabelCounter  requirementCnt
LabelString   "Requirement \arabic{requirementCnt}: "
OptionalArgs 1

LabelSep  xxx
ParSep0.7
MarginDynamic
Font
Series  Bold
EndFont
Preamble
\makeatletter
\newcommand{\requirement}[1]{%
 \def\@currentlabelname{#1}
 \refstepcounter{requirement}
 \par\noindent\textbf{Requirement \therequirement: #1}
 
\addcontentsline{req}{requirement}{\protect\numberline{\therequirement}#
1}
}
\makeatother

\setcounter{reqdepth}{1}
EndPreamble
End

Style Requirement2
Category  Requirement
RefPrefix req
TocLevel  1
LatexType Command
LatexName subrequirement
LabelType Counter

LabelCounter  subrequirementCnt
LabelString   "Requirement
\arabic{requirementCnt}.\arabic{subrequirementCnt}: "
OptionalArgs 1

LabelSep  xxx
ParSep0.7
MarginDynamic
Font
Series  Bold
EndFont
Preamble
\makeatletter
\newlistentry[requirement]{subrequirement}{req}{1}
\newcommand{\subrequirement}[1]{%
 \def\@currentlabelname{#1}
 \refstepcounter{subrequirement}
 \par\noindent\textbf{Requirement \thesubrequirement: #1}
 
\addcontentsline{req}{subrequirement}{\protect\numberline{\thesubrequire
ment}#1}
}
\makeatother

\setcounter{reqdepth}{2}
EndPreamble
End


Style Requirement3
Category  Requirement
RefPrefix req
TocLevel  2
LatexType Command
LatexName subsubrequirement
LabelType Counter

LabelCounter  subsubrequirementCnt
LabelString   "Requirement
\arabic{requirementCnt}.\arabic{subrequirementCnt}.\arabic{subsubrequire
mentCnt}: "
OptionalArgs 1

LabelSep  xxx
ParSep0.7
MarginDynamic
Font
Series  Bold
EndFont
Preamble
\makeatletter
\newlistentry[subrequirement]{subsubrequirement}{req}{1}
\newcommand{\subsubrequirement}[1]{%
 \def\@currentlabelname{#1}
 \refstepcounter{subsubrequirement}
 \par\noindent\textbf{Requirement \thesubsubrequirement: #1}
 
\addcontentsline{req}{subsubrequirement}{\protect\numberline{\thesubsubr
equirement}#1}
}
\makeatother

\setcounter{reqdepth}{3}
EndPreamble
End

Style Requirement4
Category  Requirement
RefPrefix req
TocLevel  3
LatexType Command
LatexName subsubsubrequirement
LabelType Counter

LabelCounter  subsubsubrequirementCnt
LabelString   "Requirement
\arabic{requirementCnt}.\arabic{subrequirementCnt}.\arabic{subsubrequire
mentCnt}.\arabic{subsubrequirementCnt}: "
OptionalArgs 1

LabelSep  xxx
ParSep0.7
MarginDynamic
Font
Series  Bold
EndFont
Preamble
\makeatletter
\newlistentry[subsubrequirement]{subsubsubrequirement}{req}{1}
\cftsetindents{subsubsubrequirement}{1.5em}{3.0em}

Re: Difficulty viewing pdf output

2012-03-25 Thread Paul A . Rubin
Art Edwards  icantbelieveimdoingthis.com> writes:

> 
> Could not display "/tmp/lyx_tmpdir.T25823/lyx_tmpbuf2/MRS_2012.pdf"
> 
> The location is not a folder.
> 
> The pdf file exists and is viewable, just not using the view button in lyx.
> 

Just to be clear, you're saying that if you do View > PDF or View > PDF
(pdflatex) in LyX, you find the aforenamed PDF file in the LyX buffer directory,
and you can open it manually in your preferred viewer, but LyX reports the
quoted error message?  That being the case, if you look at Tools > Preferences >
File Handling > File Formats and select the appropriate (say, PDF (pdflatex)),
is the Viewer field set correctly?

Paul