Re: Footer in Koma letter - \lfoot - \cfoot - \rfoot

2014-06-24 Thread Ross Reyes


On 6/23/2014 11:37 PM, Charlie wrote:

In:
Debian Jessie
using:
Lyx Version 2.0.6

I wanted to put a horizontal line and beneath it a custom footer, that
has the three elements:

\lfoot - \cfoot - \rfoot


This is what I use for my header/footer construction in the preamble

 \usepackage{graphics}
\usepackage{fancyhdr}
\lhead{\resizebox{0.44in}{!}{\includegraphics{A_Logo.jpg}}}
\chead{Your Name, town, USA, 484-xxx-}
\rhead{\resizebox{0.44in}{!}{\includegraphics{B_Logo.jpg}}}
\lfoot{Company, Inc. - Proprietary and Confidential}
\cfoot{}
\rfoot{\thepage}
\let\oldmaketitle=\maketitle
\def\maketitle{\oldmaketitle\thispagestyle{fancy}}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}





Re: Footer in Koma letter - \lfoot - \cfoot - \rfoot

2014-06-24 Thread Charlie
On Tue, 24 Jun 2014 07:49:22 -0400
Ross Reyes philip_...@yahoo.com wrote:

 
 On 6/23/2014 11:37 PM, Charlie wrote:
  In:
  Debian Jessie
  using:
  Lyx Version 2.0.6
 
  I wanted to put a horizontal line and beneath it a custom footer,
  that has the three elements:
 
  \lfoot - \cfoot - \rfoot
 
 This is what I use for my header/footer construction in the preamble
 
   \usepackage{graphics}
 \usepackage{fancyhdr}
 \lhead{\resizebox{0.44in}{!}{\includegraphics{A_Logo.jpg}}}
 \chead{Your Name, town, USA, 484-xxx-}
 \rhead{\resizebox{0.44in}{!}{\includegraphics{B_Logo.jpg}}}
 \lfoot{Company, Inc. - Proprietary and Confidential}
 \cfoot{}
 \rfoot{\thepage}
 \let\oldmaketitle=\maketitle
 \def\maketitle{\oldmaketitle\thispagestyle{fancy}}
 \renewcommand{\headrulewidth}{0.4pt}
 \renewcommand{\footrulewidth}{0.4pt}
 

Thanks Ross.

I have the header covered and the rest of the text doesn't do anything,
though left the text in the \lfoot and added text into the \cfoot and
the \rfoot.

There was no output at all.

 I think that would work in an article template but not in the letter
 one. I actually tried several variations of this and came up blank or
 received error messages from some attempts.

Thank you.
Charlie
-- 
Registered Linux User:- 329524
***

The keeping of bees is like the direction of
sunbeams. Henry David Thoreau

***

Debian GNU/Linux - just the best way to create magic

-


Re: Custom module: inset for mdframed boxes

2014-06-24 Thread Jürgen Spitzmüller
2014-06-19 10:36 GMT+02:00 Matthieu:

 Dear Lyx users list

 I would like to use the mdframed package in Lyx, which offers nice boxes.
 In its simplest form, mdframed is just used with (see below for
 reproduciible latex code):

 \begin{mdframed}
  A box
 \end{mdframed}

 Eventually with [frametitle=A title]

 I was trying to create a Lyx inset for this, made it somehow, but this is
 a very rough draft, and I would appreciate any help, in particular:
 -how to give the new inset a feeling of box?


Add

 Decoration classic

to the InsetLayout definition.


 -For the title of the box, the user needs to add herself: frametitle=A
 title Ideally, one would not need to do this... is this avoidable in Lyx
 (make him add automatically frametitle=), or does one need to rewrite
 slightly the environment mdframed?


Currently keyval syntax is not natively supported. So users either need to
enter the keyval syntax completely, or you need to rewrite the mdframed
environment.

-More generally, I choose to use it as a custom inset, but could have done
 defining it as a new style.. is this choice sound?


Yes, looks completely sane.

Jürgen



 Thanks!!

 ###
 #Lyx module:
 ###

 #\DeclareLyXModule[mdframed.sty]{MD frame}
 #DescriptionBegin
 # Try to use package mdframed
 #DescriptionEnd

 Format 49

 InsetLayout Flex:MDbox
LyXType custom
LatexName   mdframed
LatexType   Environment
LabelString Md frame
Requiresmdframed
LabelFont
Color   blue
Sizelarge
EndFont
MultiPartrue
HTMLStyle
 div.Frameless { margin: 1em; }
EndHTMLStyle
Preamble
\usepackage{mdframed}
   EndPreamble
   Argument 1
 LabelStringBox Title, write: frametitle=AA
 TooltipEnter the box title here
 Mandatory  0
 Decoration conglomerate
 Font
   Colorblue
   Size large
 EndFont
 AutoInsert 1
   EndArgument
 End

 
 #LaTeX minimal mdframed:
 

 \documentclass[a4paper,10pt]{article}
 \usepackage{mdframed}

 \begin{document}

 \begin{mdframed}
  A box
 \end{mdframed}

 And

 \begin{mdframed}[frametitle=A title]
  A box
 \end{mdframed}

 \end{document}





Re: Footer in Koma letter - \lfoot - \cfoot - \rfoot

2014-06-24 Thread Jean-Marie Pacquet

Le 24/06/2014 05:37, Charlie a écrit :

In:
Debian Jessie
using:
Lyx Version 2.0.6

I wanted to put a horizontal line and beneath it a custom footer, that
has the three elements:

\lfoot - \cfoot - \rfoot

So that I can place three different names and address details onto the
first page of the document.


Hi Charlie,

Which version of KomaScript are you using?
On a recent version of the user's guide (scrguien.pdf dated 2012-05-15.) 
, there is an example (at the end of section 4.10, page 178) of a first 
page footer with 2 columns (left and right). It won't be very difficult 
to add a center column.


--
Jean-Marie



Re: enumitem cloned lists

2014-06-24 Thread Richard Heck

On 06/24/2014 01:16 AM, S Shieh wrote:
I cloned, to use the terminology of the enumitem package 
documentation section 7, a new itemize list and put it in the LaTeX 
preamble of my Lyx file:



\newlist{emptydisplay}{itemize}{1}
\setlist[emptydisplay]{label={}, itemindent=1em, align=left, labelsep=!}

Now I can use this new itemize list by putting, e.g., the following in 
an ERT box:


\begin{emptydisplay}
\item The inventor of bifocals wrote an autobiography
\item The first post-master general of the US wrote an autobiography
\end{emptydisplay}

Is there a way of making this new list a Lyx style, so I can apply it 
just as I apply Quote, Enumerate-Resume, etc.?  I suspect this might 
involve modifying a layout file, or, even the enumitem module, is that 
right? And if so, are there instructions somewhere for doing this?


Chapter 5 of the Customization manual contains the documention for this. 
But the best way to figure it out, really, is just to open the 
enumitem.module file and try to mimic what is there.As for where to do 
that, you can either (i) copy enumitem.module to your local user layout 
directory (e.g., $HOME/.lyx/layouts/) and then modify it; or (ii) create 
a new module of your own in that directory (remember to reconfigure 
after you create file); or (iii) put the layout code into Document 
Settings Local Layout. Which you do depends upon how you intend to use it.


Something like this should work as a new module (for 2.1.x):

#\DeclareLyXModule[enumitem.sty]{More Customisable Lists}
#DescriptionBegin
# Additional customizable lists
#DescriptionEnd

#Requires: enumitem

Format 49

Style EmptyDisplay
CopyStyle Itemize
OptionalArgs 0
LatexName emptydisplay
Preamble
\newlist{emptydisplay}{itemize}{1}
\setlist[emptydisplay]{label={}, itemindent=1em, align=left, labelsep=!}
EndPreamble
End

Or you can put the bit starting with Format 49 into Local Layout.

You'll still get the bullet in LyX with this, since I just copied 
Itemize. You can presumably get rid of that, if you want, by changing 
the LabelType. But I'll leave that kind of customization to you.


Richard




APA with a Table of Contents: Losing the subparagaph in the ToC

2014-06-24 Thread John Kane
Yes I know, APA Style does not have a Table of Contents. However I ran into
a request for setting up one in a word processor (AOO Writer) a day or so
ago and it occurred to me that it might be possible in LyX.
If you have a look at the attached LyX file, so far I seem to have managed
to get a ToC for 4 of the 5 levels of headings. Can anyone point out why I
am not getting the subparagraph text to appear in the ToC?
I suspect I am making some trivial mistake but it is not obvious to me.

-- 
John Kane
Kingston ON Canada


APA.TOC.lyx
Description: application/lyx


Re: Footer in Koma letter - \lfoot - \cfoot - \rfoot

2014-06-24 Thread Jean-Marie Pacquet

Le 24/06/2014 16:20, Jean-Marie Pacquet a écrit :

[...] It won't be very difficult to add a center column.

If you have a 2.9x version of KomaScript (like me) the following 
modified example will do what you want. If your version is  3.x you 
should replace the first line \firstfoot{% with 
\setkomavar{firstfoot}{%.

All this has to be inserted in your .lco parameter file.


% Define a new letter foot

\firstfoot{%
  \parbox[t]{\textwidth}{\footnotesize
\rule{\linewidth}{2pt}
\begin{tabular}[t]{l@{}}%
  \multicolumn{1}{@{}l@{}}{Partners:}\\
  Jim Smith\\
  Russ Mayer
\end{tabular}%
\hfill
\begin{tabular}[t]{l@{}}%
  \multicolumn{1}{@{}l@{}}{Banks:}\\
  Citigroup\\
  Deutsche Bank
\end{tabular}%
\hfill
\begin{tabular}[t]{l@{}}%
  \multicolumn{1}{@{}l@{}}{Manager:}\\
  Jane Fonda\\[1ex]
  \multicolumn{1}{@{}l@{}}{Court Of Jurisdiction:}\\
  Great Plains
\end{tabular}%
\ifkomavarempty{frombank}{}{%
  \hfill
  \begin{tabular}[t]{l@{}}%
\multicolumn{1}{@{}l@{}}{\usekomavar*{frombank}:}\\
\usekomavar{frombank}
  \end{tabular}%
}%
  }%
}

Cheers
--
Jean-Marie


Re: APA with a Table of Contents: Losing the subparagaph in the ToC

2014-06-24 Thread Jacob Bishop
Hi John,

A couple of things. First, you have included the knitr and
short-inset-names modules in the document, which as far as I can tell are
not used for this minimal example. I removed them since I'm not yet set up
to work with those. This shouldn't cause any problems, but I thought I'd
mention it in case.

As a disclaimer, I am not exactly sure what I'm doing, but when I opened up
the apa.cls file and searched for paragraph and subparagraph, I found:
\renewcommand{\paragraph}{\@startsection{paragraph}{4}{\parindent}%
{0\baselineskip \@plus 0.2ex \@minus 0.2ex}%
{-1em}%
{\normalfont\normalsize\bfseries\itshape\addperi}}

\renewcommand{\subparagraph}[1]{\@startsection{subparagraph}{5}{1em}%
{0\baselineskip \@plus 0.2ex \@minus 0.2ex}%
{-\z@\relax}%

{\normalfont\normalsize\itshape\hspace{\parindent}{#1}\textit{.}}{\relax}}

The thing is, with the document you sent, the paragraph part is working,
but the subparagraph part is not. So, if we use a little trial-and-error to
put them together, I end up with the following, which seems to work if you
paste it into your preamble (under Document-Settings-LaTeX Preamble).


\renewcommand{\subparagraph}{\@startsection{subparagraph}{5}{\parindent}%

{0\baselineskip \@plus 0.2ex \@minus 0.2ex}%

{-1em}%

{\normalfont\normalsize\itshape\addperi}}


As a disclaimer, I'm not actually sure what I've done there, and it could
break something else, but it seems to work for me...maybe somebody who
understands things better can provide more insight. I hope this helps.

Jacob


Re: Footer in Koma letter - \lfoot - \cfoot - \rfoot

2014-06-24 Thread Charlie
On Tue, 24 Jun 2014 21:29:59 +0200
Jean-Marie Pacquet j...@pacquet.net wrote:

 Le 24/06/2014 16:20, Jean-Marie Pacquet a écrit :
  [...] It won't be very difficult to add a center column.
 
 If you have a 2.9x version of KomaScript (like me) the following 
 modified example will do what you want. If your version is  3.x you 
 should replace the first line \firstfoot{% with 
 \setkomavar{firstfoot}{%.
 All this has to be inserted in your .lco parameter file.
 
 
 % Define a new letter foot
 
 \firstfoot{%
\parbox[t]{\textwidth}{\footnotesize
  \rule{\linewidth}{2pt}
  \begin{tabular}[t]{l@{}}%
\multicolumn{1}{@{}l@{}}{Partners:}\\
Jim Smith\\
Russ Mayer
  \end{tabular}%
  \hfill
  \begin{tabular}[t]{l@{}}%
\multicolumn{1}{@{}l@{}}{Banks:}\\
Citigroup\\
Deutsche Bank
  \end{tabular}%
  \hfill
  \begin{tabular}[t]{l@{}}%
\multicolumn{1}{@{}l@{}}{Manager:}\\
Jane Fonda\\[1ex]
\multicolumn{1}{@{}l@{}}{Court Of Jurisdiction:}\\
Great Plains
  \end{tabular}%
  \ifkomavarempty{frombank}{}{%
\hfill
\begin{tabular}[t]{l@{}}%
  \multicolumn{1}{@{}l@{}}{\usekomavar*{frombank}:}\\
  \usekomavar{frombank}
\end{tabular}%
  }%
}%
 }
 
 Cheers

Thank you Jean-Marie,

The first example you pointed me to on page 178 works, and I was working
on tweaking it, and then I saw you had sent this email, which works
perfectly.

I feel like such an idiot. My only excuse is that I had looked on the
net and through other documentation that I didn't fine that reference
in the scrguien.pdf.

It's not unusual for me to go the hard way first.

I did look through the scrguien.pdf that you have directed me to in the
past and I've got in my LyX information file, but maybe I was already
overloaded with footnote information? I really have no excuse.

Anyway, as ever, and as previously thank you for your help and taking
the time to create the result. It's much appreciated and works
a treat.

Thank you once again.

Stay well,
Charlie

-- 
Registered Linux User:- 329524
***

The smallest seed of faith is better than the largest fruit of
happiness. .Henry David Thoreau

***

Debian GNU/Linux - just the best way to create magic

-


Re: Footer in Koma letter - \lfoot - \cfoot - \rfoot

2014-06-24 Thread Ross Reyes


On 6/23/2014 11:37 PM, Charlie wrote:

In:
Debian Jessie
using:
Lyx Version 2.0.6

I wanted to put a horizontal line and beneath it a custom footer, that
has the three elements:

\lfoot - \cfoot - \rfoot


This is what I use for my header/footer construction in the preamble

 \usepackage{graphics}
\usepackage{fancyhdr}
\lhead{\resizebox{0.44in}{!}{\includegraphics{A_Logo.jpg}}}
\chead{Your Name, town, USA, 484-xxx-}
\rhead{\resizebox{0.44in}{!}{\includegraphics{B_Logo.jpg}}}
\lfoot{Company, Inc. - Proprietary and Confidential}
\cfoot{}
\rfoot{\thepage}
\let\oldmaketitle=\maketitle
\def\maketitle{\oldmaketitle\thispagestyle{fancy}}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}





Re: Footer in Koma letter - \lfoot - \cfoot - \rfoot

2014-06-24 Thread Charlie
On Tue, 24 Jun 2014 07:49:22 -0400
Ross Reyes philip_...@yahoo.com wrote:

 
 On 6/23/2014 11:37 PM, Charlie wrote:
  In:
  Debian Jessie
  using:
  Lyx Version 2.0.6
 
  I wanted to put a horizontal line and beneath it a custom footer,
  that has the three elements:
 
  \lfoot - \cfoot - \rfoot
 
 This is what I use for my header/footer construction in the preamble
 
   \usepackage{graphics}
 \usepackage{fancyhdr}
 \lhead{\resizebox{0.44in}{!}{\includegraphics{A_Logo.jpg}}}
 \chead{Your Name, town, USA, 484-xxx-}
 \rhead{\resizebox{0.44in}{!}{\includegraphics{B_Logo.jpg}}}
 \lfoot{Company, Inc. - Proprietary and Confidential}
 \cfoot{}
 \rfoot{\thepage}
 \let\oldmaketitle=\maketitle
 \def\maketitle{\oldmaketitle\thispagestyle{fancy}}
 \renewcommand{\headrulewidth}{0.4pt}
 \renewcommand{\footrulewidth}{0.4pt}
 

Thanks Ross.

I have the header covered and the rest of the text doesn't do anything,
though left the text in the \lfoot and added text into the \cfoot and
the \rfoot.

There was no output at all.

 I think that would work in an article template but not in the letter
 one. I actually tried several variations of this and came up blank or
 received error messages from some attempts.

Thank you.
Charlie
-- 
Registered Linux User:- 329524
***

The keeping of bees is like the direction of
sunbeams. Henry David Thoreau

***

Debian GNU/Linux - just the best way to create magic

-


Re: Custom module: inset for mdframed boxes

2014-06-24 Thread Jürgen Spitzmüller
2014-06-19 10:36 GMT+02:00 Matthieu:

 Dear Lyx users list

 I would like to use the mdframed package in Lyx, which offers nice boxes.
 In its simplest form, mdframed is just used with (see below for
 reproduciible latex code):

 \begin{mdframed}
  A box
 \end{mdframed}

 Eventually with [frametitle=A title]

 I was trying to create a Lyx inset for this, made it somehow, but this is
 a very rough draft, and I would appreciate any help, in particular:
 -how to give the new inset a feeling of box?


Add

 Decoration classic

to the InsetLayout definition.


 -For the title of the box, the user needs to add herself: frametitle=A
 title Ideally, one would not need to do this... is this avoidable in Lyx
 (make him add automatically frametitle=), or does one need to rewrite
 slightly the environment mdframed?


Currently keyval syntax is not natively supported. So users either need to
enter the keyval syntax completely, or you need to rewrite the mdframed
environment.

-More generally, I choose to use it as a custom inset, but could have done
 defining it as a new style.. is this choice sound?


Yes, looks completely sane.

Jürgen



 Thanks!!

 ###
 #Lyx module:
 ###

 #\DeclareLyXModule[mdframed.sty]{MD frame}
 #DescriptionBegin
 # Try to use package mdframed
 #DescriptionEnd

 Format 49

 InsetLayout Flex:MDbox
LyXType custom
LatexName   mdframed
LatexType   Environment
LabelString Md frame
Requiresmdframed
LabelFont
Color   blue
Sizelarge
EndFont
MultiPartrue
HTMLStyle
 div.Frameless { margin: 1em; }
EndHTMLStyle
Preamble
\usepackage{mdframed}
   EndPreamble
   Argument 1
 LabelStringBox Title, write: frametitle=AA
 TooltipEnter the box title here
 Mandatory  0
 Decoration conglomerate
 Font
   Colorblue
   Size large
 EndFont
 AutoInsert 1
   EndArgument
 End

 
 #LaTeX minimal mdframed:
 

 \documentclass[a4paper,10pt]{article}
 \usepackage{mdframed}

 \begin{document}

 \begin{mdframed}
  A box
 \end{mdframed}

 And

 \begin{mdframed}[frametitle=A title]
  A box
 \end{mdframed}

 \end{document}





Re: Footer in Koma letter - \lfoot - \cfoot - \rfoot

2014-06-24 Thread Jean-Marie Pacquet

Le 24/06/2014 05:37, Charlie a écrit :

In:
Debian Jessie
using:
Lyx Version 2.0.6

I wanted to put a horizontal line and beneath it a custom footer, that
has the three elements:

\lfoot - \cfoot - \rfoot

So that I can place three different names and address details onto the
first page of the document.


Hi Charlie,

Which version of KomaScript are you using?
On a recent version of the user's guide (scrguien.pdf dated 2012-05-15.) 
, there is an example (at the end of section 4.10, page 178) of a first 
page footer with 2 columns (left and right). It won't be very difficult 
to add a center column.


--
Jean-Marie



Re: enumitem cloned lists

2014-06-24 Thread Richard Heck

On 06/24/2014 01:16 AM, S Shieh wrote:
I cloned, to use the terminology of the enumitem package 
documentation section 7, a new itemize list and put it in the LaTeX 
preamble of my Lyx file:



\newlist{emptydisplay}{itemize}{1}
\setlist[emptydisplay]{label={}, itemindent=1em, align=left, labelsep=!}

Now I can use this new itemize list by putting, e.g., the following in 
an ERT box:


\begin{emptydisplay}
\item The inventor of bifocals wrote an autobiography
\item The first post-master general of the US wrote an autobiography
\end{emptydisplay}

Is there a way of making this new list a Lyx style, so I can apply it 
just as I apply Quote, Enumerate-Resume, etc.?  I suspect this might 
involve modifying a layout file, or, even the enumitem module, is that 
right? And if so, are there instructions somewhere for doing this?


Chapter 5 of the Customization manual contains the documention for this. 
But the best way to figure it out, really, is just to open the 
enumitem.module file and try to mimic what is there.As for where to do 
that, you can either (i) copy enumitem.module to your local user layout 
directory (e.g., $HOME/.lyx/layouts/) and then modify it; or (ii) create 
a new module of your own in that directory (remember to reconfigure 
after you create file); or (iii) put the layout code into Document 
Settings Local Layout. Which you do depends upon how you intend to use it.


Something like this should work as a new module (for 2.1.x):

#\DeclareLyXModule[enumitem.sty]{More Customisable Lists}
#DescriptionBegin
# Additional customizable lists
#DescriptionEnd

#Requires: enumitem

Format 49

Style EmptyDisplay
CopyStyle Itemize
OptionalArgs 0
LatexName emptydisplay
Preamble
\newlist{emptydisplay}{itemize}{1}
\setlist[emptydisplay]{label={}, itemindent=1em, align=left, labelsep=!}
EndPreamble
End

Or you can put the bit starting with Format 49 into Local Layout.

You'll still get the bullet in LyX with this, since I just copied 
Itemize. You can presumably get rid of that, if you want, by changing 
the LabelType. But I'll leave that kind of customization to you.


Richard




APA with a Table of Contents: Losing the subparagaph in the ToC

2014-06-24 Thread John Kane
Yes I know, APA Style does not have a Table of Contents. However I ran into
a request for setting up one in a word processor (AOO Writer) a day or so
ago and it occurred to me that it might be possible in LyX.
If you have a look at the attached LyX file, so far I seem to have managed
to get a ToC for 4 of the 5 levels of headings. Can anyone point out why I
am not getting the subparagraph text to appear in the ToC?
I suspect I am making some trivial mistake but it is not obvious to me.

-- 
John Kane
Kingston ON Canada


APA.TOC.lyx
Description: application/lyx


Re: Footer in Koma letter - \lfoot - \cfoot - \rfoot

2014-06-24 Thread Jean-Marie Pacquet

Le 24/06/2014 16:20, Jean-Marie Pacquet a écrit :

[...] It won't be very difficult to add a center column.

If you have a 2.9x version of KomaScript (like me) the following 
modified example will do what you want. If your version is  3.x you 
should replace the first line \firstfoot{% with 
\setkomavar{firstfoot}{%.

All this has to be inserted in your .lco parameter file.


% Define a new letter foot

\firstfoot{%
  \parbox[t]{\textwidth}{\footnotesize
\rule{\linewidth}{2pt}
\begin{tabular}[t]{l@{}}%
  \multicolumn{1}{@{}l@{}}{Partners:}\\
  Jim Smith\\
  Russ Mayer
\end{tabular}%
\hfill
\begin{tabular}[t]{l@{}}%
  \multicolumn{1}{@{}l@{}}{Banks:}\\
  Citigroup\\
  Deutsche Bank
\end{tabular}%
\hfill
\begin{tabular}[t]{l@{}}%
  \multicolumn{1}{@{}l@{}}{Manager:}\\
  Jane Fonda\\[1ex]
  \multicolumn{1}{@{}l@{}}{Court Of Jurisdiction:}\\
  Great Plains
\end{tabular}%
\ifkomavarempty{frombank}{}{%
  \hfill
  \begin{tabular}[t]{l@{}}%
\multicolumn{1}{@{}l@{}}{\usekomavar*{frombank}:}\\
\usekomavar{frombank}
  \end{tabular}%
}%
  }%
}

Cheers
--
Jean-Marie


Re: APA with a Table of Contents: Losing the subparagaph in the ToC

2014-06-24 Thread Jacob Bishop
Hi John,

A couple of things. First, you have included the knitr and
short-inset-names modules in the document, which as far as I can tell are
not used for this minimal example. I removed them since I'm not yet set up
to work with those. This shouldn't cause any problems, but I thought I'd
mention it in case.

As a disclaimer, I am not exactly sure what I'm doing, but when I opened up
the apa.cls file and searched for paragraph and subparagraph, I found:
\renewcommand{\paragraph}{\@startsection{paragraph}{4}{\parindent}%
{0\baselineskip \@plus 0.2ex \@minus 0.2ex}%
{-1em}%
{\normalfont\normalsize\bfseries\itshape\addperi}}

\renewcommand{\subparagraph}[1]{\@startsection{subparagraph}{5}{1em}%
{0\baselineskip \@plus 0.2ex \@minus 0.2ex}%
{-\z@\relax}%

{\normalfont\normalsize\itshape\hspace{\parindent}{#1}\textit{.}}{\relax}}

The thing is, with the document you sent, the paragraph part is working,
but the subparagraph part is not. So, if we use a little trial-and-error to
put them together, I end up with the following, which seems to work if you
paste it into your preamble (under Document-Settings-LaTeX Preamble).


\renewcommand{\subparagraph}{\@startsection{subparagraph}{5}{\parindent}%

{0\baselineskip \@plus 0.2ex \@minus 0.2ex}%

{-1em}%

{\normalfont\normalsize\itshape\addperi}}


As a disclaimer, I'm not actually sure what I've done there, and it could
break something else, but it seems to work for me...maybe somebody who
understands things better can provide more insight. I hope this helps.

Jacob


Re: Footer in Koma letter - \lfoot - \cfoot - \rfoot

2014-06-24 Thread Charlie
On Tue, 24 Jun 2014 21:29:59 +0200
Jean-Marie Pacquet j...@pacquet.net wrote:

 Le 24/06/2014 16:20, Jean-Marie Pacquet a écrit :
  [...] It won't be very difficult to add a center column.
 
 If you have a 2.9x version of KomaScript (like me) the following 
 modified example will do what you want. If your version is  3.x you 
 should replace the first line \firstfoot{% with 
 \setkomavar{firstfoot}{%.
 All this has to be inserted in your .lco parameter file.
 
 
 % Define a new letter foot
 
 \firstfoot{%
\parbox[t]{\textwidth}{\footnotesize
  \rule{\linewidth}{2pt}
  \begin{tabular}[t]{l@{}}%
\multicolumn{1}{@{}l@{}}{Partners:}\\
Jim Smith\\
Russ Mayer
  \end{tabular}%
  \hfill
  \begin{tabular}[t]{l@{}}%
\multicolumn{1}{@{}l@{}}{Banks:}\\
Citigroup\\
Deutsche Bank
  \end{tabular}%
  \hfill
  \begin{tabular}[t]{l@{}}%
\multicolumn{1}{@{}l@{}}{Manager:}\\
Jane Fonda\\[1ex]
\multicolumn{1}{@{}l@{}}{Court Of Jurisdiction:}\\
Great Plains
  \end{tabular}%
  \ifkomavarempty{frombank}{}{%
\hfill
\begin{tabular}[t]{l@{}}%
  \multicolumn{1}{@{}l@{}}{\usekomavar*{frombank}:}\\
  \usekomavar{frombank}
\end{tabular}%
  }%
}%
 }
 
 Cheers

Thank you Jean-Marie,

The first example you pointed me to on page 178 works, and I was working
on tweaking it, and then I saw you had sent this email, which works
perfectly.

I feel like such an idiot. My only excuse is that I had looked on the
net and through other documentation that I didn't fine that reference
in the scrguien.pdf.

It's not unusual for me to go the hard way first.

I did look through the scrguien.pdf that you have directed me to in the
past and I've got in my LyX information file, but maybe I was already
overloaded with footnote information? I really have no excuse.

Anyway, as ever, and as previously thank you for your help and taking
the time to create the result. It's much appreciated and works
a treat.

Thank you once again.

Stay well,
Charlie

-- 
Registered Linux User:- 329524
***

The smallest seed of faith is better than the largest fruit of
happiness. .Henry David Thoreau

***

Debian GNU/Linux - just the best way to create magic

-


Re: Footer in Koma letter - \lfoot - \cfoot - \rfoot

2014-06-24 Thread Ross Reyes


On 6/23/2014 11:37 PM, Charlie wrote:

In:
Debian Jessie
using:
Lyx Version 2.0.6

I wanted to put a horizontal line and beneath it a custom footer, that
has the three elements:

\lfoot - \cfoot - \rfoot


This is what I use for my header/footer construction in the preamble

 \usepackage{graphics}
\usepackage{fancyhdr}
\lhead{\resizebox{0.44in}{!}{\includegraphics{A_Logo.jpg}}}
\chead{Your Name, town, USA, 484-xxx-}
\rhead{\resizebox{0.44in}{!}{\includegraphics{B_Logo.jpg}}}
\lfoot{Company, Inc. - Proprietary and Confidential}
\cfoot{}
\rfoot{\thepage}
\let\oldmaketitle=\maketitle
\def\maketitle{\oldmaketitle\thispagestyle{fancy}}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}





Re: Footer in Koma letter - \lfoot - \cfoot - \rfoot

2014-06-24 Thread Charlie
On Tue, 24 Jun 2014 07:49:22 -0400
Ross Reyes  wrote:

> 
> On 6/23/2014 11:37 PM, Charlie wrote:
> > In:
> > Debian Jessie
> > using:
> > Lyx Version 2.0.6
> >
> > I wanted to put a horizontal line and beneath it a custom footer,
> > that has the three elements:
> >
> > \lfoot - \cfoot - \rfoot
> 
> This is what I use for my header/footer construction in the preamble
> 
>   \usepackage{graphics}
> \usepackage{fancyhdr}
> \lhead{\resizebox{0.44in}{!}{\includegraphics{A_Logo.jpg}}}
> \chead{Your Name, town, USA, 484-xxx-}
> \rhead{\resizebox{0.44in}{!}{\includegraphics{B_Logo.jpg}}}
> \lfoot{Company, Inc. - Proprietary and Confidential}
> \cfoot{}
> \rfoot{\thepage}
> \let\oldmaketitle=\maketitle
> \def\maketitle{\oldmaketitle\thispagestyle{fancy}}
> \renewcommand{\headrulewidth}{0.4pt}
> \renewcommand{\footrulewidth}{0.4pt}
> 

Thanks Ross.

I have the header covered and the rest of the text doesn't do anything,
though left the text in the \lfoot and added text into the \cfoot and
the \rfoot.

There was no output at all.

 I think that would work in an article template but not in the letter
 one. I actually tried several variations of this and came up blank or
 received error messages from some attempts.

Thank you.
Charlie
-- 
Registered Linux User:- 329524
***

The keeping of bees is like the direction of
sunbeams. Henry David Thoreau

***

Debian GNU/Linux - just the best way to create magic

-


Re: Custom module: inset for mdframed boxes

2014-06-24 Thread Jürgen Spitzmüller
2014-06-19 10:36 GMT+02:00 Matthieu:

> Dear Lyx users list
>
> I would like to use the mdframed package in Lyx, which offers nice boxes.
> In its simplest form, mdframed is just used with (see below for
> reproduciible latex code):
>
> \begin{mdframed}
>  A box
> \end{mdframed}
>
> Eventually with [frametitle=A title]
>
> I was trying to create a Lyx inset for this, made it somehow, but this is
> a very rough draft, and I would appreciate any help, in particular:
> -how to give the new inset a feeling of box?


Add

 Decoration classic

to the InsetLayout definition.


> -For the title of the box, the user needs to add herself: frametitle=A
> title Ideally, one would not need to do this... is this avoidable in Lyx
> (make him add automatically "frametitle="), or does one need to rewrite
> slightly the environment mdframed?
>

Currently keyval syntax is not natively supported. So users either need to
enter the keyval syntax completely, or you need to rewrite the mdframed
environment.

-More generally, I choose to use it as a custom inset, but could have done
> defining it as a new style.. is this choice sound?
>

Yes, looks completely sane.

Jürgen



> Thanks!!
>
> ###
> #Lyx module:
> ###
>
> #\DeclareLyXModule[mdframed.sty]{MD frame}
> #DescriptionBegin
> # Try to use package mdframed
> #DescriptionEnd
>
> Format 49
>
> InsetLayout Flex:MDbox
>LyXType custom
>LatexName   mdframed
>LatexType   Environment
>LabelString "Md frame"
>Requiresmdframed
>LabelFont
>Color   blue
>Sizelarge
>EndFont
>MultiPartrue
>HTMLStyle
> div.Frameless { margin: 1em; }
>EndHTMLStyle
>Preamble
>\usepackage{mdframed}
>   EndPreamble
>   Argument 1
> LabelString"Box Title, write: frametitle=AA"
> Tooltip"Enter the box title here"
> Mandatory  0
> Decoration conglomerate
> Font
>   Colorblue
>   Size large
> EndFont
> AutoInsert 1
>   EndArgument
> End
>
> 
> #LaTeX minimal mdframed:
> 
>
> \documentclass[a4paper,10pt]{article}
> \usepackage{mdframed}
>
> \begin{document}
>
> \begin{mdframed}
>  A box
> \end{mdframed}
>
> And
>
> \begin{mdframed}[frametitle=A title]
>  A box
> \end{mdframed}
>
> \end{document}
>
>
>


Re: Footer in Koma letter - \lfoot - \cfoot - \rfoot

2014-06-24 Thread Jean-Marie Pacquet

Le 24/06/2014 05:37, Charlie a écrit :

In:
Debian Jessie
using:
Lyx Version 2.0.6

I wanted to put a horizontal line and beneath it a custom footer, that
has the three elements:

\lfoot - \cfoot - \rfoot

So that I can place three different names and address details onto the
first page of the document.


Hi Charlie,

Which version of KomaScript are you using?
On a recent version of the user's guide (scrguien.pdf dated 2012-05-15.) 
, there is an example (at the end of section 4.10, page 178) of a first 
page footer with 2 columns (left and right). It won't be very difficult 
to add a center column.


--
Jean-Marie



Re: enumitem cloned lists

2014-06-24 Thread Richard Heck

On 06/24/2014 01:16 AM, S Shieh wrote:
I "cloned," to use the terminology of the enumitem package 
documentation section 7, a new itemize list and put it in the LaTeX 
preamble of my Lyx file:



\newlist{emptydisplay}{itemize}{1}
\setlist[emptydisplay]{label={}, itemindent=1em, align=left, labelsep=!}

Now I can use this new itemize list by putting, e.g., the following in 
an ERT box:


\begin{emptydisplay}
\item The inventor of bifocals wrote an autobiography
\item The first post-master general of the US wrote an autobiography
\end{emptydisplay}

Is there a way of making this new list a Lyx style, so I can apply it 
just as I apply Quote, Enumerate-Resume, etc.?  I suspect this might 
involve modifying a layout file, or, even the enumitem module, is that 
right? And if so, are there instructions somewhere for doing this?


Chapter 5 of the Customization manual contains the documention for this. 
But the best way to figure it out, really, is just to open the 
enumitem.module file and try to mimic what is there.As for where to do 
that, you can either (i) copy enumitem.module to your local user layout 
directory (e.g., $HOME/.lyx/layouts/) and then modify it; or (ii) create 
a new module of your own in that directory (remember to reconfigure 
after you create file); or (iii) put the layout code into Document> 
Settings> Local Layout. Which you do depends upon how you intend to use it.


Something like this should work as a new module (for 2.1.x):

#\DeclareLyXModule[enumitem.sty]{More Customisable Lists}
#DescriptionBegin
# Additional customizable lists
#DescriptionEnd

#Requires: enumitem

Format 49

Style EmptyDisplay
CopyStyle Itemize
OptionalArgs 0
LatexName emptydisplay
Preamble
\newlist{emptydisplay}{itemize}{1}
\setlist[emptydisplay]{label={}, itemindent=1em, align=left, labelsep=!}
EndPreamble
End

Or you can put the bit starting with "Format 49" into Local Layout.

You'll still get the bullet in LyX with this, since I just copied 
Itemize. You can presumably get rid of that, if you want, by changing 
the LabelType. But I'll leave that kind of customization to you.


Richard




APA with a Table of Contents: Losing the subparagaph in the ToC

2014-06-24 Thread John Kane
Yes I know, APA Style does not have a Table of Contents. However I ran into
a request for setting up one in a word processor (AOO Writer) a day or so
ago and it occurred to me that it might be possible in LyX.
If you have a look at the attached LyX file, so far I seem to have managed
to get a ToC for 4 of the 5 levels of headings. Can anyone point out why I
am not getting the subparagraph text to appear in the ToC?
I suspect I am making some trivial mistake but it is not obvious to me.

-- 
John Kane
Kingston ON Canada


APA.TOC.lyx
Description: application/lyx


Re: Footer in Koma letter - \lfoot - \cfoot - \rfoot

2014-06-24 Thread Jean-Marie Pacquet

Le 24/06/2014 16:20, Jean-Marie Pacquet a écrit :

[...] It won't be very difficult to add a center column.

If you have a 2.9x version of KomaScript (like me) the following 
modified example will do what you want. If your version is > 3.x you 
should replace the first line "\firstfoot{%" with 
"\setkomavar{firstfoot}{%".

All this has to be inserted in your .lco parameter file.


% Define a new letter foot

\firstfoot{%
  \parbox[t]{\textwidth}{\footnotesize
\rule{\linewidth}{2pt}
\begin{tabular}[t]{l@{}}%
  \multicolumn{1}{@{}l@{}}{Partners:}\\
  Jim Smith\\
  Russ Mayer
\end{tabular}%
\hfill
\begin{tabular}[t]{l@{}}%
  \multicolumn{1}{@{}l@{}}{Banks:}\\
  Citigroup\\
  Deutsche Bank
\end{tabular}%
\hfill
\begin{tabular}[t]{l@{}}%
  \multicolumn{1}{@{}l@{}}{Manager:}\\
  Jane Fonda\\[1ex]
  \multicolumn{1}{@{}l@{}}{Court Of Jurisdiction:}\\
  Great Plains
\end{tabular}%
\ifkomavarempty{frombank}{}{%
  \hfill
  \begin{tabular}[t]{l@{}}%
\multicolumn{1}{@{}l@{}}{\usekomavar*{frombank}:}\\
\usekomavar{frombank}
  \end{tabular}%
}%
  }%
}

Cheers
--
Jean-Marie


Re: APA with a Table of Contents: Losing the subparagaph in the ToC

2014-06-24 Thread Jacob Bishop
Hi John,

A couple of things. First, you have included the knitr and
short-inset-names modules in the document, which as far as I can tell are
not used for this minimal example. I removed them since I'm not yet set up
to work with those. This shouldn't cause any problems, but I thought I'd
mention it in case.

As a disclaimer, I am not exactly sure what I'm doing, but when I opened up
the apa.cls file and searched for paragraph and subparagraph, I found:
\renewcommand{\paragraph}{\@startsection{paragraph}{4}{\parindent}%
{0\baselineskip \@plus 0.2ex \@minus 0.2ex}%
{-1em}%
{\normalfont\normalsize\bfseries\itshape\addperi}}

\renewcommand{\subparagraph}[1]{\@startsection{subparagraph}{5}{1em}%
{0\baselineskip \@plus 0.2ex \@minus 0.2ex}%
{-\z@\relax}%

{\normalfont\normalsize\itshape\hspace{\parindent}{#1}\textit{.}}{\relax}}

The thing is, with the document you sent, the paragraph part is working,
but the subparagraph part is not. So, if we use a little trial-and-error to
put them together, I end up with the following, which seems to work if you
paste it into your preamble (under Document->Settings->LaTeX Preamble).


\renewcommand{\subparagraph}{\@startsection{subparagraph}{5}{\parindent}%

{0\baselineskip \@plus 0.2ex \@minus 0.2ex}%

{-1em}%

{\normalfont\normalsize\itshape\addperi}}


As a disclaimer, I'm not actually sure what I've done there, and it could
break something else, but it seems to work for me...maybe somebody who
understands things better can provide more insight. I hope this helps.

Jacob


Re: Footer in Koma letter - \lfoot - \cfoot - \rfoot

2014-06-24 Thread Charlie
On Tue, 24 Jun 2014 21:29:59 +0200
Jean-Marie Pacquet  wrote:

> Le 24/06/2014 16:20, Jean-Marie Pacquet a écrit :
> > [...] It won't be very difficult to add a center column.
> >
> If you have a 2.9x version of KomaScript (like me) the following 
> modified example will do what you want. If your version is > 3.x you 
> should replace the first line "\firstfoot{%" with 
> "\setkomavar{firstfoot}{%".
> All this has to be inserted in your .lco parameter file.
> 
> 
> % Define a new letter foot
> 
> \firstfoot{%
>\parbox[t]{\textwidth}{\footnotesize
>  \rule{\linewidth}{2pt}
>  \begin{tabular}[t]{l@{}}%
>\multicolumn{1}{@{}l@{}}{Partners:}\\
>Jim Smith\\
>Russ Mayer
>  \end{tabular}%
>  \hfill
>  \begin{tabular}[t]{l@{}}%
>\multicolumn{1}{@{}l@{}}{Banks:}\\
>Citigroup\\
>Deutsche Bank
>  \end{tabular}%
>  \hfill
>  \begin{tabular}[t]{l@{}}%
>\multicolumn{1}{@{}l@{}}{Manager:}\\
>Jane Fonda\\[1ex]
>\multicolumn{1}{@{}l@{}}{Court Of Jurisdiction:}\\
>Great Plains
>  \end{tabular}%
>  \ifkomavarempty{frombank}{}{%
>\hfill
>\begin{tabular}[t]{l@{}}%
>  \multicolumn{1}{@{}l@{}}{\usekomavar*{frombank}:}\\
>  \usekomavar{frombank}
>\end{tabular}%
>  }%
>}%
> }
> 
> Cheers

Thank you Jean-Marie,

The first example you pointed me to on page 178 works, and I was working
on tweaking it, and then I saw you had sent this email, which works
perfectly.

I feel like such an idiot. My only excuse is that I had looked on the
net and through other documentation that I didn't fine that reference
in the scrguien.pdf.

It's not unusual for me to go the hard way first.

I did look through the scrguien.pdf that you have directed me to in the
past and I've got in my LyX information file, but maybe I was already
overloaded with footnote information? I really have no excuse.

Anyway, as ever, and as previously thank you for your help and taking
the time to create the result. It's much appreciated and works
a treat.

Thank you once again.

Stay well,
Charlie

-- 
Registered Linux User:- 329524
***

The smallest seed of faith is better than the largest fruit of
happiness. .Henry David Thoreau

***

Debian GNU/Linux - just the best way to create magic

-