Re: LaTex question: KOMA-script headers and chapter bibliography

2015-04-29 Thread Johannes Böttcher


On 04/29/2015 06:40 AM, Sam Lewis wrote:
 I create running headers in a Koma-script book with the following. 
This gives me a page number and the chapter heading on each page, except 
on the first page of each chapter as desired.


 \usepackage[automark]{scrlayer-scrpage}
 \pagestyle{scrheadings}
 \ihead{Chapter \headmark}
 \ohead[\pagemark]{\pagemark}
 \chead{}
 \cfoot[]{}


 In this book, I have a bibliography and a further reading section at 
the end of each chapter via this code in the preamble



 \defbibheading{subbibliography}[\bibname]{%
 \section*{#1}%
 \markboth{#1}{#1}}

 and this ERT at the end of each chapter.


 \printbibliography[heading=subbibintoc,title={Further 
Reading},notcategory=cited]

 \printbibliography[heading=subbibintoc,category=cited]
 \end{refsection}
 \begin{refsection}


 Everything works fine, except that the header on the last page of 
each chapter is called Further Reading instead of the name of the chapter.



 How to fix this?


 Many thanks!



You are defining `defbibheading` in a way that updates the running
header with *Further Reading* via `markboth`. Deleting this line should
fix your problem.

If you really want to have the chapter titles on the starting pages of
chapters, you can use `\renewcommand*{\chapterpagestyle}{scrheadings}`
or use the starred variant of the commands - `\ihead*{Chapter
\headmark}`. An up to date version of KOMA-script is needed for that.

Once you start the appendix, you have some trouble, as you are
hard-coding the word *chapter*. You can use `\chapapp` instead.

Best regards
Johannes Böttcher




Re: LaTex question: KOMA-script headers and chapter bibliography

2015-04-29 Thread Sam Lewis





 On Thursday, 30 April 2015, 2:03, Johannes Böttcher wrote:
 You are defining `defbibheading` in a way that updates the running
 header with *Further Reading* via `markboth`. Deleting this line should
 fix your problem.
 
 If you really want to have the chapter titles on the starting pages of
 chapters, you can use 
 `\renewcommand*{\chapterpagestyle}{scrheadings}`
 or use the starred variant of the commands - `\ihead*{Chapter
 \headmark}`. An up to date version of KOMA-script is needed for that.
 
 Once you start the appendix, you have some trouble, as you are
 hard-coding the word *chapter*. You can use `\chapapp` instead.



Many thanks for pointing me in the right direction. I fixed it like this.


\documentclass[chapterprefix=on]{scrbook}



\usepackage[automark]{scrlayer-scrpage}
\pagestyle{scrheadings}
\ihead{\headmark}
\ohead[\pagemark]{\pagemark}
\chead{}
\cfoot[]{}


\defbibheading{subbibliography}{%
\addsec{#1}}


\chapter{...}
\begin{refsection}
...
\printbibliography[heading=subbibliography,title={Further 
Reading},notcategory=cited]
\printbibliography[heading=subbibliography,title={Bibliography},category=cited]

\end{refsection}

Now works like a charm!

Again many thanks. 


Cheers, Sam


Re: LaTex question: KOMA-script headers and chapter bibliography

2015-04-29 Thread Johannes Böttcher


On 04/29/2015 06:40 AM, Sam Lewis wrote:
 I create running headers in a Koma-script book with the following. 
This gives me a page number and the chapter heading on each page, except 
on the first page of each chapter as desired.


 \usepackage[automark]{scrlayer-scrpage}
 \pagestyle{scrheadings}
 \ihead{Chapter \headmark}
 \ohead[\pagemark]{\pagemark}
 \chead{}
 \cfoot[]{}


 In this book, I have a bibliography and a further reading section at 
the end of each chapter via this code in the preamble



 \defbibheading{subbibliography}[\bibname]{%
 \section*{#1}%
 \markboth{#1}{#1}}

 and this ERT at the end of each chapter.


 \printbibliography[heading=subbibintoc,title={Further 
Reading},notcategory=cited]

 \printbibliography[heading=subbibintoc,category=cited]
 \end{refsection}
 \begin{refsection}


 Everything works fine, except that the header on the last page of 
each chapter is called Further Reading instead of the name of the chapter.



 How to fix this?


 Many thanks!



You are defining `defbibheading` in a way that updates the running
header with *Further Reading* via `markboth`. Deleting this line should
fix your problem.

If you really want to have the chapter titles on the starting pages of
chapters, you can use `\renewcommand*{\chapterpagestyle}{scrheadings}`
or use the starred variant of the commands - `\ihead*{Chapter
\headmark}`. An up to date version of KOMA-script is needed for that.

Once you start the appendix, you have some trouble, as you are
hard-coding the word *chapter*. You can use `\chapapp` instead.

Best regards
Johannes Böttcher




Re: LaTex question: KOMA-script headers and chapter bibliography

2015-04-29 Thread Sam Lewis





 On Thursday, 30 April 2015, 2:03, Johannes Böttcher wrote:
 You are defining `defbibheading` in a way that updates the running
 header with *Further Reading* via `markboth`. Deleting this line should
 fix your problem.
 
 If you really want to have the chapter titles on the starting pages of
 chapters, you can use 
 `\renewcommand*{\chapterpagestyle}{scrheadings}`
 or use the starred variant of the commands - `\ihead*{Chapter
 \headmark}`. An up to date version of KOMA-script is needed for that.
 
 Once you start the appendix, you have some trouble, as you are
 hard-coding the word *chapter*. You can use `\chapapp` instead.



Many thanks for pointing me in the right direction. I fixed it like this.


\documentclass[chapterprefix=on]{scrbook}



\usepackage[automark]{scrlayer-scrpage}
\pagestyle{scrheadings}
\ihead{\headmark}
\ohead[\pagemark]{\pagemark}
\chead{}
\cfoot[]{}


\defbibheading{subbibliography}{%
\addsec{#1}}


\chapter{...}
\begin{refsection}
...
\printbibliography[heading=subbibliography,title={Further 
Reading},notcategory=cited]
\printbibliography[heading=subbibliography,title={Bibliography},category=cited]

\end{refsection}

Now works like a charm!

Again many thanks. 


Cheers, Sam


Re: LaTex question: KOMA-script headers and chapter bibliography

2015-04-29 Thread Johannes Böttcher


On 04/29/2015 06:40 AM, Sam Lewis wrote:
> I create running headers in a Koma-script book with the following. 
This gives me a page number and the chapter heading on each page, except 
on the first page of each chapter as desired.

>
> \usepackage[automark]{scrlayer-scrpage}
> \pagestyle{scrheadings}
> \ihead{Chapter \headmark}
> \ohead[\pagemark]{\pagemark}
> \chead{}
> \cfoot[]{}
>
>
> In this book, I have a bibliography and a further reading section at 
the end of each chapter via this code in the preamble

>
>
> \defbibheading{subbibliography}[\bibname]{%
> \section*{#1}%
> \markboth{#1}{#1}}
>
> and this ERT at the end of each chapter.
>
>
> \printbibliography[heading=subbibintoc,title={Further 
Reading},notcategory=cited]

> \printbibliography[heading=subbibintoc,category=cited]
> \end{refsection}
> \begin{refsection}
>
>
> Everything works fine, except that the header on the last page of 
each chapter is called "Further Reading" instead of the name of the chapter.

>
>
> How to fix this?
>
>
> Many thanks!
>


You are defining `defbibheading` in a way that updates the running
header with *Further Reading* via `markboth`. Deleting this line should
fix your problem.

If you really want to have the chapter titles on the starting pages of
chapters, you can use `\renewcommand*{\chapterpagestyle}{scrheadings}`
or use the starred variant of the commands -> `\ihead*{Chapter
\headmark}`. An up to date version of KOMA-script is needed for that.

Once you start the appendix, you have some trouble, as you are
hard-coding the word *chapter*. You can use `\chapapp` instead.

Best regards
Johannes Böttcher




Re: LaTex question: KOMA-script headers and chapter bibliography

2015-04-29 Thread Sam Lewis





> On Thursday, 30 April 2015, 2:03, Johannes Böttcher wrote:
> You are defining `defbibheading` in a way that updates the running
> header with *Further Reading* via `markboth`. Deleting this line should
> fix your problem.
> 
> If you really want to have the chapter titles on the starting pages of
> chapters, you can use 
> `\renewcommand*{\chapterpagestyle}{scrheadings}`
> or use the starred variant of the commands -> `\ihead*{Chapter
> \headmark}`. An up to date version of KOMA-script is needed for that.
> 
> Once you start the appendix, you have some trouble, as you are
> hard-coding the word *chapter*. You can use `\chapapp` instead.



Many thanks for pointing me in the right direction. I fixed it like this.


\documentclass[chapterprefix=on]{scrbook}



\usepackage[automark]{scrlayer-scrpage}
\pagestyle{scrheadings}
\ihead{\headmark}
\ohead[\pagemark]{\pagemark}
\chead{}
\cfoot[]{}


\defbibheading{subbibliography}{%
\addsec{#1}}


\chapter{...}
\begin{refsection}
...
\printbibliography[heading=subbibliography,title={Further 
Reading},notcategory=cited]
\printbibliography[heading=subbibliography,title={Bibliography},category=cited]

\end{refsection}

Now works like a charm!

Again many thanks. 


Cheers, Sam


LaTex question: KOMA-script headers and chapter bibliography

2015-04-28 Thread Sam Lewis
I create running headers in a Koma-script book with the following. This gives 
me a page number and the chapter heading on each page, except on the first page 
of each chapter as desired.

\usepackage[automark]{scrlayer-scrpage}
\pagestyle{scrheadings}
\ihead{Chapter \headmark}
\ohead[\pagemark]{\pagemark}
\chead{}
\cfoot[]{}


In this book, I have a bibliography and a further reading section at the end of 
each chapter via this code in the preamble 


\defbibheading{subbibliography}[\bibname]{%
\section*{#1}%
\markboth{#1}{#1}}

and this ERT at the end of each chapter.


\printbibliography[heading=subbibintoc,title={Further 
Reading},notcategory=cited]
\printbibliography[heading=subbibintoc,category=cited]
\end{refsection}
\begin{refsection}


Everything works fine, except that the header on the last page of each chapter 
is called Further Reading instead of the name of the chapter. 


How to fix this?


Many thanks!


LaTex question: KOMA-script headers and chapter bibliography

2015-04-28 Thread Sam Lewis
I create running headers in a Koma-script book with the following. This gives 
me a page number and the chapter heading on each page, except on the first page 
of each chapter as desired.

\usepackage[automark]{scrlayer-scrpage}
\pagestyle{scrheadings}
\ihead{Chapter \headmark}
\ohead[\pagemark]{\pagemark}
\chead{}
\cfoot[]{}


In this book, I have a bibliography and a further reading section at the end of 
each chapter via this code in the preamble 


\defbibheading{subbibliography}[\bibname]{%
\section*{#1}%
\markboth{#1}{#1}}

and this ERT at the end of each chapter.


\printbibliography[heading=subbibintoc,title={Further 
Reading},notcategory=cited]
\printbibliography[heading=subbibintoc,category=cited]
\end{refsection}
\begin{refsection}


Everything works fine, except that the header on the last page of each chapter 
is called Further Reading instead of the name of the chapter. 


How to fix this?


Many thanks!


LaTex question: KOMA-script headers and chapter bibliography

2015-04-28 Thread Sam Lewis
I create running headers in a Koma-script book with the following. This gives 
me a page number and the chapter heading on each page, except on the first page 
of each chapter as desired.

\usepackage[automark]{scrlayer-scrpage}
\pagestyle{scrheadings}
\ihead{Chapter \headmark}
\ohead[\pagemark]{\pagemark}
\chead{}
\cfoot[]{}


In this book, I have a bibliography and a further reading section at the end of 
each chapter via this code in the preamble 


\defbibheading{subbibliography}[\bibname]{%
\section*{#1}%
\markboth{#1}{#1}}

and this ERT at the end of each chapter.


\printbibliography[heading=subbibintoc,title={Further 
Reading},notcategory=cited]
\printbibliography[heading=subbibintoc,category=cited]
\end{refsection}
\begin{refsection}


Everything works fine, except that the header on the last page of each chapter 
is called "Further Reading" instead of the name of the chapter. 


How to fix this?


Many thanks!


LaTeX Question

2012-10-29 Thread Rob Oakes
Dear Group,

This is more of a LaTeX question rather than a LyX question, but I know
there are many LaTeX experts here, too, so here goes.

I'm currently working with a set of fluids equations which have both
velocity and volume terms. Given how frequently the variable v appears
in both (by convention), I would like to somehow distinguish them in my
notes. (Right now, I've been using an uppercase V for volume and
lowercase v for velocity.) 

I've seen several texts use a variant of the V character, however, to
make the distinction more clear. Any idea how this might be done? What
is the best way to use a variant character in a math expression, or is
there a standard LaTeX symbol for volume? (Regular V appears to be used
for velocity, variant V for volume.)

I've already looked through the general LaTeX symbols list and the LyX
menus, but wasn't able to find the symbols used in the text.

Any thoughts would be appreciated.

Cheers,

Rob



Re: LaTeX Question

2012-10-29 Thread Richard Heck

On 10/29/2012 08:13 AM, Rob Oakes wrote:

Dear Group,

This is more of a LaTeX question rather than a LyX question, but I know
there are many LaTeX experts here, too, so here goes.

I'm currently working with a set of fluids equations which have both
velocity and volume terms. Given how frequently the variable v appears
in both (by convention), I would like to somehow distinguish them in my
notes. (Right now, I've been using an uppercase V for volume and
lowercase v for velocity.)

I've seen several texts use a variant of the V character, however, to
make the distinction more clear. Any idea how this might be done? What
is the best way to use a variant character in a math expression, or is
there a standard LaTeX symbol for volume? (Regular V appears to be used
for velocity, variant V for volume.)

I've already looked through the general LaTeX symbols list and the LyX
menus, but wasn't able to find the symbols used in the text.


Try looking here:
http://www.tex.ac.uk/tex-archive/info/symbols/comprehensive/symbols-a4.pdf

rh



Re : LaTeX Question

2012-10-29 Thread Murat Yildizoglu
Wow, this is comprehensive indeed! Thank you Richard!  

Rob, you could maybe use mathcal form for one the v's, to distinguish it from 
the other.   

--  
Murat Yildizoglu
http://yildizoglu.info


Le lundi 29 octobre 2012 à 14:28, Richard Heck a écrit :

 On 10/29/2012 08:13 AM, Rob Oakes wrote:
  Dear Group,
   
  This is more of a LaTeX question rather than a LyX question, but I know
  there are many LaTeX experts here, too, so here goes.
   
  I'm currently working with a set of fluids equations which have both
  velocity and volume terms. Given how frequently the variable v appears
  in both (by convention), I would like to somehow distinguish them in my
  notes. (Right now, I've been using an uppercase V for volume and
  lowercase v for velocity.)
   
  I've seen several texts use a variant of the V character, however, to
  make the distinction more clear. Any idea how this might be done? What
  is the best way to use a variant character in a math expression, or is
  there a standard LaTeX symbol for volume? (Regular V appears to be used
  for velocity, variant V for volume.)
   
  I've already looked through the general LaTeX symbols list and the LyX
  menus, but wasn't able to find the symbols used in the text.
   
  
 Try looking here:
 http://www.tex.ac.uk/tex-archive/info/symbols/comprehensive/symbols-a4.pdf
  
 rh  



Re: LaTeX Question

2012-10-29 Thread Guenter Milde
On 2012-10-29, Rob Oakes wrote:
 Dear Group,

 This is more of a LaTeX question rather than a LyX question, but I know
 there are many LaTeX experts here, too, so here goes.

 I'm currently working with a set of fluids equations which have both
 velocity and volume terms. Given how frequently the variable v appears
 in both (by convention), I would like to somehow distinguish them in my
 notes. (Right now, I've been using an uppercase V for volume and
 lowercase v for velocity.) 

$V$ and $v = ds/dt$ or $u = ds/dt$ are the symbols recommended by the
IUPAP (International Union of Pure and Applied Physics) for volume and
velocity respectively.

Some mathematical fonts have $v$ differ from \itshape{v} in order to
prevent mixup with $\nu$.

Günter



Re: LaTeX Question

2012-10-29 Thread Andrew Parsloe

On 30/10/2012 3:35 a.m., Guenter Milde wrote:

On 2012-10-29, Rob Oakes wrote:

Dear Group,



This is more of a LaTeX question rather than a LyX question, but I know
there are many LaTeX experts here, too, so here goes.



I'm currently working with a set of fluids equations which have both
velocity and volume terms. Given how frequently the variable v appears
in both (by convention), I would like to somehow distinguish them in my
notes. (Right now, I've been using an uppercase V for volume and
lowercase v for velocity.)


$V$ and $v = ds/dt$ or $u = ds/dt$ are the symbols recommended by the
IUPAP (International Union of Pure and Applied Physics) for volume and
velocity respectively.

Some mathematical fonts have $v$ differ from \itshape{v} in order to
prevent mixup with $\nu$.

Günter



$\upsilon$ gives a fatter $v$.

Andrew


LaTeX Question

2012-10-29 Thread Rob Oakes
Dear Group,

This is more of a LaTeX question rather than a LyX question, but I know
there are many LaTeX experts here, too, so here goes.

I'm currently working with a set of fluids equations which have both
velocity and volume terms. Given how frequently the variable v appears
in both (by convention), I would like to somehow distinguish them in my
notes. (Right now, I've been using an uppercase V for volume and
lowercase v for velocity.) 

I've seen several texts use a variant of the V character, however, to
make the distinction more clear. Any idea how this might be done? What
is the best way to use a variant character in a math expression, or is
there a standard LaTeX symbol for volume? (Regular V appears to be used
for velocity, variant V for volume.)

I've already looked through the general LaTeX symbols list and the LyX
menus, but wasn't able to find the symbols used in the text.

Any thoughts would be appreciated.

Cheers,

Rob



Re: LaTeX Question

2012-10-29 Thread Richard Heck

On 10/29/2012 08:13 AM, Rob Oakes wrote:

Dear Group,

This is more of a LaTeX question rather than a LyX question, but I know
there are many LaTeX experts here, too, so here goes.

I'm currently working with a set of fluids equations which have both
velocity and volume terms. Given how frequently the variable v appears
in both (by convention), I would like to somehow distinguish them in my
notes. (Right now, I've been using an uppercase V for volume and
lowercase v for velocity.)

I've seen several texts use a variant of the V character, however, to
make the distinction more clear. Any idea how this might be done? What
is the best way to use a variant character in a math expression, or is
there a standard LaTeX symbol for volume? (Regular V appears to be used
for velocity, variant V for volume.)

I've already looked through the general LaTeX symbols list and the LyX
menus, but wasn't able to find the symbols used in the text.


Try looking here:
http://www.tex.ac.uk/tex-archive/info/symbols/comprehensive/symbols-a4.pdf

rh



Re : LaTeX Question

2012-10-29 Thread Murat Yildizoglu
Wow, this is comprehensive indeed! Thank you Richard!  

Rob, you could maybe use mathcal form for one the v's, to distinguish it from 
the other.   

--  
Murat Yildizoglu
http://yildizoglu.info


Le lundi 29 octobre 2012 à 14:28, Richard Heck a écrit :

 On 10/29/2012 08:13 AM, Rob Oakes wrote:
  Dear Group,
   
  This is more of a LaTeX question rather than a LyX question, but I know
  there are many LaTeX experts here, too, so here goes.
   
  I'm currently working with a set of fluids equations which have both
  velocity and volume terms. Given how frequently the variable v appears
  in both (by convention), I would like to somehow distinguish them in my
  notes. (Right now, I've been using an uppercase V for volume and
  lowercase v for velocity.)
   
  I've seen several texts use a variant of the V character, however, to
  make the distinction more clear. Any idea how this might be done? What
  is the best way to use a variant character in a math expression, or is
  there a standard LaTeX symbol for volume? (Regular V appears to be used
  for velocity, variant V for volume.)
   
  I've already looked through the general LaTeX symbols list and the LyX
  menus, but wasn't able to find the symbols used in the text.
   
  
 Try looking here:
 http://www.tex.ac.uk/tex-archive/info/symbols/comprehensive/symbols-a4.pdf
  
 rh  



Re: LaTeX Question

2012-10-29 Thread Guenter Milde
On 2012-10-29, Rob Oakes wrote:
 Dear Group,

 This is more of a LaTeX question rather than a LyX question, but I know
 there are many LaTeX experts here, too, so here goes.

 I'm currently working with a set of fluids equations which have both
 velocity and volume terms. Given how frequently the variable v appears
 in both (by convention), I would like to somehow distinguish them in my
 notes. (Right now, I've been using an uppercase V for volume and
 lowercase v for velocity.) 

$V$ and $v = ds/dt$ or $u = ds/dt$ are the symbols recommended by the
IUPAP (International Union of Pure and Applied Physics) for volume and
velocity respectively.

Some mathematical fonts have $v$ differ from \itshape{v} in order to
prevent mixup with $\nu$.

Günter



Re: LaTeX Question

2012-10-29 Thread Andrew Parsloe

On 30/10/2012 3:35 a.m., Guenter Milde wrote:

On 2012-10-29, Rob Oakes wrote:

Dear Group,



This is more of a LaTeX question rather than a LyX question, but I know
there are many LaTeX experts here, too, so here goes.



I'm currently working with a set of fluids equations which have both
velocity and volume terms. Given how frequently the variable v appears
in both (by convention), I would like to somehow distinguish them in my
notes. (Right now, I've been using an uppercase V for volume and
lowercase v for velocity.)


$V$ and $v = ds/dt$ or $u = ds/dt$ are the symbols recommended by the
IUPAP (International Union of Pure and Applied Physics) for volume and
velocity respectively.

Some mathematical fonts have $v$ differ from \itshape{v} in order to
prevent mixup with $\nu$.

Günter



$\upsilon$ gives a fatter $v$.

Andrew


LaTeX Question

2012-10-29 Thread Rob Oakes
Dear Group,

This is more of a LaTeX question rather than a LyX question, but I know
there are many LaTeX experts here, too, so here goes.

I'm currently working with a set of fluids equations which have both
velocity and volume terms. Given how frequently the variable v appears
in both (by convention), I would like to somehow distinguish them in my
notes. (Right now, I've been using an uppercase V for volume and
lowercase v for velocity.) 

I've seen several texts use a variant of the V character, however, to
make the distinction more clear. Any idea how this might be done? What
is the best way to use a variant character in a math expression, or is
there a standard LaTeX symbol for volume? (Regular V appears to be used
for velocity, variant V for volume.)

I've already looked through the general LaTeX symbols list and the LyX
menus, but wasn't able to find the symbols used in the text.

Any thoughts would be appreciated.

Cheers,

Rob



Re: LaTeX Question

2012-10-29 Thread Richard Heck

On 10/29/2012 08:13 AM, Rob Oakes wrote:

Dear Group,

This is more of a LaTeX question rather than a LyX question, but I know
there are many LaTeX experts here, too, so here goes.

I'm currently working with a set of fluids equations which have both
velocity and volume terms. Given how frequently the variable v appears
in both (by convention), I would like to somehow distinguish them in my
notes. (Right now, I've been using an uppercase V for volume and
lowercase v for velocity.)

I've seen several texts use a variant of the V character, however, to
make the distinction more clear. Any idea how this might be done? What
is the best way to use a variant character in a math expression, or is
there a standard LaTeX symbol for volume? (Regular V appears to be used
for velocity, variant V for volume.)

I've already looked through the general LaTeX symbols list and the LyX
menus, but wasn't able to find the symbols used in the text.


Try looking here:
http://www.tex.ac.uk/tex-archive/info/symbols/comprehensive/symbols-a4.pdf

rh



Re : LaTeX Question

2012-10-29 Thread Murat Yildizoglu
Wow, this is comprehensive indeed! Thank you Richard!  

Rob, you could maybe use mathcal form for one the v's, to distinguish it from 
the other.   

--  
Murat Yildizoglu
http://yildizoglu.info


Le lundi 29 octobre 2012 à 14:28, Richard Heck a écrit :

> On 10/29/2012 08:13 AM, Rob Oakes wrote:
> > Dear Group,
> >  
> > This is more of a LaTeX question rather than a LyX question, but I know
> > there are many LaTeX experts here, too, so here goes.
> >  
> > I'm currently working with a set of fluids equations which have both
> > velocity and volume terms. Given how frequently the variable v appears
> > in both (by convention), I would like to somehow distinguish them in my
> > notes. (Right now, I've been using an uppercase V for volume and
> > lowercase v for velocity.)
> >  
> > I've seen several texts use a variant of the V character, however, to
> > make the distinction more clear. Any idea how this might be done? What
> > is the best way to use a variant character in a math expression, or is
> > there a standard LaTeX symbol for volume? (Regular V appears to be used
> > for velocity, variant V for volume.)
> >  
> > I've already looked through the general LaTeX symbols list and the LyX
> > menus, but wasn't able to find the symbols used in the text.
> >  
>  
> Try looking here:
> http://www.tex.ac.uk/tex-archive/info/symbols/comprehensive/symbols-a4.pdf
>  
> rh  



Re: LaTeX Question

2012-10-29 Thread Guenter Milde
On 2012-10-29, Rob Oakes wrote:
> Dear Group,

> This is more of a LaTeX question rather than a LyX question, but I know
> there are many LaTeX experts here, too, so here goes.

> I'm currently working with a set of fluids equations which have both
> velocity and volume terms. Given how frequently the variable v appears
> in both (by convention), I would like to somehow distinguish them in my
> notes. (Right now, I've been using an uppercase V for volume and
> lowercase v for velocity.) 

$V$ and $v = ds/dt$ or $u = ds/dt$ are the symbols recommended by the
IUPAP (International Union of Pure and Applied Physics) for volume and
velocity respectively.

Some mathematical fonts have $v$ differ from \itshape{v} in order to
prevent mixup with $\nu$.

Günter



Re: LaTeX Question

2012-10-29 Thread Andrew Parsloe

On 30/10/2012 3:35 a.m., Guenter Milde wrote:

On 2012-10-29, Rob Oakes wrote:

Dear Group,



This is more of a LaTeX question rather than a LyX question, but I know
there are many LaTeX experts here, too, so here goes.



I'm currently working with a set of fluids equations which have both
velocity and volume terms. Given how frequently the variable v appears
in both (by convention), I would like to somehow distinguish them in my
notes. (Right now, I've been using an uppercase V for volume and
lowercase v for velocity.)


$V$ and $v = ds/dt$ or $u = ds/dt$ are the symbols recommended by the
IUPAP (International Union of Pure and Applied Physics) for volume and
velocity respectively.

Some mathematical fonts have $v$ differ from \itshape{v} in order to
prevent mixup with $\nu$.

Günter



$\upsilon$ gives a "fatter" $v$.

Andrew


Re: latex question

2012-03-09 Thread Richard Heck

On 03/09/2012 07:46 AM, paul sutton wrote:

Hi

I am using kile (latex editor for kde) and have created a simple how to
file,   the code is below,   what is happening is that it compiles
fine,  however where I have the picture inserted this a
appears first then the text that in the source is above it.I would
have expected this the other way round.  I thought I would ask here to
see if anyone can shed light on what is going on.   I use lyx normally
but want to learn produce some pure LaTeX files so I can learn both.

That is because figures are floats: LaTeX puts them where it wants, with 
hints from you. Read this:

http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions
or something similar.

If you want the graphic exactly where it is in the text, then you need 
to load the float package:

 \usepackage{float}
and use the here definitely option:
\begin{figure}[H]

\end{figure}
That tells LaTeX: Put it where it is.

Richard


\documentclass[11pt,british]{report}
\usepackage{graphicx}

\begin{document}

Simple Geany How to:
\\
1.If Geany is not already installed you need to go to the Ubuntu
software centre and install it.
\\
2.Once installed you can start the application from either the side
bar (software centre may give you the option to add to sidebar so please
scroll
down to see what other options are available.



\begin{figure}
  \centering
  \includegraphics[width=418pt,height=247pt]{./geany1.png}
  % geany1.png: 1037x695 pixel, 72dpi, 36.58x24.52 cm, bb=0 0 1037 695
  \caption{Geany Editor}
\end{figure}

If you start a new file with File - New or you can start a specifc type
of file with File - New (from template) the latter gives you some basic
headers for that type
of file,  e.g  c, python, latex etc.

\begin{figure}
  \centering
  \includegraphics[width=418pt,height=247pt]{./geany2a.png}
  % geany1.png: 1037x695 pixel, 72dpi, 36.58x24.52 cm, bb=0 0 1037 695
  \caption{Geany Editor with python template}
\end{figure}


\end{document}


thanks for any help.,  I have attached





Re: latex question

2012-03-09 Thread Richard Heck

On 03/09/2012 07:46 AM, paul sutton wrote:

Hi

I am using kile (latex editor for kde) and have created a simple how to
file,   the code is below,   what is happening is that it compiles
fine,  however where I have the picture inserted this a
appears first then the text that in the source is above it.I would
have expected this the other way round.  I thought I would ask here to
see if anyone can shed light on what is going on.   I use lyx normally
but want to learn produce some pure LaTeX files so I can learn both.

That is because figures are floats: LaTeX puts them where it wants, with 
hints from you. Read this:

http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions
or something similar.

If you want the graphic exactly where it is in the text, then you need 
to load the float package:

 \usepackage{float}
and use the here definitely option:
\begin{figure}[H]

\end{figure}
That tells LaTeX: Put it where it is.

Richard


\documentclass[11pt,british]{report}
\usepackage{graphicx}

\begin{document}

Simple Geany How to:
\\
1.If Geany is not already installed you need to go to the Ubuntu
software centre and install it.
\\
2.Once installed you can start the application from either the side
bar (software centre may give you the option to add to sidebar so please
scroll
down to see what other options are available.



\begin{figure}
  \centering
  \includegraphics[width=418pt,height=247pt]{./geany1.png}
  % geany1.png: 1037x695 pixel, 72dpi, 36.58x24.52 cm, bb=0 0 1037 695
  \caption{Geany Editor}
\end{figure}

If you start a new file with File - New or you can start a specifc type
of file with File - New (from template) the latter gives you some basic
headers for that type
of file,  e.g  c, python, latex etc.

\begin{figure}
  \centering
  \includegraphics[width=418pt,height=247pt]{./geany2a.png}
  % geany1.png: 1037x695 pixel, 72dpi, 36.58x24.52 cm, bb=0 0 1037 695
  \caption{Geany Editor with python template}
\end{figure}


\end{document}


thanks for any help.,  I have attached





Re: latex question

2012-03-09 Thread Richard Heck

On 03/09/2012 07:46 AM, paul sutton wrote:

Hi

I am using kile (latex editor for kde) and have created a simple how to
file,   the code is below,   what is happening is that it compiles
fine,  however where I have the picture inserted this a
appears first then the text that in the source is above it.I would
have expected this the other way round.  I thought I would ask here to
see if anyone can shed light on what is going on.   I use lyx normally
but want to learn produce some pure LaTeX files so I can learn both.

That is because figures are floats: LaTeX puts them where it wants, with 
hints from you. Read this:

http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions
or something similar.

If you want the graphic exactly where it is in the text, then you need 
to load the float package:

 \usepackage{float}
and use the "here definitely" option:
\begin{figure}[H]

\end{figure}
That tells LaTeX: Put it where it is.

Richard


\documentclass[11pt,british]{report}
\usepackage{graphicx}

\begin{document}

Simple Geany How to:
\\
1.If Geany is not already installed you need to go to the Ubuntu
software centre and install it.
\\
2.Once installed you can start the application from either the side
bar (software centre may give you the option to add to sidebar so please
scroll
down to see what other options are available.



\begin{figure}
  \centering
  \includegraphics[width=418pt,height=247pt]{./geany1.png}
  % geany1.png: 1037x695 pixel, 72dpi, 36.58x24.52 cm, bb=0 0 1037 695
  \caption{Geany Editor}
\end{figure}

If you start a new file with File - New or you can start a specifc type
of file with File - New (from template) the latter gives you some basic
headers for that type
of file,  e.g  c, python, latex etc.

\begin{figure}
  \centering
  \includegraphics[width=418pt,height=247pt]{./geany2a.png}
  % geany1.png: 1037x695 pixel, 72dpi, 36.58x24.52 cm, bb=0 0 1037 695
  \caption{Geany Editor with python template}
\end{figure}


\end{document}


thanks for any help.,  I have attached





Re: LaTeX question w.r.t \input@path

2011-04-05 Thread Jean-Marc Lasgouttes

Le 04/04/11 21:47, Hellmut Weber a écrit :

Hi list,
recently in another post I found the internal LaTeX macro

   \input@path

mentioned. Putting this (surrounded by \makeatletter and \makeatother)
in an ERT eventually gives me the correct path to my LyX document as
string in the document.


Note that this \input@path is not defined when you export to LaTeX, only 
when running inside LyX. So your code should be robust to that situation...


JMarc


Re: LaTeX question w.r.t \input@path

2011-04-05 Thread Hellmut Weber
Am 04.04.2011 23:32, schrieb Julien Rioux:
 On 04/04/2011 3:47 PM, Hellmut Weber wrote:
 Hi list,
 recently in another post I found the internal LaTeX macro

\input@path

 mentioned. Putting this (surrounded by \makeatletter and \makeatother)
 in an ERT eventually gives me the correct path to my LyX document as
 string in the document.

 S many thanks to the poster of that other message (soem days
 ago) !

 Here is now my question to the LaTeX gurus:
 How can I define a LaTeX macro which gives me the END of the string
 delivered by \input@path?
 To give a concrete example: When I open document test-01.lyx with LyX in
 the directory

 /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

 and compile my document it shows the correct path

 /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/

 Fine.

 What I would like to derive from this string is
 /.../Lyx-Tests/Inputpath/blam/ ;-)
 See what I mean?

 My LaTeX experience told me the need for \makeat...,
 but this transformation I'm not able to do in LaTeX.


 Any help appreciated


 Cheers

 Hellmut


 
 kludge solution, if you know how deep your paths are:
 
 \def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
 \def\removeprefix#1{\expandafter\removeprefixx#1}
 
 \removeprefix{\input@path}
 
Hi Julien,
thanks for your answer ;-)

I think I got the basic idea

BUT i Do NOT know the length the path delivered by \input@path.
To make clear what I'm looking for I put it in python code:

leo@sylhepta ~ $ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type help, copyright, credits or license for more information.
 def shorten_path(path, len):
...   return '/.../' + '/'.join(path.split('/')[-len:])
...
 shorten_path('/home/leo/leo/Test/abc',2)
'/.../Test/abc'


Can this be done in (La)TeX?


Thanks again and thanks to all others who contributed

Best regards

Hellmut

-- 
Dr. Hellmut Weber m...@hellmutweber.de
Degenfeldstraße 2 tel   +49-89-3081172
D-80803 München-Schwabing mobil +49-172-8450321
please: No DOCs, no PPTs. why: tinyurl.com/cbgq


Re: LaTeX question w.r.t \input@path

2011-04-05 Thread Richard Heck

On 04/05/2011 03:20 AM, Hellmut Weber wrote:


To make clear what I'm looking for I put it in python code:

leo@sylhepta ~ $ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type help, copyright, credits or license for more information.

def shorten_path(path, len):

...   return '/.../' + '/'.join(path.split('/')[-len:])
...

shorten_path('/home/leo/leo/Test/abc',2)

'/.../Test/abc'
Can this be done in (La)TeX?


Yes, but it involves magic. This post

http://stackoverflow.com/questions/2402354/split-comma-separated-parameters-in-latex

describes how to split on commas and this one on spaces
http://tex.stackexchange.com/questions/12810/how-do-i-split-a-string
They can both be adapted.

Richard



Re: LaTeX question w.r.t \input@path

2011-04-05 Thread Hellmut Weber
Am 04.04.2011 23:32, schrieb Julien Rioux:
 On 04/04/2011 3:47 PM, Hellmut Weber wrote:
 Hi list,
 recently in another post I found the internal LaTeX macro

\input@path

 mentioned. Putting this (surrounded by \makeatletter and \makeatother)
 in an ERT eventually gives me the correct path to my LyX document as
 string in the document.

 S many thanks to the poster of that other message (soem days
 ago) !

 Here is now my question to the LaTeX gurus:
 How can I define a LaTeX macro which gives me the END of the string
 delivered by \input@path?
 To give a concrete example: When I open document test-01.lyx with LyX in
 the directory

 /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

 and compile my document it shows the correct path

 /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/

 Fine.

 What I would like to derive from this string is
 /.../Lyx-Tests/Inputpath/blam/ ;-)
 See what I mean?

 My LaTeX experience told me the need for \makeat...,
 but this transformation I'm not able to do in LaTeX.


 Any help appreciated


 Cheers

 Hellmut


 
 kludge solution, if you know how deep your paths are:
 
 \def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
 \def\removeprefix#1{\expandafter\removeprefixx#1}
 
 \removeprefix{\input@path}
 
Hi list,
I have to add one aspect to the functionality I'm looking for:
Since I'm used to use directory names which contain underscores ('_') my
python code should read:

leo@sylhepta ~ $ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type help, copyright, credits or license for more information.
 def shorten_path(path, len):
...   return '/.../' + '/'.join(path.split(
  '/')[-len:]).replace('_','\_')
...
 shorten_path('/home/leo/leo/Test_01/abc',2)
'/.../Test\_01/abc'


TIA and Best regards

Hellmut

-- 
Dr. Hellmut Weber m...@hellmutweber.de
Degenfeldstraße 2 tel   +49-89-3081172
D-80803 München-Schwabing mobil +49-172-8450321
please: No DOCs, no PPTs. why: tinyurl.com/cbgq



Re: LaTeX question w.r.t \input@path

2011-04-05 Thread Julien Rioux

On 05/04/2011 7:21 PM, Hellmut Weber wrote:

Am 04.04.2011 23:32, schrieb Julien Rioux:

On 04/04/2011 3:47 PM, Hellmut Weber wrote:

Hi list,
recently in another post I found the internal LaTeX macro

\input@path

mentioned. Putting this (surrounded by \makeatletter and \makeatother)
in an ERT eventually gives me the correct path to my LyX document as
string in the document.

S many thanks to the poster of that other message (soem days
ago) !

Here is now my question to the LaTeX gurus:
How can I define a LaTeX macro which gives me the END of the string
delivered by \input@path?
To give a concrete example: When I open document test-01.lyx with LyX in
the directory

 /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

and compile my document it shows the correct path

 /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/

Fine.

What I would like to derive from this string is
 /.../Lyx-Tests/Inputpath/blam/ ;-)
See what I mean?

My LaTeX experience told me the need for \makeat...,
but this transformation I'm not able to do in LaTeX.


Any help appreciated


Cheers

Hellmut




kludge solution, if you know how deep your paths are:

\def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
\def\removeprefix#1{\expandafter\removeprefixx#1}

\removeprefix{\input@path}


Hi list,
I have to add one aspect to the functionality I'm looking for:
Since I'm used to use directory names which contain underscores ('_') my
python code should read:

leo@sylhepta ~ $ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type help, copyright, credits or license for more information.

def shorten_path(path, len):

...   return '/.../' + '/'.join(path.split(
   '/')[-len:]).replace('_','\_')
...

shorten_path('/home/leo/leo/Test_01/abc',2)

'/.../Test\_01/abc'




TIA and Best regards

Hellmut



Hellmut,

You might consider taking your question to a dedicated TeX channel. 
Splitting on / is doable, escaping _ too, but the real hard part about 
your request is this:


[-len:]

In tEx I do not know how to access the last N elements of a list when he 
list length is unknown, although accessing the first N is easy. If you 
know the list length then it's easy as well, but it looks not right for 
your case because the path could be any depth.


Cheers,
Julien


Re: LaTeX question w.r.t \input@path

2011-04-05 Thread Richard Heck

On 04/05/2011 07:28 PM, Julien Rioux wrote:

On 05/04/2011 7:21 PM, Hellmut Weber wrote:

Am 04.04.2011 23:32, schrieb Julien Rioux:

On 04/04/2011 3:47 PM, Hellmut Weber wrote:

Hi list,
recently in another post I found the internal LaTeX macro

\input@path

mentioned. Putting this (surrounded by \makeatletter and \makeatother)
in an ERT eventually gives me the correct path to my LyX document as
string in the document.

S many thanks to the poster of that other message (soem days
ago) !

Here is now my question to the LaTeX gurus:
How can I define a LaTeX macro which gives me the END of the string
delivered by \input@path?
To give a concrete example: When I open document test-01.lyx with 
LyX in

the directory

 /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

and compile my document it shows the correct path

 /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/

Fine.

What I would like to derive from this string is
 /.../Lyx-Tests/Inputpath/blam/ ;-)
See what I mean?

My LaTeX experience told me the need for \makeat...,
but this transformation I'm not able to do in LaTeX.


Any help appreciated


Cheers

Hellmut




kludge solution, if you know how deep your paths are:

\def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
\def\removeprefix#1{\expandafter\removeprefixx#1}

\removeprefix{\input@path}


Hi list,
I have to add one aspect to the functionality I'm looking for:
Since I'm used to use directory names which contain underscores ('_') my
python code should read:

leo@sylhepta ~ $ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type help, copyright, credits or license for more information.

def shorten_path(path, len):

...   return '/.../' + '/'.join(path.split(
   '/')[-len:]).replace('_','\_')
...

shorten_path('/home/leo/leo/Test_01/abc',2)

'/.../Test\_01/abc'




TIA and Best regards

Hellmut



Hellmut,

You might consider taking your question to a dedicated TeX channel. 
Splitting on / is doable, escaping _ too, but the real hard part about 
your request is this:


[-len:]

In tEx I do not know how to access the last N elements of a list when 
he list length is unknown, although accessing the first N is easy. If 
you know the list length then it's easy as well, but it looks not 
right for your case because the path could be any depth.


OK, so this is getting a little off-topic, but the attached kind of 
works, as you can see if you compile it. Unfortunately, it does not work 
with macros, but only with a literal. I.e., this:

\split{hi/there/bob}
works but
\def\tempa{hi/there/bob}
\split{\tempa}
does not work. I do not see why, but perhaps someone else will know.

Richard

\documentclass[a4paper,10pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage{ifthen}
\makeatletter

\def\tempa{}\def\tempb{}
\def\split#1{\@split{#1}#1/@endtoken}
\def\@split#1#2/#3@endtoken{%
  \ifthenelse{\equal{#1}{#2}}{\def\tempa{#1}\def\tempb{}}%
  {\@@split#2/#3@endtoken}}
\def\@@split#1/#2/@endtoken{\def\tempa{#1}\def\tempb{#2}}

\makeatother

\begin{document}
Pure stuff.

\split{hi/there/bob}

\tempa

\tempb

Defined stuff

\def\tempb{hi/there/bob}
\split{\tempb}

\tempa

\tempb

\end{document}


Re: LaTeX question w.r.t \input@path

2011-04-05 Thread Jean-Marc Lasgouttes

Le 04/04/11 21:47, Hellmut Weber a écrit :

Hi list,
recently in another post I found the internal LaTeX macro

   \input@path

mentioned. Putting this (surrounded by \makeatletter and \makeatother)
in an ERT eventually gives me the correct path to my LyX document as
string in the document.


Note that this \input@path is not defined when you export to LaTeX, only 
when running inside LyX. So your code should be robust to that situation...


JMarc


Re: LaTeX question w.r.t \input@path

2011-04-05 Thread Hellmut Weber
Am 04.04.2011 23:32, schrieb Julien Rioux:
 On 04/04/2011 3:47 PM, Hellmut Weber wrote:
 Hi list,
 recently in another post I found the internal LaTeX macro

\input@path

 mentioned. Putting this (surrounded by \makeatletter and \makeatother)
 in an ERT eventually gives me the correct path to my LyX document as
 string in the document.

 S many thanks to the poster of that other message (soem days
 ago) !

 Here is now my question to the LaTeX gurus:
 How can I define a LaTeX macro which gives me the END of the string
 delivered by \input@path?
 To give a concrete example: When I open document test-01.lyx with LyX in
 the directory

 /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

 and compile my document it shows the correct path

 /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/

 Fine.

 What I would like to derive from this string is
 /.../Lyx-Tests/Inputpath/blam/ ;-)
 See what I mean?

 My LaTeX experience told me the need for \makeat...,
 but this transformation I'm not able to do in LaTeX.


 Any help appreciated


 Cheers

 Hellmut


 
 kludge solution, if you know how deep your paths are:
 
 \def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
 \def\removeprefix#1{\expandafter\removeprefixx#1}
 
 \removeprefix{\input@path}
 
Hi Julien,
thanks for your answer ;-)

I think I got the basic idea

BUT i Do NOT know the length the path delivered by \input@path.
To make clear what I'm looking for I put it in python code:

leo@sylhepta ~ $ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type help, copyright, credits or license for more information.
 def shorten_path(path, len):
...   return '/.../' + '/'.join(path.split('/')[-len:])
...
 shorten_path('/home/leo/leo/Test/abc',2)
'/.../Test/abc'


Can this be done in (La)TeX?


Thanks again and thanks to all others who contributed

Best regards

Hellmut

-- 
Dr. Hellmut Weber m...@hellmutweber.de
Degenfeldstraße 2 tel   +49-89-3081172
D-80803 München-Schwabing mobil +49-172-8450321
please: No DOCs, no PPTs. why: tinyurl.com/cbgq


Re: LaTeX question w.r.t \input@path

2011-04-05 Thread Richard Heck

On 04/05/2011 03:20 AM, Hellmut Weber wrote:


To make clear what I'm looking for I put it in python code:

leo@sylhepta ~ $ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type help, copyright, credits or license for more information.

def shorten_path(path, len):

...   return '/.../' + '/'.join(path.split('/')[-len:])
...

shorten_path('/home/leo/leo/Test/abc',2)

'/.../Test/abc'
Can this be done in (La)TeX?


Yes, but it involves magic. This post

http://stackoverflow.com/questions/2402354/split-comma-separated-parameters-in-latex

describes how to split on commas and this one on spaces
http://tex.stackexchange.com/questions/12810/how-do-i-split-a-string
They can both be adapted.

Richard



Re: LaTeX question w.r.t \input@path

2011-04-05 Thread Hellmut Weber
Am 04.04.2011 23:32, schrieb Julien Rioux:
 On 04/04/2011 3:47 PM, Hellmut Weber wrote:
 Hi list,
 recently in another post I found the internal LaTeX macro

\input@path

 mentioned. Putting this (surrounded by \makeatletter and \makeatother)
 in an ERT eventually gives me the correct path to my LyX document as
 string in the document.

 S many thanks to the poster of that other message (soem days
 ago) !

 Here is now my question to the LaTeX gurus:
 How can I define a LaTeX macro which gives me the END of the string
 delivered by \input@path?
 To give a concrete example: When I open document test-01.lyx with LyX in
 the directory

 /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

 and compile my document it shows the correct path

 /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/

 Fine.

 What I would like to derive from this string is
 /.../Lyx-Tests/Inputpath/blam/ ;-)
 See what I mean?

 My LaTeX experience told me the need for \makeat...,
 but this transformation I'm not able to do in LaTeX.


 Any help appreciated


 Cheers

 Hellmut


 
 kludge solution, if you know how deep your paths are:
 
 \def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
 \def\removeprefix#1{\expandafter\removeprefixx#1}
 
 \removeprefix{\input@path}
 
Hi list,
I have to add one aspect to the functionality I'm looking for:
Since I'm used to use directory names which contain underscores ('_') my
python code should read:

leo@sylhepta ~ $ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type help, copyright, credits or license for more information.
 def shorten_path(path, len):
...   return '/.../' + '/'.join(path.split(
  '/')[-len:]).replace('_','\_')
...
 shorten_path('/home/leo/leo/Test_01/abc',2)
'/.../Test\_01/abc'


TIA and Best regards

Hellmut

-- 
Dr. Hellmut Weber m...@hellmutweber.de
Degenfeldstraße 2 tel   +49-89-3081172
D-80803 München-Schwabing mobil +49-172-8450321
please: No DOCs, no PPTs. why: tinyurl.com/cbgq



Re: LaTeX question w.r.t \input@path

2011-04-05 Thread Julien Rioux

On 05/04/2011 7:21 PM, Hellmut Weber wrote:

Am 04.04.2011 23:32, schrieb Julien Rioux:

On 04/04/2011 3:47 PM, Hellmut Weber wrote:

Hi list,
recently in another post I found the internal LaTeX macro

\input@path

mentioned. Putting this (surrounded by \makeatletter and \makeatother)
in an ERT eventually gives me the correct path to my LyX document as
string in the document.

S many thanks to the poster of that other message (soem days
ago) !

Here is now my question to the LaTeX gurus:
How can I define a LaTeX macro which gives me the END of the string
delivered by \input@path?
To give a concrete example: When I open document test-01.lyx with LyX in
the directory

 /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

and compile my document it shows the correct path

 /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/

Fine.

What I would like to derive from this string is
 /.../Lyx-Tests/Inputpath/blam/ ;-)
See what I mean?

My LaTeX experience told me the need for \makeat...,
but this transformation I'm not able to do in LaTeX.


Any help appreciated


Cheers

Hellmut




kludge solution, if you know how deep your paths are:

\def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
\def\removeprefix#1{\expandafter\removeprefixx#1}

\removeprefix{\input@path}


Hi list,
I have to add one aspect to the functionality I'm looking for:
Since I'm used to use directory names which contain underscores ('_') my
python code should read:

leo@sylhepta ~ $ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type help, copyright, credits or license for more information.

def shorten_path(path, len):

...   return '/.../' + '/'.join(path.split(
   '/')[-len:]).replace('_','\_')
...

shorten_path('/home/leo/leo/Test_01/abc',2)

'/.../Test\_01/abc'




TIA and Best regards

Hellmut



Hellmut,

You might consider taking your question to a dedicated TeX channel. 
Splitting on / is doable, escaping _ too, but the real hard part about 
your request is this:


[-len:]

In tEx I do not know how to access the last N elements of a list when he 
list length is unknown, although accessing the first N is easy. If you 
know the list length then it's easy as well, but it looks not right for 
your case because the path could be any depth.


Cheers,
Julien


Re: LaTeX question w.r.t \input@path

2011-04-05 Thread Richard Heck

On 04/05/2011 07:28 PM, Julien Rioux wrote:

On 05/04/2011 7:21 PM, Hellmut Weber wrote:

Am 04.04.2011 23:32, schrieb Julien Rioux:

On 04/04/2011 3:47 PM, Hellmut Weber wrote:

Hi list,
recently in another post I found the internal LaTeX macro

\input@path

mentioned. Putting this (surrounded by \makeatletter and \makeatother)
in an ERT eventually gives me the correct path to my LyX document as
string in the document.

S many thanks to the poster of that other message (soem days
ago) !

Here is now my question to the LaTeX gurus:
How can I define a LaTeX macro which gives me the END of the string
delivered by \input@path?
To give a concrete example: When I open document test-01.lyx with 
LyX in

the directory

 /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

and compile my document it shows the correct path

 /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/

Fine.

What I would like to derive from this string is
 /.../Lyx-Tests/Inputpath/blam/ ;-)
See what I mean?

My LaTeX experience told me the need for \makeat...,
but this transformation I'm not able to do in LaTeX.


Any help appreciated


Cheers

Hellmut




kludge solution, if you know how deep your paths are:

\def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
\def\removeprefix#1{\expandafter\removeprefixx#1}

\removeprefix{\input@path}


Hi list,
I have to add one aspect to the functionality I'm looking for:
Since I'm used to use directory names which contain underscores ('_') my
python code should read:

leo@sylhepta ~ $ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type help, copyright, credits or license for more information.

def shorten_path(path, len):

...   return '/.../' + '/'.join(path.split(
   '/')[-len:]).replace('_','\_')
...

shorten_path('/home/leo/leo/Test_01/abc',2)

'/.../Test\_01/abc'




TIA and Best regards

Hellmut



Hellmut,

You might consider taking your question to a dedicated TeX channel. 
Splitting on / is doable, escaping _ too, but the real hard part about 
your request is this:


[-len:]

In tEx I do not know how to access the last N elements of a list when 
he list length is unknown, although accessing the first N is easy. If 
you know the list length then it's easy as well, but it looks not 
right for your case because the path could be any depth.


OK, so this is getting a little off-topic, but the attached kind of 
works, as you can see if you compile it. Unfortunately, it does not work 
with macros, but only with a literal. I.e., this:

\split{hi/there/bob}
works but
\def\tempa{hi/there/bob}
\split{\tempa}
does not work. I do not see why, but perhaps someone else will know.

Richard

\documentclass[a4paper,10pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage{ifthen}
\makeatletter

\def\tempa{}\def\tempb{}
\def\split#1{\@split{#1}#1/@endtoken}
\def\@split#1#2/#3@endtoken{%
  \ifthenelse{\equal{#1}{#2}}{\def\tempa{#1}\def\tempb{}}%
  {\@@split#2/#3@endtoken}}
\def\@@split#1/#2/@endtoken{\def\tempa{#1}\def\tempb{#2}}

\makeatother

\begin{document}
Pure stuff.

\split{hi/there/bob}

\tempa

\tempb

Defined stuff

\def\tempb{hi/there/bob}
\split{\tempb}

\tempa

\tempb

\end{document}


Re: LaTeX question w.r.t \input@path

2011-04-05 Thread Jean-Marc Lasgouttes

Le 04/04/11 21:47, Hellmut Weber a écrit :

Hi list,
recently in another post I found the internal LaTeX macro

   \input@path

mentioned. Putting this (surrounded by \makeatletter and \makeatother)
in an ERT eventually gives me the correct path to my LyX document as
string in the document.


Note that this \input@path is not defined when you export to LaTeX, only 
when running inside LyX. So your code should be robust to that situation...


JMarc


Re: LaTeX question w.r.t \input@path

2011-04-05 Thread Hellmut Weber
Am 04.04.2011 23:32, schrieb Julien Rioux:
> On 04/04/2011 3:47 PM, Hellmut Weber wrote:
>> Hi list,
>> recently in another post I found the internal LaTeX macro
>>
>>\input@path
>>
>> mentioned. Putting this (surrounded by \makeatletter and \makeatother)
>> in an ERT eventually gives me the correct path to my LyX document as
>> string in the document.
>>
>> S many thanks to the poster of that other message (soem days
>> ago) !
>>
>> Here is now my question to the LaTeX gurus:
>> How can I define a LaTeX macro which gives me the END of the string
>> delivered by \input@path?
>> To give a concrete example: When I open document test-01.lyx with LyX in
>> the directory
>>
>> /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam
>>
>> and compile my document it shows the correct path
>>
>> /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/
>>
>> Fine.
>>
>> What I would like to derive from this string is
>> /.../Lyx-Tests/Inputpath/blam/ ;-)
>> See what I mean?
>>
>> My LaTeX experience told me the need for \makeat...,
>> but this transformation I'm not able to do in LaTeX.
>>
>>
>> Any help appreciated
>>
>>
>> Cheers
>>
>> Hellmut
>>
>>
> 
> kludge solution, if you know how deep your paths are:
> 
> \def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
> \def\removeprefix#1{\expandafter\removeprefixx#1}
> 
> \removeprefix{\input@path}
> 
Hi Julien,
thanks for your answer ;-)

I think I got the basic idea

BUT i Do NOT know the length the path delivered by \input@path.
To make clear what I'm looking for I put it in python code:

leo@sylhepta ~ $ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> def shorten_path(path, len):
...   return '/.../' + '/'.join(path.split('/')[-len:])
...
>>> shorten_path('/home/leo/leo/Test/abc',2)
'/.../Test/abc'
>>>

Can this be done in (La)TeX?


Thanks again and thanks to all others who contributed

Best regards

Hellmut

-- 
Dr. Hellmut Weber m...@hellmutweber.de
Degenfeldstraße 2 tel   +49-89-3081172
D-80803 München-Schwabing mobil +49-172-8450321
please: No DOCs, no PPTs. why: tinyurl.com/cbgq


Re: LaTeX question w.r.t \input@path

2011-04-05 Thread Richard Heck

On 04/05/2011 03:20 AM, Hellmut Weber wrote:


To make clear what I'm looking for I put it in python code:

leo@sylhepta ~ $ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.

def shorten_path(path, len):

...   return '/.../' + '/'.join(path.split('/')[-len:])
...

shorten_path('/home/leo/leo/Test/abc',2)

'/.../Test/abc'
Can this be done in (La)TeX?


Yes, but it involves magic. This post

http://stackoverflow.com/questions/2402354/split-comma-separated-parameters-in-latex

describes how to split on commas and this one on spaces
http://tex.stackexchange.com/questions/12810/how-do-i-split-a-string
They can both be adapted.

Richard



Re: LaTeX question w.r.t \input@path

2011-04-05 Thread Hellmut Weber
Am 04.04.2011 23:32, schrieb Julien Rioux:
> On 04/04/2011 3:47 PM, Hellmut Weber wrote:
>> Hi list,
>> recently in another post I found the internal LaTeX macro
>>
>>\input@path
>>
>> mentioned. Putting this (surrounded by \makeatletter and \makeatother)
>> in an ERT eventually gives me the correct path to my LyX document as
>> string in the document.
>>
>> S many thanks to the poster of that other message (soem days
>> ago) !
>>
>> Here is now my question to the LaTeX gurus:
>> How can I define a LaTeX macro which gives me the END of the string
>> delivered by \input@path?
>> To give a concrete example: When I open document test-01.lyx with LyX in
>> the directory
>>
>> /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam
>>
>> and compile my document it shows the correct path
>>
>> /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/
>>
>> Fine.
>>
>> What I would like to derive from this string is
>> /.../Lyx-Tests/Inputpath/blam/ ;-)
>> See what I mean?
>>
>> My LaTeX experience told me the need for \makeat...,
>> but this transformation I'm not able to do in LaTeX.
>>
>>
>> Any help appreciated
>>
>>
>> Cheers
>>
>> Hellmut
>>
>>
> 
> kludge solution, if you know how deep your paths are:
> 
> \def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
> \def\removeprefix#1{\expandafter\removeprefixx#1}
> 
> \removeprefix{\input@path}
> 
Hi list,
I have to add one aspect to the functionality I'm looking for:
Since I'm used to use directory names which contain underscores ('_') my
python code should read:

leo@sylhepta ~ $ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> def shorten_path(path, len):
...   return '/.../' + '/'.join(path.split(
  '/')[-len:]).replace('_','\_')
...
>>> shorten_path('/home/leo/leo/Test_01/abc',2)
'/.../Test\_01/abc'
>>>

TIA and Best regards

Hellmut

-- 
Dr. Hellmut Weber m...@hellmutweber.de
Degenfeldstraße 2 tel   +49-89-3081172
D-80803 München-Schwabing mobil +49-172-8450321
please: No DOCs, no PPTs. why: tinyurl.com/cbgq



Re: LaTeX question w.r.t \input@path

2011-04-05 Thread Julien Rioux

On 05/04/2011 7:21 PM, Hellmut Weber wrote:

Am 04.04.2011 23:32, schrieb Julien Rioux:

On 04/04/2011 3:47 PM, Hellmut Weber wrote:

Hi list,
recently in another post I found the internal LaTeX macro

\input@path

mentioned. Putting this (surrounded by \makeatletter and \makeatother)
in an ERT eventually gives me the correct path to my LyX document as
string in the document.

S many thanks to the poster of that other message (soem days
ago) !

Here is now my question to the LaTeX gurus:
How can I define a LaTeX macro which gives me the END of the string
delivered by \input@path?
To give a concrete example: When I open document test-01.lyx with LyX in
the directory

 /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

and compile my document it shows the correct path

 /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/

Fine.

What I would like to derive from this string is
 /.../Lyx-Tests/Inputpath/blam/ ;-)
See what I mean?

My LaTeX experience told me the need for \makeat...,
but this transformation I'm not able to do in LaTeX.


Any help appreciated


Cheers

Hellmut




kludge solution, if you know how deep your paths are:

\def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
\def\removeprefix#1{\expandafter\removeprefixx#1}

\removeprefix{\input@path}


Hi list,
I have to add one aspect to the functionality I'm looking for:
Since I'm used to use directory names which contain underscores ('_') my
python code should read:

leo@sylhepta ~ $ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.

def shorten_path(path, len):

...   return '/.../' + '/'.join(path.split(
   '/')[-len:]).replace('_','\_')
...

shorten_path('/home/leo/leo/Test_01/abc',2)

'/.../Test\_01/abc'




TIA and Best regards

Hellmut



Hellmut,

You might consider taking your question to a dedicated TeX channel. 
Splitting on / is doable, escaping _ too, but the real hard part about 
your request is this:


[-len:]

In tEx I do not know how to access the last N elements of a list when he 
list length is unknown, although accessing the first N is easy. If you 
know the list length then it's easy as well, but it looks not right for 
your case because the path could be any depth.


Cheers,
Julien


Re: LaTeX question w.r.t \input@path

2011-04-05 Thread Richard Heck

On 04/05/2011 07:28 PM, Julien Rioux wrote:

On 05/04/2011 7:21 PM, Hellmut Weber wrote:

Am 04.04.2011 23:32, schrieb Julien Rioux:

On 04/04/2011 3:47 PM, Hellmut Weber wrote:

Hi list,
recently in another post I found the internal LaTeX macro

\input@path

mentioned. Putting this (surrounded by \makeatletter and \makeatother)
in an ERT eventually gives me the correct path to my LyX document as
string in the document.

S many thanks to the poster of that other message (soem days
ago) !

Here is now my question to the LaTeX gurus:
How can I define a LaTeX macro which gives me the END of the string
delivered by \input@path?
To give a concrete example: When I open document test-01.lyx with 
LyX in

the directory

 /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

and compile my document it shows the correct path

 /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/

Fine.

What I would like to derive from this string is
 /.../Lyx-Tests/Inputpath/blam/ ;-)
See what I mean?

My LaTeX experience told me the need for \makeat...,
but this transformation I'm not able to do in LaTeX.


Any help appreciated


Cheers

Hellmut




kludge solution, if you know how deep your paths are:

\def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
\def\removeprefix#1{\expandafter\removeprefixx#1}

\removeprefix{\input@path}


Hi list,
I have to add one aspect to the functionality I'm looking for:
Since I'm used to use directory names which contain underscores ('_') my
python code should read:

leo@sylhepta ~ $ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.

def shorten_path(path, len):

...   return '/.../' + '/'.join(path.split(
   '/')[-len:]).replace('_','\_')
...

shorten_path('/home/leo/leo/Test_01/abc',2)

'/.../Test\_01/abc'




TIA and Best regards

Hellmut



Hellmut,

You might consider taking your question to a dedicated TeX channel. 
Splitting on / is doable, escaping _ too, but the real hard part about 
your request is this:


[-len:]

In tEx I do not know how to access the last N elements of a list when 
he list length is unknown, although accessing the first N is easy. If 
you know the list length then it's easy as well, but it looks not 
right for your case because the path could be any depth.


OK, so this is getting a little off-topic, but the attached kind of 
works, as you can see if you compile it. Unfortunately, it does not work 
with macros, but only with a literal. I.e., this:

\split{hi/there/bob}
works but
\def\tempa{hi/there/bob}
\split{\tempa}
does not work. I do not see why, but perhaps someone else will know.

Richard

\documentclass[a4paper,10pt]{article}
\usepackage[utf8x]{inputenc}
\usepackage{ifthen}
\makeatletter

\def\tempa{}\def\tempb{}
\def\split#1{\@split{#1}#1/@endtoken}
\def\@split#1#2/#3@endtoken{%
  \ifthenelse{\equal{#1}{#2}}{\def\tempa{#1}\def\tempb{}}%
  {\@@split#2/#3@endtoken}}
\def\@@split#1/#2/@endtoken{\def\tempa{#1}\def\tempb{#2}}

\makeatother

\begin{document}
Pure stuff.

\split{hi/there/bob}

\tempa

\tempb

Defined stuff

\def\tempb{hi/there/bob}
\split{\tempb}

\tempa

\tempb

\end{document}


LaTeX question w.r.t \input@path

2011-04-04 Thread Hellmut Weber
Hi list,
recently in another post I found the internal LaTeX macro

  \input@path

mentioned. Putting this (surrounded by \makeatletter and \makeatother)
in an ERT eventually gives me the correct path to my LyX document as
string in the document.

S many thanks to the poster of that other message (soem days ago) !

Here is now my question to the LaTeX gurus:
How can I define a LaTeX macro which gives me the END of the string
delivered by \input@path?
To give a concrete example: When I open document test-01.lyx with LyX in
the directory

   /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

and compile my document it shows the correct path

   /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/

Fine.

What I would like to derive from this string is
   /.../Lyx-Tests/Inputpath/blam/ ;-)
See what I mean?

My LaTeX experience told me the need for \makeat...,
but this transformation I'm not able to do in LaTeX.


Any help appreciated


Cheers

Hellmut


-- 
Dr. Hellmut Weber m...@hellmutweber.de
Degenfeldstraße 2 tel   +49-89-3081172
D-80803 München-Schwabing mobil +49-172-8450321
please: No DOCs, no PPTs. why: tinyurl.com/cbgq


Re: LaTeX question w.r.t \input@path

2011-04-04 Thread Julien Rioux

On 04/04/2011 3:47 PM, Hellmut Weber wrote:

Hi list,
recently in another post I found the internal LaTeX macro

   \input@path

mentioned. Putting this (surrounded by \makeatletter and \makeatother)
in an ERT eventually gives me the correct path to my LyX document as
string in the document.

S many thanks to the poster of that other message (soem days ago) !

Here is now my question to the LaTeX gurus:
How can I define a LaTeX macro which gives me the END of the string
delivered by \input@path?
To give a concrete example: When I open document test-01.lyx with LyX in
the directory

/home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

and compile my document it shows the correct path

/home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/

Fine.

What I would like to derive from this string is
/.../Lyx-Tests/Inputpath/blam/ ;-)
See what I mean?

My LaTeX experience told me the need for \makeat...,
but this transformation I'm not able to do in LaTeX.


Any help appreciated


Cheers

Hellmut




kludge solution, if you know how deep your paths are:

\def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
\def\removeprefix#1{\expandafter\removeprefixx#1}

\removeprefix{\input@path}

--
Julien



Re: LaTeX question w.r.t \input@path

2011-04-04 Thread Julien Rioux

On 04/04/2011 5:32 PM, Julien Rioux wrote:

On 04/04/2011 3:47 PM, Hellmut Weber wrote:

Hi list,
recently in another post I found the internal LaTeX macro

\input@path

mentioned. Putting this (surrounded by \makeatletter and \makeatother)
in an ERT eventually gives me the correct path to my LyX document as
string in the document.

S many thanks to the poster of that other message (soem days
ago) !

Here is now my question to the LaTeX gurus:
How can I define a LaTeX macro which gives me the END of the string
delivered by \input@path?
To give a concrete example: When I open document test-01.lyx with LyX in
the directory

/home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

and compile my document it shows the correct path

/home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/

Fine.

What I would like to derive from this string is
/.../Lyx-Tests/Inputpath/blam/ ;-)
See what I mean?

My LaTeX experience told me the need for \makeat...,
but this transformation I'm not able to do in LaTeX.


Any help appreciated


Cheers

Hellmut




kludge solution, if you know how deep your paths are:

\def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
\def\removeprefix#1{\expandafter\removeprefixx#1}

\removeprefix{\input@path}



(...will not work with windows-style paths.
If you need that remove the leading / after removeprefixx)

--
Julien



Re: LaTeX question w.r.t \input@path

2011-04-04 Thread Richard Heck

On 04/04/2011 05:32 PM, Julien Rioux wrote:


kludge solution, if you know how deep your paths are:

\def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
\def\removeprefix#1{\expandafter\removeprefixx#1}

Can you explain the point of the \expandafter? I see this often, but 
don't understand it.


rh



Re: LaTeX question w.r.t \input@path

2011-04-04 Thread Julien Rioux

On 04/04/2011 5:54 PM, Richard Heck wrote:

On 04/04/2011 05:32 PM, Julien Rioux wrote:


kludge solution, if you know how deep your paths are:

\def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
\def\removeprefix#1{\expandafter\removeprefixx#1}


Can you explain the point of the \expandafter? I see this often, but
don't understand it.

rh



\expandafter\foo\bar tells TeX to expand \bar before expanding \foo

in this case:

first,
expand \input@path to /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

second,
parse /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam using /#1/#2/#3/#4/#5



LaTeX question w.r.t \input@path

2011-04-04 Thread Hellmut Weber
Hi list,
recently in another post I found the internal LaTeX macro

  \input@path

mentioned. Putting this (surrounded by \makeatletter and \makeatother)
in an ERT eventually gives me the correct path to my LyX document as
string in the document.

S many thanks to the poster of that other message (soem days ago) !

Here is now my question to the LaTeX gurus:
How can I define a LaTeX macro which gives me the END of the string
delivered by \input@path?
To give a concrete example: When I open document test-01.lyx with LyX in
the directory

   /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

and compile my document it shows the correct path

   /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/

Fine.

What I would like to derive from this string is
   /.../Lyx-Tests/Inputpath/blam/ ;-)
See what I mean?

My LaTeX experience told me the need for \makeat...,
but this transformation I'm not able to do in LaTeX.


Any help appreciated


Cheers

Hellmut


-- 
Dr. Hellmut Weber m...@hellmutweber.de
Degenfeldstraße 2 tel   +49-89-3081172
D-80803 München-Schwabing mobil +49-172-8450321
please: No DOCs, no PPTs. why: tinyurl.com/cbgq


Re: LaTeX question w.r.t \input@path

2011-04-04 Thread Julien Rioux

On 04/04/2011 3:47 PM, Hellmut Weber wrote:

Hi list,
recently in another post I found the internal LaTeX macro

   \input@path

mentioned. Putting this (surrounded by \makeatletter and \makeatother)
in an ERT eventually gives me the correct path to my LyX document as
string in the document.

S many thanks to the poster of that other message (soem days ago) !

Here is now my question to the LaTeX gurus:
How can I define a LaTeX macro which gives me the END of the string
delivered by \input@path?
To give a concrete example: When I open document test-01.lyx with LyX in
the directory

/home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

and compile my document it shows the correct path

/home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/

Fine.

What I would like to derive from this string is
/.../Lyx-Tests/Inputpath/blam/ ;-)
See what I mean?

My LaTeX experience told me the need for \makeat...,
but this transformation I'm not able to do in LaTeX.


Any help appreciated


Cheers

Hellmut




kludge solution, if you know how deep your paths are:

\def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
\def\removeprefix#1{\expandafter\removeprefixx#1}

\removeprefix{\input@path}

--
Julien



Re: LaTeX question w.r.t \input@path

2011-04-04 Thread Julien Rioux

On 04/04/2011 5:32 PM, Julien Rioux wrote:

On 04/04/2011 3:47 PM, Hellmut Weber wrote:

Hi list,
recently in another post I found the internal LaTeX macro

\input@path

mentioned. Putting this (surrounded by \makeatletter and \makeatother)
in an ERT eventually gives me the correct path to my LyX document as
string in the document.

S many thanks to the poster of that other message (soem days
ago) !

Here is now my question to the LaTeX gurus:
How can I define a LaTeX macro which gives me the END of the string
delivered by \input@path?
To give a concrete example: When I open document test-01.lyx with LyX in
the directory

/home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

and compile my document it shows the correct path

/home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/

Fine.

What I would like to derive from this string is
/.../Lyx-Tests/Inputpath/blam/ ;-)
See what I mean?

My LaTeX experience told me the need for \makeat...,
but this transformation I'm not able to do in LaTeX.


Any help appreciated


Cheers

Hellmut




kludge solution, if you know how deep your paths are:

\def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
\def\removeprefix#1{\expandafter\removeprefixx#1}

\removeprefix{\input@path}



(...will not work with windows-style paths.
If you need that remove the leading / after removeprefixx)

--
Julien



Re: LaTeX question w.r.t \input@path

2011-04-04 Thread Richard Heck

On 04/04/2011 05:32 PM, Julien Rioux wrote:


kludge solution, if you know how deep your paths are:

\def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
\def\removeprefix#1{\expandafter\removeprefixx#1}

Can you explain the point of the \expandafter? I see this often, but 
don't understand it.


rh



Re: LaTeX question w.r.t \input@path

2011-04-04 Thread Julien Rioux

On 04/04/2011 5:54 PM, Richard Heck wrote:

On 04/04/2011 05:32 PM, Julien Rioux wrote:


kludge solution, if you know how deep your paths are:

\def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
\def\removeprefix#1{\expandafter\removeprefixx#1}


Can you explain the point of the \expandafter? I see this often, but
don't understand it.

rh



\expandafter\foo\bar tells TeX to expand \bar before expanding \foo

in this case:

first,
expand \input@path to /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

second,
parse /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam using /#1/#2/#3/#4/#5



LaTeX question w.r.t \input@path

2011-04-04 Thread Hellmut Weber
Hi list,
recently in another post I found the internal LaTeX macro

  \input@path

mentioned. Putting this (surrounded by \makeatletter and \makeatother)
in an ERT eventually gives me the correct path to my LyX document as
string in the document.

S many thanks to the poster of that other message (soem days ago) !

Here is now my question to the LaTeX gurus:
How can I define a LaTeX macro which gives me the END of the string
delivered by \input@path?
To give a concrete example: When I open document test-01.lyx with LyX in
the directory

   /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

and compile my document it shows the correct path

   /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/

Fine.

What I would like to derive from this string is
   /.../Lyx-Tests/Inputpath/blam/ ;-)
See what I mean?

My LaTeX experience told me the need for \makeat...,
but this transformation I'm not able to do in LaTeX.


Any help appreciated


Cheers

Hellmut


-- 
Dr. Hellmut Weber m...@hellmutweber.de
Degenfeldstraße 2 tel   +49-89-3081172
D-80803 München-Schwabing mobil +49-172-8450321
please: No DOCs, no PPTs. why: tinyurl.com/cbgq


Re: LaTeX question w.r.t \input@path

2011-04-04 Thread Julien Rioux

On 04/04/2011 3:47 PM, Hellmut Weber wrote:

Hi list,
recently in another post I found the internal LaTeX macro

   \input@path

mentioned. Putting this (surrounded by \makeatletter and \makeatother)
in an ERT eventually gives me the correct path to my LyX document as
string in the document.

S many thanks to the poster of that other message (soem days ago) !

Here is now my question to the LaTeX gurus:
How can I define a LaTeX macro which gives me the END of the string
delivered by \input@path?
To give a concrete example: When I open document test-01.lyx with LyX in
the directory

/home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

and compile my document it shows the correct path

/home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/

Fine.

What I would like to derive from this string is
/.../Lyx-Tests/Inputpath/blam/ ;-)
See what I mean?

My LaTeX experience told me the need for \makeat...,
but this transformation I'm not able to do in LaTeX.


Any help appreciated


Cheers

Hellmut




kludge solution, if you know how deep your paths are:

\def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
\def\removeprefix#1{\expandafter\removeprefixx#1}

\removeprefix{\input@path}

--
Julien



Re: LaTeX question w.r.t \input@path

2011-04-04 Thread Julien Rioux

On 04/04/2011 5:32 PM, Julien Rioux wrote:

On 04/04/2011 3:47 PM, Hellmut Weber wrote:

Hi list,
recently in another post I found the internal LaTeX macro

\input@path

mentioned. Putting this (surrounded by \makeatletter and \makeatother)
in an ERT eventually gives me the correct path to my LyX document as
string in the document.

S many thanks to the poster of that other message (soem days
ago) !

Here is now my question to the LaTeX gurus:
How can I define a LaTeX macro which gives me the END of the string
delivered by \input@path?
To give a concrete example: When I open document test-01.lyx with LyX in
the directory

/home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

and compile my document it shows the correct path

/home/leo/leo/Tests/Lyx-Tests/Inputpath/blam/

Fine.

What I would like to derive from this string is
/.../Lyx-Tests/Inputpath/blam/ ;-)
See what I mean?

My LaTeX experience told me the need for \makeat...,
but this transformation I'm not able to do in LaTeX.


Any help appreciated


Cheers

Hellmut




kludge solution, if you know how deep your paths are:

\def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
\def\removeprefix#1{\expandafter\removeprefixx#1}

\removeprefix{\input@path}



(...will not work with windows-style paths.
If you need that remove the leading / after removeprefixx)

--
Julien



Re: LaTeX question w.r.t \input@path

2011-04-04 Thread Richard Heck

On 04/04/2011 05:32 PM, Julien Rioux wrote:


kludge solution, if you know how deep your paths are:

\def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
\def\removeprefix#1{\expandafter\removeprefixx#1}

Can you explain the point of the \expandafter? I see this often, but 
don't understand it.


rh



Re: LaTeX question w.r.t \input@path

2011-04-04 Thread Julien Rioux

On 04/04/2011 5:54 PM, Richard Heck wrote:

On 04/04/2011 05:32 PM, Julien Rioux wrote:


kludge solution, if you know how deep your paths are:

\def\removeprefixx/#1/#2/#3/#4/#5{Your path is /.../#5}
\def\removeprefix#1{\expandafter\removeprefixx#1}


Can you explain the point of the \expandafter? I see this often, but
don't understand it.

rh



\expandafter\foo\bar tells TeX to expand \bar before expanding \foo

in this case:

first,
expand \input@path to /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam

second,
parse /home/leo/leo/Tests/Lyx-Tests/Inputpath/blam using /#1/#2/#3/#4/#5



Re: (latex question) Repeated footnote?

2008-01-17 Thread Helge Hafting

Daniel CLEMENT wrote:

Also possible :

Place the cross-reference to the labeled footnote in a superscript, so that
it will appear as a note too.

Thus you get twice the same reference to the same footnote, they look alike,
and the numbering si preserved.
  

Be careful if your footnotes are set up to reset on every
new page. Because a page break could happen between two
references to the same footnote. The next page might then
have a different footnote re-using the same footnote number.

Not a problem if your footnote numbers increase all the way,
(or reset only per-chapter), or if you use the see footnote x on
page y form of reference.

Helge Hafting


Re: (latex question) Repeated footnote?

2008-01-17 Thread Helge Hafting

Daniel CLEMENT wrote:

Also possible :

Place the cross-reference to the labeled footnote in a superscript, so that
it will appear as a note too.

Thus you get twice the same reference to the same footnote, they look alike,
and the numbering si preserved.
  

Be careful if your footnotes are set up to reset on every
new page. Because a page break could happen between two
references to the same footnote. The next page might then
have a different footnote re-using the same footnote number.

Not a problem if your footnote numbers increase all the way,
(or reset only per-chapter), or if you use the see footnote x on
page y form of reference.

Helge Hafting


Re: (latex question) Repeated footnote?

2008-01-17 Thread Helge Hafting

Daniel CLEMENT wrote:

Also possible :

Place the cross-reference to the labeled footnote in a superscript, so that
it will appear as a note too.

Thus you get twice the same reference to the same footnote, they look alike,
and the numbering si preserved.
  

Be careful if your footnotes are set up to reset on every
new page. Because a page break could happen between two
references to the same footnote. The next page might then
have a different footnote re-using the same footnote number.

Not a problem if your footnote numbers increase all the way,
(or reset only per-chapter), or if you use the "see footnote x on
page y" form of reference.

Helge Hafting


Re: (latex question) Repeated footnote?

2008-01-11 Thread Neal Becker
Neal Becker wrote:

 I have a description env, and I have some notes for some entries.  I was
 planning to use footnotes, but I need multiple references to the _same_
 notes.
 
 Like:
 
 entry A: 1
 entry B: 1
 entry C: 2
 
 1: some footnote
 2: some other footnote

It looks like floatmisc package can help.

Strangely, lyx allows inserting a label into a footnote, but I don't see how
to use this as a reference (that would appear formatted in the style of a
footnote). 



(latex question) Repeated footnote?

2008-01-11 Thread Neal Becker
I have a description env, and I have some notes for some entries.  I was
planning to use footnotes, but I need multiple references to the _same_
notes.

Like:

entry A: 1
entry B: 1
entry C: 2

1: some footnote
2: some other footnote



Re: (latex question) Repeated footnote?

2008-01-11 Thread Les Denham
On Friday 11 January 2008 08:25, Neal Becker wrote:
 I have a description env, and I have some notes for some entries.  I was
 planning to use footnotes, but I need multiple references to the _same_
 notes.

 Like:

 entry A: 1
 entry B: 1
 entry C: 2

 1: some footnote
 2: some other footnote

Neal,

1. The first time the footnote occurs, put it in normally. 

2. Then put a label in the footnote.

3. To refer to the same footnote a second time, insert a crossreference to the 
label and format it as superscript.

4. Example attached.

Les


footnote.lyx
Description: application/lyx


RE: (latex question) Repeated footnote?

2008-01-11 Thread Daniel CLEMENT
Also possible :

Place the cross-reference to the labeled footnote in a superscript, so that
it will appear as a note too.

Thus you get twice the same reference to the same footnote, they look alike,
and the numbering si preserved.

Daniel CLEMENT

 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] Behalf Of Dominik Wa?enhoven
 Sent: Friday, January 11, 2008 5:19 PM
 To: lyx-users@lists.lyx.org
 Subject: Re: (latex question) Repeated footnote?


 Neal Becker schrieb:

  Strangely, lyx allows inserting a label into a footnote, but I
 don't see how
  to use this as a reference (that would appear formatted in the
 style of a
  footnote).

 You could do something like

 1: [label-in-footnote] This is a footnote.
 2: On this topic, see footnote [reference:label-in-footnote]

 That's what labels in footnotes could e.g. be used for.

 Regards,
 Dominik.-

 --
 -
 Orange vous informe que cet  e-mail a ete controle par l'anti-virus mail.
 Aucun virus connu a ce jour par nos services n'a ete detecte.






Re: (latex question) Repeated footnote?

2008-01-11 Thread Dominik Waßenhoven
Neal Becker schrieb:

 Strangely, lyx allows inserting a label into a footnote, but I don't see how
 to use this as a reference (that would appear formatted in the style of a
 footnote).

You could do something like

1: [label-in-footnote] This is a footnote.
2: On this topic, see footnote [reference:label-in-footnote]

That's what labels in footnotes could e.g. be used for.

Regards,
Dominik.-



RE: (latex question) Repeated footnote?

2008-01-11 Thread Daniel CLEMENT
Also possible :

Place the cross-reference to the labeled footnote in a superscript, so that
it will appear as a note too.

Thus you get twice the same reference to the same footnote, they look alike,
and the numbering si preserved.

Daniel CLEMENT

 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] Behalf Of Dominik Wa?enhoven
 Sent: Friday, January 11, 2008 5:19 PM
 To: lyx-users@lists.lyx.org
 Subject: Re: (latex question) Repeated footnote?


 Neal Becker schrieb:

  Strangely, lyx allows inserting a label into a footnote, but I
 don't see how
  to use this as a reference (that would appear formatted in the
 style of a
  footnote).

 You could do something like

 1: [label-in-footnote] This is a footnote.
 2: On this topic, see footnote [reference:label-in-footnote]

 That's what labels in footnotes could e.g. be used for.

 Regards,
 Dominik.-

 --
 -
 Orange vous informe que cet  e-mail a ete controle par l'anti-virus mail.
 Aucun virus connu a ce jour par nos services n'a ete detecte.






Re: (latex question) Repeated footnote?

2008-01-11 Thread Neal Becker
Neal Becker wrote:

 I have a description env, and I have some notes for some entries.  I was
 planning to use footnotes, but I need multiple references to the _same_
 notes.
 
 Like:
 
 entry A: 1
 entry B: 1
 entry C: 2
 
 1: some footnote
 2: some other footnote

It looks like floatmisc package can help.

Strangely, lyx allows inserting a label into a footnote, but I don't see how
to use this as a reference (that would appear formatted in the style of a
footnote). 



(latex question) Repeated footnote?

2008-01-11 Thread Neal Becker
I have a description env, and I have some notes for some entries.  I was
planning to use footnotes, but I need multiple references to the _same_
notes.

Like:

entry A: 1
entry B: 1
entry C: 2

1: some footnote
2: some other footnote



Re: (latex question) Repeated footnote?

2008-01-11 Thread Les Denham
On Friday 11 January 2008 08:25, Neal Becker wrote:
 I have a description env, and I have some notes for some entries.  I was
 planning to use footnotes, but I need multiple references to the _same_
 notes.

 Like:

 entry A: 1
 entry B: 1
 entry C: 2

 1: some footnote
 2: some other footnote

Neal,

1. The first time the footnote occurs, put it in normally. 

2. Then put a label in the footnote.

3. To refer to the same footnote a second time, insert a crossreference to the 
label and format it as superscript.

4. Example attached.

Les


footnote.lyx
Description: application/lyx


RE: (latex question) Repeated footnote?

2008-01-11 Thread Daniel CLEMENT
Also possible :

Place the cross-reference to the labeled footnote in a superscript, so that
it will appear as a note too.

Thus you get twice the same reference to the same footnote, they look alike,
and the numbering si preserved.

Daniel CLEMENT

 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] Behalf Of Dominik Wa?enhoven
 Sent: Friday, January 11, 2008 5:19 PM
 To: lyx-users@lists.lyx.org
 Subject: Re: (latex question) Repeated footnote?


 Neal Becker schrieb:

  Strangely, lyx allows inserting a label into a footnote, but I
 don't see how
  to use this as a reference (that would appear formatted in the
 style of a
  footnote).

 You could do something like

 1: [label-in-footnote] This is a footnote.
 2: On this topic, see footnote [reference:label-in-footnote]

 That's what labels in footnotes could e.g. be used for.

 Regards,
 Dominik.-

 --
 -
 Orange vous informe que cet  e-mail a ete controle par l'anti-virus mail.
 Aucun virus connu a ce jour par nos services n'a ete detecte.






Re: (latex question) Repeated footnote?

2008-01-11 Thread Dominik Waßenhoven
Neal Becker schrieb:

 Strangely, lyx allows inserting a label into a footnote, but I don't see how
 to use this as a reference (that would appear formatted in the style of a
 footnote).

You could do something like

1: [label-in-footnote] This is a footnote.
2: On this topic, see footnote [reference:label-in-footnote]

That's what labels in footnotes could e.g. be used for.

Regards,
Dominik.-



RE: (latex question) Repeated footnote?

2008-01-11 Thread Daniel CLEMENT
Also possible :

Place the cross-reference to the labeled footnote in a superscript, so that
it will appear as a note too.

Thus you get twice the same reference to the same footnote, they look alike,
and the numbering si preserved.

Daniel CLEMENT

 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] Behalf Of Dominik Wa?enhoven
 Sent: Friday, January 11, 2008 5:19 PM
 To: lyx-users@lists.lyx.org
 Subject: Re: (latex question) Repeated footnote?


 Neal Becker schrieb:

  Strangely, lyx allows inserting a label into a footnote, but I
 don't see how
  to use this as a reference (that would appear formatted in the
 style of a
  footnote).

 You could do something like

 1: [label-in-footnote] This is a footnote.
 2: On this topic, see footnote [reference:label-in-footnote]

 That's what labels in footnotes could e.g. be used for.

 Regards,
 Dominik.-

 --
 -
 Orange vous informe que cet  e-mail a ete controle par l'anti-virus mail.
 Aucun virus connu a ce jour par nos services n'a ete detecte.






Re: (latex question) Repeated footnote?

2008-01-11 Thread Neal Becker
Neal Becker wrote:

> I have a description env, and I have some notes for some entries.  I was
> planning to use footnotes, but I need multiple references to the _same_
> notes.
> 
> Like:
> 
> entry A: 1
> entry B: 1
> entry C: 2
> 
> 1: some footnote
> 2: some other footnote

It looks like floatmisc package can help.

Strangely, lyx allows inserting a label into a footnote, but I don't see how
to use this as a reference (that would appear formatted in the style of a
footnote). 



(latex question) Repeated footnote?

2008-01-11 Thread Neal Becker
I have a description env, and I have some notes for some entries.  I was
planning to use footnotes, but I need multiple references to the _same_
notes.

Like:

entry A: 1
entry B: 1
entry C: 2

1: some footnote
2: some other footnote



Re: (latex question) Repeated footnote?

2008-01-11 Thread Les Denham
On Friday 11 January 2008 08:25, Neal Becker wrote:
> I have a description env, and I have some notes for some entries.  I was
> planning to use footnotes, but I need multiple references to the _same_
> notes.
>
> Like:
>
> entry A: 1
> entry B: 1
> entry C: 2
>
> 1: some footnote
> 2: some other footnote

Neal,

1. The first time the footnote occurs, put it in normally. 

2. Then put a label in the footnote.

3. To refer to the same footnote a second time, insert a crossreference to the 
label and format it as superscript.

4. Example attached.

Les


footnote.lyx
Description: application/lyx


RE: (latex question) Repeated footnote?

2008-01-11 Thread Daniel CLEMENT
Also possible :

Place the cross-reference to the labeled footnote in a superscript, so that
it will appear as a note too.

Thus you get twice the same reference to the same footnote, they look alike,
and the numbering si preserved.

Daniel CLEMENT

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Dominik Wa?enhoven
> Sent: Friday, January 11, 2008 5:19 PM
> To: lyx-users@lists.lyx.org
> Subject: Re: (latex question) Repeated footnote?
>
>
> Neal Becker schrieb:
>
> > Strangely, lyx allows inserting a label into a footnote, but I
> don't see how
> > to use this as a reference (that would appear formatted in the
> style of a
> > footnote).
>
> You could do something like
>
> 1: [label-in-footnote] This is a footnote.
> 2: On this topic, see footnote [reference:label-in-footnote]
>
> That's what labels in footnotes could e.g. be used for.
>
> Regards,
> Dominik.-
>
> --
> -
> Orange vous informe que cet  e-mail a ete controle par l'anti-virus mail.
> Aucun virus connu a ce jour par nos services n'a ete detecte.
>
>




Re: (latex question) Repeated footnote?

2008-01-11 Thread Dominik Waßenhoven
Neal Becker schrieb:

> Strangely, lyx allows inserting a label into a footnote, but I don't see how
> to use this as a reference (that would appear formatted in the style of a
> footnote).

You could do something like

1: [label-in-footnote] This is a footnote.
2: On this topic, see footnote [reference:label-in-footnote]

That's what labels in footnotes could e.g. be used for.

Regards,
Dominik.-



RE: (latex question) Repeated footnote?

2008-01-11 Thread Daniel CLEMENT
Also possible :

Place the cross-reference to the labeled footnote in a superscript, so that
it will appear as a note too.

Thus you get twice the same reference to the same footnote, they look alike,
and the numbering si preserved.

Daniel CLEMENT

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] Behalf Of Dominik Wa?enhoven
> Sent: Friday, January 11, 2008 5:19 PM
> To: lyx-users@lists.lyx.org
> Subject: Re: (latex question) Repeated footnote?
>
>
> Neal Becker schrieb:
>
> > Strangely, lyx allows inserting a label into a footnote, but I
> don't see how
> > to use this as a reference (that would appear formatted in the
> style of a
> > footnote).
>
> You could do something like
>
> 1: [label-in-footnote] This is a footnote.
> 2: On this topic, see footnote [reference:label-in-footnote]
>
> That's what labels in footnotes could e.g. be used for.
>
> Regards,
> Dominik.-
>
> --
> -
> Orange vous informe que cet  e-mail a ete controle par l'anti-virus mail.
> Aucun virus connu a ce jour par nos services n'a ete detecte.
>
>




(O/T) Latex Question

2007-09-20 Thread Richard Kleeman
I realize this is not about lyx but I am using lyx first and then 
exporting to latex.


My problem is that the journal I am submitting to (Philosophical 
Transactions Royal Society A) doesn't provide a bst file and insists 
that bibliography items be placed in the latex file in full.


This is a pain because I use bibtex usually and have all my citations 
stored nicely in a bib file. Is there a macro or method for converting a 
latex file using a callout to a bib file to one in which all citations 
are listed at the end of the file after the command 
\begin{thebibliography}{}???


I see that the bbl file lists the references but doesn't seem to be in 
the correct format for inserting in the original latex file...



Richard Kleeman



Re: (O/T) Latex Question

2007-09-20 Thread Richard Kleeman

Bo Peng wrote:

I see that the bbl file lists the references but doesn't seem to be in
the correct format for inserting in the original latex file...


You can first find a .bst file that produce the bibliography in the
right format, then insert the generated bbl to the .tex file. I
usually do this even when the publisher provides a .bst file because I
do not want to submit my .bib file.

Bo

How does one obtain such a customized bst file? The publisher in this 
instance seems to have very specific formatting requirements that look a 
little non-standard to me. I remember seeing a method of customizing bst 
files but it seemed to have a rather steep learning curve and was quite 
technical...


Richard



Re: (O/T) Latex Question

2007-09-20 Thread Bo Peng
 I see that the bbl file lists the references but doesn't seem to be in
 the correct format for inserting in the original latex file...

You can first find a .bst file that produce the bibliography in the
right format, then insert the generated bbl to the .tex file. I
usually do this even when the publisher provides a .bst file because I
do not want to submit my .bib file.

Bo


Re: (O/T) Latex Question

2007-09-20 Thread Bo Peng
 How does one obtain such a customized bst file? The publisher in this
 instance seems to have very specific formatting requirements that look a
 little non-standard to me. I remember seeing a method of customizing bst
 files but it seemed to have a rather steep learning curve and was quite
 technical...

Have a look at makebst.
http://www.ctan.org/tex-archive/macros/latex/contrib/custom-bib/

If you are not comfortable of doing this, just find a .bst file that
is close to your publisher's style, and manually edit the .bbl file.

Bo


(O/T) Latex Question

2007-09-20 Thread Richard Kleeman
I realize this is not about lyx but I am using lyx first and then 
exporting to latex.


My problem is that the journal I am submitting to (Philosophical 
Transactions Royal Society A) doesn't provide a bst file and insists 
that bibliography items be placed in the latex file in full.


This is a pain because I use bibtex usually and have all my citations 
stored nicely in a bib file. Is there a macro or method for converting a 
latex file using a callout to a bib file to one in which all citations 
are listed at the end of the file after the command 
\begin{thebibliography}{}???


I see that the bbl file lists the references but doesn't seem to be in 
the correct format for inserting in the original latex file...



Richard Kleeman



Re: (O/T) Latex Question

2007-09-20 Thread Richard Kleeman

Bo Peng wrote:

I see that the bbl file lists the references but doesn't seem to be in
the correct format for inserting in the original latex file...


You can first find a .bst file that produce the bibliography in the
right format, then insert the generated bbl to the .tex file. I
usually do this even when the publisher provides a .bst file because I
do not want to submit my .bib file.

Bo

How does one obtain such a customized bst file? The publisher in this 
instance seems to have very specific formatting requirements that look a 
little non-standard to me. I remember seeing a method of customizing bst 
files but it seemed to have a rather steep learning curve and was quite 
technical...


Richard



Re: (O/T) Latex Question

2007-09-20 Thread Bo Peng
 I see that the bbl file lists the references but doesn't seem to be in
 the correct format for inserting in the original latex file...

You can first find a .bst file that produce the bibliography in the
right format, then insert the generated bbl to the .tex file. I
usually do this even when the publisher provides a .bst file because I
do not want to submit my .bib file.

Bo


Re: (O/T) Latex Question

2007-09-20 Thread Bo Peng
 How does one obtain such a customized bst file? The publisher in this
 instance seems to have very specific formatting requirements that look a
 little non-standard to me. I remember seeing a method of customizing bst
 files but it seemed to have a rather steep learning curve and was quite
 technical...

Have a look at makebst.
http://www.ctan.org/tex-archive/macros/latex/contrib/custom-bib/

If you are not comfortable of doing this, just find a .bst file that
is close to your publisher's style, and manually edit the .bbl file.

Bo


(O/T) Latex Question

2007-09-20 Thread Richard Kleeman
I realize this is not about lyx but I am using lyx first and then 
exporting to latex.


My problem is that the journal I am submitting to (Philosophical 
Transactions Royal Society A) doesn't provide a bst file and insists 
that bibliography items be placed in the latex file in full.


This is a pain because I use bibtex usually and have all my citations 
stored nicely in a bib file. Is there a macro or method for converting a 
latex file using a callout to a bib file to one in which all citations 
are listed at the end of the file after the command 
\begin{thebibliography}{}???


I see that the bbl file lists the references but doesn't seem to be in 
the correct format for inserting in the original latex file...



Richard Kleeman



Re: (O/T) Latex Question

2007-09-20 Thread Richard Kleeman

Bo Peng wrote:

I see that the bbl file lists the references but doesn't seem to be in
the correct format for inserting in the original latex file...


You can first find a .bst file that produce the bibliography in the
right format, then insert the generated bbl to the .tex file. I
usually do this even when the publisher provides a .bst file because I
do not want to submit my .bib file.

Bo

How does one obtain such a customized bst file? The publisher in this 
instance seems to have very specific formatting requirements that look a 
little non-standard to me. I remember seeing a method of customizing bst 
files but it seemed to have a rather steep learning curve and was quite 
technical...


Richard



Re: (O/T) Latex Question

2007-09-20 Thread Bo Peng
> I see that the bbl file lists the references but doesn't seem to be in
> the correct format for inserting in the original latex file...

You can first find a .bst file that produce the bibliography in the
right format, then insert the generated bbl to the .tex file. I
usually do this even when the publisher provides a .bst file because I
do not want to submit my .bib file.

Bo


Re: (O/T) Latex Question

2007-09-20 Thread Bo Peng
> How does one obtain such a customized bst file? The publisher in this
> instance seems to have very specific formatting requirements that look a
> little non-standard to me. I remember seeing a method of customizing bst
> files but it seemed to have a rather steep learning curve and was quite
> technical...

Have a look at makebst.
http://www.ctan.org/tex-archive/macros/latex/contrib/custom-bib/

If you are not comfortable of doing this, just find a .bst file that
is close to your publisher's style, and manually edit the .bbl file.

Bo


LaTeX question

2007-07-18 Thread Hellmut Weber

Hi
it has proven very helpful for me to have at the end of my documents the 
full path of the master file.


Giving a look to the latex preview (many thanks for that feature !;-) I 
saw the definition of '[EMAIL PROTECTED]'. Great, first part of the information 
needed, already available (to be included in a '\makeatletter / 
\makeatother' pair for latex's sake). For the second part, i.e. the 
actaual filename some time ago in this lsit the TeX command '\jobname' 
has been mentioned. Wunderful.


AS LONG AS you don't have illegal cahrs in your path (Like '_' which I 
use quite a lot.


Does anybody know how to modify TeX strings as 'Test_01' to 'Test\_01', 
i.e. escape the illegal chars with a backslash.

I'm sure it is possible but my TeX knowledge is not sufficient.

Any help appreciated. TIA

Hellmut

--
Dr. Hellmut Weber [EMAIL PROTECTED]
Degenfeldstraße 2 tel   +49-89-3081172
D-80803 München-Schwabing mobil +49-172-8450321
please: No DOCs, no PPTs. why: tinyurl.com/cbgq




Re: LaTeX question

2007-07-18 Thread William Adams

On Jul 17, 2007, at 5:03 PM, Hellmut Weber wrote:

AS LONG AS you don't have illegal cahrs in your path (Like '_'  
which I use quite a lot.


Does anybody know how to modify TeX strings as 'Test_01' to 'Test 
\_01', i.e. escape the illegal chars with a backslash.

I'm sure it is possible but my TeX knowledge is not sufficient.


Change the catcode so that underscore is treated as a letter instead:
\catcode`\_=12\relax

should do it.

Since you're at the end of a document no need to restore it I think,  
but if you wish to, doing so is left as an exercise for the reader.


William

--
William Adams
senior graphic designer
Fry Communications




Re: LaTeX question

2007-07-18 Thread Hellmut Weber

Hi William,
this certainly will do it ;-)


Change the catcode so that underscore is treated as a letter instead:
\catcode`\_=12\relax

should do it.


Many thanks

Hellmut

--
Dr. Hellmut Weber [EMAIL PROTECTED]
Degenfeldstraße 2 tel   +49-89-3081172
D-80803 München-Schwabing mobil +49-172-8450321
please: No DOCs, no PPTs. why: tinyurl.com/cbgq



LaTeX question

2007-07-18 Thread Hellmut Weber

Hi
it has proven very helpful for me to have at the end of my documents the 
full path of the master file.


Giving a look to the latex preview (many thanks for that feature !;-) I 
saw the definition of '[EMAIL PROTECTED]'. Great, first part of the information 
needed, already available (to be included in a '\makeatletter / 
\makeatother' pair for latex's sake). For the second part, i.e. the 
actaual filename some time ago in this lsit the TeX command '\jobname' 
has been mentioned. Wunderful.


AS LONG AS you don't have illegal cahrs in your path (Like '_' which I 
use quite a lot.


Does anybody know how to modify TeX strings as 'Test_01' to 'Test\_01', 
i.e. escape the illegal chars with a backslash.

I'm sure it is possible but my TeX knowledge is not sufficient.

Any help appreciated. TIA

Hellmut

--
Dr. Hellmut Weber [EMAIL PROTECTED]
Degenfeldstraße 2 tel   +49-89-3081172
D-80803 München-Schwabing mobil +49-172-8450321
please: No DOCs, no PPTs. why: tinyurl.com/cbgq




Re: LaTeX question

2007-07-18 Thread William Adams

On Jul 17, 2007, at 5:03 PM, Hellmut Weber wrote:

AS LONG AS you don't have illegal cahrs in your path (Like '_'  
which I use quite a lot.


Does anybody know how to modify TeX strings as 'Test_01' to 'Test 
\_01', i.e. escape the illegal chars with a backslash.

I'm sure it is possible but my TeX knowledge is not sufficient.


Change the catcode so that underscore is treated as a letter instead:
\catcode`\_=12\relax

should do it.

Since you're at the end of a document no need to restore it I think,  
but if you wish to, doing so is left as an exercise for the reader.


William

--
William Adams
senior graphic designer
Fry Communications




Re: LaTeX question

2007-07-18 Thread Hellmut Weber

Hi William,
this certainly will do it ;-)


Change the catcode so that underscore is treated as a letter instead:
\catcode`\_=12\relax

should do it.


Many thanks

Hellmut

--
Dr. Hellmut Weber [EMAIL PROTECTED]
Degenfeldstraße 2 tel   +49-89-3081172
D-80803 München-Schwabing mobil +49-172-8450321
please: No DOCs, no PPTs. why: tinyurl.com/cbgq



LaTeX question

2007-07-18 Thread Hellmut Weber

Hi
it has proven very helpful for me to have at the end of my documents the 
full path of the master file.


Giving a look to the latex preview (many thanks for that feature !;-) I 
saw the definition of '[EMAIL PROTECTED]'. Great, first part of the information 
needed, already available (to be included in a '\makeatletter / 
\makeatother' pair for latex's sake). For the second part, i.e. the 
actaual filename some time ago in this lsit the TeX command '\jobname' 
has been mentioned. Wunderful.


AS LONG AS you don't have "illegal" cahrs in your path (Like '_' which I 
use quite a lot.


Does anybody know how to modify TeX strings as 'Test_01' to 'Test\_01', 
i.e. escape the illegal chars with a backslash.

I'm sure it is possible but my TeX knowledge is not sufficient.

Any help appreciated. TIA

Hellmut

--
Dr. Hellmut Weber [EMAIL PROTECTED]
Degenfeldstraße 2 tel   +49-89-3081172
D-80803 München-Schwabing mobil +49-172-8450321
please: No DOCs, no PPTs. why: tinyurl.com/cbgq




  1   2   >