Re: Custom layout inset without arguments

2020-04-20 Thread Andrew Parsloe

On 21/04/2020 8:47 am, Richard Kimberly Heck wrote:

On 4/19/20 2:23 PM, Gaston Gloesener wrote:


Riki wrote:

>This is bug #4066: https://www.lyx.org/trac/ticket/4066. There's at 
least some intention to try to figure it out before 2.4.0. For now, 
the workaround you mention is the only one available.


>

>Riki

Thank you for this pointer. I am a bit scared by this bug report 
having 13 years and last update being 12 months ago, but let’s stay 
positive it will happen 😊


I filed the report, too, and have always meant to do something about 
it. Really, that bug is more general, since the idea was for it to be 
possible to declare various options, as well, so the command could in 
effect have arguments (the way the label command does, e.g.).




Andrew wrote:

>But you can eliminate the red box from showing by closing the inset 
(click on the inset label to toggle open/closed).


Thanks for this workaround. I did actually notice this shortly after 
sending my email and must admit that it is already a big progress 
that I can at least get rid of the annoying  red box.


Would it be enough here if we could just have a "no text box" option? 
This would basically be a form of Decoration.


Riki

For appearance in LyX this would be helpful, but if the associated latex 
command has an empty argument  attached that might be confusing, for 
example if using the latex command in an ert inset where you will need 
to remember that it is not just the command that is required but also a 
following empty argument (otherwise the next token in the ert inset is 
going to be gobbled).


Andrew

-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Custom layout inset without arguments

2020-04-20 Thread Richard Kimberly Heck
On 4/19/20 2:23 PM, Gaston Gloesener wrote:
>
> Riki wrote:
>
> >This is bug #4066: https://www.lyx.org/trac/ticket/4066. There's at
> least some intention to try to figure it out before 2.4.0. For now,
> the workaround you mention is the only one available.
>
> > 
>
> >Riki
>
>  
>
> Thank you for this pointer. I am a bit scared by this bug report
> having 13 years and last update being 12 months ago, but let’s stay
> positive it will happen 😊
>
I filed the report, too, and have always meant to do something about it.
Really, that bug is more general, since the idea was for it to be
possible to declare various options, as well, so the command could in
effect have arguments (the way the label command does, e.g.).


>  Andrew wrote:
>
>  
>
> >But you can eliminate the red box from showing by closing the inset
> (click on the inset label to toggle open/closed).
>
>  
>
> Thanks for this workaround. I did actually notice this shortly after
> sending my email and must admit that it is already a big progress that
> I can at least get rid of the annoying  red box.
>
Would it be enough here if we could just have a "no text box" option?
This would basically be a form of Decoration.

Riki


-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Custom layout inset without arguments

2020-04-19 Thread Jean-Marc Lasgouttes

Le 19/04/2020 à 20:23, Gaston Gloesener a écrit :

Riki wrote:

 >This is bug #4066: https://www.lyx.org/trac/ticket/4066. There's at 
least some intention to try to figure it out before 2.4.0. For now, the 
workaround you mention is the only one available.


 >

 >Riki

Thank you for this pointer. I am a bit scared by this bug report having 
13 years and last update being 12 months ago, but let’s stay positive it 
will happen 😊


Sure, stay positive, I recently fixed this one:
https://www.lyx.org/trac/ticket/4451

More generally, 15 bugs older than yours will be fixed in 2.4.0 :)
https://www.lyx.org/trac/query?status=fixed&milestone=2.4.0&or&status=fixedinmaster&max=0&col=id&col=summary&col=severity&col=component&col=keywords&order=id

JMarc
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


RE: Custom layout inset without arguments

2020-04-19 Thread Gaston Gloesener
Riki wrote:

>This is bug #4066: https://www.lyx.org/trac/ticket/4066. There's at least some 
>intention to try to figure it out before 2.4.0. For now, the workaround you 
>mention is the only one available.

> 

>Riki

 

Thank you for this pointer. I am a bit scared by this bug report having 13 
years and last update being 12 months ago, but let’s stay positive it will 
happen 😊 

 

Andrew wrote:

 

>But you can eliminate the red box from showing by closing the inset (click on 
>the inset label to toggle open/closed).

 

Thanks for this workaround. I did actually notice this shortly after sending my 
email and must admit that it is already a big progress that I can at least get 
rid of the annoying  red box.

 

>Alternatively, there is a hybrid Latex/LyX solution, that avoids going to the 
>menu to insert custom insets and uses keyboard shortcuts instead.

>1. Ensure instant preview is On (Tools > Preferences > Look & Feel >

>Display)

>2. Assign a keyboard shortcut to preview-insert (Tools > Preferences > Editing 
>> Shortcuts > Cursor, Mouse and Editing Functions). Now that printing directly 
>from LyX is no longer supported the shortcut Ctrl+P is available.

>3. Enter in the preamble (Document > Settings > Latex Preamble)

>   \newcommand*{\projectName}{ My Project Name }

>   and click OK.

> 

>To enter the project name in the document,

>4. insert a preview inset (Ctrl+P)

>5. insert an ert inset (Ctrl+L) inside the preview inset. On a QWERTY 
>keyboard, the P and L? keys are diagonal neighbours so steps 4 & 5 involve 
>holding the ctrl key down and tapping P and L in quick succession.

>6. enter \projectName in the ert inset

>7. move the cursor outside the insets. The preview does its magic and the 
>project name is shown.

 

Thanks for this workaround. I will give it a try but I fear that keyboard 
shortcuts will not be an option in my case because I will risk to have quite a 
number of such “name” macros.

 

Thanks to both of you, very much appreciated!

 

-- next part --

An HTML attachment was scrubbed...

URL: 


 

--

 

Message: 2

Date: Sun, 19 Apr 2020 03:00:09 +0200

From: Bernd mailto:bernd.kappenb...@gmx.de> >

To: LyX Users List mailto:lyx-users@lists.lyx.org> >

Subject: Archaic Greek?

Message-ID: <2a28dde0-706e-ae44-7e5b-1785073bb...@gmx.de 
 >

Content-Type: text/plain; charset=utf-8; format=flowed

 

I am looking for an archaic Greek font. (Not sure it is the right forum...)

 

I downloaded one from MiKTeX (https://ctan.org/pkg/greek6cbc) and the whole 
archaic bundle, but I cannot get it to work -- maybe incompatible with Unicode?

 

Any alternative suggestions are welcome!

 

Kind regards,

 

Bernd

 

-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Custom layout inset without arguments

2020-04-18 Thread Andrew Parsloe


On 19/04/2020 6:36 am, Richard Kimberly Heck wrote:

On 4/18/20 9:49 AM, Gaston Gloesener wrote:


InsetLayout "Flex:projectNameInset"

  LabelString “My Project Name"

  LatexType Command

  LaTexName projectName

  LyxType "custom"

  Decoration Classic

  Preamble

    \newcommand*{\projectName}{ My Project Name }

  EndPreamble

End

The problem with this InsetLayout is that LyX always displays a red 
parameter input box after the insert of the inset and this is quite 
annoying in this use case as such insets will be quite common in the 
document. Is there any method for removing this as this macro does 
not require any arguments. I tried to set LatexType to None with no 
success and did not identify any other potential solution. Also 
google did not show me any potential solutions for this.


After some research and looking up in files provided with LyX I seem 
to understand that basically insets are always expected to have some 
type of conments and the use I make of it here is more a work-a-round 
than a solution. At least I was unable to locate an inset where no 
content was excpected.


So the question remains:

  * Is there a way to prevent LyX from asking for some content (red box)
  * If not, is there another solutioin than the one used here to
achieve the same goals and avoid that input box ?
  * would it be possible to add an attribute to InsetLayout to
disable the contents box in the doc text in a future version ?
(like NoContent)

This is bug #4066: https://www.lyx.org/trac/ticket/4066. There's at 
least some intention to try to figure it out before 2.4.0. For now, 
the workaround you mention is the only one available.


Riki

But you can eliminate the red box from showing by closing the inset 
(click on the inset label to toggle open/closed).


Alternatively, there is a hybrid Latex/LyX solution, that avoids going 
to the menu to insert custom insets and uses keyboard shortcuts instead.


1. Ensure instant preview is On (Tools > Preferences > Look & Feel > 
Display)


2. Assign a keyboard shortcut to preview-insert (Tools > Preferences > 
Editing > Shortcuts > Cursor, Mouse and Editing Functions). Now that 
printing directly from LyX is no longer supported the shortcut Ctrl+P is 
available.


3. Enter in the preamble (Document > Settings > Latex Preamble)

\newcommand*{\projectName}{ My Project Name }

and click OK.

To enter the project name in the document,

4. insert a preview inset (Ctrl+P)

5. insert an ert inset (Ctrl+L) inside the preview inset. On a QWERTY 
keyboard, the P and L  keys are diagonal neighbours so steps 4 & 5 
involve holding the ctrl key down and tapping P and L in quick succession.


6. enter \projectName in the ert inset

7. move the cursor outside the insets. The preview does its magic and 
the project name is shown.


Andrew


-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Custom layout inset without arguments

2020-04-18 Thread Richard Kimberly Heck
On 4/18/20 9:49 AM, Gaston Gloesener wrote:
>
> Hello,
>
>  
>
> NOTE: if you are not interested in my history of TeX/LaTex and Lyx
> just jump to the question below :-D
>
>  
>
> I am very new to Lyx but a very “old” Tex/LaTeX user, while I was not
> using it for long time right now. I started using TeX/LaTeX back in
> the 1990’s where I used it for writing several project documents and
> even wrote a quite complex package for building figures of binary data
> structures.
>
>  
>
> So I did have some very deep TeX knowledge at that time, while I have
> to admit that now I have to lookup everything again like a noob 😊 But
> due to the former use the bits come up and fit together quite easily
> again. When it comes to LaTeX my knowledge is also much smaller than
> at that time but still better then plain TeX “internals”.
>
>  
>
> This said, I decided to start a rather quite huge project
> documentation using LaTeX again for reasons of the target audience of
> the project. While I was used to write all my documents in plain LaTeX
> in ascii mode I decided to give a modern frontend a try this time.
> After some research and reading my choice did obviously fall on LyX.
> This was yesterday late evening 😃 and I decided to start with MikTex
> after also some research on both options. I was not expecting LyX to
> trigger as many MikTex  package downloads which voided one advantage
> of MikTex and also hung at some point. So I went back and went with
> TexLive this time. Installation took a long time (as expected) but
> worked this time including LyX which I reinstalled just for not having
> to search on how to switch TeX instance and making sure it’s a clean
> installation as well.
>
>  
>
> _Question_
>
>  
>
> First I want to mention that I did RFM (LyX user and customization
> manuals relevant sections) and used google with no success
>
>  
>
> I was looking for a way to use macros for entity names which may
> change throughout the lifecycle of the documents (like the project
> name). I know how to do it using a TeX macro but I wanted it to be a
> LyX integrated solution. The solution was found via google  to be an
> InsetLayout in the local layout settings. I did quickly understand the
> main mechanics and attributes so that I got it to work and looked up
> the details in the LyX customization manual.
>
>  
>
>  
>
> InsetLayout "Flex:projectNameInset"
>
>   LabelString “My Project Name"
>
>   LatexType Command
>
>   LaTexName projectName
>
>   LyxType "custom"
>
>   Decoration Classic
>
>   Preamble
>
>     \newcommand*{\projectName}{ My Project Name }
>
>   EndPreamble
>
> End
>
>  
>
> The problem with this InsetLayout is that LyX always displays a red
> parameter input box after the insert of the inset and this is quite
> annoying in this use case as such insets will be quite common in the
> document. Is there any method for removing this as this macro does not
> require any arguments. I tried to set LatexType to None with no
> success and did not identify any other potential solution. Also google
> did not show me any potential solutions for this.
>
>  
>
> After some research and looking up in files provided with LyX I seem
> to understand that basically insets are always expected to have some
> type of conments and the use I make of it here is more a work-a-round
> than a solution. At least I was unable to locate an inset where no
> content was excpected.
>
>  
>
> So the question remains:
>
>  
>
>   * Is there a way to prevent LyX from asking for some content (red box)
>   * If not, is there another solutioin than the one used here to
> achieve the same goals and avoid that input box ?
>   * would it be possible to add an attribute to InsetLayout to disable
> the contents box in the doc text in a future version ? (like
> NoContent)
>
This is bug #4066: https://www.lyx.org/trac/ticket/4066. There's at
least some intention to try to figure it out before 2.4.0. For now, the
workaround you mention is the only one available.

Riki



-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Custom layout inset without arguments

2020-04-18 Thread Gaston Gloesener
Hello,

 

NOTE: if you are not interested in my history of TeX/LaTex and Lyx just jump to 
the question below :-D

 

I am very new to Lyx but a very “old” Tex/LaTeX user, while I was not using it 
for long time right now. I started using TeX/LaTeX back in the 1990’s where I 
used it for writing several project documents and even wrote a quite complex 
package for building figures of binary data structures.

 

So I did have some very deep TeX knowledge at that time, while I have to admit 
that now I have to lookup everything again like a noob 😊 But due to the former 
use the bits come up and fit together quite easily again. When it comes to 
LaTeX my knowledge is also much smaller than at that time but still better then 
plain TeX “internals”.

 

This said, I decided to start a rather quite huge project documentation using 
LaTeX again for reasons of the target audience of the project. While I was used 
to write all my documents in plain LaTeX in ascii mode I decided to give a 
modern frontend a try this time. After some research and reading my choice did 
obviously fall on LyX. This was yesterday late evening 😃 and I decided to start 
with MikTex after also some research on both options. I was not expecting LyX 
to trigger as many MikTex  package downloads which voided one advantage of 
MikTex and also hung at some point. So I went back and went with TexLive this 
time. Installation took a long time (as expected) but worked this time 
including LyX which I reinstalled just for not having to search on how to 
switch TeX instance and making sure it’s a clean installation as well.

 

Question

 

First I want to mention that I did RFM (LyX user and customization manuals 
relevant sections) and used google with no success

 

I was looking for a way to use macros for entity names which may change 
throughout the lifecycle of the documents (like the project name). I know how 
to do it using a TeX macro but I wanted it to be a LyX integrated solution. The 
solution was found via google  to be an InsetLayout in the local layout 
settings. I did quickly understand the main mechanics and attributes so that I 
got it to work and looked up the details in the LyX customization manual. 

 

 

InsetLayout "Flex:projectNameInset"

  LabelString “My Project Name"

  LatexType Command

  LaTexName projectName

  LyxType "custom"

  Decoration Classic

  Preamble

\newcommand*{\projectName}{ My Project Name }

  EndPreamble

End

 

The problem with this InsetLayout is that LyX always displays a red parameter 
input box after the insert of the inset and this is quite annoying in this use 
case as such insets will be quite common in the document. Is there any method 
for removing this as this macro does not require any arguments. I tried to set 
LatexType to None with no success and did not identify any other potential 
solution. Also google did not show me any potential solutions for this.

 

After some research and looking up in files provided with LyX I seem to 
understand that basically insets are always expected to have some type of 
conments and the use I make of it here is more a work-a-round than a solution. 
At least I was unable to locate an inset where no content was excpected.

 

So the question remains:

 

*   Is there a way to prevent LyX from asking for some content (red box)
*   If not, is there another solutioin than the one used here to achieve 
the same goals and avoid that input box ?
*   would it be possible to add an attribute to InsetLayout to disable the 
contents box in the doc text in a future version ? (like NoContent)

 

Many thanks for reading,

And more thanks for replying 😊,

Gatson

 

 

-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: "default" bibliography style in custom layout

2017-09-04 Thread John K. Parejko
On 4Sep 2017, at 06:52, Richard Heck  wrote:

> On 09/03/2017 07:36 PM, John K. Parejko wrote:
> 
>> Is there a command to add to the layout file to prevent LyX from adding the 
>> bibliography style? 
> 
> No, but you do not have to enter a style in the bibliography dialog. LyX
> will insert one by default, but you can erase it. Then no
> \bibliographystyle is output.

Ah-hah! I didn’t realize I could delete the text in that box: I thought it was 
a pure selection box.

That did the trick.

Thank you!
John




Re: "default" bibliography style in custom layout

2017-09-04 Thread Richard Heck
On 09/03/2017 07:36 PM, John K. Parejko wrote:
> Hello,
>
> I’m working with a custom LaTeX class[1], based off of article, and I’ve made 
> a LyX layout for it (attached below, modified from article.layout) that works 
> well so far, except for the bibliography. The latex class specifies the 
> bibliography style:
>
> \bibliographystyle{lsst_aa}
>
> and there is no option in LyX’s BibTeX Bibliography window to use the 
> “default” style, nor can I figure out a way to modify the custom layout file 
> to not insert \bibliographystyle. Thus, the document cannot be built because 
> there will be two styles.
>
> Is there a command to add to the layout file to prevent LyX from adding the 
> bibliography style? 

No, but you do not have to enter a style in the bibliography dialog. LyX
will insert one by default, but you can erase it. Then no
\bibliographystyle is output.

Richard



"default" bibliography style in custom layout

2017-09-03 Thread John K. Parejko
Hello,

I’m working with a custom LaTeX class[1], based off of article, and I’ve made a 
LyX layout for it (attached below, modified from article.layout) that works 
well so far, except for the bibliography. The latex class specifies the 
bibliography style:

\bibliographystyle{lsst_aa}

and there is no option in LyX’s BibTeX Bibliography window to use the “default” 
style, nor can I figure out a way to modify the custom layout file to not 
insert \bibliographystyle. Thus, the document cannot be built because there 
will be two styles.

Is there a command to add to the layout file to prevent LyX from adding the 
bibliography style? Based on looking at other existing layouts, I tried adding 
either

```
Style Bibliography
End
```

or

```
NoStyle Bibliography
```

but neither prevented `\bibliographystyle{…}` from being included in the 
produced LaTeX. I can add an ERT box with `\bibliography{…}` at the end of the 
LyX doc, but it’d be nice to remove that ERT.

Any suggestions on how to modify my LyX layout, or otherwise tell the 
bibliography to not specify style in the output?

Thank you,
John

1: 
https://github.com/lsst/lsst-texmf/blob/master/texmf/tex/latex/lsst/lsstdoc.cls

2: lsstdoc.layout

#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[lsstdoc, article]{LSST doc (Standard Class based on 
article)}
#  \DeclareCategory{Articles}
# Article textclass definition file. Taken from initial LyX source code
# Author : Matthias Ettrich 
# Transposed by Pascal André 
# Heavily modifed and enhanced by serveral developers.
# Modified by John Parejko for LSST doc

# NOTE: To use this with your LyX doc, you can select it as a "Local Layout"
# NOTE: in Document->Settings->Document Class.

Format 60
Input stdclass.inc

SecNumDepth 3
TocDepth3

NoStyle Chapter
NoCounter chapter
NoStyle Chapter*

# lsstdoc loads a number of packages itself
Provides hyperref 1
Provides geometry 1
Provides color 1
Provides babel 1
Provides natbib 1

# Provide the Insert->Short Title option
Style Title
Argument 1
  LabelString   "Short Title|S"
  Tooltip   "Short title which will appear in the running header"
  InsertCotext  1
EndArgument
End

Style Part
Align Left
AlignPossible Left
TopSep2
BottomSep 1.5
Font
  SizeLarger
EndFont
End


Style Part*
Align Left
AlignPossible Left
TopSep2
BottomSep 1.5
Font
  SizeLarger
EndFont
End



Re: Custom layout file: in preamble styles with custom latex commands

2014-11-14 Thread Ernesto Posse
I figured out the problem: on the Mac LyX stores the UserDir under
~/Library/Application Support/LyX-. I still had version 2.0 and
was editing my layout file in that folder, rather than the one in the 2.1
folder. I now works as expected.

Thanks again.


On Fri, Nov 14, 2014 at 3:46 AM, Jürgen Spitzmüller  wrote:

> Jürgen Spitzmüller wrote:
> > > Is it possible that LyX caches layout files somewhere and it's not
> picking
> > > up a new version (I'm on OS X Mavericks with LyX 2.1.2.1 for what it's
> > > worth).
> >
> > No. You are sure that you do not have a copy of the layout file which is
> > used  by LyX?
>
> Also assure that your document does not have a local layout that overwrites
> the layout definition.
>
> Jürgen
>



-- 
Ernesto Posse
Zeligsoft.com


Re: Custom layout file: in preamble styles with custom latex commands

2014-11-14 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote:
> > Is it possible that LyX caches layout files somewhere and it's not picking
> > up a new version (I'm on OS X Mavericks with LyX 2.1.2.1 for what it's
> > worth).
> 
> No. You are sure that you do not have a copy of the layout file which is
> used  by LyX?

Also assure that your document does not have a local layout that overwrites 
the layout definition.

Jürgen


Re: Custom layout file: in preamble styles with custom latex commands

2014-11-14 Thread Jürgen Spitzmüller
Ernesto Posse wrote:
> That's exactly what I tried but got exactly the same result as using
> 'post:'. I think that for some reason, when I reconfigure and restart, LyX
> is not catching the changes in the layout file. I've tried running it from
> the command-line with different debug options, but I don't see anything
> about it, other than a comment saying that it's loading layout files, but
> not mention of whether it was successful or not.
> 
> Is it possible that LyX caches layout files somewhere and it's not picking
> up a new version (I'm on OS X Mavericks with LyX 2.1.2.1 for what it's
> worth).

No. You are sure that you do not have a copy of the layout file which is used 
by LyX?

Jürgen


Re: Custom layout file: in preamble styles with custom latex commands

2014-11-13 Thread Ernesto Posse
Thanks. Comments inline below.

On Thu, Nov 13, 2014 at 9:57 AM, Jürgen Spitzmüller  wrote:

> 2014-11-13 15:38 GMT+01:00 Ernesto Posse:
>
>> Thanks. That is what I want to achieve and your example does accomplish
>> this, but I don't understand why using the first form of "Argument"
>> declaration in the layout file, without 'post:', the second argument to the
>> command is always the text from the work area, this is,
>>
>> \command{arg1}{work area text}{arg2}{arg3} ...
>>
>> I understand that's what 'post:' does, but without it, I obtain the same
>> result. What if I want to generate the following?
>>
>> \command{arg1}{arg2}{arg3}{work area text}
>>
>
> If you do not use post:, you need to stick with the pre numbering, that is
>
>  Argument 1
>
>Mandatory 1
>
>LabelString "CR number"
>
> EndArgument
>
>Argument 2
>
>Mandatory 1
>
>LabelString "Sub-Category"
>
> EndArgument
>
> Argument 3
>
>LabelString "Subject Descriptor"
>
> EndArgument
>
>
>


That's exactly what I tried but got exactly the same result as using
'post:'. I think that for some reason, when I reconfigure and restart, LyX
is not catching the changes in the layout file. I've tried running it from
the command-line with different debug options, but I don't see anything
about it, other than a comment saying that it's loading layout files, but
not mention of whether it was successful or not.

Is it possible that LyX caches layout files somewhere and it's not picking
up a new version (I'm on OS X Mavericks with LyX 2.1.2.1 for what it's
worth).




> In my particular case, it seems to me that there is no particularly good
>> reason why the "category" field should be treated differently than the
>> others (CR code, sub-category, subject).
>>
>
> Maybe you are looking for a flex inset rather than a style?
>
>

I've read a bit about those, but I don't think so. I just need a plain
command, and the documentation explicitly says that the output should be
such that the work area text is the last argument to the command.


>
>> Also, why doesn't the "Mandatory 0" flag work? I would expect it to
>> produce an argument enclosed in [...], not in {...}.
>>
>
>
> Works for me. Although it is superfluous (Mandatory is false by default).
>
>
In your example it seems to work. I've no idea why it's not working for my
other test files. The only difference seems to be that I'm not using a
local layout.




> Jürgen
>
>
>>
>> Thanks
>>
>> PS: The style I want to use is ACM small journals (
>> http://www.acm.org/publications/submissions/latex_style). I'm not sure
>> if it's the same as the one for SIG proceedings, but I'm guessing there
>> will be some differences.
>>
>
>


-- 
Ernesto Posse
Zeligsoft.com


Re: Custom layout file: in preamble styles with custom latex commands

2014-11-13 Thread Jürgen Spitzmüller
2014-11-13 15:38 GMT+01:00 Ernesto Posse:

> Thanks. That is what I want to achieve and your example does accomplish
> this, but I don't understand why using the first form of "Argument"
> declaration in the layout file, without 'post:', the second argument to the
> command is always the text from the work area, this is,
>
> \command{arg1}{work area text}{arg2}{arg3} ...
>
> I understand that's what 'post:' does, but without it, I obtain the same
> result. What if I want to generate the following?
>
> \command{arg1}{arg2}{arg3}{work area text}
>

If you do not use post:, you need to stick with the pre numbering, that is

 Argument 1

   Mandatory 1

   LabelString "CR number"

EndArgument

   Argument 2

   Mandatory 1

   LabelString "Sub-Category"

EndArgument

Argument 3

   LabelString "Subject Descriptor"

EndArgument



> In my particular case, it seems to me that there is no particularly good
> reason why the "category" field should be treated differently than the
> others (CR code, sub-category, subject).
>

Maybe you are looking for a flex inset rather than a style?


>
> Also, why doesn't the "Mandatory 0" flag work? I would expect it to
> produce an argument enclosed in [...], not in {...}.
>


Works for me. Although it is superfluous (Mandatory is false by default).

Jürgen


>
> Thanks
>
> PS: The style I want to use is ACM small journals (
> http://www.acm.org/publications/submissions/latex_style). I'm not sure if
> it's the same as the one for SIG proceedings, but I'm guessing there will
> be some differences.
>


Re: Custom layout file: in preamble styles with custom latex commands

2014-11-13 Thread Ernesto Posse
Thanks. That is what I want to achieve and your example does accomplish
this, but I don't understand why using the first form of "Argument"
declaration in the layout file, without 'post:', the second argument to the
command is always the text from the work area, this is,

\command{arg1}{work area text}{arg2}{arg3} ...

I understand that's what 'post:' does, but without it, I obtain the same
result. What if I want to generate the following?

\command{arg1}{arg2}{arg3}{work area text}

In my particular case, it seems to me that there is no particularly good
reason why the "category" field should be treated differently than the
others (CR code, sub-category, subject).

Also, why doesn't the "Mandatory 0" flag work? I would expect it to produce
an argument enclosed in [...], not in {...}.

Thanks

PS: The style I want to use is ACM small journals (
http://www.acm.org/publications/submissions/latex_style). I'm not sure if
it's the same as the one for SIG proceedings, but I'm guessing there will
be some differences.

On Thu, Nov 13, 2014 at 4:01 AM, Jürgen Spitzmüller  wrote:

> 2014-11-12 21:14 GMT+01:00 Ernesto Posse:
>
>> Thanks. That's quite nice, but it doesn't work quite as expected.
>>
>> I tried the two forms, arguments with and without 'post:' and I get the
>> same result: the second argument of the command is the "body" (the text
>> that follows all arguments) and "Mandatory 0" seems to be ignored (the
>> generated argument is enclosed in {...} rather than [...]). For example, if
>> in the LyX work area I write the following (with text enclosed in <...>
>> representing the style name and <...>[ ... ] representing an argument inset)
>>
>>  [D.2.4.1] [Software Engineering]
>> [Software/Program Verification]  [Formal methods]
>> Some other text
>>
>> Then the resulting code is
>>
>> \category{D.2.4.1}{Some other text}{Software
>> Engineering}{Software/Program Verification}{Formal  methods}
>>
>> So it looks like all arguments after the first are treated as if they
>> where tagged with 'post:' and the optional flag seems to be ignored.
>>
>> Is this a bug or am I missing something?
>>
>
> Maybe I misunderstand you, but don't you want to achieve this output:
>
> \category{CR-Number}{Category}{Sub-Category}[Subject Descriptor]
>
>
> Whereas the second mandatory argument ("Category") is what is inserted in
> the main text?
>
> (I figured that you want to use this style:
>
> http://www.acm.org/sigs/publications/sigguide-v2.2sp)
>
>
> The attached document shows this (the definition is in Document > Local
> Layout).
>
>
> Jürgen
>
>


-- 
Ernesto Posse
Zeligsoft.com


Re: Custom layout file: in preamble styles with custom latex commands

2014-11-13 Thread Jürgen Spitzmüller
2014-11-12 21:14 GMT+01:00 Ernesto Posse:

> Thanks. That's quite nice, but it doesn't work quite as expected.
>
> I tried the two forms, arguments with and without 'post:' and I get the
> same result: the second argument of the command is the "body" (the text
> that follows all arguments) and "Mandatory 0" seems to be ignored (the
> generated argument is enclosed in {...} rather than [...]). For example, if
> in the LyX work area I write the following (with text enclosed in <...>
> representing the style name and <...>[ ... ] representing an argument inset)
>
>  [D.2.4.1] [Software Engineering]
> [Software/Program Verification]  [Formal methods]
> Some other text
>
> Then the resulting code is
>
> \category{D.2.4.1}{Some other text}{Software Engineering}{Software/Program
> Verification}{Formal  methods}
>
> So it looks like all arguments after the first are treated as if they
> where tagged with 'post:' and the optional flag seems to be ignored.
>
> Is this a bug or am I missing something?
>

Maybe I misunderstand you, but don't you want to achieve this output:

\category{CR-Number}{Category}{Sub-Category}[Subject Descriptor]


Whereas the second mandatory argument ("Category") is what is inserted in
the main text?

(I figured that you want to use this style:

http://www.acm.org/sigs/publications/sigguide-v2.2sp)


The attached document shows this (the definition is in Document > Local
Layout).


Jürgen


category.lyx
Description: application/lyx


Re: Custom layout file: in preamble styles with custom latex commands

2014-11-12 Thread Ernesto Posse
Thanks. That's quite nice, but it doesn't work quite as expected.

I tried the two forms, arguments with and without 'post:' and I get the
same result: the second argument of the command is the "body" (the text
that follows all arguments) and "Mandatory 0" seems to be ignored (the
generated argument is enclosed in {...} rather than [...]). For example, if
in the LyX work area I write the following (with text enclosed in <...>
representing the style name and <...>[ ... ] representing an argument inset)

 [D.2.4.1] [Software Engineering]
[Software/Program Verification]  [Formal methods]
Some other text

Then the resulting code is

\category{D.2.4.1}{Some other text}{Software Engineering}{Software/Program
Verification}{Formal  methods}

So it looks like all arguments after the first are treated as if they where
tagged with 'post:' and the optional flag seems to be ignored.

Is this a bug or am I missing something?






On Wed, Nov 12, 2014 at 2:08 PM, Jürgen Spitzmüller  wrote:

> 2014-11-12 20:01 GMT+01:00 Jürgen Spitzmüller:
>
>
>> However, if you use LyX 2.1, you do not need an own command, since the
>> command in question is possible with the help of the new argument syntax:
>>
>> Style Category
>> InPreamble1
>> LabelTypeStatic
>> LabelString"Category"
>> LatexTypeCommand
>> LatexNamecategory
>> Argument 1
>> Mandatory 1
>> LabelString"CR number"
>> EndArgument
>> Argument 2
>> Mandatory 1
>> LabelString"Category"
>> EndArgument
>> Argument 3
>> Mandatory 1
>> LabelString"Sub-Category"
>> EndArgument
>> Argument 4
>> LabelString"Subject Descriptor"
>> EndArgument
>> MarginDynamic
>> Labelsepxx
>> LabelFont
>> FamilySans
>> SeriesBold
>> ShapeSlanted
>> SizeNormal
>> ColorBlue
>> EndFont
>> End
>>
>
>
> Sorry, this should be:
>
> Style Category
> InPreamble1
> LabelTypeStatic
> LabelString"Category"
> LatexTypeCommand
> LatexNamecategory
> Argument 1
> Mandatory 1
> LabelString"CR number"
> EndArgument
> Argument post:1
> Mandatory 1
> LabelString"Sub-Category"
> EndArgument
> Argument post:2
> LabelString"Subject Descriptor"
> EndArgument
> MarginDynamic
> Labelsepxx
> LabelFont
> FamilySans
> SeriesBold
> ShapeSlanted
> SizeNormal
> ColorBlue
> EndFont
> End
>
>
> Jürgen
>
>


-- 
Ernesto Posse
Zeligsoft.com


Re: Custom layout file: in preamble styles with custom latex commands

2014-11-12 Thread Jürgen Spitzmüller
2014-11-12 20:01 GMT+01:00 Jürgen Spitzmüller:

>
> However, if you use LyX 2.1, you do not need an own command, since the
> command in question is possible with the help of the new argument syntax:
>
> Style Category
> InPreamble1
> LabelTypeStatic
> LabelString"Category"
> LatexTypeCommand
> LatexNamecategory
> Argument 1
> Mandatory 1
> LabelString"CR number"
> EndArgument
> Argument 2
> Mandatory 1
> LabelString"Category"
> EndArgument
> Argument 3
> Mandatory 1
> LabelString"Sub-Category"
> EndArgument
> Argument 4
> LabelString"Subject Descriptor"
> EndArgument
> MarginDynamic
> Labelsepxx
> LabelFont
> FamilySans
> SeriesBold
> ShapeSlanted
> SizeNormal
> ColorBlue
> EndFont
> End
>


Sorry, this should be:

Style Category
InPreamble1
LabelTypeStatic
LabelString"Category"
LatexTypeCommand
LatexNamecategory
Argument 1
Mandatory 1
LabelString"CR number"
EndArgument
Argument post:1
Mandatory 1
LabelString"Sub-Category"
EndArgument
Argument post:2
LabelString"Subject Descriptor"
EndArgument
MarginDynamic
Labelsepxx
LabelFont
FamilySans
SeriesBold
ShapeSlanted
SizeNormal
ColorBlue
EndFont
End


Jürgen


Re: Custom layout file: in preamble styles with custom latex commands

2014-11-12 Thread Jürgen Spitzmüller
2014-11-12 19:18 GMT+01:00 Ernesto Posse:

> Hi. I'm trying to define my own layout file and I ran into this situation:
> I need a style whose latex command must go into the preamble (as required
> by the underlying latex class), but I need to define my own command for the
> style because the one provided by the base class doesn't work well with the
> way styles work in the LyX UI.
>
> The problem is that styles which have been declared as "InPreamble 1" get
> their code generated before the user preamble which defines the required
> latex command, and therefore, when compiling, LaTeX will stop with an error
> saying that the control sequence is not defined (because it is defined
> later). The style in question is the following:
>
> Style Category
> InPreamble 1
> LabelType Static
> LabelString "Category"
> LatexType Command
> LatexName ACMCCScategory
> RequiredArgs 3
> Margin Dynamic
> Labelsep xx
> LabelFont
> Family Sans
> Series Bold
> Shape Slanted
> Size Normal
> Color Blue
> EndFont
> Preamble
> \newcommand{\ACMCCScategory}[4]{\category{#1}{#2}{#3}[4]}
> EndPreamble
> End
>
> So as you see, the style uses the custom-defined command \ACMCCScategory,
> but the generated code is this:
>
> \makeatletter
>
>
> %% LyX specific LaTeX commands.
>
>
> \ACMCCScategory{D.2.4}{Software Engineering}{Software/Program
> Verification}{Formal methods}
>
>
> %% Textclass specific LaTeX commands.
>
> \newcommand{\ACMCCScategory}[4]{\category{#1}{#2}{#3}[4]}
>
>
> %% User specified LaTeX commands.
>
> \usepackage{aadl}
>
>
> \makeatother
>
>
> So the problem is evident: the command is defined after it is being used.
>
>
> Is there a way to tell LyX to produce the preamble commands before the "in
> preamble" styles?
>

No, this is not yet possible.

However, if you use LyX 2.1, you do not need an own command, since the
command in question is possible with the help of the new argument syntax:

Style Category
InPreamble1
LabelTypeStatic
LabelString"Category"
LatexTypeCommand
LatexNamecategory
Argument 1
Mandatory 1
LabelString"CR number"
EndArgument
Argument 2
Mandatory 1
LabelString"Category"
EndArgument
Argument 3
Mandatory 1
LabelString"Sub-Category"
EndArgument
Argument 4
LabelString"Subject Descriptor"
EndArgument
MarginDynamic
Labelsepxx
LabelFont
FamilySans
SeriesBold
ShapeSlanted
SizeNormal
ColorBlue
EndFont
End


This also gives a much better UI, since both the Insert menu and the
argument insets tell you which argument you are actually dealing with. And
the order of insertion does not matter (in contrast to the pre 2.1 argument
insets)


HTH,
Jürgen


Custom layout file: in preamble styles with custom latex commands

2014-11-12 Thread Ernesto Posse
Hi. I'm trying to define my own layout file and I ran into this situation:
I need a style whose latex command must go into the preamble (as required
by the underlying latex class), but I need to define my own command for the
style because the one provided by the base class doesn't work well with the
way styles work in the LyX UI.

The problem is that styles which have been declared as "InPreamble 1" get
their code generated before the user preamble which defines the required
latex command, and therefore, when compiling, LaTeX will stop with an error
saying that the control sequence is not defined (because it is defined
later). The style in question is the following:

Style Category
InPreamble 1
LabelType Static
LabelString "Category"
LatexType Command
LatexName ACMCCScategory
RequiredArgs 3
Margin Dynamic
Labelsep xx
LabelFont
Family Sans
Series Bold
Shape Slanted
Size Normal
Color Blue
EndFont
Preamble
\newcommand{\ACMCCScategory}[4]{\category{#1}{#2}{#3}[4]}
EndPreamble
End

So as you see, the style uses the custom-defined command \ACMCCScategory,
but the generated code is this:

\makeatletter


%% LyX specific LaTeX commands.


\ACMCCScategory{D.2.4}{Software Engineering}{Software/Program
Verification}{Formal methods}


%% Textclass specific LaTeX commands.

\newcommand{\ACMCCScategory}[4]{\category{#1}{#2}{#3}[4]}


%% User specified LaTeX commands.

\usepackage{aadl}


\makeatother


So the problem is evident: the command is defined after it is being used.


Is there a way to tell LyX to produce the preamble commands before the "in
preamble" styles?




-- 
Ernesto Posse
Zeligsoft.com


Re: Custom layout : how can Lyx transfer parameters to LATEX ?

2013-08-23 Thread Richard Heck

On 08/23/2013 03:44 AM, LDF(f) wrote:

Thanks Scott !

I was able to figure out how to transfer from Lyx to Latex.

I just didn't find how to use the argument(s) in the Lyx part of the .layout
format file. Another way to put it, I didn't find the equivalent in Lyx of
the Latex #1 : I tried Argument1, arg1, etc. with no success. Is there a way
to use the argument(s) in the Lyx part ?

Thanks again for this promising 2.1 new feature !


I'm not sure what you're trying to do here. The arguments within LyX 
itself appear in new versions of what used to be called the "Short 
Title" inset. That's the only place they appear. You can't do anything 
with them otherwise. They are output to LaTeX as optional or mandatory 
arguments in the order specified in the layout file.


This is all documented in the Customization manual that ships with 
2.1.beta1. See section 5.3.6.


Richard



RE: Custom layout : how can Lyx transfer parameters to LATEX ?

2013-08-23 Thread LDF(f)

Thanks Scott !

I was able to figure out how to transfer from Lyx to Latex.

I just didn't find how to use the argument(s) in the Lyx part of the .layout
format file. Another way to put it, I didn't find the equivalent in Lyx of
the Latex #1 : I tried Argument1, arg1, etc. with no success. Is there a way
to use the argument(s) in the Lyx part ?

Thanks again for this promising 2.1 new feature !

Al


-Message d'origine-
De : skost...@lyx.org [mailto:skost...@lyx.org] De la part de Scott
Kostyshak
Envoyé : vendredi 9 août 2013 11:09
À : LDF(f)
Cc : lyx-users@lists.lyx.org
Objet : Re: Custom layout : how can Lyx transfer parameters to LATEX ?

On Fri, Aug 9, 2013 at 4:09 AM, LDF(f)  wrote:

> I didn't see anything in the documentation nor in the examples here and
> there, that could be used to enter parameters for a custom layout.

This is a new feature in 2.1. You can try the beta if you want:
ftp://ftp.lyx.org/pub/lyx/devel/lyx-2.1/lyx-2.1.0beta1

See 5.3.6  Paragraph styles in the LyX 2.1 Help > Customization
manual. Look for "argument" in that section.

Scott



Re: Custom layout : how can Lyx transfer parameters to LATEX ?

2013-08-09 Thread Scott Kostyshak
On Fri, Aug 9, 2013 at 4:09 AM, LDF(f)  wrote:

> I didn't see anything in the documentation nor in the examples here and
> there, that could be used to enter parameters for a custom layout.

This is a new feature in 2.1. You can try the beta if you want:
ftp://ftp.lyx.org/pub/lyx/devel/lyx-2.1/lyx-2.1.0beta1

See 5.3.6  Paragraph styles in the LyX 2.1 Help > Customization
manual. Look for "argument" in that section.

Scott


Custom layout : how can Lyx transfer parameters to LATEX ?

2013-08-09 Thread LDF(f)
Hello all ! 

The context:

I created a new environment. 
I made a new .layout format to be able to enter this environment through
Lyx. 

Now, I need parameters for my environment. 

The question:

Is there any mecanism so that I can enter parameters through LyX, which can
be transfered to the Latex environment ? 

 

I didn't see anything in the documentation nor in the examples here and
there, that could be used to enter parameters for a custom layout. So your
help is required !

Even to say it is just not possible !

 

 

Thanks for your help.

 



Re: creating a custom layout from scratch

2010-08-21 Thread Rob Oakes

 Hi Boraz,
Start by reading section 5.2 of Help > Customization.  Then I would 
suggest looking at a couple of layout files, first something simple 
like the basic article class (article.layout) and then a thesis-type 
layout file.  The layout files are located in a folder (cleverly named 
'layouts') beneath the installation directory for LyX.  If you're not 
sure where that is, try Help > About LyX and look for the "Library 
directory" path near the bottom.  Layout files are plain text, so you 
can view them in your favorite text editor.  Some of them import other 
files (.inc extension).


You will also need a LaTeX class for your new document type.  If you 
don't have a custom LaTeX class, shop around for a standard class that 
supports the various types of environment you need.
In addition to this excellent advice, I would take a look at the series 
of articles by Steve Litt 
(http://www.troubleshooters.com/linux/lyx/surefire_layout.htm and 
http://www.troubleshooters.com/linux/lyx/lyx_latex_tex.htm).  I've also 
written a series of articles that may be helpful.  You can find a full 
list of the LyX articles at:


http://blog.oak-tree.us/index.php/writing/latex

Additionally, there are links to a few custom document classes I 
maintain which also have layout files that might serve as examples.  You 
might start by looking at the texMemo layout file.  It is 
straightforward, but at the same time, includes examples of how to do 
character/paragraph styles in addition to custom insets.


If you have any questions, don't hesitate to write back to the list.  
Most of the people here are very nice (I might be the one major 
exception) and are willing to help.


Cheers,

Rob



Re: creating a custom layout from scratch

2010-08-21 Thread Paul A. Rubin

On 8/21/2010 6:26 AM, Blaz Gersak wrote:

Dear Lyx gurus :)!

Gurus only?  Or can non-gurus respond?  :-)


I am required to create a lyx layout from scratch and myke it totally
independent of other layouts.

---
It's supposed to look like this in Lyx:
---

[snip]


where can I learn how to do this? I have just started using Lyx and
Latex about a week ago.



Start by reading section 5.2 of Help > Customization.  Then I would 
suggest looking at a couple of layout files, first something simple like 
the basic article class (article.layout) and then a thesis-type layout 
file.  The layout files are located in a folder (cleverly named 
'layouts') beneath the installation directory for LyX.  If you're not 
sure where that is, try Help > About LyX and look for the "Library 
directory" path near the bottom.  Layout files are plain text, so you 
can view them in your favorite text editor.  Some of them import other 
files (.inc extension).


You will also need a LaTeX class for your new document type.  If you 
don't have a custom LaTeX class, shop around for a standard class that 
supports the various types of environment you need.


HTH,
Paul



creating a custom layout from scratch

2010-08-21 Thread Blaz Gersak
Dear Lyx gurus :)!

I am required to create a lyx layout from scratch and myke it totally
independent of other layouts.

---
It's supposed to look like this in Lyx:
---

author: author text author text
author text author text

subject:subject text subject text
subject text subject text

thesis title:   thesis title text thesis title text
thesis title text thesis title text

opening1:   opening1 text opening1 text
opening1 text opening1 text

body1:  body1 text body1 text
body1 text body1 text

conclusion1:conclusion1 text conclusion1 text
conclusion1 text conclusion1 text

research title: research title text research title text
research title text research title text

opening2:   opening2 text opening2 text
opening2 text opening2 text

body2:  body2 text body2 text
body2 text body2 text

conclusion2:conclusion2 text conclusion2 text
conclusion2 text conclusion2 text

-
# where the author, subject, thesis title, ... are all independent
Environments
-


And it should be put out to dvi or pdf like this:


author text author text
author text author text

subject text subject text
subject text subject text

thesis title text thesis title text
thesis title text thesis title text

opening1:   opening1 text opening1 text
opening1 text opening1 text

body1:  body1 text body1 text
body1 text body1 text

conclusion1:conclusion1 text conclusion1 text
conclusion1 text conclusion1 text

research title text research title text
research title text research title text

opening2:   opening2 text opening2 text
opening2 text opening2 text

body2:  body2 text body2 text
body2 text body2 text

conclusion2:conclusion2 text conclusion2 text
conclusion2 text conclusion2 text



where can I learn how to do this? I have just started using Lyx and
Latex about a week ago.

Thank you very much for all your help in advance :bow:.

Sincerely,
UFOKatarn



Re: inserting custom layout

2010-07-19 Thread Richard Heck

On 07/20/2010 01:26 AM, Sajjad wrote:




I need some suggestion make this mapping between the manual that
i have now and .layout file that i have to edit. Some of the
macros defined in the manual has no corresponding options defined
in the LyX manual. What to do then?


That depends upon the command. Ones like \subject are going to be
treated as paragraphs. So:
Style Subject
LatexType command
LatexName subject
# this tells LyX that it goes into Front Matter
InTitle 1
End
Very basic, with no special formatting, but it will work. The only
one of the Front Matter commands you can't do this way is
\thesisDate, because LyX doesn't yet do multi-argument commands.
There will be support for that in 2.0, however. So, for now, you'd
have to enter that as ERT.


Any hint on how to do you find /subject to be treated as a Style? In 
the manual it specifies that it takes only one argument.



Isn't that just above? One argument is easy.

rh



Re: inserting custom layout

2010-07-19 Thread Sajjad
On Fri, Jul 16, 2010 at 4:56 PM, Richard Heck  wrote:

>  On 07/16/2010 05:32 AM, Sajjad wrote:
>
> Hello Forum,
>
>  I have made similar post couple of months ago. The new class that i am
> trying to incorporate into LyX layout is accompanied by a description of the
> class file.
>
>  I did some configuration so  that get the liuthesis.layout in
> Document->settings->Document class option combox box. I believe that it is
> not enough to get started with the writing yet.
>
>  And i am kind of confused how to make the related configuration in the
> layout file. Lets take an example:
>
>  1. In the accompanied manual, it specifies number of options that i can
> set. One of the options is "Output format". The possible values for this
> option are:
>
>- print.
>- ePress.
>- pdfRelease.
>- draft.
>
> How to specifiy this option in the layout file. I have checked the
> customization chapter for LyX. Should it go under the section "ClassOptions"
> section or "AddToPreamble" ?
>
>  If you want one of these options set by default, but for the user to be
> able to override it, then add it ClassOptions, e.g.:
> Class Options
> Other ePress
> End
> These will turn up on the Document Class pane of Document>Settings.
>
>
>
>  There are several other Macros in the accompanied pdf file that must be
> configured in  the layout file.
>
>
>  During the previous post, one Julien showed me some hint ; like inputting
> the department name of the thesis that i am writing for and it was specified
> in the class options from LyX Documents Settings menu. He suggested this
> based on his extensive experience with LyX.
>
>  Now if i have to specify the department name in the liuthesis.layout file
> it should have went into "ClassOptions" section and  inside "Other"
> subsection. Shouldn't it?
>
>  Yes, just as with ePress, since this is a class option.
>
>
>  I need some suggestion make this mapping between the manual that i have
> now and .layout file that i have to edit. Some of the macros defined in the
> manual has no corresponding options defined in the LyX manual. What to do
> then?
>
>  That depends upon the command. Ones like \subject are going to be treated
> as paragraphs. So:
> Style Subject
> LatexType command
> LatexName subject
> # this tells LyX that it goes into Front Matter
> InTitle 1
> End
> Very basic, with no special formatting, but it will work. The only one of
> the Front Matter commands you can't do this way is \thesisDate, because LyX
> doesn't yet do multi-argument commands. There will be support for that in
> 2.0, however. So, for now, you'd have to enter that as ERT.
>

Any hint on how to do you find /subject to be treated as a Style? In the
manual it specifies that it takes only one argument.

>
> Then I'd do:
> TitleLatexName makeFrontPage
> so LyX will issue \makeFrontPage to create the title page, etc.
>
> The theorem, etc, environments can probably be copied over from LyX's own
> theorems.inc.
>
> Richard
>
> InTitle 1
>


Re: inserting custom layout

2010-07-18 Thread Richard Heck

On 07/18/2010 05:23 AM, Sajjad wrote:


The class options have been set as follows:

ClassOptions
   Other ePress, itn, [english|swedish]
End

But the same result as before, Only the ePress options is shown in 
 the class options in Documents->Settings and Predefined checkbox


Any other hint to look into?


Apparently we need quotes around the whole thing:
ClassOptions
  Other "ePress,itn,[english|swedish]"
End
Seems wrong, but it works.

rh



Re: inserting custom layout

2010-07-18 Thread Sajjad
On Sat, Jul 17, 2010 at 4:02 PM, Richard Heck  wrote:

> On 07/16/2010 09:14 PM, Sajjad wrote:
>
>>
>>
>> I have several other Options to set and i have tried them as follows:
>>
>> ClassOptions
>>   Other "ePress","itn","[english|swedish]"
>> End
>>
>>  I think the quotes are the problem. Try removing all of them.
>

Hello rh,

The class options have been set as follows:

ClassOptions
   Other ePress, itn, [english|swedish]
End

But the same result as before, Only the ePress options is shown in  the
class options in Documents->Settings and Predefined checkbox


Any other hint to look into?


Regards
Sajjad

>
> rh
>
>


Re: inserting custom layout

2010-07-17 Thread Richard Heck

On 07/16/2010 09:14 PM, Sajjad wrote:



I have several other Options to set and i have tried them as follows:

ClassOptions
   Other "ePress","itn","[english|swedish]"
End


I think the quotes are the problem. Try removing all of them.

rh



Re: inserting custom layout

2010-07-16 Thread Sajjad
On Fri, Jul 16, 2010 at 4:56 PM, Richard Heck  wrote:

>  On 07/16/2010 05:32 AM, Sajjad wrote:
>
> Hello Forum,
>
>  I have made similar post couple of months ago. The new class that i am
> trying to incorporate into LyX layout is accompanied by a description of the
> class file.
>
>  I did some configuration so  that get the liuthesis.layout in
> Document->settings->Document class option combox box. I believe that it is
> not enough to get started with the writing yet.
>
>  And i am kind of confused how to make the related configuration in the
> layout file. Lets take an example:
>
>  1. In the accompanied manual, it specifies number of options that i can
> set. One of the options is "Output format". The possible values for this
> option are:
>
>- print.
>- ePress.
>- pdfRelease.
>- draft.
>
> How to specifiy this option in the layout file. I have checked the
> customization chapter for LyX. Should it go under the section "ClassOptions"
> section or "AddToPreamble" ?
>
>  If you want one of these options set by default, but for the user to be
> able to override it, then add it ClassOptions, e.g.:
> Class Options
> Other ePress
> End
> These will turn up on the Document Class pane of Document>Settings.
>


I have several other Options to set and i have tried them as follows:

ClassOptions
   Other "ePress","itn","[english|swedish]"
End

then i checked the LyX in the Documents->Settings and only "ePress" shows
up. The rest of the other options did not show up anywhere. Did they get
effected or ignored. I check the manual and it says that several Other
options can be specified with comma separation.


Anything else that  missed in the process?

>
>
>
>  There are several other Macros in the accompanied pdf file that must be
> configured in  the layout file.
>
>
>  During the previous post, one Julien showed me some hint ; like inputting
> the department name of the thesis that i am writing for and it was specified
> in the class options from LyX Documents Settings menu. He suggested this
> based on his extensive experience with LyX.
>
>  Now if i have to specify the department name in the liuthesis.layout file
> it should have went into "ClassOptions" section and  inside "Other"
> subsection. Shouldn't it?
>
>  Yes, just as with ePress, since this is a class option.
>
>
>  I need some suggestion make this mapping between the manual that i have
> now and .layout file that i have to edit. Some of the macros defined in the
> manual has no corresponding options defined in the LyX manual. What to do
> then?
>
>  That depends upon the command. Ones like \subject are going to be treated
> as paragraphs. So:
> Style Subject
> LatexType command
> LatexName subject
> # this tells LyX that it goes into Front Matter
> InTitle 1
> End
> Very basic, with no special formatting, but it will work. The only one of
> the Front Matter commands you can't do this way is \thesisDate, because LyX
> doesn't yet do multi-argument commands. There will be support for that in
> 2.0, however. So, for now, you'd have to enter that as ERT.
>
> Then I'd do:
> TitleLatexName makeFrontPage
> so LyX will issue \makeFrontPage to create the title page, etc.
>
> The theorem, etc, environments can probably be copied over from LyX's own
> theorems.inc.
>
> Richard
>
> InTitle 1
>


Re: inserting custom layout

2010-07-16 Thread Julien Rioux

On 16/07/2010 5:32 AM, Sajjad wrote:

Hello Forum,

I have made similar post couple of months ago. The new class that i am
trying to incorporate into LyX layout is accompanied by a description of the
class file.

I did some configuration so  that get the liuthesis.layout in
Document->settings->Document class option combox box. I believe that it is
not enough to get started with the writing yet.

And i am kind of confused how to make the related configuration in the
layout file. Lets take an example:

1. In the accompanied manual, it specifies number of options that i can set.
One of the options is "Output format". The possible values for this option
are:

-  print.
- ePress.
- pdfRelease.
- draft.

How to specifiy this option in the layout file. I have checked the
customization chapter for LyX. Should it go under the section "ClassOptions"
section or "AddToPreamble" ?

There are several other Macros in the accompanied pdf file that must be
configured in  the layout file.


During the previous post, one Julien showed me some hint ; like inputting
the department name of the thesis that i am writing for and it was specified
in the class options from LyX Documents Settings menu. He suggested this
based on his extensive experience with LyX.


Now if i have to specify the department name in the liuthesis.layout file it
should have went into "ClassOptions" section and  inside "Other" subsection.
Shouldn't it?


I need some suggestion make this mapping between the manual that i have now
and .layout file that i have to edit. Some of the macros defined in the
manual has no corresponding options defined in the LyX manual. What to do
then?


Regards
Sajjad



Hi,

I don't have much time at the moment to help with the layout, but if I 
remember correctly you had a basic layout file to get started, no? It 
would be useful to share it if you do have one, so that other users can 
help enhance it.


In any case, I should say that not having the layout file does not 
prevent you from starting to use LyX to write your thesis. Just use a 
layout such as book or report and use the standard markups like chapter, 
section, figures, theorems, etc. These are standard markups and will be 
understood when you change your layout (once you have a working 
liuthesis.layout). On the other hand, I would advise not to fill the 
frontmatter yet since this is where liuthesis.cls uses a lot of custom 
commands.


Cheers,
Julien


Re: inserting custom layout

2010-07-16 Thread Richard Heck

On 07/16/2010 05:32 AM, Sajjad wrote:

Hello Forum,

I have made similar post couple of months ago. The new class that i am 
trying to incorporate into LyX layout is accompanied by a description 
of the class file.


I did some configuration so  that get the liuthesis.layout in 
Document->settings->Document class option combox box. I believe that 
it is not enough to get started with the writing yet.


And i am kind of confused how to make the related configuration in the 
layout file. Lets take an example:


1. In the accompanied manual, it specifies number of options that i 
can set. One of the options is "Output format". The possible values 
for this option are:


* print.
* ePress.
* pdfRelease.
* draft.

How to specifiy this option in the layout file. I have checked the 
customization chapter for LyX. Should it go under the section 
"ClassOptions" section or "AddToPreamble" ?


If you want one of these options set by default, but for the user to be 
able to override it, then add it ClassOptions, e.g.:

Class Options
Other ePress
End
These will turn up on the Document Class pane of Document>Settings.


There are several other Macros in the accompanied pdf file that must 
be configured in  the layout file.



During the previous post, one Julien showed me some hint ; like 
inputting the department name of the thesis that i am writing for and 
it was specified in the class options from LyX Documents Settings 
menu. He suggested this based on his extensive experience with LyX.


Now if i have to specify the department name in the liuthesis.layout 
file it should have went into "ClassOptions" section and  inside 
"Other" subsection. Shouldn't it?



Yes, just as with ePress, since this is a class option.

I need some suggestion make this mapping between the manual that i 
have now and .layout file that i have to edit. Some of the macros 
defined in the manual has no corresponding options defined in the LyX 
manual. What to do then?


That depends upon the command. Ones like \subject are going to be 
treated as paragraphs. So:

Style Subject
LatexType command
LatexName subject
# this tells LyX that it goes into Front Matter
InTitle 1
End
Very basic, with no special formatting, but it will work. The only one 
of the Front Matter commands you can't do this way is \thesisDate, 
because LyX doesn't yet do multi-argument commands. There will be 
support for that in 2.0, however. So, for now, you'd have to enter that 
as ERT.


Then I'd do:
TitleLatexName makeFrontPage
so LyX will issue \makeFrontPage to create the title page, etc.

The theorem, etc, environments can probably be copied over from LyX's 
own theorems.inc.


Richard

InTitle 1


inserting custom layout

2010-07-16 Thread Sajjad
Hello Forum,

I have made similar post couple of months ago. The new class that i am
trying to incorporate into LyX layout is accompanied by a description of the
class file.

I did some configuration so  that get the liuthesis.layout in
Document->settings->Document class option combox box. I believe that it is
not enough to get started with the writing yet.

And i am kind of confused how to make the related configuration in the
layout file. Lets take an example:

1. In the accompanied manual, it specifies number of options that i can set.
One of the options is "Output format". The possible values for this option
are:

   -  print.
   - ePress.
   - pdfRelease.
   - draft.

How to specifiy this option in the layout file. I have checked the
customization chapter for LyX. Should it go under the section "ClassOptions"
section or "AddToPreamble" ?

There are several other Macros in the accompanied pdf file that must be
configured in  the layout file.


During the previous post, one Julien showed me some hint ; like inputting
the department name of the thesis that i am writing for and it was specified
in the class options from LyX Documents Settings menu. He suggested this
based on his extensive experience with LyX.


Now if i have to specify the department name in the liuthesis.layout file it
should have went into "ClassOptions" section and  inside "Other" subsection.
Shouldn't it?


I need some suggestion make this mapping between the manual that i have now
and .layout file that i have to edit. Some of the macros defined in the
manual has no corresponding options defined in the LyX manual. What to do
then?


Regards
Sajjad


Re: insert custom layout

2010-04-14 Thread Julien Rioux

On 14/04/2010 3:03 PM, Sajjad wrote:

It seems very obvious that i have get down more on the basics of LaTeX.
  Even though i managed so far with LyX, without getting too much on LaTeX,
it will not take me any further.


Some of the options can be set by editing the from the LyX interface and
some of hem through inserting TEX code.

And i find that hard to decide which one is the better option to go with .


Regards
Sajjad



When a feature is already implemented in LyX, you should use it over TeX 
code. For example, a \clearpage command can be put in TeX code, but it 
is neater to use LyX's Import > Formatting > Clear Page.


When a feature is not already supported by LyX, it could be implemented. 
LyX can be customized in many ways, which makes it quite powerful. To 
list those options from the top of my head:


file formats and converters:
for inserting graphics from your favorite editor and what not.

layouts:
for new types of documents (closely linked to latex document classes)

modules:
for simple functionality not necessarily tied to a document type 
(closely related to latex packages)


Mind you, editing a custom layout or module is something of an advanced 
feature. It's not overly difficult in simple cases, but it sure can get 
complicated, and relies on knowledge of LyX's syntax and of LaTeX in 
many cases. When done properly, one can happily write text inside LyX 
and not worry about "programming" your document so that it produces 
output. But the starting point for new features will often be tried out 
first in TeX code boxes, and then moved to a module or layout. And 
sometimes one can be very happy with TeX code in the document and in the 
preamble, as long as it works.


So whatever works for you, I guess. If you have specific issues we'll be 
happy to help.


Regards,
Julien


Re: insert custom layout

2010-04-14 Thread Sajjad
It seems very obvious that i have get down more on the basics of LaTeX.
 Even though i managed so far with LyX, without getting too much on LaTeX,
it will not take me any further.


Some of the options can be set by editing the from the LyX interface and
some of hem through inserting TEX code.

And i find that hard to decide which one is the better option to go with .


Regards
Sajjad

On Tue, Apr 13, 2010 at 4:25 PM, rgheck  wrote:

> On 04/13/2010 06:12 AM, Guenter Milde wrote:
>
>>
>> The problem occured also in the dinbrief class. It's solved by
>> defining two styles. From dinbrief.layout::
>>
>>   # dinbrief's \phone has 2 args, area and number. We define an empty
>>   # command that can be set by the Area_Code style
>>   Preamble
>>\newcommand{\areacode}{}
>>   EndPreamble
>>
>> ...
>>
>>   # dinbrief's \phone has 2 args, area and number,
>>   # define both as distinct styles
>>
>>   Style "Area code"
>>CopyStyle   DinBrief
>>LabelString "Vorwahl:"
>>LatexName   "renewcommand{\areacode}"
>>   End
>>
>>   Style Telephone
>>CopyStyle   DinBrief
>>LabelString "Telefon:"
>>LatexName   phone
>>LatexParam  {\areacode}
>>   End
>>
>>
>> It should be possible to adapt this technique to liuthesis if the ERT
>> hack is too hackish.
>>
>>
>>
> That's impressive, but pretty hackish itself! Perhaps for 2.1 I'll try to
> get actual multi-argument commands working.
>
> rh
>
>


Re: insert custom layout

2010-04-13 Thread rgheck

On 04/13/2010 06:12 AM, Guenter Milde wrote:


The problem occured also in the dinbrief class. It's solved by
defining two styles. From dinbrief.layout::

   # dinbrief's \phone has 2 args, area and number. We define an empty
   # command that can be set by the Area_Code style
   Preamble
\newcommand{\areacode}{}
   EndPreamble

...

   # dinbrief's \phone has 2 args, area and number,
   # define both as distinct styles

   Style "Area code"
CopyStyle   DinBrief
LabelString "Vorwahl:"
LatexName   "renewcommand{\areacode}"
   End

   Style Telephone
CopyStyle   DinBrief
LabelString "Telefon:"
LatexName   phone
LatexParam  {\areacode}
   End


It should be possible to adapt this technique to liuthesis if the ERT
hack is too hackish.

   
That's impressive, but pretty hackish itself! Perhaps for 2.1 I'll try 
to get actual multi-argument commands working.


rh



Re: insert custom layout

2010-04-13 Thread Guenter Milde
On 2010-04-12, rgheck wrote:
> On 04/10/2010 06:24 PM, Julien Rioux wrote:
>> Sajjad  writes:

>> ... there is a problem here because liuthesis redefines \title
>> to take 2 arguments:

>> "You must always provide both a Swedish (first argument) and an English
>> title (second argument), \title{Svensk titel}{English Title}."

>> but LyX will output \title{YOUR TITLE} no matter what (i.e., only 1
>> argument).

This can be changed in the layout file (although not straightforward).

>> A workaround is to write your Swedish title like usual and then, at
>> the end of the line, insert a TeX box and write "}{English title"
>> inside it (with the braces).

Or put just the }{ in the ERT box and write the English Title
as normal text.

> There isn't at present any good way to do this. Multi-argument commands 
> aren't directly supported. I've been thinking about this for a while, 
> but haven't done anything.

The problem occured also in the dinbrief class. It's solved by
defining two styles. From dinbrief.layout::

  # dinbrief's \phone has 2 args, area and number. We define an empty
  # command that can be set by the Area_Code style
  Preamble
\newcommand{\areacode}{}
  EndPreamble
  
...
  
  # dinbrief's \phone has 2 args, area and number,
  # define both as distinct styles
  
  Style "Area code"
CopyStyle   DinBrief
LabelString "Vorwahl:"
LatexName   "renewcommand{\areacode}"
  End
  
  Style Telephone
CopyStyle   DinBrief
LabelString "Telefon:"
LatexName   phone
LatexParam  {\areacode}
  End


It should be possible to adapt this technique to liuthesis if the ERT
hack is too hackish.

Günter



Re: insert custom layout

2010-04-12 Thread rgheck

On 04/10/2010 06:24 PM, Julien Rioux wrote:

Sajjad  writes:
   

then i choose the Title Environment and set the title of the thesis work
and then i select the author and put my name there.
 

By the way, there is a problem here because liuthesis redefines \title
to take 2 arguments:

"You must always provide both a Swedish (first argument) and an English
title (second argument), \title{Svensk titel}{English Title}."

but LyX will output \title{YOUR TITLE} no matter what (i.e., only 1 argument).

A workaround is to write your Swedish title like usual and then, at the end
of the line, insert a TeX box and write "}{English title" inside it (with the
braces).

This is a hack, but I am not sure how you would do this elegantly in LyX.

   
There isn't at present any good way to do this. Multi-argument commands 
aren't directly supported. I've been thinking about this for a while, 
but haven't done anything.


rh



Re: insert custom layout

2010-04-10 Thread Julien Rioux
Sajjad  writes:
> then i choose the Title Environment and set the title of the thesis work
> and then i select the author and put my name there.

By the way, there is a problem here because liuthesis redefines \title
to take 2 arguments:

"You must always provide both a Swedish (first argument) and an English
title (second argument), \title{Svensk titel}{English Title}."

but LyX will output \title{YOUR TITLE} no matter what (i.e., only 1 argument).

A workaround is to write your Swedish title like usual and then, at the end
of the line, insert a TeX box and write "}{English title" inside it (with the
braces).

This is a hack, but I am not sure how you would do this elegantly in LyX.

Good luck!

Julien




Re: insert custom layout

2010-04-10 Thread Julien Rioux
Hi,

Sajjad  writes:
> Hello all,
> 
> I have attached the liuthesis.layout and the liuhesis.cls for your reference.

Thanks. This makes it much easier to troubleshoot.

> When i try to see a preview it gives me several LaTeX error. They are :
> 
> 
> Undefined Control sequence
> 
> ".ding division definition \thesis  divTAG.}

The documentation for liuthesis (section 2.1.4) says that you must provide the
department (one of ida, ifm, etc.) as a class option. In LyX you would go with
the menu to:

Document > Settings > Document Class

And then insert your choice in the "custom" field under "Class options".

> AND 
> 
> 
> LaTeX Error: Option clash for package inputenc.
> 
> The package inputenc has already been loaded with options:
>   [latin1]
> There has now been an attempt to load it with options
>   [latin9]
> Adding the global options:
>   latin1,latin9
> to your \documentclass declaration may fix this.
> Try typingto proceed.
> 
> 
> Any hint on that ?

This is because liuthesis requires a specific input encoding. Instruct LyX to
obey this by going to:

Document > Settings > Language

and set the Encoding to "Other: Western European (ISO 8859-1)"

> I have several LateX file inside that package folder. Do i have to edit any
one of them to get it functional?

In principle, no, you don't have to edit any tex file. You should consult
liuthesis.pdf; it seems to give a good description of your LaTeX class.  Some
non-standard commands, such as \thesisDate, can be inputed in LyX inside a TeX
box (Insert > TeX Code).

If you feel adventurous, you can modify your layout file to make LyX understand
these commands without the use of TeX Code.  For that, see LyX's Help >
Customization.  Eventually, if you implement all the features of the TeX class
into the LyX layout, you might want to submit your layout file for inclusion
with the liuthesis.zip distribution.

> 
> 
> Regards
> Sajjad
> 

Cheers,
Julien




Re: insert custom layout

2010-04-10 Thread Sajjad
Hello all,

I have attached the liuthesis.layout and the liuhesis.cls for your
reference.

Now i can choose the liuthesis layout from the Documents->Settings->Document
class option.

then i choose the Title Environment and set the title of the thesis work and
then i select the author and put my name there.


When i try to see a preview it gives me several LaTeX error. They are :


Undefined Control sequence

".ding division definition \the...@divtag.}

 The control sequence at the end of the top line

of your error message was never \def'ed. If you have

misspelled it (e.g., `\hobx'), type `I' and the correct

spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined."


AND


LaTeX Error: Option clash for package inputenc.



"\setcounter

{secnumdepth}{3}

The package inputenc has already been loaded with options:

[latin1]

There has now been an attempt to load it with options

[latin9]

Adding the global options:

latin1,latin9

to your \documentclass declaration may fix this.

Try typing  to proceed.

"


Any hint on that ?


I have several LateX file inside that package folder. Do i have to edit any
one of them to get it functional?


Regards
Sajjad







On Fri, Apr 9, 2010 at 1:38 PM, rgheck  wrote:

> On 04/08/2010 03:29 PM, Sajjad wrote:
>
>> On Thu, Apr 8, 2010 at 4:24 AM, Julien Rioux> >wrote:
>>
>>
>>
>>>
>>> On 07/04/2010 7:08 PM, Sajjad wrote:
>>>
>>>
>>>
 6. The liuthesis.layout file contain the following:

 #% Do not delete this line below; configure depends on this
 #  \DeclareLaTeXClass{liuthesis}




>>> If that's all you have in there, this is not sufficient. As suggested, a
>>> good starting point for you would be to copy the book.layout file.
>>>
>>>
>>>
>> If it not then , i did copy the contents of book.layout and put it into
>> the
>> liuthesis.layout.
>>
>> What should i do now? Any reference ?
>>
>>
>>
> Yes. Do this:
>
>
>  If that is what you did, I don't know what the matter is. If you start LyX
>>> from a console you might get useful information for debugging.
>>>
>>>
>>>
>> You probably have an error somewhere in the layout file.
>
> rh
>
>
%%
%% This is file `liuthesis.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% liuthesis.dtx  (with options: `class')
%% 
%% IMPORTANT NOTICE:
%% 
%% For the copyright see the source file.
%% 
%% Any modified versions of this file must be renamed
%% with new filenames distinct from liuthesis.cls.
%% 
%% For distribution of the original source see the terms
%% for copying and modification in the file liuthesis.dtx.
%% 
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
\ProvidesClass{liuthesis}[2007/01/13 liuthesis Class v. 1.3]
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{lmodern}
\RequirePackage[T1]{fontenc}
\RequirePackage[latin1]{inputenc}
\RequirePackage[swedish, english]{babel}
\newcommand*{\liuthesisDefinition}[2]{%
  \ClassInfo{liuthesis}{Loaded definition file '\CurrentOption.ltd'}%
  \newcommand*{\the...@divtag}{#1}%
  \newcommand...@address}{#2}}

\newif\ifliuthe...@hyperref \liuthe...@hyperreffalse
\newcommand*\phantomsection{\relax}
\newcommand*\href[2][]{#1}
\newcommand*\pdfbookmark[3][]{\relax}


%
%%%   Language%%%
%

\def\acknowledgementsname{Acknowledgments}%
\def\corollaryname{Corollary}
\def\definitionname{Definition}
\def\examplename{Example}
\def\lemmaname{Lemma}
\def\listexamplename{List of Examples}
\def\theoremname{Theorem}
\newcommand*{\monthName}[1]{\ifcase#1\or
  January\or February\or March\or
  April\or May\or June\or
  July\or August\or September\or
  October\or November\or December\else Unknown\fi}

\addto{\captionsenglish}{%
  \def\acknowledgementsname{Acknowledgments}%
  \def\corollaryname{Corollary}%
  \def\definitionname{Definition}%
  \def\examplename{Example}%
  \def\lemmaname{Lemma}%
  \def\listexamplename{List of Examples}%
  \def\theoremname{Theorem}%
  \renewcommand*{\monthName}[1]{\ifcase#1\or%
January\or February\or March\or%
April\or May\or June\or%
July\or August\or September\or%
October\or November\or December\else Unknown\fi}%
}
\addto{\captionsswedish}{%
  \def\acknowledgementsname{Tack}%
  \def\corollaryname{Korrolarium}%
  \def\definitionname{Definition}%
  \def\examplename{Exempel}%
  \def\lemmaname{Lemma}%
  \def\listexamplename{Exempellista}%
  \def\theoremname{Sats}%
  \renewcommand*{\monthName}[1]{\ifcase#1\or%
januari\or februari\or mars\or%
april\or maj\or juni\or%
juli\or augusti\or september\or%
oktober\or november\or december\else Unknown\fi}%
}
\DeclareOption{english}{%
  \AtBeginDocument{\selectlanguage{english}}%
}

\DeclareOption{swedish}{%
  \AtBeginDocument{\selectlanguage{swedish}}%
}

%
%%% CROP SETTINGS %%%
%%

Re: insert custom layout

2010-04-09 Thread rgheck

On 04/08/2010 03:29 PM, Sajjad wrote:

On Thu, Apr 8, 2010 at 4:24 AM, Julien Riouxwrote:

   


On 07/04/2010 7:08 PM, Sajjad wrote:

 

6. The liuthesis.layout file contain the following:

#% Do not delete this line below; configure depends on this
#  \DeclareLaTeXClass{liuthesis}


   

If that's all you have in there, this is not sufficient. As suggested, a
good starting point for you would be to copy the book.layout file.

 

If it not then , i did copy the contents of book.layout and put it into the
liuthesis.layout.

What should i do now? Any reference ?

   

Yes. Do this:


If that is what you did, I don't know what the matter is. If you start LyX
from a console you might get useful information for debugging.

 

You probably have an error somewhere in the layout file.

rh



Re: insert custom layout

2010-04-08 Thread Sajjad
On Thu, Apr 8, 2010 at 4:24 AM, Julien Rioux wrote:

>
>
> On 07/04/2010 7:08 PM, Sajjad wrote:
>
>> 6. The liuthesis.layout file contain the following:
>>
>> #% Do not delete this line below; configure depends on this
>> #  \DeclareLaTeXClass{liuthesis}
>>
>>
> If that's all you have in there, this is not sufficient. As suggested, a
> good starting point for you would be to copy the book.layout file.
>

If it not then , i did copy the contents of book.layout and put it into the
liuthesis.layout.

What should i do now? Any reference ?

>
> If that is what you did, I don't know what the matter is. If you start LyX
> from a console you might get useful information for debugging.
>
> --
> Julien
>
>


Re: insert custom layout

2010-04-08 Thread Guenter Milde
On 2010-04-08, Julien Rioux wrote:
> On 07/04/2010 7:08 PM, Sajjad wrote:
>> 6. The liuthesis.layout file contain the following:

>> #% Do not delete this line below; configure depends on this
>> #  \DeclareLaTeXClass{liuthesis}


> If that's all you have in there, this is not sufficient. As suggested, a 
> good starting point for you would be to copy the book.layout file.

I rather recommend to 

  Input book.layout

instead of copying. You can then add and override definitions in the rest
of the file (once the layout is up and working).
(See e.g. the dinbrief.layout for an example of this approach.)

Also, for debugging

* Test if the liuthesis document class works as expected in pure LaTeX.
  (Check if the sample LaTeX documents (or a self-written LaTeX file)
  works if compiled from the command line.)

* Export your non-working LyX document to LaTeX and see if this works
  fine or why it fails.


Günter



Re: insert custom layout

2010-04-07 Thread Julien Rioux

On 07/04/2010 7:08 PM, Sajjad wrote:

6. The liuthesis.layout file contain the following:

#% Do not delete this line below; configure depends on this
#  \DeclareLaTeXClass{liuthesis}



If that's all you have in there, this is not sufficient. As suggested, a 
good starting point for you would be to copy the book.layout file.


If that is what you did, I don't know what the matter is. If you start 
LyX from a console you might get useful information for debugging.


--
Julien



Re: insert custom layout

2010-04-07 Thread Sajjad
Thanks rgcheck,


I have gone through  the manual of configuring Lyx and there they have
explained how to include custom .clas file.

I think  i followed the steps and i do see the 'liuthesis' in the Document
class option under Documents->Settings.
But When i check  "liuthesis" , the system hangs. So i think i need to
elaborate the steps that i have followed.


1. I created a directory called  /usr/local/texmf/latex/liuthesis and
unzipped the file under the liuthesis folder. Now the folder 'liuthesis'
contains more subdirectories.

2. Opened the texmf.cnf file and edited the TEXMFLOCAL with  the path
specified in step 1.

3. Executed texhash and it created a ls-R.

4. From LyX i executed the Reconfigure command.

5. created a liuthesis.layout file and put in the directory where the LyX
installation put all  the layout files, so  that LyX can find it.

6. The liuthesis.layout file contain the following:

#% Do not delete this line below; configure depends on this
#  \DeclareLaTeXClass{liuthesis}


7.  I ran Reconfigure again.

8 Restarted LyX and chose the liuthesis class from the layout option and the
program hangs.


Is there anything i missed? Where should i look into to fix this?


Regards
Sajjad


On Wed, Apr 7, 2010 at 1:49 PM, rgheck  wrote:

> On 04/06/2010 04:27 PM, Sajjad wrote:
>
>> Hello,
>>
>> In most of the report writing i used the report class. The university that
>> i
>> am studying in have own class and i want to import it into LyX's document
>> class by importing custom layout. The custom layout accepts only one
>> .layout file,
>> where as the my university 'liuthesis' contains several .tex file.
>>
>>
>>
> Since liuthesis is a document class, it is provided as a .cls file,
> liuthesis.cls. The .tex files that are provided with it are examples,
> documentation, and the like, and have nothing to do with layout.
>
> What you will need to be able to use liuthesis with LyX is a file
> liuthesis.layout. Since liuthesis is based upon book, you can get started
> simply by copying book.layout to liuthesis.layout and changing the second
> line to:
>\DeclareLaTeXClass{liuthesis}
> This will not give you access in LyX to the special constructs of
> liuthesis, but it will get you started. You should then be able to import
> the .tex files provided as examples.
>
> Richard
>
>


Re: insert custom layout

2010-04-07 Thread rgheck

On 04/06/2010 04:27 PM, Sajjad wrote:

Hello,

In most of the report writing i used the report class. The university that i
am studying in have own class and i want to import it into LyX's document
class by importing custom layout. The custom layout accepts only one .layout 
file,
where as the my university 'liuthesis' contains several .tex file.

   
Since liuthesis is a document class, it is provided as a .cls file, 
liuthesis.cls. The .tex files that are provided with it are examples, 
documentation, and the like, and have nothing to do with layout.


What you will need to be able to use liuthesis with LyX is a file 
liuthesis.layout. Since liuthesis is based upon book, you can get 
started simply by copying book.layout to liuthesis.layout and changing 
the second line to:

\DeclareLaTeXClass{liuthesis}
This will not give you access in LyX to the special constructs of 
liuthesis, but it will get you started. You should then be able to 
import the .tex files provided as examples.


Richard



insert custom layout

2010-04-06 Thread Sajjad
Hello,

In most of the report writing i used the report class. The university that i
am studying in have own class and i want to import it into LyX's document
class

by importing custom layout. The custom layout accepts only one .layout file,
where as the my university 'liuthesis' contains several .tex file.



Any hint?


Regards
Sajjad


Re: LabelString problem in custom layout

2009-06-09 Thread Ryan Warner
I can't seem to resolve this by changing the SecNumDepth in the layout
file, but by changing the \secnumdepth setting in the .lyx file that
fixed it.

-Ryan

On Tue, Jun 9, 2009 at 12:06 PM, Jean-Marc Lasgouttes wrote:
> Le 9 juin 09 à 17:55, Ryan Warner a écrit :
>>
>> I'm having a problem with the attached custom layout.  If I set the
>> TocLevel of any of my styles to be > 2 the LabelString does not show
>> up.  Currently I work around this by setting TocLevel on all my styles
>> to 2.  This makes the LabelString show up, but the ToC preview window
>> shows the style at the wrong level.  Anyone have experience with this
>> type of thing?
>
> Try to set TocDepth qnd SecNumDepth (at the beginning of the layout file) to
> sensible value.
> The second one, in particular, indicates up to which level sections should
> be numbered by defqult.
>
> JMarc


Re: LabelString problem in custom layout

2009-06-09 Thread Jean-Marc Lasgouttes

Le 9 juin 09 à 17:55, Ryan Warner a écrit :

I'm having a problem with the attached custom layout.  If I set the
TocLevel of any of my styles to be > 2 the LabelString does not show
up.  Currently I work around this by setting TocLevel on all my styles
to 2.  This makes the LabelString show up, but the ToC preview window
shows the style at the wrong level.  Anyone have experience with this
type of thing?


Try to set TocDepth qnd SecNumDepth (at the beginning of the layout  
file) to sensible value.
The second one, in particular, indicates up to which level sections  
should be numbered by defqult.


JMarc

LabelString problem in custom layout

2009-06-09 Thread Ryan Warner
I'm having a problem with the attached custom layout.  If I set the
TocLevel of any of my styles to be > 2 the LabelString does not show
up.  Currently I work around this by setting TocLevel on all my styles
to 2.  This makes the LabelString show up, but the ToC preview window
shows the style at the wrong level.  Anyone have experience with this
type of thing?

In dvplan.layout, the styles I'm having trouble with are
Configurations, Section, and SubSection.  Install the layout and open
the included foo.lyx.  You'll see a bunch of empty lines in the ToC,
and a bunch of blank lines in the editor window.

Now make the following modification to dvplan.layout.  In the 3 styles
I mentioned in the last paragraph, change the TocLevel to 2.  Restart
LyX, and again look at foo.lyx.  You should now see the previously
missing LabelStrings.  The side effect is that these styles now show
up at the wrong level in the ToC window.

-Ryan


dvplan.tar.gz
Description: GNU Zip compressed data


Re: Need help creating a Style in a custom layout

2009-05-05 Thread rgheck

Ryan Warner wrote:

Hello LyX users,

I'm new to TeX, LaTeX, and LyX, but climbing fast.  I'm trying to make
a standardized structured document format for my company.  Right now,
I'm attempting to do this by making a custom LyX layout.

This layout is based on article.cls.  As it happens, if I apply this
style to a line in LyX, the generated output in DVI is what I want.
However, in the GUI the preview is not.  In the GUI I don't get the
prepended "Feature:" and the text is completely unformatted.  How do I
make the preview in the GUI resemble the output?

Here's my Style entry in my layout file:

Style Feature
LatexType Command
LatexName planfeature
Preamble
\newcommand{\planfeature}[1]{ \section{Feature: #1} }
EndPreamble
End

For that matter, how does LyX know how to display \section{FooBar}
normally?  Does it parse the class and determine the appearance or is
it predefined somewhere?

  
Look at the file stdsections.inc. If you do roughly what's done there, I 
expect you will get the results you want.



On the subject of layout files and Style entries.  Looking at the
layouts that come with LyX, there are a lot of options you can use.
Is any of that documented anywhere?  Or is it all learn by example?

  
It's documented in the Customization manual, chapter 5, I think. See the 
Help menu.


Richard



Need help creating a Style in a custom layout

2009-05-05 Thread Ryan Warner
Hello LyX users,

I'm new to TeX, LaTeX, and LyX, but climbing fast.  I'm trying to make
a standardized structured document format for my company.  Right now,
I'm attempting to do this by making a custom LyX layout.

This layout is based on article.cls.  As it happens, if I apply this
style to a line in LyX, the generated output in DVI is what I want.
However, in the GUI the preview is not.  In the GUI I don't get the
prepended "Feature:" and the text is completely unformatted.  How do I
make the preview in the GUI resemble the output?

Here's my Style entry in my layout file:

Style Feature
LatexType Command
LatexName planfeature
Preamble
\newcommand{\planfeature}[1]{ \section{Feature: #1} }
EndPreamble
End

For that matter, how does LyX know how to display \section{FooBar}
normally?  Does it parse the class and determine the appearance or is
it predefined somewhere?

On the subject of layout files and Style entries.  Looking at the
layouts that come with LyX, there are a lot of options you can use.
Is any of that documented anywhere?  Or is it all learn by example?

-Ryan


Re: upload a custom layout

2009-03-29 Thread Manveru
2009/3/29 Uwe Stöhr 

> nick schrieb:
>
>  Ok, I think that I can make a Russian translation of LyX's strings.
>> But I wonder if I can start from russian "ru.po" instead of Ukrainian
>> "uk.po".
>>
>
> Of course you can also start from ru.po. Use what suits you the most.
>
> regards Uwe
>

Nick you can even try to merge uk.po and ru.po to ro.new.po before you start
(you can use TortoiseDiff, KDiff, WinMerge... and plenty others I think),
and then correct Ukrainian to Russian, and then translate rest of strings.

-- 
Manveru
jabber: manv...@manveru.pl
gg: 1624001
  http://www.manveru.pl


Re: upload a custom layout

2009-03-29 Thread Uwe Stöhr

nick schrieb:


Ok, I think that I can make a Russian translation of LyX's strings.
But I wonder if I can start from russian "ru.po" instead of Ukrainian 
"uk.po".


Of course you can also start from ru.po. Use what suits you the most.

regards Uwe


Re: upload a custom layout

2009-03-29 Thread nick

Ok, I think that I can make a Russian translation of LyX's strings.
But I wonder if I can start from russian "ru.po" instead of Ukrainian 
"uk.po".

It seems to me that it already has many translated strings, so I could
just translate fuzzy/untranslated strings in "ru.po". (And of course I can
take some similar words from "uk.po" because Ukrainian and Russian 
indeed have many words in common)


With best regards,
Nick

Uwe Stöhr wrote:

nckg schrieb:


I've made a LyX layout which customizes "Theorems (AMS)" module the
following way:
1) Titles of theorems are translated to Russian language


Translating stings is automatically done by LyX. The problem is that 
we don't have actually a Russian translation of LyX's strings:

http://www.lyx.org/I18n
But as you can see, we have an almost complete translation to 
Ukrainian. I guess you can take the Ukrainian translation and create a 
Russian one out of it because Ukrainian and Russian have many words in 
common, don't they?

Translating LyX is relatively easy:

- download the file "uk.po" from here:
  
http://www.lyx.org/trac/browser/lyx-devel/branches/BRANCH_1_6_X/po/uk.po

- rename it to "ru.po" and open it with the program poedit:
  http://www.poedit.net/
- translate it

A more detailed description is given here:
http://www.lyx.org/trac/browser/lyx-devel/branches/BRANCH_1_6_X/README.localization 



You would help LyX a lot by translating its strings. When you are 
unsure or have questions, please ask on the lyx-docs and/or the 
lyx-devel mailing list and we'll help you.


2) Theorems, Definitions and so on are numbered separately, and each 
type
of these environments is numbered consecutively throughout the 
document...


For the other cases Richard heck knows more than me - I CCed him.

regards Uwe





Re: custom layout -- possible bug?

2009-03-24 Thread Jürgen Spitzmüller
Ernesto Posse wrote:
> --- begin of sig-alternate.layout ---
> #% Do not delete the line below; configure depends on this
> #  \DeclareLaTeXClass[sig-alternate]{sig-alternate}
>
> Format 11
> Input stdclass.inc
> --- end of sig-alternate.layout ---

#  \DeclareLaTeXClass{sig-alternate}

should do.

Also, did you run Edit>Reconfigure?

Jürgen


Re: custom layout -- possible bug?

2009-03-24 Thread Guenter Milde
On 2009-03-23, Ernesto Posse wrote:
> Hello. I'm having a bit of an issue with a custom layout I'm trying to
> create for ACM SIG proceedings (from the sig-alternate.cls available
> at http://www.acm.org/sigs/publications/proceedings-templates)

> First I'm creating a layoutfile named "sig-alternate.layout" and
> placed it under my layouts directory. The file contains the following:

> --- begin of sig-alternate.layout ---
> #% Do not delete the line below; configure depends on this
> #  \DeclareLaTeXClass[sig-alternate]{sig-alternate}

> Format 11
> Input stdclass.inc
> --- end of sig-alternate.layout ---

> And I create a sample file (test.lyx) with this layout. Then I
> generate plain latex from it and this is what I obtain:
...
> The problem is that the first line has the wrong class (article)! Am I
> doing something wrong? Why doesn't the generated latex begin with this
> \documentclass{sig-alternate}?

Try with 

#  \DeclareLaTeXClass[sig-alternate](sig-alternate)

as second line (braces instead of brackets).

Günter




custom layout -- possible bug?

2009-03-23 Thread Ernesto Posse
Hello. I'm having a bit of an issue with a custom layout I'm trying to
create for ACM SIG proceedings (from the sig-alternate.cls available
at http://www.acm.org/sigs/publications/proceedings-templates)

First I'm creating a layoutfile named "sig-alternate.layout" and
placed it under my layouts directory. The file contains the following:

--- begin of sig-alternate.layout ---
#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[sig-alternate]{sig-alternate}

Format 11
Input stdclass.inc
--- end of sig-alternate.layout ---

And I create a sample file (test.lyx) with this layout. Then I
generate plain latex from it and this is what I obtain:

--- begin of test.tex ---
%% LyX 1.6.1 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}

\usepackage{babel}

\begin{document}

\title{Blah blah}


\author{Me}

\maketitle

Something...
\end{document}
--- end of test.tex ---


The problem is that the first line has the wrong class (article)! Am I
doing something wrong? Why doesn't the generated latex begin with this
\documentclass{sig-alternate}?


Thanks.

PS: I'm running lyx 1.6.1 on ubuntu.

-- 
Ernesto Posse

Applied Formal Methods Group - Software Technology Lab
School of Computing
Queen's University - Kingston, Ontario, Canada


Re: upload a custom layout

2009-03-19 Thread Christian Ridderström

On Sun, 15 Mar 2009, nckg wrote:


If this layout could be of any use for other people, I would like to upload
it to LyX website.
(However I haven't found a "register" option there, so I am writing here.)


Hi Nick,

If you´d like, I can send you the password for uploading files off-list. 
Othewise Uwe´s suggestion is good :-)


Best regards
/Christian



With best regards,
Nick.



--
Christian Ridderström   Mobile: +46-70 687 39 44

Re: upload a custom layout

2009-03-15 Thread Uwe Stöhr

nckg schrieb:


I've made a LyX layout which customizes "Theorems (AMS)" module the
following way:
1) Titles of theorems are translated to Russian language


Translating stings is automatically done by LyX. The problem is that we don't have actually a 
Russian translation of LyX's strings:

http://www.lyx.org/I18n
But as you can see, we have an almost complete translation to Ukrainian. I guess you can take the 
Ukrainian translation and create a Russian one out of it because Ukrainian and Russian have many 
words in common, don't they?

Translating LyX is relatively easy:

- download the file "uk.po" from here:
  http://www.lyx.org/trac/browser/lyx-devel/branches/BRANCH_1_6_X/po/uk.po
- rename it to "ru.po" and open it with the program poedit:
  http://www.poedit.net/
- translate it

A more detailed description is given here:
http://www.lyx.org/trac/browser/lyx-devel/branches/BRANCH_1_6_X/README.localization

You would help LyX a lot by translating its strings. When you are unsure or have questions, please 
ask on the lyx-docs and/or the lyx-devel mailing list and we'll help you.



2) Theorems, Definitions and so on are numbered separately, and each type
of these environments is numbered consecutively throughout the document...


For the other cases Richard heck knows more than me - I CCed him.

regards Uwe


upload a custom layout

2009-03-15 Thread nckg

Hello!

I've made a LyX layout which customizes "Theorems (AMS)" module the
following way:
1) Titles of theorems are translated to Russian language
2) Theorems, Definitions and so on are numbered separately, and each type
of these environments is numbered consecutively throughout the document.

If this layout could be of any use for other people, I would like to upload
it to LyX website.
(However I haven't found a "register" option there, so I am writing here.)

With best regards,
Nick.
-- 
View this message in context: 
http://n2.nabble.com/upload-a-custom-layout-tp2480919p2480919.html
Sent from the LyX - Users mailing list archive at Nabble.com.



Re: label and counter in custom layout

2008-08-23 Thread Florin Oprina
On Sun, Aug 24, 2008 at 6:01 AM, rgheck <[EMAIL PROTECTED]> wrote:
>
> You might need a LabelString command, like:
>   LabelString "\arabic{Mycounter}"
> This tells LyX what to print as the label, whereas the LabelCounter, I
> think, tells LyX which counter to increment.
>
> rh
>
>>
>>
>
>

Yes! That did the trick! Thank you!


Re: label and counter in custom layout

2008-08-23 Thread rgheck

Florin Oprina wrote:

Hi all.
I'm trying to create a custom layout. What I want is a style to
display a counter at the beginning of the paragraph, automatically
incremented. In LyX 1.5.3, I followed the customisation guide and
ended up with:
Counter
Name Mycounter
End
Style My_Style
LatexType   Command
LatexName   emph
LabelType   Counter
LabelCounterMycounter
LabelSepxx
LeftMargin  xx
ParSkip   0.0
ItemSep   0.2
TopSep0.7
BottomSep 0.7
ParSep0.3
Align Block
AlignPossible Block, Left
End

(nevermind the boring \emph{} command, at this stage it is used just
as a placeholder)
This doesn't work as expected, and I don't know what I'm missing. I
was expecting to see a number at the beginning of the line, namely the
value of Mycounter.

  

You might need a LabelString command, like:
   LabelString "\arabic{Mycounter}"
This tells LyX what to print as the label, whereas the LabelCounter, I 
think, tells LyX which counter to increment.


rh


Any help is much appreciated.
  




label and counter in custom layout

2008-08-23 Thread Florin Oprina
Hi all.
I'm trying to create a custom layout. What I want is a style to
display a counter at the beginning of the paragraph, automatically
incremented. In LyX 1.5.3, I followed the customisation guide and
ended up with:
Counter
Name Mycounter
End
Style My_Style
LatexType   Command
LatexName   emph
LabelType   Counter
LabelCounterMycounter
LabelSepxx
LeftMargin  xx
ParSkip   0.0
ItemSep   0.2
TopSep0.7
BottomSep 0.7
ParSep0.3
Align Block
AlignPossible Block, Left
End

(nevermind the boring \emph{} command, at this stage it is used just
as a placeholder)
This doesn't work as expected, and I don't know what I'm missing. I
was expecting to see a number at the beginning of the line, namely the
value of Mycounter.
Any help is much appreciated.


Re: custom layout

2008-02-06 Thread Robert Orr
I did something similar.   I used a 1x2 table at each
step and in the table I put the graphic in one column,
the text in the other.

Perhaps that is workable for you too.

> Z. Bian wrote:
> > I am trying to write a book with lyx. The book is
> mostly tutorials with step by step instructions. For
> each step, I need to have step number, a block of
> text on left as instruction, and a image on right as
> figure showing what the instruction means.
> 



  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs


Re: custom layout

2008-02-05 Thread rgheck

Z. Bian wrote:

I am trying to write a book with lyx. The book is mostly tutorials with step by 
step instructions. For each step, I need to have step number, a block of text 
on left as instruction, and a image on right as figure showing what the 
instruction means.

I am currently using a custom list. For each item/step, I use two boxes within 
another box. This works ok, but too painful with the insertion of all the boxes 
and setting width etc.

Can I create a custom layout that I can simply insert into document that has 
two predefined fields for me to put in the text and figure, and it will layout 
the text and figure by passing the text and figure to a predefined latex class?

I can create a cuxtom layout that passes one item, but not two, to a latex 
class.
  
This is a shortcoming of LyX, one I'd love to remedy. But here's a hack: 
Define your layout so that it calls a two-argument command. Then, in ERT 
at the very beginning of each one, put: {whatever you want}, as your 
first argument.


Other way: Make the first argument optional, turn on optional arguments 
in the layout, and then put your first argument in the misnamed "short 
title" inset (under Insert).



Richard



custom layout

2008-02-05 Thread Z. Bian
I am trying to write a book with lyx. The book is mostly tutorials with step by 
step instructions. For each step, I need to have step number, a block of text 
on left as instruction, and a image on right as figure showing what the 
instruction means.

I am currently using a custom list. For each item/step, I use two boxes within 
another box. This works ok, but too painful with the insertion of all the boxes 
and setting width etc.

Can I create a custom layout that I can simply insert into document that has 
two predefined fields for me to put in the text and figure, and it will layout 
the text and figure by passing the text and figure to a predefined latex class?

I can create a cuxtom layout that passes one item, but not two, to a latex 
class.

Is this possible?

Thanks.

Max



Re: Problematic custom layout file

2006-03-14 Thread Charles de Miramon
Georg Baum wrote:


> Maybe you have a customized book layout file there that also needs one of
> the numxxx includes?
> 
Yes. You are right. I had in my .lyx/layouts an old stdclasse.inc from 1.3
that was loaded by LyX 1.4 in preference to the nex stdclasse.inc and
created errors. Removing it solved the problem.

Cheers,
Charles
-- 
http://www.kde-france.org



Re: Problematic custom layout file

2006-03-14 Thread Georg Baum
Am Dienstag, 14. März 2006 17:52 schrieb Charles de Miramon:
> I have a layout file for the class lettre (French letter) that I attach 
that
> does not work in 1.4. Adding Include numarticle.inc in the layout file 
does
> not solve the problem.

The file contains a typo

Input stdlayout.inc

is wrong, correct is

Input stdlayouts.inc

I am a bit surprised that LyX does not tell you the invalid line. The 
error handling of layout file reading certainly has to be improved.

> LyX 1.4 on a .lyx with custom layouts file from 1.3 is also causing
> problems. When you try to open help, LyX explains that it cannot find 
the
> book class. Erasing the .lyx/layouts/ solbve the problem

Maybe you have a customized book layout file there that also needs one of 
the numxxx includes?


Georg



Re: Custom .layout files in LyX 1.4

2006-03-14 Thread Georg Baum
Am Dienstag, 14. März 2006 14:52 schrieb Maria Gouskova:

> #% #% Do not delete the line below; configure depends on this
> #  \DeclareLaTeXClass[article]{article (Covington)}
> # Article textclass definition file. Taken from initial LyX source code
> # Author : Matthias Ettrich <[EMAIL PROTECTED]>
> # Transposed by Pascal Andre <[EMAIL PROTECTED]>
> # Heavily modifed and enhanced by several developers.
> 
> Format 2

This line tells LyX that the layout file is in the new format for 1.4, but 
this is not true, because it contains the old keyword MaxCounter. Read 
the section 'Upgrading old layout files' in Customization.lyx if you want 
to know more about this.

> Input stdclass.inc
> Input numarticle.inc
> Input linguistics.inc
> 
> NoStyle Chapter
> NoStyle Chapter*
> 
> MaxCounter  Counter_Section
> SecNumDepth 3
> TocDepth3
> 
> End

End is not valid at this place (neither in 1.3 nor in 1.4). Remove this 
line and the line with Format above and everything should work.
It seems that LyX 1.4 is more picky about unknown keywords in layout files 
than 1.3.

> i didn't change the contents of the linguistics.inc file, though. if
> that has to be modified as well, then this could be causing the
> problem.

No, that one works fine.


Georg



Problematic custom layout file

2006-03-14 Thread Charles de Miramon
Héllo,

Like Maria, I've got problem with custom LyX layout files converted from 1.3
to 1.4

I have a layout file for the class lettre (French letter) that I attach that
does not work in 1.4. Adding Include numarticle.inc in the layout file does
not solve the problem.

LyX 1.4 on a .lyx with custom layouts file from 1.3 is also causing
problems. When you try to open help, LyX explains that it cannot find the
book class. Erasing the .lyx/layouts/ solbve the problem

Cheers,
Charles
-- 
http://www.kde-france.org#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass{lettre}
# Lettre textclass definition file. 
# Adapté de letter.layout par N. Hathout (2 février 2001)
# Author : Matthias Ettrich <[EMAIL PROTECTED]>
# Heavily modifed and enhanced by serveral developers.

# Input general definitions
Input stdlettre.inc
Input stdlists.inc
Input stdlayout.inc
Input lyxmacros.inc

# Remove some unwanted styles.
#NoStyleRight_Address
#NoStyleAddress

# Lettre textclass definition file.
# Adapté de stdletter.inc par N. Hathout (2 février 2001)
# Modifié par Yann Morère (13 fev 2001) Charles de Miramon (20/11/2003)
# Author : Matthias Ettrich <[EMAIL PROTECTED]>
# Heavily modifed and enhanced by several developers.

# General textclass parameters
Columns 1
Sides   1
PageStyle   Empty

# This is just to show how to declare the default font.
# The defaults are exactly those shown here.
DefaultFont
  FamilyRoman
  SeriesMedium
  Shape Up
  Size  Normal
  Color None
EndFont

# Standard style definition
Style Standard
  MarginStatic
  LatexType Paragraph
  LatexName dummy
  ParIndent MM
  ParSkip   0.4
  Align Block
  AlignPossible Block, Left, Right, Center
  LabelType No_Label
End

# DestinataireSend_To_Address style definition
#Style Send_To_Address
Style Destinataire
#  Margin   Static
#  Margin   Right_Address_Box
  Latextype Command
  LatexName begin
  LatexParam{letter}
  #Ugly hack!
  Preamble
  \AtEndDocument{\end{letter}}
  EndPreamble
  KeepEmpty 1  
  ParSkip   0.4
  BottomSep 1.5
  ParSep1.5
  Align Right
#  AlignPossibleBlock, Left, Right, Center
  LabelType No_Label
End

# Expediteur My Address style
#Style My_Address
Style Expediteur
  MarginStatic
#  Margin   Right_Address_Box
  LatexType Command
  LatexName address
  ParSkip   0.4
  BottomSep 1.5
  ParSep1.5
  Align Left
  AlignPossible Left
End

# Telephone style definition
Style Telephone
  MarginStatic
  LatexType Command
  LatexName telephone
  LeftMarginSignature:xx
  LabelSep  xx
  TopSep0.4
  BottomSep 0.4
  ParSep0.4
  Align Block
  AlignPossible Block, Left
  LabelType Static
  LabelString   Téléphone:
#  Spacing   Other 1.5
End

# Fax style definition
Style Fax
  MarginStatic
  LatexType Command
  LatexName fax
  LeftMarginSignature::xx
  LabelSep  xx
  TopSep0.4
  BottomSep 0.4
  ParSep0.4
  Align Block
  AlignPossible Block, Left
  LabelType Static
  LabelString   Fax:
#  Spacing   Other 1.5
End

# Email style definition
Style Email
  MarginStatic
  LatexType Command
  LatexName email
  LeftMarginSignature::xx
  LabelSep  xx
  TopSep0.4
  BottomSep 0.4
  ParSep0.4
  Align Block
  AlignPossible Block, Left
  LabelType Static
  LabelString   Email:
#  Spacing   Other 1.5
End

# Lieu style definition
Style Lieu
  MarginStatic
  LatexType Command
  LatexName lieu
  LeftMarginSignature::xx
  LabelSep  xx
  TopSep0.4
  BottomSep 0.4
  ParSep0.4
  Align Block
  AlignPossible Block, Left
  LabelType Static
  LabelString   Lieu:
#  Spacing   Other 1.5
End

# Vref style definition
Style Vref
  MarginStatic
  LatexType Command
  LatexName vref
  LeftMarginSignature::xx
  LabelSep  xx
  TopSep0.4
  BottomSep 0.4
  ParSep0.4
  Align Block
  AlignPo

Re: Custom .layout files in LyX 1.4

2006-03-14 Thread Maria Gouskova
i actually did add numarticle.inc (copied it from the new
article.layout), so the text of the .layout file that causes the
problem is as follows:

#% #% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[article]{article (Covington)}
# Article textclass definition file. Taken from initial LyX source code
# Author : Matthias Ettrich <[EMAIL PROTECTED]>
# Transposed by Pascal Andre <[EMAIL PROTECTED]>
# Heavily modifed and enhanced by several developers.

Format 2

Input stdclass.inc
Input numarticle.inc
Input linguistics.inc

NoStyle Chapter
NoStyle Chapter*

MaxCounter  Counter_Section
SecNumDepth 3
TocDepth3

End

"linguistics.inc" is juergen's file:

http://wiki.lyx.org/uploads/LyX/LinguistLyX/linguistics.inc

i didn't change the contents of the linguistics.inc file, though. if
that has to be modified as well, then this could be causing the
problem.

--
mg


Re: Custom .layout files in LyX 1.4

2006-03-14 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:

Georg> Jean-Marc Lasgouttes wrote:
>> Georg, I think we should try to add numarticle.inc to stdclass.inc.
>> What do you think of that?

Georg> I agree, but the question is: Why was it separated in the first
Georg> place?

I think it is just that Andre (?) decided to do it like that. I am not
sure there is a better answer.

JMarc


Re: Custom .layout files in LyX 1.4

2006-03-14 Thread Georg Baum
Jean-Marc Lasgouttes wrote:

> Georg, I think we should try to add numarticle.inc to stdclass.inc.
> What do you think of that?

I agree, but the question is: Why was it separated in the first place?


Georg



Re: Custom .layout files in LyX 1.4

2006-03-14 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:

Georg> Maria Gouskova wrote:
>> I just installed LyX 1.4 on Mac OS 10.4.5 and am having a problem
>> with custom-made .layout files. When I try to change the document
>> class to a custom document class, an error message appears saying
>> the document could not be converted to that format. This happens
>> whether the .layout file is in LyX's own layouts directory or in
>> Library/Application Support/LyX/layouts. LyX can clearly find the
>> .layout file, since it appears in the list of available document
>> classes. The problem disappears in LyX 1.3.7 on the same computer
>> with the same .layout file. I checked the syntax of the .layout
>> file, and it does not seem to be different from the files that LyX
>> 1.4 ships with.

Georg> The syntax changed slightly from 1.3 to 1.4. You may need to
Georg> add

Georg> Include numarticle.inc

Georg, I think we should try to add numarticle.inc to stdclass.inc.
What do you think of that?

JMarc



Re: Custom .layout files in LyX 1.4

2006-03-13 Thread Georg Baum
Maria Gouskova wrote:

> I just installed LyX 1.4 on Mac OS 10.4.5 and am having a problem with
> custom-made .layout files. When I try to change the document class to
> a custom document class, an error message appears saying the document
> could not be converted to that format. This happens whether the
> .layout file is in LyX's own layouts directory or in
> Library/Application Support/LyX/layouts. LyX can clearly find the
> .layout file, since it appears in the list of available document
> classes. The problem disappears in LyX 1.3.7 on the same computer with
> the same .layout file. I checked the syntax of the .layout file, and
> it does not seem to be different from the files that LyX 1.4 ships
> with.

The syntax changed slightly from 1.3 to 1.4. You may need to add

Include numarticle.inc

to the layou file. Read the section "Upgrading old layout files" of the
Customization Guide for details.

> Is this a bug?

Maybe. Can you send a problematic layout file? Then we could have a look.


Georg



Custom .layout files in LyX 1.4

2006-03-13 Thread Maria Gouskova
I just installed LyX 1.4 on Mac OS 10.4.5 and am having a problem with
custom-made .layout files. When I try to change the document class to
a custom document class, an error message appears saying the document
could not be converted to that format. This happens whether the
.layout file is in LyX's own layouts directory or in
Library/Application Support/LyX/layouts. LyX can clearly find the
.layout file, since it appears in the list of available document
classes. The problem disappears in LyX 1.3.7 on the same computer with
the same .layout file. I checked the syntax of the .layout file, and
it does not seem to be different from the files that LyX 1.4 ships
with.

Is this a bug?

Maria Gouskova


Re: custom layout resources for common environments

2005-11-20 Thread Nusret BALCI

Yes, you're right. I noticed that just a couple of
minutes ago.
My document uses standard book class + some stuff in
preamble, but I guess I can copy them by modifying
layout file for book class, or better creating a
hybrid layout. It doesn't seem so hard now.

Thank you all.

Regards,

Nusret


--- Jose' Matos <[EMAIL PROTECTED]> wrote:

> On Sunday 20 November 2005 11:16, Nusret BALCI
> wrote:
> > In the past I used Sientific Workplace writing my
> M.S.
> > thesis (and I will use, hopefully, LyX in for my
> PhD
> > thesis :). They used a similar layout dropdown
> box,
> > but it had some of the options I mentioned. For
> > example, if you select the Theorem environment
> (just
> > as you do when you select, say, Enumerate in LyX,
> > rendering automatically changed to an emphasized
> mode
> > together with a "Theorem" caption, etc. This was
> very
> > pleasant to my eyes.
> 
> There are (lyx) layout classes with those styles
> defined, search for ams 
> variants and you will see them.
> 
> -- 
> José Abílio
> 





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


Re: custom layout resources for common environments

2005-11-20 Thread Jose' Matos
On Sunday 20 November 2005 11:16, Nusret BALCI wrote:
> In the past I used Sientific Workplace writing my M.S.
> thesis (and I will use, hopefully, LyX in for my PhD
> thesis :). They used a similar layout dropdown box,
> but it had some of the options I mentioned. For
> example, if you select the Theorem environment (just
> as you do when you select, say, Enumerate in LyX,
> rendering automatically changed to an emphasized mode
> together with a "Theorem" caption, etc. This was very
> pleasant to my eyes.

There are (lyx) layout classes with those styles defined, search for ams 
variants and you will see them.

-- 
José Abílio


Re: custom layout resources for common environments

2005-11-20 Thread chr
On Sun, 20 Nov 2005, Roy Schestowitz wrote:

> _/ On Sun 20 Nov 2005 01:08:02 GMT, [Nusret BALCI] wrote : \_
> 
> > Hi everybody,
> > Is there a place or does anybody know a good site for
> > custom layouts which can be used with LyX? For
> > example, there is no theorem, corollary, proof,
> > exercise, exam question, multiple choice test
> > question, etc. layouts available by default. Of course
> > this is a relatively side issue as you can get what
> > you want in the final typeset document, but it would
> > be nice to have visual effects on the screen as you
> > work with LyX :). If there are such repositories on
> > the net that you are aware of, could you let me know?
> > Regards,
> > Nusret
> 
> Hi,
> 
> I suggest you look at the following set of Wiki pages:
> 
> http://wiki.lyx.org/Examples/Examples

Also check out

> http://wiki.lyx.org/Layouts/Layouts

which is the place where user's can upload their own layout files (which 
among other things control the appearance in the LyX window).

/Christian

-- 
Christian Ridderström, +46-8-768 39 44   http://www.md.kth.se/~chr




Re: custom layout resources for common environments

2005-11-20 Thread Nusret BALCI

Thanks Roy.
Sure I'll look at the examples, etc. I just didn't
want to reinvent the wheel: if people already did
create layout files for such stuff, I could happily
use them though :). 

Well, to put it more precisely, what I meant was, in
fact, the rendering on the screen of the document (by
LyX, not the final output). As I said, the final
output is usually satisfactory if you can fine tune
enough your document within LyX, or directly in
exported LaTeX file.

Just to be able to explain better my point (not to
advocate or advertise any software: as i said, this
whole thing is cosmetic in nature), let me give an
example:

In the past I used Sientific Workplace writing my M.S.
thesis (and I will use, hopefully, LyX in for my PhD
thesis :). They used a similar layout dropdown box,
but it had some of the options I mentioned. For
example, if you select the Theorem environment (just
as you do when you select, say, Enumerate in LyX,
rendering automatically changed to an emphasized mode
together with a "Theorem" caption, etc. This was very
pleasant to my eyes. 

If I undestand it corectly (I started to use LyX just
a few days ago, so I may be very well wrong), you can
avoid gray ERT boxes if you create custom layout
files.

My question is whether there are such custom layout
files of your own or on the web. Thank you in advance
to everyone who will be willing to share: If I manage
to obtain pretty layout files, I'll make them
available on the web. But given that I'm still a
beginner here, it may take time especially since my
weekdays are somewhat busy these days.

And, hell no, I don't mean "talking dogs" or "paper
clips" :). They are sweet though, aren't they :)?

Regards,
Nusret



 
> > Hi everybody,
> > Is there a place or does anybody know a good site
> for
> > custom layouts which can be used with LyX? For
> > example, there is no theorem, corollary, proof,
> > exercise, exam question, multiple choice test
> > question, etc. layouts available by default. Of
> course
> > this is a relatively side issue as you can get
> what
> > you want in the final typeset document, but it
> would
> > be nice to have visual effects on the screen as
> you
> > work with LyX :). If there are such repositories
> on
> > the net that you are aware of, could you let me
> know?
> > Regards,
> > Nusret
> 
> Hi,
> 
> I suggest you look at the following set of Wiki
> pages:
> 
> http://wiki.lyx.org/Examples/Examples
> 
> Also,  be  sure to have a look at examples, which
> come  pre-packaged  with
> LyX. They reside in:
> 
> /lyx/examples/
> 
> where "/lyx" is your LyX installation directory.





> For  theorem,  corollary,  proof and so forth you
> might have  to  use  ERT
> (Insert -> TeX), though there are workarounds that
> might suit you better.
> 
> I  am  not too sure what you mean by "visual effects
> on the screen as  you
> work with LyX". As output is usually paper or a Web
> page, dynamicity would
> be gratuitous and lead to speed penalties. Are you
> thinking of a paperclip
> or a talking dog?
> 
> Hope it helps,
> 
> Roy
> 
> -- 
> Roy S. Schestowitz
> http://Schestowitz.com  |SuSE Linux |
> PGP-Key: 0x74572E8E
>   5:30am  up 17 days  1:24,  5 users,  load average:
> 0.15, 0.52, 0.70
> 
> 





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


Re: custom layout resources for common environments

2005-11-19 Thread Roy Schestowitz

_/ On Sun 20 Nov 2005 01:08:02 GMT, [Nusret BALCI] wrote : \_


Hi everybody,
Is there a place or does anybody know a good site for
custom layouts which can be used with LyX? For
example, there is no theorem, corollary, proof,
exercise, exam question, multiple choice test
question, etc. layouts available by default. Of course
this is a relatively side issue as you can get what
you want in the final typeset document, but it would
be nice to have visual effects on the screen as you
work with LyX :). If there are such repositories on
the net that you are aware of, could you let me know?
Regards,
Nusret


Hi,

I suggest you look at the following set of Wiki pages:

http://wiki.lyx.org/Examples/Examples

Also,  be  sure to have a look at examples, which come  pre-packaged  with
LyX. They reside in:

/lyx/examples/

where "/lyx" is your LyX installation directory.

For  theorem,  corollary,  proof and so forth you might have  to  use  ERT
(Insert -> TeX), though there are workarounds that might suit you better.

I  am  not too sure what you mean by "visual effects on the screen as  you
work with LyX". As output is usually paper or a Web page, dynamicity would
be gratuitous and lead to speed penalties. Are you thinking of a paperclip
or a talking dog?

Hope it helps,

Roy

--
Roy S. Schestowitz
http://Schestowitz.com  |SuSE Linux | PGP-Key: 0x74572E8E
 5:30am  up 17 days  1:24,  5 users,  load average: 0.15, 0.52, 0.70



custom layout resources for common environments

2005-11-19 Thread Nusret BALCI
Hi everybody,
Is there a place or does anybody know a good site for
custom layouts which can be used with LyX? For
example, there is no theorem, corollary, proof,
exercise, exam question, multiple choice test
question, etc. layouts available by default. Of course
this is a relatively side issue as you can get what
you want in the final typeset document, but it would
be nice to have visual effects on the screen as you
work with LyX :). If there are such repositories on
the net that you are aware of, could you let me know?
Regards,
Nusret




__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


Re: Custom layout and psmatrix from pstricks, 1.4.0pre2

2005-10-26 Thread Herbert Voss
maarten wrote:

>> latex -> ps/eps images
>> pdflatex -> png,jpg,pdf images
> 
> I know the latex basics, but I forgot to mention that also when I use
> logo.eps it happened.

sure, LyX doesn't know, that you use \includegraphics nad
did not write \usepackage{graphicx} in the preamble.
When using the LyX way to insert a graphic, LyX dies the rest.

in your case, you have to put the \usepackage by yourself
in the preamble.

> In the mean time I found out logo.png in the header works for pdflatex
> as long as you put another image somewhere in the document.

see above

> If you use ps2pdf you NEED logo.eps. In the rest of the document you can
> still use other types of images, lyx takes care about that.
> 
> After some trail and error I found out:
> The solution is to remove \usepackage{cmap} (why?) and - off course -

example file! However \usepackage{lmodern} is the better way


> put ps2pdf instead of pdftex in the hyperref options in the preamble.

in most cases, hyperref can detect by itself, what driver
is the needed.

>> let this be done by geometry, at least by LyX
> 
> Is that really needed? I try to keep the "user" interaction about
> document layout as low possible so I specified this in the layout
> Preamble.

no, use the LyX menu

Herbert



Re: Custom layout and psmatrix from pstricks, 1.4.0pre2

2005-10-26 Thread maarten
Herbert,

It's solved! But I still have some questions. See below.

On Wed, 2005-10-26 at 13:45 +0200, Herbert Voss wrote:
> maarten wrote:
> 
> > Hi,
> > 
> > I have some trouble when trying to getting this ERT to work correctly:
> > 
> > \begin{psmatrix}[colsep=0.5cm]
> > \psframebox{Yes} & \psframebox{No} & C \\
> > \psframebox{Yesy} & \psframebox{No} & C \\
> > \ncline{->}{1,1}{2,1}
> > \end{psmatrix}
> > 
> > I've put \usepackage{pst-node} in the document preamble.
> > 
> > This works (ps2pdf) as long as I use the standard book layout. When I
> > use pdflatex this does not work (as I understand obviously).
> 
> PSTricks -> PostScript Tricks ...
> this cannot be compiled with pdflatex. However, unless
> you didn't use character expansion, ps2pdf does the same job.
> 
> 
> > On the other hand, if I generate pdf from my books (without any
> > pstricks) with ps2pdf I get a complaint "LaTex Error: Cannot determine
> > size of graphic logo.png". But this works fine with pdflatex.
> 
> you should read some basic informations about LaTeX/pdflatex
> 
> > Does anyone have a workaround? I run 1.4.0pre2.
> 
> latex -> ps/eps images
> pdflatex -> png,jpg,pdf images

I know the latex basics, but I forgot to mention that also when I use
logo.eps it happened.
In the mean time I found out logo.png in the header works for pdflatex
as long as you put another image somewhere in the document.
If you use ps2pdf you NEED logo.eps. In the rest of the document you can
still use other types of images, lyx takes care about that.

After some trail and error I found out:
The solution is to remove \usepackage{cmap} (why?) and - off course -
put ps2pdf instead of pdftex in the hyperref options in the preamble.


> 
> > % Marges
> > \addtolength{\evensidemargin}{-22pt}
> > \addtolength{\voffset}{-0.3in}
> > \oddsidemargin 0.0in
> > \textwidth 6.3in
> > \textheight 9.0in
> 
> let this be done by geometry, at least by LyX

Is that really needed? I try to keep the "user" interaction about
document layout as low possible so I specified this in the layout
Preamble.

> 
> > \newsavebox{\oordlogo}
> > \savebox{\oordlogo}{\includegraphics[width=15mm]{logo.png}}
> > \rhead{\usebox{\oordlogo}}
> 
> why did you put this in a box?

I don't know, I copied a sample I found somewhere and it worked. This
works also and is perhaps 'cleaner' code:
\rhead{\includegraphics[width=15mm]{logo.eps}}


> 
> 
> Herbert
> 

Maarten


Re: Custom layout and psmatrix from pstricks, 1.4.0pre2

2005-10-26 Thread Herbert Voss
maarten wrote:

> Hi,
> 
> I have some trouble when trying to getting this ERT to work correctly:
> 
> \begin{psmatrix}[colsep=0.5cm]
> \psframebox{Yes} & \psframebox{No} & C \\
> \psframebox{Yesy} & \psframebox{No} & C \\
> \ncline{->}{1,1}{2,1}
> \end{psmatrix}
> 
> I've put \usepackage{pst-node} in the document preamble.
> 
> This works (ps2pdf) as long as I use the standard book layout. When I
> use pdflatex this does not work (as I understand obviously).

PSTricks -> PostScript Tricks ...
this cannot be compiled with pdflatex. However, unless
you didn't use character expansion, ps2pdf does the same job.


> On the other hand, if I generate pdf from my books (without any
> pstricks) with ps2pdf I get a complaint "LaTex Error: Cannot determine
> size of graphic logo.png". But this works fine with pdflatex.

you should read some basic informations about LaTeX/pdflatex

> Does anyone have a workaround? I run 1.4.0pre2.

latex -> ps/eps images
pdflatex -> png,jpg,pdf images

> % Marges
> \addtolength{\evensidemargin}{-22pt}
> \addtolength{\voffset}{-0.3in}
> \oddsidemargin 0.0in
> \textwidth 6.3in
> \textheight 9.0in

let this be done by geometry, at least by LyX

> \newsavebox{\oordlogo}
> \savebox{\oordlogo}{\includegraphics[width=15mm]{logo.png}}
> \rhead{\usebox{\oordlogo}}

why did you put this in a box?


Herbert



Custom layout and psmatrix from pstricks, 1.4.0pre2

2005-10-26 Thread maarten
Hi,

I have some trouble when trying to getting this ERT to work correctly:

\begin{psmatrix}[colsep=0.5cm]
\psframebox{Yes} & \psframebox{No} & C \\ 
\psframebox{Yesy} & \psframebox{No} & C \\
\ncline{->}{1,1}{2,1}
\end{psmatrix}

I've put \usepackage{pst-node} in the document preamble.

This works (ps2pdf) as long as I use the standard book layout. When I
use pdflatex this does not work (as I understand obviously).

On the other hand, if I generate pdf from my books (without any
pstricks) with ps2pdf I get a complaint "LaTex Error: Cannot determine
size of graphic logo.png". But this works fine with pdflatex.

Does anyone have a workaround? I run 1.4.0pre2.

Maarten


=my layout===

#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[book]{book in van Oord stijl}
# Book textclass definition file. Taken from initial LyX source code
# Author : Matthias Ettrich <[EMAIL PROTECTED]>
# Transposed by Pascal André <[EMAIL PROTECTED]>
# Heavily modifed and enhanced by serveral developers.

# Input general definitions
Input stdclass.inc
Input numreport.inc

# Global parameters.
Sides   2
PageStyle   Headings

# There is no abstract environment in book.cls
NoStyle Abstract

# a few changes to the bibliography
Style Bibliography
  TopSep4
  LabelString   Bibliography
  # label font definition
  LabelFont 
Series  Bold
SizeHuge
  EndFont
End


Preamble

% Lettertype
\usepackage[scaled=0.92]{helvet}
\renewcommand{\familydefault}{\sfdefault}

% Marges
\addtolength{\evensidemargin}{-22pt}
\addtolength{\voffset}{-0.3in}
\oddsidemargin 0.0in
\textwidth 6.3in
\textheight 9.0in

% Versiebeheer tags
\usepackage{rcs}

% Kop en voetteksten
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\footrulewidth}{0.5pt}
\renewcommand{\headrulewidth}{0.5pt}
\newsavebox{\oordlogo}
\savebox{\oordlogo}{\includegraphics[width=15mm]{logo.png}}
\rhead{\usebox{\oordlogo}}

\lhead{Left top}
\chead{Middle top}

\rfoot{Right bottom}
\cfoot{\thepage}
\lfoot{Left bottom}

% Conditionele teksten
\usepackage{ifthen}
\newcommand{\boot}{Volvox Hopper}

% file-namen afbreken
\usepackage{path}
\discretionaries |[EMAIL PROTECTED]&*()_+`-=#{}[]:";<>,.?\/| % truukje om
taakmenuhelpfile en
%mainmenuhelpfile goed af te breken. k en u erbij, ' eruit
% dit is wel tricky, maar voorlopig werkt het

% Indexen en PDF opties
\usepackage{chappg}
\usepackage{tocbibind}
\usepackage{cmap}

\usepackage[
plainpages=false,
%linktocpage=true,
pdfpagelabels=true,
pdftex,
bookmarks=true,
a4paper=true,
pdfpagemode=UseOutlines,
bookmarksnumbered=true]{hyperref}
EndPreamble



Re: Custom layout & style

2002-12-19 Thread William Adams
Janine said:
>What *is* necessary to me is
>visible in http://www.terrabionic.com/books. Sure, they look OK. I want
>them to look GOOD ::}

>With your help, that is possible. Please consider it?

>I dunno.

While the subject matter appeals, your texts seem burdened w/ 
elementary errors of text and formatting

hagakure.pdf pg. 44, last paragraph, third line
"No matter whether one be of high or low rank, a family line is 
something that
will decline when its trine has come...

``trine''? Surely you mean time?

I guess you're typesetting a Project Gutenberg e-text? IME, they 
always need to be proofed carefully. Take a look at, Okakura Kakuzo's 
_The Book of Tea_ in my portfolio at http://members.aol.com/willadams 
for my experience w/ that. I did, finally get them to accept (some 
of) my corrections though.

Your documents also have some orphans and widows, and I've never 
liked space between paragraphs in lieu of indentation, and some pages 
seem to run short (always do that on a spread---hard for me to check 
if you've done that though, since your pagination in the .pdf matches 
up the wrong verso / recto, i.e., 43 and 44 face each other in facing 
pages view in Acrobat Reader).

You also have some too-long lines (hagakure.pdf pg. 44 has an example 
of this).

I'd urge you to read a few basic texts on typography so as to at 
least cover the basics before asking for further help. I've a listing 
of them in my bibliography on my web site (ob. discl. I'm an Amazon 
Associate and may profit).

I'd especially recommend Adrian Wilson's _The Design of Books_ and 
Bringhurst's _Elements of Typographic Style_

William


--
William Adams, publishing specialist
voice - 717-731-6707 | Fax - 717-731-6708
www.atlis.com



Custom layout & style

2002-12-18 Thread Janine C . Buorditez
Hi.

I'm in the process of defining my own look to my books.

I've currently assembled a typedragon.layout and a typedragon.sty.
The .layout file is a modified book.layout. The .sty file is a modified
lshort.sty from ``The Not So Short Introduction to LaTeX2e''.

The style of the lshort document fascinates me. I doubt I've seen anything
better. If you have or created something superior on your own, please let
me know. Or if you have any neat fonts to spice things up I'd be glad to do
anything for them.

Preamble 
\usepackage{typedragon}
EndPreamble

Putting that in the premable only freezes LyX upon PDF preview.
Something must be wrong, and I'm not the girl to figure it out ;)

I'm positive there are tons of conflicts arising out of the settings in
the .sty file that are unnecessary to me. What *is* necessary to me is
visible in http://www.terrabionic.com/books. Sure, they look OK. I want
them to look GOOD ::}

With your help, that is possible. Please consider it?

Thanks! :P

Yours sincerely,
--janine



typedragon.layout
Description: Binary data


typedragon.sty
Description: Binary data