Re: changing justification of caption

2009-08-21 Thread Wolfgang Engelmann
Am Friday 21 August 2009 04:23:06 schrieb Jonatan R. Catai:
 Dear All,

 I added a float picture on my report and Lyx adds the caption automatically
 - so far so good. However, the caption stays on the center of the page. I
 tryed clicking with the right button of the mouse outside the caption box,
 within the float picture box, and in Paragraph Settings change to left, but
 no sucess - the caption remaings on the center in DVI and PDF output. Am I
 doing something wrong? How can I change its position to the left?

 I am using article koma script.

 Jonatan

Mark the float with mouse, click with right mouse button, select paragraph 
settings  justification left
(wording might be different in English; I am using the German setting)

Wolfgang


Re: help - some questions

2009-08-21 Thread Sam Liddicott
* Ricardo Perrone wrote, On 21/08/09 04:05:
 Hi,
 
 I need a little help with some questions:

I've thought of such things from time to time, and concluded that the
style authors have more knowledge of typesetting than I do, and that my
opinion of more appropriate space probably enjoys less acceptance than
their opinion.

However there is a case to make for being able to change it... you just
first need to ask yourself if you are sure that you know better than the
class designers. If you decision is based purely on it's too wide then
you probably don't know better and you should leave it alone.

 1- Lyx has some default font size like Normal, small, smallest, etc. But how 
 can I change it to a specific font size to be applied in some places of my 
 document? For instance 10.5pt.

Font sizes in Lyx and Latex are given names:
http://www.image.ufl.edu/help/latex/fonts.shtml

So first you need to think if you literally want 10.5pt or if you want
to set the size of one of the name styles or sizes to 10.5pt.

You can mess with tie \fontsize{}{} command; insert this in your pre-amble:

\newcommand\sizetf[1]{\begingroup\fontsize{10.5}{12}\selectfont{#1}\endgroup}

then you can use the command

\sizetf{I'm in 10.5pt}

in ERT in your document.

(I wish Lyx supported adding per-document layouts and elements in the
same way that it supports adding Latex commands in the preamble)


 2- I am using enumerate environment, but it adds a large space between the 
 paragraph and the first item of environment. Is there a way to change it to a 
 more appropriated space? I am using book.cls template.

You probably want to read this:
http://tkcs-collins.com/truman/latex/list_examp.shtml

And you may find it easier to use these if you define a lyx .module file
to go with them. Look at existing lyx module files to work this out, and
install your own in ~/.lyx/layouts

Sam


Captions

2009-08-21 Thread solvi . natland
Hi!

Does anybody know, how can get rid of the indentations in my float caption 
texts (for both figures and tables)?

Figure 1:   Now my text looks like this,
here begins the 2nd line of the caption.

Figure 2:   And I would like to have something like
this, where there isn't an indent in the 2nd line.

Document-class: book(KOMA-script)
LYX version 1.6.3 for Windows.

I have tried different things I found on the internet, both ERT and 
commands for the preamble but so far nothing has worked out - either 
nothing happens or I get lots and lots of errors. I have looked in the 
KOMA-manual but I just don't undrstand it- I basically needs an 
explanation for dummies :D

It should be mentioned that I already have this defined in the preamble:

\usepackage[dvips=false%
,pdftex=false%
,vtex=false%
,twoside%
,papersize={170mm,240mm}% --- A4 with 20mm cut on both sides and 28.8mm 
cut top and bottom
,hdivide={24mm,*,24mm}% --- 122mm text width, 24mm margin both sides (no 
binding edge!)
,vdivide={11.5mm,*,17.5mm}% --- 28.5+11.5=40mm from top of A4 to text 
(46mm at bottom)
,includehead%
,includefoot%
]{geometry}
\usepackage[a4,cam,axes,noinfo,center]{crop} % For printing crop-marks on 
a4 manuscript
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{\uppercase{#1}}{}}
\renewcommand{\sectionmark}[1]{\markright{\uppercase{#1}}}
\fancyhf{}
\fancyhead[LE,RO]{\small \thepage} % Left on Even numbered pages  Right 
on Odd
\fancyhead[LO]{\small \slshape \rightmark} % Left on Odd (Right-hand page)
\fancyhead[RE]{\small \slshape \leftmark} % Right on Even (Left-hand page)
\renewcommand{\headrulewidth}{0.5pt}

I really hope someone can help me with this and please give me the 
dummy-version :D

 

image/jpeg

Re: help - some questions

2009-08-21 Thread Olivier Ripoll

Sam Liddicott wrote:

* Ricardo Perrone wrote, On 21/08/09 04:05:

Hi,


[...]


You can mess with tie \fontsize{}{} command; insert this in your pre-amble:

\newcommand\sizetf[1]{\begingroup\fontsize{10.5}{12}\selectfont{#1}\endgroup}

then you can use the command

\sizetf{I'm in 10.5pt}

in ERT in your document.

(I wish Lyx supported adding per-document layouts and elements in the
same way that it supports adding Latex commands in the preamble)


Isn't that what layout modules are for ? Something like the following 
seems to work fine (I set the aspect to green in LyX to clearly 
differentiate from the normal text):


InsetLayout CharStyle:FontSize10.5
LyxType   charstyle
LabelString   FontSize10.5
LatexType command
LatexName SizeTenPointFive
Font
  Color   green
  Sizenormal
EndFont
Preamble

\newcommand\SizeTenPointFive[1]{\begingroup\fontsize{10.5}{12}\selectfont{#1}\endgroup}
EndPreamble
End


I attach an example module with font sizes from 8 to 12.5 with step 0.5. 
It works fine for me on 1.6.3. Once it is copied to the layout folder 
(*), you reconfigure, close  reopen lyx, and add the Font Size Styles 
module in the Document-Settings, Modules tab. Apply and you 
automatically have those styles in Edit-Text Styles or better, in the 
right-click contextual menu.


However, I do not encourage the use of font size this way. Better is to 
use logical styles.


Best regards,

Olivier

(*) On windows, it is
C:\Documents and Settings\###?\Application Data\lyx16\layouts
where ### is the user name
on linux, it should be in the home folder, in something like .lyx16/layouts

#\DeclareLyXModule{Font Size Styles}
#DescriptionBegin
#Custom font sizes.
#DescriptionEnd

# Author : ORi (based on code by Sam Liddicott)

Format 11

InsetLayout CharStyle:FontSize8
LyxType   charstyle
LabelString   FontSize8
LatexType command
LatexName SizeEight
Font
  Color   green
  Sizesmall
EndFont
Preamble

\newcommand\SizeEight[1]{\begingroup\fontsize{8}{9.5}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout CharStyle:FontSize8.5
LyxType   charstyle
LabelString   FontSize8.5
LatexType command
LatexName SizeEightPointFive
Font
  Color   green
  Sizesmall
EndFont
Preamble

\newcommand\SizeEightPointFive[1]{\begingroup\fontsize{8.5}{10}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout CharStyle:FontSize9
LyxType   charstyle
LabelString   FontSize9
LatexType command
LatexName SizeNine
Font
  Color   green
  Sizesmall
EndFont
Preamble

\newcommand\SizeNine[1]{\begingroup\fontsize{9}{10.5}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout CharStyle:FontSize9.5
LyxType   charstyle
LabelString   FontSize9.5
LatexType command
LatexName SizeNinePointFive
Font
  Color   green
  Sizesmall
EndFont
Preamble

\newcommand\SizeNinePointFive[1]{\begingroup\fontsize{9.5}{11}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout CharStyle:FontSize10
LyxType   charstyle
LabelString   FontSize10
LatexType command
LatexName SizeTen
Font
  Color   green
  Sizenormal
EndFont
Preamble

\newcommand\SizeTen[1]{\begingroup\fontsize{10}{11.5}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout CharStyle:FontSize10.5
LyxType   charstyle
LabelString   FontSize10.5
LatexType command
LatexName SizeTenPointFive
Font
  Color   green
  Sizenormal
EndFont
Preamble

\newcommand\SizeTenPointFive[1]{\begingroup\fontsize{10.5}{12}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout CharStyle:FontSize11
LyxType   charstyle
LabelString   FontSize11
LatexType command
LatexName SizeEleven
Font
  Color   green
  Sizenormal
EndFont
Preamble

\newcommand\SizeEleven[1]{\begingroup\fontsize{11}{13}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout CharStyle:FontSize11.5

Re: help - some questions

2009-08-21 Thread Sam Liddicott
* Olivier Ripoll wrote, On 21/08/09 10:29:
 Sam Liddicott wrote:
 * Ricardo Perrone wrote, On 21/08/09 04:05:
 Hi,

 [...]
 
 You can mess with tie \fontsize{}{} command; insert this in your
 pre-amble:

 \newcommand\sizetf[1]{\begingroup\fontsize{10.5}{12}\selectfont{#1}\endgroup}


 then you can use the command

 \sizetf{I'm in 10.5pt}

 in ERT in your document.

 (I wish Lyx supported adding per-document layouts and elements in the
 same way that it supports adding Latex commands in the preamble)
 
 Isn't that what layout modules are for ? 

Sure, but as you can't embed a layout module in the lyx document, ERT
can sometimes be easier and more portable, and for small chunks of text
is already clearly delineated in the Lyx document by the red box.

(I suggested a layout module for his enums, it would be nuts to do those
with ERT)

And thanks for providing the examples that I was too lazy to provide..

Sam


Re: help - some questions

2009-08-21 Thread Olivier Ripoll

Sam Liddicott wrote:

* Olivier Ripoll wrote, On 21/08/09 10:29:

Sam Liddicott wrote:

* Ricardo Perrone wrote, On 21/08/09 04:05:

Hi,


[...]


You can mess with tie \fontsize{}{} command; insert this in your
pre-amble:

\newcommand\sizetf[1]{\begingroup\fontsize{10.5}{12}\selectfont{#1}\endgroup}


then you can use the command

\sizetf{I'm in 10.5pt}

in ERT in your document.

(I wish Lyx supported adding per-document layouts and elements in the
same way that it supports adding Latex commands in the preamble)
Isn't that what layout modules are for ? 


Sure, but as you can't embed a layout module in the lyx document, ERT
can sometimes be easier and more portable, and for small chunks of text
is already clearly delineated in the Lyx document by the red box.


Okay, I see what you meant now. Hopefully, the layout modules will be 
somehow integrated in the embedded format, when it is available.



(I suggested a layout module for his enums, it would be nuts to do those
with ERT)

And thanks for providing the examples that I was too lazy to provide..


It was a good challenge for me, and I learnt a lot: it seems latex 
command names cannot contain numbers nor . or _ characters. I had to 
go for the ugly number in full letters way. I also learnt the LyX font 
size this way (no numbers).


This illustrates the big 'drawback' of LyX: After ~8 years using LyX, 
writing a Thesis and several documents, I haven't learnt much of LaTeX 
because LyX does all for me. LyX encourages laziness !


Regards,

Olivier



Re: Captions

2009-08-21 Thread Pierfranco Minsenti
Hi,

the most effective way (as far as I know) to customise float capions is to
use the package caption which provides several options.
I use it in connection withLyX and the KOMA script report class and I obtain
what I want.
If it is not included in your LaTeX distribution you can download it from:
 http://www.ctan.org/tex-archive/macros/latex/contrib/caption/
and install in your computer.

Then in you preamble you should put the following lines:

\usepackage{caption}
\captionsetup[table]{format=plain,skip=\medskipamount} % for tables
\captionsetup[figure]{format=plainskip=\medskipamount} %for figures

Check the documentation with all the options you can use at
http://www.ctan.org/get/macros/latex/contrib/caption/caption-eng.pdf

Best wishes

Pierfranco

2009/8/21 solvi.natl...@uis.no


 Hi!

 Does anybody know, how can get rid of the indentations in my float caption
 texts (for both figures and tables)?

 Figure 1:Now my text looks like this,
here begins the 2nd line of the caption.

 Figure 2:And I would like to have something like
 this, where there isn't an indent in the 2nd line.

 Document-class: book(KOMA-script)
 LYX version 1.6.3 for Windows.

 I have tried different things I found on the internet, both ERT and
 commands for the preamble but so far nothing has worked out - either nothing
 happens or I get lots and lots of errors. I have looked in the KOMA-manual
 but I just don't undrstand it- I basically needs an explanation for dummies
 :D

 It should be mentioned that I already have this defined in the preamble:

 \usepackage[dvips=false%
 ,pdftex=false%
 ,vtex=false%
 ,twoside%
 ,papersize={170mm,240mm}% --- A4 with 20mm cut on both sides and 28.8mm cut
 top and bottom
 ,hdivide={24mm,*,24mm}% --- 122mm text width, 24mm margin both sides (no
 binding edge!)
 ,vdivide={11.5mm,*,17.5mm}% --- 28.5+11.5=40mm from top of A4 to text (46mm
 at bottom)
 ,includehead%
 ,includefoot%
 ]{geometry}
 \usepackage[a4,cam,axes,noinfo,center]{crop} % For printing crop-marks on
 a4 manuscript
 \usepackage{fancyhdr}
 \pagestyle{fancy}
 \renewcommand{\chaptermark}[1]{\markboth{\uppercase{#1}}{}}
 \renewcommand{\sectionmark}[1]{\markright{\uppercase{#1}}}
 \fancyhf{}
 \fancyhead[LE,RO]{\small \thepage} % Left on Even numbered pages  Right on
 Odd
 \fancyhead[LO]{\small \slshape \rightmark} % Left on Odd (Right-hand page)
 \fancyhead[RE]{\small \slshape \leftmark} % Right on Even (Left-hand page)
 \renewcommand{\headrulewidth}{0.5pt}

 I really hope someone can help me with this and please give me the
 dummy-version :D






Re: Captions

2009-08-21 Thread Wolfgang Engelmann
Am Friday 21 August 2009 11:28:40 schrieb solvi.natl...@uis.no:
 Hi!

 Does anybody know, how can get rid of the indentations in my float caption
 texts (for both figures and tables)?

 Figure 1:   Now my text looks like this,
 here begins the 2nd line of the caption.

 Figure 2:   And I would like to have something like
 this, where there isn't an indent in the 2nd line.

 Document-class: book(KOMA-script)
 LYX version 1.6.3 for Windows.


I am using
\setcapindent{0mm}
in the preamble
under  book(KOMA-script) ( LYX version 1.6.3 for Linux)

Wolfgang

 I have tried different things I found on the internet, both ERT and
 commands for the preamble but so far nothing has worked out - either
 nothing happens or I get lots and lots of errors. I have looked in the
 KOMA-manual but I just don't undrstand it- I basically needs an
 explanation for dummies :D

 It should be mentioned that I already have this defined in the preamble:

 \usepackage[dvips=false%
 ,pdftex=false%
 ,vtex=false%
 ,twoside%
 ,papersize={170mm,240mm}% --- A4 with 20mm cut on both sides and 28.8mm
 cut top and bottom
 ,hdivide={24mm,*,24mm}% --- 122mm text width, 24mm margin both sides (no
 binding edge!)
 ,vdivide={11.5mm,*,17.5mm}% --- 28.5+11.5=40mm from top of A4 to text
 (46mm at bottom)
 ,includehead%
 ,includefoot%
 ]{geometry}
 \usepackage[a4,cam,axes,noinfo,center]{crop} % For printing crop-marks on
 a4 manuscript
 \usepackage{fancyhdr}
 \pagestyle{fancy}
 \renewcommand{\chaptermark}[1]{\markboth{\uppercase{#1}}{}}
 \renewcommand{\sectionmark}[1]{\markright{\uppercase{#1}}}
 \fancyhf{}
 \fancyhead[LE,RO]{\small \thepage} % Left on Even numbered pages  Right
 on Odd
 \fancyhead[LO]{\small \slshape \rightmark} % Left on Odd (Right-hand page)
 \fancyhead[RE]{\small \slshape \leftmark} % Right on Even (Left-hand page)
 \renewcommand{\headrulewidth}{0.5pt}

 I really hope someone can help me with this and please give me the
 dummy-version :D



-- 
-
Wolfgang Engelmann
Schlossgartenstrasse 22
D-72070 Tübingen
Tel 07071 68325


Re: How to embed a spreadsheet in LyX or LaTeX?

2009-08-21 Thread Pavel Sanda
Helge Hafting wrote:
 Steve Litt wrote:
 Hi all,
 How can I embed a spreadsheet (MS Excel I assume) into a LyX or LaTeX 
 document?

 I wrote an external inset for spreadsheets some time ago.
 You can find it here:
 http://www.mail-archive.com/lyx-de...@lists.lyx.org/msg132049.html

put it in wiki?
pavel


Re: help - some questions

2009-08-21 Thread Steve Litt
On Thursday 20 August 2009 23:05:20 Ricardo Perrone wrote:
 Hi,

 2- I am using enumerate environment, but
 it adds a large space between the paragraph and the first item of
 environment. Is there a way to change it to a more appropriated space? I am
 using book.cls template.

Hi Ricardo,

The following comes right out of my layout file, which is based on book.cls:

% ### MyEnumerate: Vertically denser version of Enumerate style ###
\newenvironment{myenumerateL}{%
~\\[-1.2\baselineskip]
\begin{enumerate}%
\setlength{\parsep}{-2pt}
\setlength{\parskip}{-2pt}
\setlength{\partopsep}{-3pt}
\setstretch{0.7}
}{
\end{enumerate}
~\\[-0.5\baselineskip]
}

The preceding's main effect is to space all list items closer to each other, 
but the top ~\\[-1.2\baselineskip] controls the distance of the list to the 
preceding paragraph.

I chose to make a brand new environment, but you could have just as easily 
done it in place like this:

\let\oldenumerate\enumerate
\let\oldendenumerate\endenumerate

And then oldenumerate in the begin and end.

HTH

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt




index entry see also ?

2009-08-21 Thread Jeremy C. Reed
LaTeX has see for an index entry, but docbook has see and see also.

Any suggestions on how to get LyX or LaTeX to support a see also style 
index entry?

I believe that \seename can be redefined, but I may want both.

Something like:
\index{BSD|seealso{Berkeley Unix}}


Re: index entry see also ?

2009-08-21 Thread Ian S. Worthington
FWIW I hate index entries that redirect me.  There may be an occasional
justified use (redirect me to a concept with many sub-entries) but most
redirect me to another entry to give me a page or two.  Surely this is
archaic?

i

-- Original Message --
Received: 10:10 AM COT, 08/21/2009
From: Jeremy C. Reed r...@reedmedia.net
To: lyx-users@lists.lyx.org
Subject: index entry see also ?

 LaTeX has see for an index entry, but docbook has see and see also.
 
 Any suggestions on how to get LyX or LaTeX to support a see also style 
 index entry?
 
 I believe that \seename can be redefined, but I may want both.
 
 Something like:
 \index{BSD|seealso{Berkeley Unix}}
 





Re: Fancy TOC and headers question

2009-08-21 Thread L Duperval
On Thu, 20 Aug 2009 16:29:22 -0400, rgheck wrote:
 Well, here are a few. It seems to me that what you're doing, more or
 less, is using what would ordinarily be called sections but renaming
 them as tips. I'm not sure about this, because you list a section
 before the first chapter. 

You are correct. I mixed up my terminology: it really should say Part 
-- section is OpenOffice.org terminology for the same thing.

 But if that is what you are doing, then you
 will first need to redefine how sections appear in the TOC. I would do
 this using the titlesec package, but the koma-script packages probably
 have their own way of doing this. I don't know.
 

OK, I took a look. Titlesec seems interesting. I'll see if Koma-Script 
allows those types of changes also.

 As far as the TOC goes, titlesec has a companion package, titletoc,
 which may be what you need. Then again, it may be that, once you're
 redefined what sections are called (tips, in your case), all will be
 well.
 

OK, thanks.

 Finally, customization of headers generally means the use of the
 fancyhdr package, for which LyX provides limited support. The examples
 in the fancyhdr docs make it pretty easy to get what you want, though.
 

I guess so, if I can get the numbering to say Tip # and if I can get 
tip numbers to keep on incrementing from one chapter to the next.

Thanks for the ideas,

L

-- 
Get free public speaking and communication tips
by registering at http://www.duperval.com

Bring out the speaker in you!



\index expressions

2009-08-21 Thread Sam Liddicott
I'm trying to extend the indexing of newfangle literate code chunks.

I'm: \usepackage{index}

so that I can have multiple indexes; but the \index{} command seems to
literally interpret the first parameter, so that
\index{\chunkname}
indexes \chunkname instead of the name.

I've tried all kinds of use of \expandafter and other tricks with
secondary macros, like this:

\def\ch...@index#1{%
  \...@index[chunks]{#1}%
}%
\def\Chunk#1{%
  \lstset{title={\newfanglecaption},name=#1}%
  \global\edef\...@chunkname{\lst@intname}%
  \expandafter\ch...@index{\lst@chunkname}%
}%

But even then I get the literal text \...@chunkname as the indexed item.

The only thing that nearly works is if I pass #1 within \Chunk, but
then I get other text too, which I want to chop off.

Any clues on how to make the index package take an expression?

Sam


Re: help - some questions

2009-08-21 Thread rgheck

On 08/21/2009 06:08 AM, Sam Liddicott wrote:

* Olivier Ripoll wrote, On 21/08/09 10:29:
   

Sam Liddicott wrote:
 

(I wish Lyx supported adding per-document layouts and elements in the
same way that it supports adding Latex commands in the preamble)
   

Isn't that what layout modules are for ?
 

Sure, but as you can't embed a layout module in the lyx document, ERT
can sometimes be easier and more portable, and for small chunks of text
is already clearly delineated in the Lyx document by the red box.

   
Actually, LyX does support embedded layout. But it's an Advanced Feature 
because it is somewhat dangerous, so it is not widely advertised. There 
is also, at the moment, no GUI for it.


Have a look at the file Customization.lyx in your favorite text editor. 
Some way down you will find these lines:


\begin_local_layout
Format 7
InsetLayout CharStyle:MenuItem
LyxType   charstyle
LabelString   menu
LatexType command
LatexName menuitem
Font
Family  Sans
EndFont
Preamble
\newcommand*{\menuitem}[1]{{\sffamily #1}}
EndPreamble
End
\end_local_layout

If you want to include local layout in your document, you can open it in 
a text editor and add similar lines. Make sure they are well tested 
first, and be real careful about the first and last line. Unpredictable 
things might happen otherwise.


I hope to add a GUI for this in the next LyX release (now looking like 
1.7). I'd be really, really happy if someone else wanted to jump in and 
do it. It should actually be quite easy. (More or less just copy the GUI 
for the preamble.)


Richard



Re: Find All and Emphasize

2009-08-21 Thread Tommaso Cucinotta

Pavel Sanda ha scritto:

Tommaso Cucinotta wrote:
  

Hi all,

I'd like to mention that, with the patch I committed right now on the SVN, 
the current version of LyX from trunk implements correctly this kind of 
feature, i.e., you can search for a plain word and replace it with its 
emphasized or boldface version, or search for some text (i.e., X1) and 
replace it with a math symbol ($X_1$), or you can search for some maths 
(i.e., $X^1$) and replace it with some rework of it (i.e., $Y_1$), etc.. I 
know there are many use-cases, and I hope somebody helps in identifying the 
most important ones and/or possible issues.



can you write some documentation in our manuals? this or the hint in bug 3095
wouldn't occur to me ... :)
pavel

  

I've committed right now the original manual I wrote at the times the
feature was not yet in trunk (probably Abdel forgot to consider this
file when he ported the patch to trunk). I'll extend it with further
details, such as the use-case under discussion, or the replace feature.

   T.




Re: \index expressions

2009-08-21 Thread Sam Liddicott

The Texbook says:

  The \write command is somewhht special, 
because its token
list is first read without expansion; expansion occurs later, when the 
tokens are actually

being written to a file.


As \index writes to a file, this may be the problem!

I'll see if I can do any tricks with
\def\trick#1
where  is delimiters to try and the name it out of the original 
text, as #1 macros seem to make it through fine...


Sam

Sam Liddicott wrote:

I'm trying to extend the indexing of newfangle literate code chunks.

I'm: \usepackage{index}

so that I can have multiple indexes; but the \index{} command seems to
literally interpret the first parameter, so that
\index{\chunkname}
indexes \chunkname instead of the name.

I've tried all kinds of use of \expandafter and other tricks with
secondary macros, like this:

\def\ch...@index#1{%
  \...@index[chunks]{#1}%
}%
\def\Chunk#1{%
  \lstset{title={\newfanglecaption},name=#1}%
  \global\edef\...@chunkname{\lst@intname}%
  \expandafter\ch...@index{\lst@chunkname}%
}%

But even then I get the literal text \...@chunkname as the indexed item.

The only thing that nearly works is if I pass #1 within \Chunk, but
then I get other text too, which I want to chop off.

Any clues on how to make the index package take an expression?

Sam
  




Re: Maximum Font Size

2009-08-21 Thread Andre Poenitz
On Thu, Aug 20, 2009 at 05:01:20PM -0500, Les Denham wrote:
 On Thursday 20 August 2009 02:38:08 pm José Matos wrote:
  On Thursday 20 August 2009 16:09:21 Steve Litt wrote:
   Unless of course you have a 64 bit computer.
 
  And the data type used is long. For most of the 64-bit linux the memory
  layout is LP-64 that means that only long and pointer are 64 bits wide.
 
  In case anyone wonders wikipedia has an interesting starting point to read
  about this:
  http://en.wikipedia.org/wiki/LP64
 
   SteveT
 
 So the real question is whether the variable used for the font size is short 
 (16 bits in all common models), int (16 bits in LP32, 32 bits in ILP32 and 
 LP64, and 64 bits in ILP64) or long (32 bits in LP32, 64 bits in LP64 and 
 ILP64).  I have no idea where to look in the source code for this.  It's 
 probably buried in TeX somewhere, but TeX is written in WEB, which in turn is 
 written in either Pascal or C -- I'm not sure.

TeX's integer arithmetic is on all platforms exactly the same (something
hand-made fixed point) That's by design to ensure the same output no
matter where the program runs.

Andre'


Re: help - some questions

2009-08-21 Thread Guenter Milde
On 2009-08-21, Sam Liddicott wrote:
 * Ricardo Perrone wrote, On 21/08/09 04:05:

 2- I am using enumerate environment, but it adds a large space between
 the paragraph and the first item of environment. Is there a way to
 change it to a more appropriated space? I am using book.cls template.

 You probably want to read this:
 http://tkcs-collins.com/truman/latex/list_examp.shtml

 And you may find it easier to use these if you define a lyx .module file
 to go with them. Look at existing lyx module files to work this out, and
 install your own in ~/.lyx/layouts

There is a module for list styling, search wiki.lyx.org for 'enumitem'::

#\DeclareLyXModule[enumitem.sty]{Customisable Lists (enumitem)}
#DescriptionBegin
# Control the layout of enumerate, itemize and description
# with an optional argument.
# See http://dante.ctan.org/CTAN/macros/latex/contrib/enumitem/enumitem.pdf
#DescriptionEnd


Günter



Re: changing justification of caption

2009-08-21 Thread Jonatan R. Catai
Unfortunetly, it did not work.

Only the picture goes to the left, but not the caption. Some other idea?


Jonatan

On Fri, Aug 21, 2009 at 4:27 AM, Wolfgang Engelmann 
engelm...@uni-tuebingen.de wrote:

 Am Friday 21 August 2009 04:23:06 schrieb Jonatan R. Catai:
  Dear All,
 
  I added a float picture on my report and Lyx adds the caption
 automatically
  - so far so good. However, the caption stays on the center of the page. I
  tryed clicking with the right button of the mouse outside the caption
 box,
  within the float picture box, and in Paragraph Settings change to left,
 but
  no sucess - the caption remaings on the center in DVI and PDF output. Am
 I
  doing something wrong? How can I change its position to the left?
 
  I am using article koma script.
 
  Jonatan

 Mark the float with mouse, click with right mouse button, select paragraph
 settings  justification left
 (wording might be different in English; I am using the German setting)

 Wolfgang



Re: Find All and Emphasize

2009-08-21 Thread Pavel Sanda
Tommaso Cucinotta wrote:
 I've committed right now the original manual I wrote at the times the
 feature was not yet in trunk (probably Abdel forgot to consider this
 file when he ported the patch to trunk). I'll extend it with further
 details, such as the use-case under discussion, or the replace feature.

finally we should merge this file inside other manuals since we have far
too much entries in help menu, but for the time being its ok this way.
nice work.

pavel


A feature you really need

2009-08-21 Thread Steve Litt
Hi all,

Thank you so much for the outline view on LyX 1.6.x. You need two or three 
more buttons to make the outline view fully functional:

* Insert
* Delete
* Maybe Insert Subservient

The Insert function inserts a new heading, at the level of the current 
heading, directly above either the next heading at the current level, or if 
the next heading superior to the current level, whichever comes first. A little 
window should pop up for you to type the text of the heading into. This can be 
mapped to the Insert key, which at least on my LyX is unmapped.

The Delete function deletes the current headline and everything subservient to 
it. This function should have an are you sure screen, and maybe highlight in 
the document view everything that will be deleted. No need for a keyboard 
mapping --- this should not be done thoughtlessly.

The Insert Subservient button would insert a headline 1 level subservient to 
the current level, just above the next headline 1 level subservient to the 
current one or the next level superior to that. In other words, it goes below 
any text directly below the current outline. Maybe map this to Ctrl+Insert or 
something.

With these two or three added buttons you now have a fully functional outline 
processor integrated with the document processor. True, this outline processor 
isn't as fast or featureful as VimOutliner, but it can be used to 
design/outline chapters. 

I just tried designing a chapter with the current outline mode without the 
buttons, and it's so slow as to make you forget what you're doing. You must 
repeatedly type in headlines in the doc, then give them headline level 
environments, then move them around with the up and down and in and out. I 
can't explain why, but it's incredibly slow, and it takes your mind away from 
the designing.

You know, even just the one Insert button would make this a WHOLE BUNCH faster 
to use.

Thanks

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt




Re: A feature you really need

2009-08-21 Thread rgheck

On 08/21/2009 07:00 PM, Steve Litt wrote:

Hi all,

Thank you so much for the outline view on LyX 1.6.x. You need two or three
more buttons to make the outline view fully functional:

* Insert
* Delete
* Maybe Insert Subservient

   
Add this to trac, Steve. It's a good idea, and I'm sure someone will 
implement it.


rh


The Insert function inserts a new heading, at the level of the current
heading, directly above either the next heading at the current level, or if
the next heading superior to the current level, whichever comes first. A little
window should pop up for you to type the text of the heading into. This can be
mapped to the Insert key, which at least on my LyX is unmapped.

The Delete function deletes the current headline and everything subservient to
it. This function should have an are you sure screen, and maybe highlight in
the document view everything that will be deleted. No need for a keyboard
mapping --- this should not be done thoughtlessly.

The Insert Subservient button would insert a headline 1 level subservient to
the current level, just above the next headline 1 level subservient to the
current one or the next level superior to that. In other words, it goes below
any text directly below the current outline. Maybe map this to Ctrl+Insert or
something.

With these two or three added buttons you now have a fully functional outline
processor integrated with the document processor. True, this outline processor
isn't as fast or featureful as VimOutliner, but it can be used to
design/outline chapters.

I just tried designing a chapter with the current outline mode without the
buttons, and it's so slow as to make you forget what you're doing. You must
repeatedly type in headlines in the doc, then give them headline level
environments, then move them around with the up and down and in and out. I
can't explain why, but it's incredibly slow, and it takes your mind away from
the designing.

You know, even just the one Insert button would make this a WHOLE BUNCH faster
to use.

Thanks

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt

   




Re: changing justification of caption

2009-08-21 Thread Wolfgang Engelmann
Am Friday 21 August 2009 04:23:06 schrieb Jonatan R. Catai:
 Dear All,

 I added a float picture on my report and Lyx adds the caption automatically
 - so far so good. However, the caption stays on the center of the page. I
 tryed clicking with the right button of the mouse outside the caption box,
 within the float picture box, and in Paragraph Settings change to left, but
 no sucess - the caption remaings on the center in DVI and PDF output. Am I
 doing something wrong? How can I change its position to the left?

 I am using article koma script.

 Jonatan

Mark the float with mouse, click with right mouse button, select paragraph 
settings  justification left
(wording might be different in English; I am using the German setting)

Wolfgang


Re: help - some questions

2009-08-21 Thread Sam Liddicott
* Ricardo Perrone wrote, On 21/08/09 04:05:
 Hi,
 
 I need a little help with some questions:

I've thought of such things from time to time, and concluded that the
style authors have more knowledge of typesetting than I do, and that my
opinion of more appropriate space probably enjoys less acceptance than
their opinion.

However there is a case to make for being able to change it... you just
first need to ask yourself if you are sure that you know better than the
class designers. If you decision is based purely on it's too wide then
you probably don't know better and you should leave it alone.

 1- Lyx has some default font size like Normal, small, smallest, etc. But how 
 can I change it to a specific font size to be applied in some places of my 
 document? For instance 10.5pt.

Font sizes in Lyx and Latex are given names:
http://www.image.ufl.edu/help/latex/fonts.shtml

So first you need to think if you literally want 10.5pt or if you want
to set the size of one of the name styles or sizes to 10.5pt.

You can mess with tie \fontsize{}{} command; insert this in your pre-amble:

\newcommand\sizetf[1]{\begingroup\fontsize{10.5}{12}\selectfont{#1}\endgroup}

then you can use the command

\sizetf{I'm in 10.5pt}

in ERT in your document.

(I wish Lyx supported adding per-document layouts and elements in the
same way that it supports adding Latex commands in the preamble)


 2- I am using enumerate environment, but it adds a large space between the 
 paragraph and the first item of environment. Is there a way to change it to a 
 more appropriated space? I am using book.cls template.

You probably want to read this:
http://tkcs-collins.com/truman/latex/list_examp.shtml

And you may find it easier to use these if you define a lyx .module file
to go with them. Look at existing lyx module files to work this out, and
install your own in ~/.lyx/layouts

Sam


Captions

2009-08-21 Thread solvi . natland
Hi!

Does anybody know, how can get rid of the indentations in my float caption 
texts (for both figures and tables)?

Figure 1:   Now my text looks like this,
here begins the 2nd line of the caption.

Figure 2:   And I would like to have something like
this, where there isn't an indent in the 2nd line.

Document-class: book(KOMA-script)
LYX version 1.6.3 for Windows.

I have tried different things I found on the internet, both ERT and 
commands for the preamble but so far nothing has worked out - either 
nothing happens or I get lots and lots of errors. I have looked in the 
KOMA-manual but I just don't undrstand it- I basically needs an 
explanation for dummies :D

It should be mentioned that I already have this defined in the preamble:

\usepackage[dvips=false%
,pdftex=false%
,vtex=false%
,twoside%
,papersize={170mm,240mm}% --- A4 with 20mm cut on both sides and 28.8mm 
cut top and bottom
,hdivide={24mm,*,24mm}% --- 122mm text width, 24mm margin both sides (no 
binding edge!)
,vdivide={11.5mm,*,17.5mm}% --- 28.5+11.5=40mm from top of A4 to text 
(46mm at bottom)
,includehead%
,includefoot%
]{geometry}
\usepackage[a4,cam,axes,noinfo,center]{crop} % For printing crop-marks on 
a4 manuscript
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{\uppercase{#1}}{}}
\renewcommand{\sectionmark}[1]{\markright{\uppercase{#1}}}
\fancyhf{}
\fancyhead[LE,RO]{\small \thepage} % Left on Even numbered pages  Right 
on Odd
\fancyhead[LO]{\small \slshape \rightmark} % Left on Odd (Right-hand page)
\fancyhead[RE]{\small \slshape \leftmark} % Right on Even (Left-hand page)
\renewcommand{\headrulewidth}{0.5pt}

I really hope someone can help me with this and please give me the 
dummy-version :D

 

image/jpeg

Re: help - some questions

2009-08-21 Thread Olivier Ripoll

Sam Liddicott wrote:

* Ricardo Perrone wrote, On 21/08/09 04:05:

Hi,


[...]


You can mess with tie \fontsize{}{} command; insert this in your pre-amble:

\newcommand\sizetf[1]{\begingroup\fontsize{10.5}{12}\selectfont{#1}\endgroup}

then you can use the command

\sizetf{I'm in 10.5pt}

in ERT in your document.

(I wish Lyx supported adding per-document layouts and elements in the
same way that it supports adding Latex commands in the preamble)


Isn't that what layout modules are for ? Something like the following 
seems to work fine (I set the aspect to green in LyX to clearly 
differentiate from the normal text):


InsetLayout CharStyle:FontSize10.5
LyxType   charstyle
LabelString   FontSize10.5
LatexType command
LatexName SizeTenPointFive
Font
  Color   green
  Sizenormal
EndFont
Preamble

\newcommand\SizeTenPointFive[1]{\begingroup\fontsize{10.5}{12}\selectfont{#1}\endgroup}
EndPreamble
End


I attach an example module with font sizes from 8 to 12.5 with step 0.5. 
It works fine for me on 1.6.3. Once it is copied to the layout folder 
(*), you reconfigure, close  reopen lyx, and add the Font Size Styles 
module in the Document-Settings, Modules tab. Apply and you 
automatically have those styles in Edit-Text Styles or better, in the 
right-click contextual menu.


However, I do not encourage the use of font size this way. Better is to 
use logical styles.


Best regards,

Olivier

(*) On windows, it is
C:\Documents and Settings\###?\Application Data\lyx16\layouts
where ### is the user name
on linux, it should be in the home folder, in something like .lyx16/layouts

#\DeclareLyXModule{Font Size Styles}
#DescriptionBegin
#Custom font sizes.
#DescriptionEnd

# Author : ORi (based on code by Sam Liddicott)

Format 11

InsetLayout CharStyle:FontSize8
LyxType   charstyle
LabelString   FontSize8
LatexType command
LatexName SizeEight
Font
  Color   green
  Sizesmall
EndFont
Preamble

\newcommand\SizeEight[1]{\begingroup\fontsize{8}{9.5}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout CharStyle:FontSize8.5
LyxType   charstyle
LabelString   FontSize8.5
LatexType command
LatexName SizeEightPointFive
Font
  Color   green
  Sizesmall
EndFont
Preamble

\newcommand\SizeEightPointFive[1]{\begingroup\fontsize{8.5}{10}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout CharStyle:FontSize9
LyxType   charstyle
LabelString   FontSize9
LatexType command
LatexName SizeNine
Font
  Color   green
  Sizesmall
EndFont
Preamble

\newcommand\SizeNine[1]{\begingroup\fontsize{9}{10.5}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout CharStyle:FontSize9.5
LyxType   charstyle
LabelString   FontSize9.5
LatexType command
LatexName SizeNinePointFive
Font
  Color   green
  Sizesmall
EndFont
Preamble

\newcommand\SizeNinePointFive[1]{\begingroup\fontsize{9.5}{11}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout CharStyle:FontSize10
LyxType   charstyle
LabelString   FontSize10
LatexType command
LatexName SizeTen
Font
  Color   green
  Sizenormal
EndFont
Preamble

\newcommand\SizeTen[1]{\begingroup\fontsize{10}{11.5}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout CharStyle:FontSize10.5
LyxType   charstyle
LabelString   FontSize10.5
LatexType command
LatexName SizeTenPointFive
Font
  Color   green
  Sizenormal
EndFont
Preamble

\newcommand\SizeTenPointFive[1]{\begingroup\fontsize{10.5}{12}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout CharStyle:FontSize11
LyxType   charstyle
LabelString   FontSize11
LatexType command
LatexName SizeEleven
Font
  Color   green
  Sizenormal
EndFont
Preamble

\newcommand\SizeEleven[1]{\begingroup\fontsize{11}{13}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout CharStyle:FontSize11.5

Re: help - some questions

2009-08-21 Thread Sam Liddicott
* Olivier Ripoll wrote, On 21/08/09 10:29:
 Sam Liddicott wrote:
 * Ricardo Perrone wrote, On 21/08/09 04:05:
 Hi,

 [...]
 
 You can mess with tie \fontsize{}{} command; insert this in your
 pre-amble:

 \newcommand\sizetf[1]{\begingroup\fontsize{10.5}{12}\selectfont{#1}\endgroup}


 then you can use the command

 \sizetf{I'm in 10.5pt}

 in ERT in your document.

 (I wish Lyx supported adding per-document layouts and elements in the
 same way that it supports adding Latex commands in the preamble)
 
 Isn't that what layout modules are for ? 

Sure, but as you can't embed a layout module in the lyx document, ERT
can sometimes be easier and more portable, and for small chunks of text
is already clearly delineated in the Lyx document by the red box.

(I suggested a layout module for his enums, it would be nuts to do those
with ERT)

And thanks for providing the examples that I was too lazy to provide..

Sam


Re: help - some questions

2009-08-21 Thread Olivier Ripoll

Sam Liddicott wrote:

* Olivier Ripoll wrote, On 21/08/09 10:29:

Sam Liddicott wrote:

* Ricardo Perrone wrote, On 21/08/09 04:05:

Hi,


[...]


You can mess with tie \fontsize{}{} command; insert this in your
pre-amble:

\newcommand\sizetf[1]{\begingroup\fontsize{10.5}{12}\selectfont{#1}\endgroup}


then you can use the command

\sizetf{I'm in 10.5pt}

in ERT in your document.

(I wish Lyx supported adding per-document layouts and elements in the
same way that it supports adding Latex commands in the preamble)
Isn't that what layout modules are for ? 


Sure, but as you can't embed a layout module in the lyx document, ERT
can sometimes be easier and more portable, and for small chunks of text
is already clearly delineated in the Lyx document by the red box.


Okay, I see what you meant now. Hopefully, the layout modules will be 
somehow integrated in the embedded format, when it is available.



(I suggested a layout module for his enums, it would be nuts to do those
with ERT)

And thanks for providing the examples that I was too lazy to provide..


It was a good challenge for me, and I learnt a lot: it seems latex 
command names cannot contain numbers nor . or _ characters. I had to 
go for the ugly number in full letters way. I also learnt the LyX font 
size this way (no numbers).


This illustrates the big 'drawback' of LyX: After ~8 years using LyX, 
writing a Thesis and several documents, I haven't learnt much of LaTeX 
because LyX does all for me. LyX encourages laziness !


Regards,

Olivier



Re: Captions

2009-08-21 Thread Pierfranco Minsenti
Hi,

the most effective way (as far as I know) to customise float capions is to
use the package caption which provides several options.
I use it in connection withLyX and the KOMA script report class and I obtain
what I want.
If it is not included in your LaTeX distribution you can download it from:
 http://www.ctan.org/tex-archive/macros/latex/contrib/caption/
and install in your computer.

Then in you preamble you should put the following lines:

\usepackage{caption}
\captionsetup[table]{format=plain,skip=\medskipamount} % for tables
\captionsetup[figure]{format=plainskip=\medskipamount} %for figures

Check the documentation with all the options you can use at
http://www.ctan.org/get/macros/latex/contrib/caption/caption-eng.pdf

Best wishes

Pierfranco

2009/8/21 solvi.natl...@uis.no


 Hi!

 Does anybody know, how can get rid of the indentations in my float caption
 texts (for both figures and tables)?

 Figure 1:Now my text looks like this,
here begins the 2nd line of the caption.

 Figure 2:And I would like to have something like
 this, where there isn't an indent in the 2nd line.

 Document-class: book(KOMA-script)
 LYX version 1.6.3 for Windows.

 I have tried different things I found on the internet, both ERT and
 commands for the preamble but so far nothing has worked out - either nothing
 happens or I get lots and lots of errors. I have looked in the KOMA-manual
 but I just don't undrstand it- I basically needs an explanation for dummies
 :D

 It should be mentioned that I already have this defined in the preamble:

 \usepackage[dvips=false%
 ,pdftex=false%
 ,vtex=false%
 ,twoside%
 ,papersize={170mm,240mm}% --- A4 with 20mm cut on both sides and 28.8mm cut
 top and bottom
 ,hdivide={24mm,*,24mm}% --- 122mm text width, 24mm margin both sides (no
 binding edge!)
 ,vdivide={11.5mm,*,17.5mm}% --- 28.5+11.5=40mm from top of A4 to text (46mm
 at bottom)
 ,includehead%
 ,includefoot%
 ]{geometry}
 \usepackage[a4,cam,axes,noinfo,center]{crop} % For printing crop-marks on
 a4 manuscript
 \usepackage{fancyhdr}
 \pagestyle{fancy}
 \renewcommand{\chaptermark}[1]{\markboth{\uppercase{#1}}{}}
 \renewcommand{\sectionmark}[1]{\markright{\uppercase{#1}}}
 \fancyhf{}
 \fancyhead[LE,RO]{\small \thepage} % Left on Even numbered pages  Right on
 Odd
 \fancyhead[LO]{\small \slshape \rightmark} % Left on Odd (Right-hand page)
 \fancyhead[RE]{\small \slshape \leftmark} % Right on Even (Left-hand page)
 \renewcommand{\headrulewidth}{0.5pt}

 I really hope someone can help me with this and please give me the
 dummy-version :D






Re: Captions

2009-08-21 Thread Wolfgang Engelmann
Am Friday 21 August 2009 11:28:40 schrieb solvi.natl...@uis.no:
 Hi!

 Does anybody know, how can get rid of the indentations in my float caption
 texts (for both figures and tables)?

 Figure 1:   Now my text looks like this,
 here begins the 2nd line of the caption.

 Figure 2:   And I would like to have something like
 this, where there isn't an indent in the 2nd line.

 Document-class: book(KOMA-script)
 LYX version 1.6.3 for Windows.


I am using
\setcapindent{0mm}
in the preamble
under  book(KOMA-script) ( LYX version 1.6.3 for Linux)

Wolfgang

 I have tried different things I found on the internet, both ERT and
 commands for the preamble but so far nothing has worked out - either
 nothing happens or I get lots and lots of errors. I have looked in the
 KOMA-manual but I just don't undrstand it- I basically needs an
 explanation for dummies :D

 It should be mentioned that I already have this defined in the preamble:

 \usepackage[dvips=false%
 ,pdftex=false%
 ,vtex=false%
 ,twoside%
 ,papersize={170mm,240mm}% --- A4 with 20mm cut on both sides and 28.8mm
 cut top and bottom
 ,hdivide={24mm,*,24mm}% --- 122mm text width, 24mm margin both sides (no
 binding edge!)
 ,vdivide={11.5mm,*,17.5mm}% --- 28.5+11.5=40mm from top of A4 to text
 (46mm at bottom)
 ,includehead%
 ,includefoot%
 ]{geometry}
 \usepackage[a4,cam,axes,noinfo,center]{crop} % For printing crop-marks on
 a4 manuscript
 \usepackage{fancyhdr}
 \pagestyle{fancy}
 \renewcommand{\chaptermark}[1]{\markboth{\uppercase{#1}}{}}
 \renewcommand{\sectionmark}[1]{\markright{\uppercase{#1}}}
 \fancyhf{}
 \fancyhead[LE,RO]{\small \thepage} % Left on Even numbered pages  Right
 on Odd
 \fancyhead[LO]{\small \slshape \rightmark} % Left on Odd (Right-hand page)
 \fancyhead[RE]{\small \slshape \leftmark} % Right on Even (Left-hand page)
 \renewcommand{\headrulewidth}{0.5pt}

 I really hope someone can help me with this and please give me the
 dummy-version :D



-- 
-
Wolfgang Engelmann
Schlossgartenstrasse 22
D-72070 Tübingen
Tel 07071 68325


Re: How to embed a spreadsheet in LyX or LaTeX?

2009-08-21 Thread Pavel Sanda
Helge Hafting wrote:
 Steve Litt wrote:
 Hi all,
 How can I embed a spreadsheet (MS Excel I assume) into a LyX or LaTeX 
 document?

 I wrote an external inset for spreadsheets some time ago.
 You can find it here:
 http://www.mail-archive.com/lyx-de...@lists.lyx.org/msg132049.html

put it in wiki?
pavel


Re: help - some questions

2009-08-21 Thread Steve Litt
On Thursday 20 August 2009 23:05:20 Ricardo Perrone wrote:
 Hi,

 2- I am using enumerate environment, but
 it adds a large space between the paragraph and the first item of
 environment. Is there a way to change it to a more appropriated space? I am
 using book.cls template.

Hi Ricardo,

The following comes right out of my layout file, which is based on book.cls:

% ### MyEnumerate: Vertically denser version of Enumerate style ###
\newenvironment{myenumerateL}{%
~\\[-1.2\baselineskip]
\begin{enumerate}%
\setlength{\parsep}{-2pt}
\setlength{\parskip}{-2pt}
\setlength{\partopsep}{-3pt}
\setstretch{0.7}
}{
\end{enumerate}
~\\[-0.5\baselineskip]
}

The preceding's main effect is to space all list items closer to each other, 
but the top ~\\[-1.2\baselineskip] controls the distance of the list to the 
preceding paragraph.

I chose to make a brand new environment, but you could have just as easily 
done it in place like this:

\let\oldenumerate\enumerate
\let\oldendenumerate\endenumerate

And then oldenumerate in the begin and end.

HTH

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt




index entry see also ?

2009-08-21 Thread Jeremy C. Reed
LaTeX has see for an index entry, but docbook has see and see also.

Any suggestions on how to get LyX or LaTeX to support a see also style 
index entry?

I believe that \seename can be redefined, but I may want both.

Something like:
\index{BSD|seealso{Berkeley Unix}}


Re: index entry see also ?

2009-08-21 Thread Ian S. Worthington
FWIW I hate index entries that redirect me.  There may be an occasional
justified use (redirect me to a concept with many sub-entries) but most
redirect me to another entry to give me a page or two.  Surely this is
archaic?

i

-- Original Message --
Received: 10:10 AM COT, 08/21/2009
From: Jeremy C. Reed r...@reedmedia.net
To: lyx-users@lists.lyx.org
Subject: index entry see also ?

 LaTeX has see for an index entry, but docbook has see and see also.
 
 Any suggestions on how to get LyX or LaTeX to support a see also style 
 index entry?
 
 I believe that \seename can be redefined, but I may want both.
 
 Something like:
 \index{BSD|seealso{Berkeley Unix}}
 





Re: Fancy TOC and headers question

2009-08-21 Thread L Duperval
On Thu, 20 Aug 2009 16:29:22 -0400, rgheck wrote:
 Well, here are a few. It seems to me that what you're doing, more or
 less, is using what would ordinarily be called sections but renaming
 them as tips. I'm not sure about this, because you list a section
 before the first chapter. 

You are correct. I mixed up my terminology: it really should say Part 
-- section is OpenOffice.org terminology for the same thing.

 But if that is what you are doing, then you
 will first need to redefine how sections appear in the TOC. I would do
 this using the titlesec package, but the koma-script packages probably
 have their own way of doing this. I don't know.
 

OK, I took a look. Titlesec seems interesting. I'll see if Koma-Script 
allows those types of changes also.

 As far as the TOC goes, titlesec has a companion package, titletoc,
 which may be what you need. Then again, it may be that, once you're
 redefined what sections are called (tips, in your case), all will be
 well.
 

OK, thanks.

 Finally, customization of headers generally means the use of the
 fancyhdr package, for which LyX provides limited support. The examples
 in the fancyhdr docs make it pretty easy to get what you want, though.
 

I guess so, if I can get the numbering to say Tip # and if I can get 
tip numbers to keep on incrementing from one chapter to the next.

Thanks for the ideas,

L

-- 
Get free public speaking and communication tips
by registering at http://www.duperval.com

Bring out the speaker in you!



\index expressions

2009-08-21 Thread Sam Liddicott
I'm trying to extend the indexing of newfangle literate code chunks.

I'm: \usepackage{index}

so that I can have multiple indexes; but the \index{} command seems to
literally interpret the first parameter, so that
\index{\chunkname}
indexes \chunkname instead of the name.

I've tried all kinds of use of \expandafter and other tricks with
secondary macros, like this:

\def\ch...@index#1{%
  \...@index[chunks]{#1}%
}%
\def\Chunk#1{%
  \lstset{title={\newfanglecaption},name=#1}%
  \global\edef\...@chunkname{\lst@intname}%
  \expandafter\ch...@index{\lst@chunkname}%
}%

But even then I get the literal text \...@chunkname as the indexed item.

The only thing that nearly works is if I pass #1 within \Chunk, but
then I get other text too, which I want to chop off.

Any clues on how to make the index package take an expression?

Sam


Re: help - some questions

2009-08-21 Thread rgheck

On 08/21/2009 06:08 AM, Sam Liddicott wrote:

* Olivier Ripoll wrote, On 21/08/09 10:29:
   

Sam Liddicott wrote:
 

(I wish Lyx supported adding per-document layouts and elements in the
same way that it supports adding Latex commands in the preamble)
   

Isn't that what layout modules are for ?
 

Sure, but as you can't embed a layout module in the lyx document, ERT
can sometimes be easier and more portable, and for small chunks of text
is already clearly delineated in the Lyx document by the red box.

   
Actually, LyX does support embedded layout. But it's an Advanced Feature 
because it is somewhat dangerous, so it is not widely advertised. There 
is also, at the moment, no GUI for it.


Have a look at the file Customization.lyx in your favorite text editor. 
Some way down you will find these lines:


\begin_local_layout
Format 7
InsetLayout CharStyle:MenuItem
LyxType   charstyle
LabelString   menu
LatexType command
LatexName menuitem
Font
Family  Sans
EndFont
Preamble
\newcommand*{\menuitem}[1]{{\sffamily #1}}
EndPreamble
End
\end_local_layout

If you want to include local layout in your document, you can open it in 
a text editor and add similar lines. Make sure they are well tested 
first, and be real careful about the first and last line. Unpredictable 
things might happen otherwise.


I hope to add a GUI for this in the next LyX release (now looking like 
1.7). I'd be really, really happy if someone else wanted to jump in and 
do it. It should actually be quite easy. (More or less just copy the GUI 
for the preamble.)


Richard



Re: Find All and Emphasize

2009-08-21 Thread Tommaso Cucinotta

Pavel Sanda ha scritto:

Tommaso Cucinotta wrote:
  

Hi all,

I'd like to mention that, with the patch I committed right now on the SVN, 
the current version of LyX from trunk implements correctly this kind of 
feature, i.e., you can search for a plain word and replace it with its 
emphasized or boldface version, or search for some text (i.e., X1) and 
replace it with a math symbol ($X_1$), or you can search for some maths 
(i.e., $X^1$) and replace it with some rework of it (i.e., $Y_1$), etc.. I 
know there are many use-cases, and I hope somebody helps in identifying the 
most important ones and/or possible issues.



can you write some documentation in our manuals? this or the hint in bug 3095
wouldn't occur to me ... :)
pavel

  

I've committed right now the original manual I wrote at the times the
feature was not yet in trunk (probably Abdel forgot to consider this
file when he ported the patch to trunk). I'll extend it with further
details, such as the use-case under discussion, or the replace feature.

   T.




Re: \index expressions

2009-08-21 Thread Sam Liddicott

The Texbook says:

  The \write command is somewhht special, 
because its token
list is first read without expansion; expansion occurs later, when the 
tokens are actually

being written to a file.


As \index writes to a file, this may be the problem!

I'll see if I can do any tricks with
\def\trick#1
where  is delimiters to try and the name it out of the original 
text, as #1 macros seem to make it through fine...


Sam

Sam Liddicott wrote:

I'm trying to extend the indexing of newfangle literate code chunks.

I'm: \usepackage{index}

so that I can have multiple indexes; but the \index{} command seems to
literally interpret the first parameter, so that
\index{\chunkname}
indexes \chunkname instead of the name.

I've tried all kinds of use of \expandafter and other tricks with
secondary macros, like this:

\def\ch...@index#1{%
  \...@index[chunks]{#1}%
}%
\def\Chunk#1{%
  \lstset{title={\newfanglecaption},name=#1}%
  \global\edef\...@chunkname{\lst@intname}%
  \expandafter\ch...@index{\lst@chunkname}%
}%

But even then I get the literal text \...@chunkname as the indexed item.

The only thing that nearly works is if I pass #1 within \Chunk, but
then I get other text too, which I want to chop off.

Any clues on how to make the index package take an expression?

Sam
  




Re: Maximum Font Size

2009-08-21 Thread Andre Poenitz
On Thu, Aug 20, 2009 at 05:01:20PM -0500, Les Denham wrote:
 On Thursday 20 August 2009 02:38:08 pm José Matos wrote:
  On Thursday 20 August 2009 16:09:21 Steve Litt wrote:
   Unless of course you have a 64 bit computer.
 
  And the data type used is long. For most of the 64-bit linux the memory
  layout is LP-64 that means that only long and pointer are 64 bits wide.
 
  In case anyone wonders wikipedia has an interesting starting point to read
  about this:
  http://en.wikipedia.org/wiki/LP64
 
   SteveT
 
 So the real question is whether the variable used for the font size is short 
 (16 bits in all common models), int (16 bits in LP32, 32 bits in ILP32 and 
 LP64, and 64 bits in ILP64) or long (32 bits in LP32, 64 bits in LP64 and 
 ILP64).  I have no idea where to look in the source code for this.  It's 
 probably buried in TeX somewhere, but TeX is written in WEB, which in turn is 
 written in either Pascal or C -- I'm not sure.

TeX's integer arithmetic is on all platforms exactly the same (something
hand-made fixed point) That's by design to ensure the same output no
matter where the program runs.

Andre'


Re: help - some questions

2009-08-21 Thread Guenter Milde
On 2009-08-21, Sam Liddicott wrote:
 * Ricardo Perrone wrote, On 21/08/09 04:05:

 2- I am using enumerate environment, but it adds a large space between
 the paragraph and the first item of environment. Is there a way to
 change it to a more appropriated space? I am using book.cls template.

 You probably want to read this:
 http://tkcs-collins.com/truman/latex/list_examp.shtml

 And you may find it easier to use these if you define a lyx .module file
 to go with them. Look at existing lyx module files to work this out, and
 install your own in ~/.lyx/layouts

There is a module for list styling, search wiki.lyx.org for 'enumitem'::

#\DeclareLyXModule[enumitem.sty]{Customisable Lists (enumitem)}
#DescriptionBegin
# Control the layout of enumerate, itemize and description
# with an optional argument.
# See http://dante.ctan.org/CTAN/macros/latex/contrib/enumitem/enumitem.pdf
#DescriptionEnd


Günter



Re: changing justification of caption

2009-08-21 Thread Jonatan R. Catai
Unfortunetly, it did not work.

Only the picture goes to the left, but not the caption. Some other idea?


Jonatan

On Fri, Aug 21, 2009 at 4:27 AM, Wolfgang Engelmann 
engelm...@uni-tuebingen.de wrote:

 Am Friday 21 August 2009 04:23:06 schrieb Jonatan R. Catai:
  Dear All,
 
  I added a float picture on my report and Lyx adds the caption
 automatically
  - so far so good. However, the caption stays on the center of the page. I
  tryed clicking with the right button of the mouse outside the caption
 box,
  within the float picture box, and in Paragraph Settings change to left,
 but
  no sucess - the caption remaings on the center in DVI and PDF output. Am
 I
  doing something wrong? How can I change its position to the left?
 
  I am using article koma script.
 
  Jonatan

 Mark the float with mouse, click with right mouse button, select paragraph
 settings  justification left
 (wording might be different in English; I am using the German setting)

 Wolfgang



Re: Find All and Emphasize

2009-08-21 Thread Pavel Sanda
Tommaso Cucinotta wrote:
 I've committed right now the original manual I wrote at the times the
 feature was not yet in trunk (probably Abdel forgot to consider this
 file when he ported the patch to trunk). I'll extend it with further
 details, such as the use-case under discussion, or the replace feature.

finally we should merge this file inside other manuals since we have far
too much entries in help menu, but for the time being its ok this way.
nice work.

pavel


A feature you really need

2009-08-21 Thread Steve Litt
Hi all,

Thank you so much for the outline view on LyX 1.6.x. You need two or three 
more buttons to make the outline view fully functional:

* Insert
* Delete
* Maybe Insert Subservient

The Insert function inserts a new heading, at the level of the current 
heading, directly above either the next heading at the current level, or if 
the next heading superior to the current level, whichever comes first. A little 
window should pop up for you to type the text of the heading into. This can be 
mapped to the Insert key, which at least on my LyX is unmapped.

The Delete function deletes the current headline and everything subservient to 
it. This function should have an are you sure screen, and maybe highlight in 
the document view everything that will be deleted. No need for a keyboard 
mapping --- this should not be done thoughtlessly.

The Insert Subservient button would insert a headline 1 level subservient to 
the current level, just above the next headline 1 level subservient to the 
current one or the next level superior to that. In other words, it goes below 
any text directly below the current outline. Maybe map this to Ctrl+Insert or 
something.

With these two or three added buttons you now have a fully functional outline 
processor integrated with the document processor. True, this outline processor 
isn't as fast or featureful as VimOutliner, but it can be used to 
design/outline chapters. 

I just tried designing a chapter with the current outline mode without the 
buttons, and it's so slow as to make you forget what you're doing. You must 
repeatedly type in headlines in the doc, then give them headline level 
environments, then move them around with the up and down and in and out. I 
can't explain why, but it's incredibly slow, and it takes your mind away from 
the designing.

You know, even just the one Insert button would make this a WHOLE BUNCH faster 
to use.

Thanks

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt




Re: A feature you really need

2009-08-21 Thread rgheck

On 08/21/2009 07:00 PM, Steve Litt wrote:

Hi all,

Thank you so much for the outline view on LyX 1.6.x. You need two or three
more buttons to make the outline view fully functional:

* Insert
* Delete
* Maybe Insert Subservient

   
Add this to trac, Steve. It's a good idea, and I'm sure someone will 
implement it.


rh


The Insert function inserts a new heading, at the level of the current
heading, directly above either the next heading at the current level, or if
the next heading superior to the current level, whichever comes first. A little
window should pop up for you to type the text of the heading into. This can be
mapped to the Insert key, which at least on my LyX is unmapped.

The Delete function deletes the current headline and everything subservient to
it. This function should have an are you sure screen, and maybe highlight in
the document view everything that will be deleted. No need for a keyboard
mapping --- this should not be done thoughtlessly.

The Insert Subservient button would insert a headline 1 level subservient to
the current level, just above the next headline 1 level subservient to the
current one or the next level superior to that. In other words, it goes below
any text directly below the current outline. Maybe map this to Ctrl+Insert or
something.

With these two or three added buttons you now have a fully functional outline
processor integrated with the document processor. True, this outline processor
isn't as fast or featureful as VimOutliner, but it can be used to
design/outline chapters.

I just tried designing a chapter with the current outline mode without the
buttons, and it's so slow as to make you forget what you're doing. You must
repeatedly type in headlines in the doc, then give them headline level
environments, then move them around with the up and down and in and out. I
can't explain why, but it's incredibly slow, and it takes your mind away from
the designing.

You know, even just the one Insert button would make this a WHOLE BUNCH faster
to use.

Thanks

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt

   




Re: changing justification of caption

2009-08-21 Thread Wolfgang Engelmann
Am Friday 21 August 2009 04:23:06 schrieb Jonatan R. Catai:
> Dear All,
>
> I added a float picture on my report and Lyx adds the caption automatically
> - so far so good. However, the caption stays on the center of the page. I
> tryed clicking with the right button of the mouse outside the caption box,
> within the float picture box, and in Paragraph Settings change to left, but
> no sucess - the caption remaings on the center in DVI and PDF output. Am I
> doing something wrong? How can I change its position to the left?
>
> I am using article koma script.
>
> Jonatan

Mark the float with mouse, click with right mouse button, select paragraph 
settings > justification left
(wording might be different in English; I am using the German setting)

Wolfgang


Re: help - some questions

2009-08-21 Thread Sam Liddicott
* Ricardo Perrone wrote, On 21/08/09 04:05:
> Hi,
> 
> I need a little help with some questions:

I've thought of such things from time to time, and concluded that the
style authors have more knowledge of typesetting than I do, and that my
opinion of "more appropriate space" probably enjoys less acceptance than
their opinion.

However there is a case to make for being able to change it... you just
first need to ask yourself if you are sure that you know better than the
class designers. If you decision is based purely on "it's too wide" then
you probably don't know better and you should leave it alone.

> 1- Lyx has some default font size like Normal, small, smallest, etc. But how 
> can I change it to a specific font size to be applied in some places of my 
> document? For instance 10.5pt.

Font sizes in Lyx and Latex are given names:
http://www.image.ufl.edu/help/latex/fonts.shtml

So first you need to think if you literally want "10.5pt" or if you want
to set the size of one of the name styles or sizes to 10.5pt.

You can mess with tie \fontsize{}{} command; insert this in your pre-amble:

\newcommand\sizetf[1]{\begingroup\fontsize{10.5}{12}\selectfont{#1}\endgroup}

then you can use the command

\sizetf{I'm in 10.5pt}

in ERT in your document.

(I wish Lyx supported adding per-document layouts and elements in the
same way that it supports adding Latex commands in the preamble)


> 2- I am using enumerate environment, but it adds a large space between the 
> paragraph and the first item of environment. Is there a way to change it to a 
> more appropriated space? I am using book.cls template.

You probably want to read this:
http://tkcs-collins.com/truman/latex/list_examp.shtml

And you may find it easier to use these if you define a lyx .module file
to go with them. Look at existing lyx module files to work this out, and
install your own in ~/.lyx/layouts

Sam


Captions

2009-08-21 Thread solvi . natland
Hi!

Does anybody know, how can get rid of the indentations in my float caption 
texts (for both figures and tables)?

Figure 1:   Now my text looks like this,
here begins the 2nd line of the caption.

Figure 2:   And I would like to have something like
this, where there isn't an indent in the 2nd line.

Document-class: book(KOMA-script)
LYX version 1.6.3 for Windows.

I have tried different things I found on the internet, both ERT and 
commands for the preamble but so far nothing has worked out - either 
nothing happens or I get lots and lots of errors. I have looked in the 
KOMA-manual but I just don't undrstand it- I basically needs an 
explanation for dummies :D

It should be mentioned that I already have this defined in the preamble:

\usepackage[dvips=false%
,pdftex=false%
,vtex=false%
,twoside%
,papersize={170mm,240mm}% --- A4 with 20mm cut on both sides and 28.8mm 
cut top and bottom
,hdivide={24mm,*,24mm}% --- 122mm text width, 24mm margin both sides (no 
binding edge!)
,vdivide={11.5mm,*,17.5mm}% --- 28.5+11.5=40mm from top of A4 to text 
(46mm at bottom)
,includehead%
,includefoot%
]{geometry}
\usepackage[a4,cam,axes,noinfo,center]{crop} % For printing crop-marks on 
a4 manuscript
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{\uppercase{#1}}{}}
\renewcommand{\sectionmark}[1]{\markright{\uppercase{#1}}}
\fancyhf{}
\fancyhead[LE,RO]{\small \thepage} % Left on Even numbered pages & Right 
on Odd
\fancyhead[LO]{\small \slshape \rightmark} % Left on Odd (Right-hand page)
\fancyhead[RE]{\small \slshape \leftmark} % Right on Even (Left-hand page)
\renewcommand{\headrulewidth}{0.5pt}

I really hope someone can help me with this and please give me the 
dummy-version :D

 

<>

Re: help - some questions

2009-08-21 Thread Olivier Ripoll

Sam Liddicott wrote:

* Ricardo Perrone wrote, On 21/08/09 04:05:

Hi,


[...]


You can mess with tie \fontsize{}{} command; insert this in your pre-amble:

\newcommand\sizetf[1]{\begingroup\fontsize{10.5}{12}\selectfont{#1}\endgroup}

then you can use the command

\sizetf{I'm in 10.5pt}

in ERT in your document.

(I wish Lyx supported adding per-document layouts and elements in the
same way that it supports adding Latex commands in the preamble)


Isn't that what layout modules are for ? Something like the following 
seems to work fine (I set the aspect to green in LyX to clearly 
differentiate from the normal text):


InsetLayout CharStyle:FontSize10.5
LyxType   charstyle
LabelString   FontSize10.5
LatexType command
LatexName SizeTenPointFive
Font
  Color   green
  Sizenormal
EndFont
Preamble

\newcommand\SizeTenPointFive[1]{\begingroup\fontsize{10.5}{12}\selectfont{#1}\endgroup}
EndPreamble
End


I attach an example module with font sizes from 8 to 12.5 with step 0.5. 
It works fine for me on 1.6.3. Once it is copied to the layout folder 
(*), you reconfigure, close & reopen lyx, and add the "Font Size Styles" 
module in the Document->Settings, "Modules" tab. Apply and you 
automatically have those styles in "Edit->Text Styles" or better, in the 
right-click contextual menu.


However, I do not encourage the use of font size this way. Better is to 
use logical styles.


Best regards,

Olivier

(*) On windows, it is
C:\Documents and Settings\###?\Application Data\lyx16\layouts
where ### is the user name
on linux, it should be in the home folder, in something like .lyx16/layouts

#\DeclareLyXModule{Font Size Styles}
#DescriptionBegin
#Custom font sizes.
#DescriptionEnd

# Author : ORi (based on code by Sam Liddicott)

Format 11

InsetLayout CharStyle:FontSize8
LyxType   charstyle
LabelString   FontSize8
LatexType command
LatexName SizeEight
Font
  Color   green
  Sizesmall
EndFont
Preamble

\newcommand\SizeEight[1]{\begingroup\fontsize{8}{9.5}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout CharStyle:FontSize8.5
LyxType   charstyle
LabelString   FontSize8.5
LatexType command
LatexName SizeEightPointFive
Font
  Color   green
  Sizesmall
EndFont
Preamble

\newcommand\SizeEightPointFive[1]{\begingroup\fontsize{8.5}{10}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout CharStyle:FontSize9
LyxType   charstyle
LabelString   FontSize9
LatexType command
LatexName SizeNine
Font
  Color   green
  Sizesmall
EndFont
Preamble

\newcommand\SizeNine[1]{\begingroup\fontsize{9}{10.5}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout CharStyle:FontSize9.5
LyxType   charstyle
LabelString   FontSize9.5
LatexType command
LatexName SizeNinePointFive
Font
  Color   green
  Sizesmall
EndFont
Preamble

\newcommand\SizeNinePointFive[1]{\begingroup\fontsize{9.5}{11}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout CharStyle:FontSize10
LyxType   charstyle
LabelString   FontSize10
LatexType command
LatexName SizeTen
Font
  Color   green
  Sizenormal
EndFont
Preamble

\newcommand\SizeTen[1]{\begingroup\fontsize{10}{11.5}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout CharStyle:FontSize10.5
LyxType   charstyle
LabelString   FontSize10.5
LatexType command
LatexName SizeTenPointFive
Font
  Color   green
  Sizenormal
EndFont
Preamble

\newcommand\SizeTenPointFive[1]{\begingroup\fontsize{10.5}{12}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout CharStyle:FontSize11
LyxType   charstyle
LabelString   FontSize11
LatexType command
LatexName SizeEleven
Font
  Color   green
  Sizenormal
EndFont
Preamble

\newcommand\SizeEleven[1]{\begingroup\fontsize{11}{13}\selectfont{#1}\endgroup}
EndPreamble
End

InsetLayout 

Re: help - some questions

2009-08-21 Thread Sam Liddicott
* Olivier Ripoll wrote, On 21/08/09 10:29:
> Sam Liddicott wrote:
>> * Ricardo Perrone wrote, On 21/08/09 04:05:
>>> Hi,
>>>
> [...]
> 
>> You can mess with tie \fontsize{}{} command; insert this in your
>> pre-amble:
>>
>> \newcommand\sizetf[1]{\begingroup\fontsize{10.5}{12}\selectfont{#1}\endgroup}
>>
>>
>> then you can use the command
>>
>> \sizetf{I'm in 10.5pt}
>>
>> in ERT in your document.
>>
>> (I wish Lyx supported adding per-document layouts and elements in the
>> same way that it supports adding Latex commands in the preamble)
> 
> Isn't that what layout modules are for ? 

Sure, but as you can't embed a layout module in the lyx document, ERT
can sometimes be easier and more portable, and for small chunks of text
is already clearly delineated in the Lyx document by the red box.

(I suggested a layout module for his enums, it would be nuts to do those
with ERT)

And thanks for providing the examples that I was too lazy to provide..

Sam


Re: help - some questions

2009-08-21 Thread Olivier Ripoll

Sam Liddicott wrote:

* Olivier Ripoll wrote, On 21/08/09 10:29:

Sam Liddicott wrote:

* Ricardo Perrone wrote, On 21/08/09 04:05:

Hi,


[...]


You can mess with tie \fontsize{}{} command; insert this in your
pre-amble:

\newcommand\sizetf[1]{\begingroup\fontsize{10.5}{12}\selectfont{#1}\endgroup}


then you can use the command

\sizetf{I'm in 10.5pt}

in ERT in your document.

(I wish Lyx supported adding per-document layouts and elements in the
same way that it supports adding Latex commands in the preamble)
Isn't that what layout modules are for ? 


Sure, but as you can't embed a layout module in the lyx document, ERT
can sometimes be easier and more portable, and for small chunks of text
is already clearly delineated in the Lyx document by the red box.


Okay, I see what you meant now. Hopefully, the layout modules will be 
somehow integrated in the "embedded" format, when it is available.



(I suggested a layout module for his enums, it would be nuts to do those
with ERT)

And thanks for providing the examples that I was too lazy to provide..


It was a good "challenge" for me, and I learnt a lot: it seems latex 
command names cannot contain numbers nor "." or "_" characters. I had to 
go for the ugly "number in full letters" way. I also learnt the LyX font 
size this way (no numbers).


This illustrates the big 'drawback' of LyX: After ~8 years using LyX, 
writing a Thesis and several documents, I haven't learnt much of LaTeX 
because LyX does all for me. LyX encourages laziness !


Regards,

Olivier



Re: Captions

2009-08-21 Thread Pierfranco Minsenti
Hi,

the most effective way (as far as I know) to customise float capions is to
use the package caption which provides several options.
I use it in connection withLyX and the KOMA script report class and I obtain
what I want.
If it is not included in your LaTeX distribution you can download it from:
 http://www.ctan.org/tex-archive/macros/latex/contrib/caption/
and install in your computer.

Then in you preamble you should put the following lines:

\usepackage{caption}
\captionsetup[table]{format=plain,skip=\medskipamount} % for tables
\captionsetup[figure]{format=plainskip=\medskipamount} %for figures

Check the documentation with all the options you can use at
http://www.ctan.org/get/macros/latex/contrib/caption/caption-eng.pdf

Best wishes

Pierfranco

2009/8/21 

>
> Hi!
>
> Does anybody know, how can get rid of the indentations in my float caption
> texts (for both figures and tables)?
>
> Figure 1:Now my text looks like this,
>here begins the 2nd line of the caption.
>
> Figure 2:And I would like to have something like
> this, where there isn't an indent in the 2nd line.
>
> Document-class: book(KOMA-script)
> LYX version 1.6.3 for Windows.
>
> I have tried different things I found on the internet, both ERT and
> commands for the preamble but so far nothing has worked out - either nothing
> happens or I get lots and lots of errors. I have looked in the KOMA-manual
> but I just don't undrstand it- I basically needs an explanation for dummies
> :D
>
> It should be mentioned that I already have this defined in the preamble:
>
> \usepackage[dvips=false%
> ,pdftex=false%
> ,vtex=false%
> ,twoside%
> ,papersize={170mm,240mm}% --- A4 with 20mm cut on both sides and 28.8mm cut
> top and bottom
> ,hdivide={24mm,*,24mm}% --- 122mm text width, 24mm margin both sides (no
> binding edge!)
> ,vdivide={11.5mm,*,17.5mm}% --- 28.5+11.5=40mm from top of A4 to text (46mm
> at bottom)
> ,includehead%
> ,includefoot%
> ]{geometry}
> \usepackage[a4,cam,axes,noinfo,center]{crop} % For printing crop-marks on
> a4 manuscript
> \usepackage{fancyhdr}
> \pagestyle{fancy}
> \renewcommand{\chaptermark}[1]{\markboth{\uppercase{#1}}{}}
> \renewcommand{\sectionmark}[1]{\markright{\uppercase{#1}}}
> \fancyhf{}
> \fancyhead[LE,RO]{\small \thepage} % Left on Even numbered pages & Right on
> Odd
> \fancyhead[LO]{\small \slshape \rightmark} % Left on Odd (Right-hand page)
> \fancyhead[RE]{\small \slshape \leftmark} % Right on Even (Left-hand page)
> \renewcommand{\headrulewidth}{0.5pt}
>
> I really hope someone can help me with this and please give me the
> dummy-version :D
>
>
>
>


Re: Captions

2009-08-21 Thread Wolfgang Engelmann
Am Friday 21 August 2009 11:28:40 schrieb solvi.natl...@uis.no:
> Hi!
>
> Does anybody know, how can get rid of the indentations in my float caption
> texts (for both figures and tables)?
>
> Figure 1:   Now my text looks like this,
> here begins the 2nd line of the caption.
>
> Figure 2:   And I would like to have something like
> this, where there isn't an indent in the 2nd line.
>
> Document-class: book(KOMA-script)
> LYX version 1.6.3 for Windows.
>

I am using
\setcapindent{0mm}
in the preamble
under  book(KOMA-script) ( LYX version 1.6.3 for Linux)

Wolfgang

> I have tried different things I found on the internet, both ERT and
> commands for the preamble but so far nothing has worked out - either
> nothing happens or I get lots and lots of errors. I have looked in the
> KOMA-manual but I just don't undrstand it- I basically needs an
> explanation for dummies :D
>
> It should be mentioned that I already have this defined in the preamble:
>
> \usepackage[dvips=false%
> ,pdftex=false%
> ,vtex=false%
> ,twoside%
> ,papersize={170mm,240mm}% --- A4 with 20mm cut on both sides and 28.8mm
> cut top and bottom
> ,hdivide={24mm,*,24mm}% --- 122mm text width, 24mm margin both sides (no
> binding edge!)
> ,vdivide={11.5mm,*,17.5mm}% --- 28.5+11.5=40mm from top of A4 to text
> (46mm at bottom)
> ,includehead%
> ,includefoot%
> ]{geometry}
> \usepackage[a4,cam,axes,noinfo,center]{crop} % For printing crop-marks on
> a4 manuscript
> \usepackage{fancyhdr}
> \pagestyle{fancy}
> \renewcommand{\chaptermark}[1]{\markboth{\uppercase{#1}}{}}
> \renewcommand{\sectionmark}[1]{\markright{\uppercase{#1}}}
> \fancyhf{}
> \fancyhead[LE,RO]{\small \thepage} % Left on Even numbered pages & Right
> on Odd
> \fancyhead[LO]{\small \slshape \rightmark} % Left on Odd (Right-hand page)
> \fancyhead[RE]{\small \slshape \leftmark} % Right on Even (Left-hand page)
> \renewcommand{\headrulewidth}{0.5pt}
>
> I really hope someone can help me with this and please give me the
> dummy-version :D



-- 
-
Wolfgang Engelmann
Schlossgartenstrasse 22
D-72070 Tübingen
Tel 07071 68325


Re: How to embed a spreadsheet in LyX or LaTeX?

2009-08-21 Thread Pavel Sanda
Helge Hafting wrote:
> Steve Litt wrote:
>> Hi all,
>> How can I embed a spreadsheet (MS Excel I assume) into a LyX or LaTeX 
>> document?
>
> I wrote an external inset for spreadsheets some time ago.
> You can find it here:
> http://www.mail-archive.com/lyx-de...@lists.lyx.org/msg132049.html

put it in wiki?
pavel


Re: help - some questions

2009-08-21 Thread Steve Litt
On Thursday 20 August 2009 23:05:20 Ricardo Perrone wrote:
> Hi,
>
> 2- I am using enumerate environment, but
> it adds a large space between the paragraph and the first item of
> environment. Is there a way to change it to a more appropriated space? I am
> using book.cls template.

Hi Ricardo,

The following comes right out of my layout file, which is based on book.cls:

% ### MyEnumerate: Vertically denser version of Enumerate style ###
\newenvironment{myenumerateL}{%
~\\[-1.2\baselineskip]
\begin{enumerate}%
\setlength{\parsep}{-2pt}
\setlength{\parskip}{-2pt}
\setlength{\partopsep}{-3pt}
\setstretch{0.7}
}{
\end{enumerate}
~\\[-0.5\baselineskip]
}

The preceding's main effect is to space all list items closer to each other, 
but the top "~\\[-1.2\baselineskip]" controls the distance of the list to the 
preceding paragraph.

I chose to make a brand new environment, but you could have just as easily 
done it in place like this:

\let\oldenumerate\enumerate
\let\oldendenumerate\endenumerate

And then oldenumerate in the begin and end.

HTH

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt




index entry "see also" ?

2009-08-21 Thread Jeremy C. Reed
LaTeX has "see" for an index entry, but docbook has "see" and "see also".

Any suggestions on how to get LyX or LaTeX to support a "see also" style 
index entry?

I believe that \seename can be redefined, but I may want both.

Something like:
\index{BSD|seealso{Berkeley Unix}}


Re: index entry "see also" ?

2009-08-21 Thread Ian S. Worthington
FWIW I hate index entries that redirect me.  There may be an occasional
justified use (redirect me to a concept with many sub-entries) but most
redirect me to another entry to give me a page or two.  Surely this is
archaic?

i

-- Original Message --
Received: 10:10 AM COT, 08/21/2009
From: "Jeremy C. Reed" 
To: lyx-users@lists.lyx.org
Subject: index entry "see also" ?

> LaTeX has "see" for an index entry, but docbook has "see" and "see also".
> 
> Any suggestions on how to get LyX or LaTeX to support a "see also" style 
> index entry?
> 
> I believe that \seename can be redefined, but I may want both.
> 
> Something like:
> \index{BSD|seealso{Berkeley Unix}}
> 





Re: Fancy TOC and headers question

2009-08-21 Thread L Duperval
On Thu, 20 Aug 2009 16:29:22 -0400, rgheck wrote:
> Well, here are a few. It seems to me that what you're doing, more or
> less, is using what would ordinarily be called "sections" but renaming
> them as "tips". I'm not sure about this, because you list a section
> before the first chapter. 

You are correct. I mixed up my terminology: it really should say "Part" 
-- section is OpenOffice.org terminology for the same thing.

> But if that is what you are doing, then you
> will first need to redefine how sections appear in the TOC. I would do
> this using the titlesec package, but the koma-script packages probably
> have their own way of doing this. I don't know.
> 

OK, I took a look. Titlesec seems interesting. I'll see if Koma-Script 
allows those types of changes also.

> As far as the TOC goes, titlesec has a companion package, titletoc,
> which may be what you need. Then again, it may be that, once you're
> redefined what sections are called (tips, in your case), all will be
> well.
> 

OK, thanks.

> Finally, customization of headers generally means the use of the
> fancyhdr package, for which LyX provides limited support. The examples
> in the fancyhdr docs make it pretty easy to get what you want, though.
> 

I guess so, if I can get the numbering to say "Tip #" and if I can get 
tip numbers to keep on incrementing from one chapter to the next.

Thanks for the ideas,

L

-- 
Get free public speaking and communication tips
by registering at http://www.duperval.com

Bring out the speaker in you!



\index expressions

2009-08-21 Thread Sam Liddicott
I'm trying to extend the indexing of newfangle literate code chunks.

I'm: \usepackage{index}

so that I can have multiple indexes; but the \index{} command seems to
literally interpret the first parameter, so that
\index{\chunkname}
indexes "\chunkname" instead of the name.

I've tried all kinds of use of \expandafter and other tricks with
secondary macros, like this:

\def\ch...@index#1{%
  \...@index[chunks]{#1}%
}%
\def\Chunk#1{%
  \lstset{title={\newfanglecaption},name=#1}%
  \global\edef\...@chunkname{\lst@intname}%
  \expandafter\ch...@index{\lst@chunkname}%
}%

But even then I get the literal text "\...@chunkname" as the indexed item.

The only thing that "nearly" works is if I pass #1 within \Chunk, but
then I get other text too, which I want to chop off.

Any clues on how to make the index package take an expression?

Sam


Re: help - some questions

2009-08-21 Thread rgheck

On 08/21/2009 06:08 AM, Sam Liddicott wrote:

* Olivier Ripoll wrote, On 21/08/09 10:29:
   

Sam Liddicott wrote:
 

(I wish Lyx supported adding per-document layouts and elements in the
same way that it supports adding Latex commands in the preamble)
   

Isn't that what layout modules are for ?
 

Sure, but as you can't embed a layout module in the lyx document, ERT
can sometimes be easier and more portable, and for small chunks of text
is already clearly delineated in the Lyx document by the red box.

   
Actually, LyX does support embedded layout. But it's an Advanced Feature 
because it is somewhat dangerous, so it is not widely advertised. There 
is also, at the moment, no GUI for it.


Have a look at the file Customization.lyx in your favorite text editor. 
Some way down you will find these lines:


\begin_local_layout
Format 7
InsetLayout CharStyle:MenuItem
LyxType   charstyle
LabelString   menu
LatexType command
LatexName menuitem
Font
Family  Sans
EndFont
Preamble
\newcommand*{\menuitem}[1]{{\sffamily #1}}
EndPreamble
End
\end_local_layout

If you want to include local layout in your document, you can open it in 
a text editor and add similar lines. Make sure they are well tested 
first, and be real careful about the first and last line. Unpredictable 
things might happen otherwise.


I hope to add a GUI for this in the next LyX release (now looking like 
1.7). I'd be really, really happy if someone else wanted to jump in and 
do it. It should actually be quite easy. (More or less just copy the GUI 
for the preamble.)


Richard



Re: Find All and Emphasize

2009-08-21 Thread Tommaso Cucinotta

Pavel Sanda ha scritto:

Tommaso Cucinotta wrote:
  

Hi all,

I'd like to mention that, with the patch I committed right now on the SVN, 
the current version of LyX from trunk implements correctly this kind of 
feature, i.e., you can search for a plain word and replace it with its 
emphasized or boldface version, or search for some text (i.e., X1) and 
replace it with a math symbol ($X_1$), or you can search for some maths 
(i.e., $X^1$) and replace it with some rework of it (i.e., $Y_1$), etc.. I 
know there are many use-cases, and I hope somebody helps in identifying the 
most important ones and/or possible issues.



can you write some documentation in our manuals? this or the hint in bug 3095
wouldn't occur to me ... :)
pavel

  

I've committed right now the original manual I wrote at the times the
feature was not yet in trunk (probably Abdel forgot to consider this
file when he ported the patch to trunk). I'll extend it with further
details, such as the use-case under discussion, or the replace feature.

   T.




Re: \index expressions

2009-08-21 Thread Sam Liddicott

The Texbook says:

  The \write command is somewhht special, 
because its token
list is first read without expansion; expansion occurs later, when the 
tokens are actually

being written to a file.


As \index writes to a file, this may be the problem!

I'll see if I can do any tricks with
\def\trick#1
where  is delimiters to try and the name it out of the original 
text, as #1 macros seem to make it through fine...


Sam

Sam Liddicott wrote:

I'm trying to extend the indexing of newfangle literate code chunks.

I'm: \usepackage{index}

so that I can have multiple indexes; but the \index{} command seems to
literally interpret the first parameter, so that
\index{\chunkname}
indexes "\chunkname" instead of the name.

I've tried all kinds of use of \expandafter and other tricks with
secondary macros, like this:

\def\ch...@index#1{%
  \...@index[chunks]{#1}%
}%
\def\Chunk#1{%
  \lstset{title={\newfanglecaption},name=#1}%
  \global\edef\...@chunkname{\lst@intname}%
  \expandafter\ch...@index{\lst@chunkname}%
}%

But even then I get the literal text "\...@chunkname" as the indexed item.

The only thing that "nearly" works is if I pass #1 within \Chunk, but
then I get other text too, which I want to chop off.

Any clues on how to make the index package take an expression?

Sam
  




Re: Maximum Font Size

2009-08-21 Thread Andre Poenitz
On Thu, Aug 20, 2009 at 05:01:20PM -0500, Les Denham wrote:
> On Thursday 20 August 2009 02:38:08 pm José Matos wrote:
> > On Thursday 20 August 2009 16:09:21 Steve Litt wrote:
> > > Unless of course you have a 64 bit computer.
> >
> > And the data type used is long. For most of the 64-bit linux the memory
> > layout is LP-64 that means that only long and pointer are 64 bits wide.
> >
> > In case anyone wonders wikipedia has an interesting starting point to read
> > about this:
> > http://en.wikipedia.org/wiki/LP64
> >
> > > SteveT
> 
> So the real question is whether the variable used for the font size is short 
> (16 bits in all common models), int (16 bits in LP32, 32 bits in ILP32 and 
> LP64, and 64 bits in ILP64) or long (32 bits in LP32, 64 bits in LP64 and 
> ILP64).  I have no idea where to look in the source code for this.  It's 
> probably buried in TeX somewhere, but TeX is written in WEB, which in turn is 
> written in either Pascal or C -- I'm not sure.

TeX's integer arithmetic is on all platforms exactly the same (something
hand-made fixed point) That's by design to ensure the same output no
matter where the program runs.

Andre'


Re: help - some questions

2009-08-21 Thread Guenter Milde
On 2009-08-21, Sam Liddicott wrote:
> * Ricardo Perrone wrote, On 21/08/09 04:05:

>> 2- I am using enumerate environment, but it adds a large space between
>> the paragraph and the first item of environment. Is there a way to
>> change it to a more appropriated space? I am using book.cls template.

> You probably want to read this:
> http://tkcs-collins.com/truman/latex/list_examp.shtml

> And you may find it easier to use these if you define a lyx .module file
> to go with them. Look at existing lyx module files to work this out, and
> install your own in ~/.lyx/layouts

There is a module for list styling, search wiki.lyx.org for 'enumitem'::

#\DeclareLyXModule[enumitem.sty]{Customisable Lists (enumitem)}
#DescriptionBegin
# Control the layout of enumerate, itemize and description
# with an optional argument.
# See http://dante.ctan.org/CTAN/macros/latex/contrib/enumitem/enumitem.pdf
#DescriptionEnd


Günter



Re: changing justification of caption

2009-08-21 Thread Jonatan R. Catai
Unfortunetly, it did not work.

Only the picture goes to the left, but not the caption. Some other idea?


Jonatan

On Fri, Aug 21, 2009 at 4:27 AM, Wolfgang Engelmann <
engelm...@uni-tuebingen.de> wrote:

> Am Friday 21 August 2009 04:23:06 schrieb Jonatan R. Catai:
> > Dear All,
> >
> > I added a float picture on my report and Lyx adds the caption
> automatically
> > - so far so good. However, the caption stays on the center of the page. I
> > tryed clicking with the right button of the mouse outside the caption
> box,
> > within the float picture box, and in Paragraph Settings change to left,
> but
> > no sucess - the caption remaings on the center in DVI and PDF output. Am
> I
> > doing something wrong? How can I change its position to the left?
> >
> > I am using article koma script.
> >
> > Jonatan
>
> Mark the float with mouse, click with right mouse button, select paragraph
> settings > justification left
> (wording might be different in English; I am using the German setting)
>
> Wolfgang
>


Re: Find All and Emphasize

2009-08-21 Thread Pavel Sanda
Tommaso Cucinotta wrote:
> I've committed right now the original manual I wrote at the times the
> feature was not yet in trunk (probably Abdel forgot to consider this
> file when he ported the patch to trunk). I'll extend it with further
> details, such as the use-case under discussion, or the replace feature.

finally we should merge this file inside other manuals since we have far
too much entries in help menu, but for the time being its ok this way.
nice work.

pavel


A feature you really need

2009-08-21 Thread Steve Litt
Hi all,

Thank you so much for the outline view on LyX 1.6.x. You need two or three 
more buttons to make the outline view fully functional:

* Insert
* Delete
* Maybe "Insert Subservient"

The Insert function inserts a new heading, at the level of the current 
heading, directly above either the next heading at the current level, or if 
the next heading superior to the current level, whichever comes first. A little 
window should pop up for you to type the text of the heading into. This can be 
mapped to the Insert key, which at least on my LyX is unmapped.

The Delete function deletes the current headline and everything subservient to 
it. This function should have an "are you sure" screen, and maybe highlight in 
the document view everything that will be deleted. No need for a keyboard 
mapping --- this should not be done thoughtlessly.

The "Insert Subservient button would insert a headline 1 level subservient to 
the current level, just above the next headline 1 level subservient to the 
current one or the next level superior to that. In other words, it goes below 
any text directly below the current outline. Maybe map this to Ctrl+Insert or 
something.

With these two or three added buttons you now have a fully functional outline 
processor integrated with the document processor. True, this outline processor 
isn't as fast or featureful as VimOutliner, but it can be used to 
design/outline chapters. 

I just tried designing a chapter with the current outline mode without the 
buttons, and it's so slow as to make you forget what you're doing. You must 
repeatedly type in headlines in the doc, then give them headline level 
environments, then move them around with the up and down and in and out. I 
can't explain why, but it's incredibly slow, and it takes your mind away from 
the designing.

You know, even just the one Insert button would make this a WHOLE BUNCH faster 
to use.

Thanks

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt




Re: A feature you really need

2009-08-21 Thread rgheck

On 08/21/2009 07:00 PM, Steve Litt wrote:

Hi all,

Thank you so much for the outline view on LyX 1.6.x. You need two or three
more buttons to make the outline view fully functional:

* Insert
* Delete
* Maybe "Insert Subservient"

   
Add this to trac, Steve. It's a good idea, and I'm sure someone will 
implement it.


rh


The Insert function inserts a new heading, at the level of the current
heading, directly above either the next heading at the current level, or if
the next heading superior to the current level, whichever comes first. A little
window should pop up for you to type the text of the heading into. This can be
mapped to the Insert key, which at least on my LyX is unmapped.

The Delete function deletes the current headline and everything subservient to
it. This function should have an "are you sure" screen, and maybe highlight in
the document view everything that will be deleted. No need for a keyboard
mapping --- this should not be done thoughtlessly.

The "Insert Subservient button would insert a headline 1 level subservient to
the current level, just above the next headline 1 level subservient to the
current one or the next level superior to that. In other words, it goes below
any text directly below the current outline. Maybe map this to Ctrl+Insert or
something.

With these two or three added buttons you now have a fully functional outline
processor integrated with the document processor. True, this outline processor
isn't as fast or featureful as VimOutliner, but it can be used to
design/outline chapters.

I just tried designing a chapter with the current outline mode without the
buttons, and it's so slow as to make you forget what you're doing. You must
repeatedly type in headlines in the doc, then give them headline level
environments, then move them around with the up and down and in and out. I
can't explain why, but it's incredibly slow, and it takes your mind away from
the designing.

You know, even just the one Insert button would make this a WHOLE BUNCH faster
to use.

Thanks

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt