Re: program to use Lyx as a code-evaluating notebook
On 05/28/2012 09:34 AM, Richard Heck wrote: On 05/27/2012 09:56 PM, Allen Barker wrote: The program is currently ~800K tarred and zipped, including documentation. If anyone here is interested in trying it out I can send copies out by email (unless someone suggests a better way to distribute copies at this stage). If you're at all serious about this program, then I'd suggest you create a git repo for it somewhere like gitorious, and then people can have easy access, as well as follow the changes you're making. List it as pre-alpha or whatever, and people know what they're getting. OK, thanks. I'll look into setting up a git repo somewhere and re-post when I get things set up.
Re: changing fixed names 'Contents', 'List of Figures', etc. Maybe solved
On 2012-05-29, Steve Litt wrote: On Tue, 29 May 2012 00:03:08 + (UTC), ddiedrichs said: I cannot change the default strings 'Contents', 'List of Figures', etc. that are generated as titles of these sections. I have tried putting in the preamble commands of the type: \renewcommand{\contentsname}{Table of Contents} But nothing works. I am typing in English without the babel package. Are you sure you do not use the babel packge? LyX uses it by default. What does the ViewSource window show when you tick the show complete source box? (You can also export your example to LaTeX and play with it.) I am asking, because the minimal LaTeX example \documentclass[english]{article} % \usepackage{babel} \renewcommand{\contentsname}{Table of Contents} \begin{document} \tableofcontents \section{test the best} \end{document} works as you expect (showing Table of Contents as contents heading in the output). I reproduced your symptom in an article based document, putting \renewcommand{\contentsname}{Table of Contents} in the document preamble, as you would expect it should be. Like you, my document continued to print the table of contents title as Contents. So then I exported to LaTeX, fooled around with it, and discovered it works only if \renewcommand{\contentsname}{Table of Contents} is in the document itself, not the document header. The usual trick in these cases is \AtBeginDocument. Indeed, replacing renaming \renewcommand{\contentsname}{Table of Contents} with: \AtBeginDocument{\renewcommand{\contentsname}{Table of Contents}} works also with babel as expected. So I went back into LyX, removed \renewcommand{\contentsname}{Table of Contents} from the document preamble, and put it in an ERT before the Table of Contents, and it did the right thing. No need for ERT with \AtBeginDocument. Günter
Re: program to use Lyx as a code-evaluating notebook
On 2012-05-28, Allen Barker wrote: I've written a Python program which I'm calling Lyx Notebook. It interacts with Lyx (via the Lyx server) to allow it to be used as a code-evaluating notebook (similar to Mathematica notebooks or the Sage notebook). It's still at an early stage, but I already find it useful. Sounds interesting. I wonder whether the project might gain from the PyClient Python package that provides a pythonic interface to LyX. http://wiki.lyx.org/Tools/PyClient Günter
Re: program to use Lyx as a code-evaluating notebook
On 05/29/2012 03:29 AM, Guenter Milde wrote: On 2012-05-28, Allen Barker wrote: I've written a Python program which I'm calling Lyx Notebook. It interacts with Lyx (via the Lyx server) to allow it to be used as a code-evaluating notebook (similar to Mathematica notebooks or the Sage notebook). It's still at an early stage, but I already find it useful. Sounds interesting. I wonder whether the project might gain from the PyClient Python package that provides a pythonic interface to LyX. http://wiki.lyx.org/Tools/PyClient That package might have been useful. I think I came across that page, but I wasn't sure if the package was still operational since it hadn't been updated for a few years. Since I was playing around with the Lyx server pipes anyway, I ended up just implementing things from scratch.
Re: Problem compiling document to Postscript
Durign the latest try I just recieved an error message (in Swedish): Ett fel uppstod vid körning av: dvips -t a4 -o Symposieskrift.ps Symposieskrift.dvi (An error occurred during operation: dvips -t a4 -o Symposieskrift.ps Symposieskrift.dvi) or something similar in English. There were no log popping up and thus nothing to check. I retrieved the log from View - Messages and attach it. I can't see anything obviously wrong, but the most logical for me is that the last images in the log should be the problematic ones and shoudl thus be converted to eps? log Description: Binary data
Re: Managing acknowledgements and disclosures?
On 05/21/2012 10:31 PM, Chris Hennick wrote: Tonight I decided that when I was citing books or reprints that had been given to me, I should probably add an acknowledgement, like so: The authors wish to thank donors for the following reference materials: [#] from Jane Doe, [#] from John Doe, and [#, #] from anonymous sources. However, I'll have to manually edit this acknowledgement if I drop one of those sources, or if I receive and cite another reprint. It also occurs to me that I'd have the same issue if I were buying source materials with grant money, since then the citations would determine which grant numbers went on which papers. (At least, that's how I understand funding disclosure, although as a grad student I'm new to the subject.) Is it possible in LyX to automatically manage acknowledgements and grant disclosures, when some of them are tied to particular citations? The answer is that it should be possible to do this in LaTeX---you can do anything in LaTeX---but it is not trivial. Most bibliographical citations print a note field. One could put into the note field a LaTeX command that would add an acknowledgement to some existing list of acknowledgements. So you'd have something like: \def\addtoacks#1{ \@ifundefined\myacks {\def\myacks{#1}} {\def\myacks{\myacks; #1}}} to set it up, and then in each thing you want to acknowledge, in the BibTeX note field: \addtoacks{\cite{mykey}, from Jane Doe} or whatever. The nice thing about this is that the acknowledgements will appear in order, though you won't get the collapse [#, #]. The bad thing is that this version won't work unless the acknowledgement is printed after the bibliography, which may not be what you want. In that case, you could try printing the acknoweldgement to a file and then loading that file on a later run of LaTeX, but that gets more complicated. Richard
Re: program to use Lyx as a code-evaluating notebook
On Mon, May 28, 2012 at 8:34 AM, Richard Heck rgh...@comcast.net wrote: If you're at all serious about this program, then I'd suggest you create a git repo for it somewhere like gitorious, and then people can have easy access, as well as follow the changes you're making. List it as pre-alpha or whatever, and people know what they're getting. +1 Git has become my preferred downloader for these sorts of things. There's a number of git service providers (github, gitorious, ...), and you can always host your own. Nico --
Re: program to use Lyx as a code-evaluating notebook
On 05/28/2012 09:34 AM, Richard Heck wrote: On 05/27/2012 09:56 PM, Allen Barker wrote: The program is currently ~800K tarred and zipped, including documentation. If anyone here is interested in trying it out I can send copies out by email (unless someone suggests a better way to distribute copies at this stage). If you're at all serious about this program, then I'd suggest you create a git repo for it somewhere like gitorious, and then people can have easy access, as well as follow the changes you're making. List it as pre-alpha or whatever, and people know what they're getting. OK, thanks. I'll look into setting up a git repo somewhere and re-post when I get things set up.
Re: changing fixed names 'Contents', 'List of Figures', etc. Maybe solved
On 2012-05-29, Steve Litt wrote: On Tue, 29 May 2012 00:03:08 + (UTC), ddiedrichs said: I cannot change the default strings 'Contents', 'List of Figures', etc. that are generated as titles of these sections. I have tried putting in the preamble commands of the type: \renewcommand{\contentsname}{Table of Contents} But nothing works. I am typing in English without the babel package. Are you sure you do not use the babel packge? LyX uses it by default. What does the ViewSource window show when you tick the show complete source box? (You can also export your example to LaTeX and play with it.) I am asking, because the minimal LaTeX example \documentclass[english]{article} % \usepackage{babel} \renewcommand{\contentsname}{Table of Contents} \begin{document} \tableofcontents \section{test the best} \end{document} works as you expect (showing Table of Contents as contents heading in the output). I reproduced your symptom in an article based document, putting \renewcommand{\contentsname}{Table of Contents} in the document preamble, as you would expect it should be. Like you, my document continued to print the table of contents title as Contents. So then I exported to LaTeX, fooled around with it, and discovered it works only if \renewcommand{\contentsname}{Table of Contents} is in the document itself, not the document header. The usual trick in these cases is \AtBeginDocument. Indeed, replacing renaming \renewcommand{\contentsname}{Table of Contents} with: \AtBeginDocument{\renewcommand{\contentsname}{Table of Contents}} works also with babel as expected. So I went back into LyX, removed \renewcommand{\contentsname}{Table of Contents} from the document preamble, and put it in an ERT before the Table of Contents, and it did the right thing. No need for ERT with \AtBeginDocument. Günter
Re: program to use Lyx as a code-evaluating notebook
On 2012-05-28, Allen Barker wrote: I've written a Python program which I'm calling Lyx Notebook. It interacts with Lyx (via the Lyx server) to allow it to be used as a code-evaluating notebook (similar to Mathematica notebooks or the Sage notebook). It's still at an early stage, but I already find it useful. Sounds interesting. I wonder whether the project might gain from the PyClient Python package that provides a pythonic interface to LyX. http://wiki.lyx.org/Tools/PyClient Günter
Re: program to use Lyx as a code-evaluating notebook
On 05/29/2012 03:29 AM, Guenter Milde wrote: On 2012-05-28, Allen Barker wrote: I've written a Python program which I'm calling Lyx Notebook. It interacts with Lyx (via the Lyx server) to allow it to be used as a code-evaluating notebook (similar to Mathematica notebooks or the Sage notebook). It's still at an early stage, but I already find it useful. Sounds interesting. I wonder whether the project might gain from the PyClient Python package that provides a pythonic interface to LyX. http://wiki.lyx.org/Tools/PyClient That package might have been useful. I think I came across that page, but I wasn't sure if the package was still operational since it hadn't been updated for a few years. Since I was playing around with the Lyx server pipes anyway, I ended up just implementing things from scratch.
Re: Problem compiling document to Postscript
Durign the latest try I just recieved an error message (in Swedish): Ett fel uppstod vid körning av: dvips -t a4 -o Symposieskrift.ps Symposieskrift.dvi (An error occurred during operation: dvips -t a4 -o Symposieskrift.ps Symposieskrift.dvi) or something similar in English. There were no log popping up and thus nothing to check. I retrieved the log from View - Messages and attach it. I can't see anything obviously wrong, but the most logical for me is that the last images in the log should be the problematic ones and shoudl thus be converted to eps? log Description: Binary data
Re: Managing acknowledgements and disclosures?
On 05/21/2012 10:31 PM, Chris Hennick wrote: Tonight I decided that when I was citing books or reprints that had been given to me, I should probably add an acknowledgement, like so: The authors wish to thank donors for the following reference materials: [#] from Jane Doe, [#] from John Doe, and [#, #] from anonymous sources. However, I'll have to manually edit this acknowledgement if I drop one of those sources, or if I receive and cite another reprint. It also occurs to me that I'd have the same issue if I were buying source materials with grant money, since then the citations would determine which grant numbers went on which papers. (At least, that's how I understand funding disclosure, although as a grad student I'm new to the subject.) Is it possible in LyX to automatically manage acknowledgements and grant disclosures, when some of them are tied to particular citations? The answer is that it should be possible to do this in LaTeX---you can do anything in LaTeX---but it is not trivial. Most bibliographical citations print a note field. One could put into the note field a LaTeX command that would add an acknowledgement to some existing list of acknowledgements. So you'd have something like: \def\addtoacks#1{ \@ifundefined\myacks {\def\myacks{#1}} {\def\myacks{\myacks; #1}}} to set it up, and then in each thing you want to acknowledge, in the BibTeX note field: \addtoacks{\cite{mykey}, from Jane Doe} or whatever. The nice thing about this is that the acknowledgements will appear in order, though you won't get the collapse [#, #]. The bad thing is that this version won't work unless the acknowledgement is printed after the bibliography, which may not be what you want. In that case, you could try printing the acknoweldgement to a file and then loading that file on a later run of LaTeX, but that gets more complicated. Richard
Re: program to use Lyx as a code-evaluating notebook
On Mon, May 28, 2012 at 8:34 AM, Richard Heck rgh...@comcast.net wrote: If you're at all serious about this program, then I'd suggest you create a git repo for it somewhere like gitorious, and then people can have easy access, as well as follow the changes you're making. List it as pre-alpha or whatever, and people know what they're getting. +1 Git has become my preferred downloader for these sorts of things. There's a number of git service providers (github, gitorious, ...), and you can always host your own. Nico --
Re: program to use Lyx as a code-evaluating notebook
On 05/28/2012 09:34 AM, Richard Heck wrote: On 05/27/2012 09:56 PM, Allen Barker wrote: The program is currently ~800K tarred and zipped, including documentation. If anyone here is interested in trying it out I can send copies out by email (unless someone suggests a better way to distribute copies at this stage). If you're at all serious about this program, then I'd suggest you create a git repo for it somewhere like gitorious, and then people can have easy access, as well as follow the changes you're making. List it as pre-alpha or whatever, and people know what they're getting. OK, thanks. I'll look into setting up a git repo somewhere and re-post when I get things set up.
Re: changing fixed names 'Contents', 'List of Figures', etc.
On 2012-05-29, Steve Litt wrote: > On Tue, 29 May 2012 00:03:08 + (UTC), ddiedrichs said: >> I cannot change the default strings 'Contents', 'List of Figures', >> etc. that are generated as titles of these sections. I have tried >> putting in the preamble commands of the type: >> \renewcommand{\contentsname}{Table of Contents} >> But nothing works. I am typing in English without the babel package. Are you sure you do not use the babel packge? LyX uses it by default. What does the View>Source window show when you tick the "show complete source" box? (You can also export your example to LaTeX and play with it.) I am asking, because the minimal LaTeX example \documentclass[english]{article} % \usepackage{babel} \renewcommand{\contentsname}{Table of Contents} \begin{document} \tableofcontents \section{test the best} \end{document} works as you expect (showing "Table of Contents" as contents heading in the output). > I reproduced your symptom in an article based document, putting > \renewcommand{\contentsname}{Table of Contents} in the document > preamble, as you would expect it should be. Like you, my document > continued to print the table of contents title as "Contents". So then I > exported to LaTeX, fooled around with it, and discovered it works only > if \renewcommand{\contentsname}{Table of Contents} is in the document > itself, not the document header. The usual trick in these cases is \AtBeginDocument. Indeed, replacing renaming \renewcommand{\contentsname}{Table of Contents} with: \AtBeginDocument{\renewcommand{\contentsname}{Table of Contents}} works also with babel as expected. > So I went back into LyX, removed \renewcommand{\contentsname}{Table of > Contents} from the document preamble, and put it in an ERT before the > Table of Contents, and it did the right thing. No need for ERT with \AtBeginDocument. Günter
Re: program to use Lyx as a code-evaluating notebook
On 2012-05-28, Allen Barker wrote: > I've written a Python program which I'm calling > Lyx Notebook. It interacts with Lyx (via the Lyx > server) to allow it to be used as a code-evaluating > notebook (similar to Mathematica notebooks or the > Sage notebook). It's still at an early stage, but > I already find it useful. Sounds interesting. I wonder whether the project might gain from the PyClient Python package that provides a "pythonic" interface to LyX. http://wiki.lyx.org/Tools/PyClient Günter
Re: program to use Lyx as a code-evaluating notebook
On 05/29/2012 03:29 AM, Guenter Milde wrote: On 2012-05-28, Allen Barker wrote: I've written a Python program which I'm calling Lyx Notebook. It interacts with Lyx (via the Lyx server) to allow it to be used as a code-evaluating notebook (similar to Mathematica notebooks or the Sage notebook). It's still at an early stage, but I already find it useful. Sounds interesting. I wonder whether the project might gain from the PyClient Python package that provides a "pythonic" interface to LyX. http://wiki.lyx.org/Tools/PyClient That package might have been useful. I think I came across that page, but I wasn't sure if the package was still operational since it hadn't been updated for a few years. Since I was playing around with the Lyx server pipes anyway, I ended up just implementing things from scratch.
Re: Problem compiling document to Postscript
Durign the latest try I just recieved an error message (in Swedish): Ett fel uppstod vid körning av: dvips -t a4 -o "Symposieskrift.ps" "Symposieskrift.dvi" (An error occurred during operation: dvips -t a4 -o "Symposieskrift.ps" "Symposieskrift.dvi") or something similar in English. There were no log popping up and thus nothing to check. I retrieved the log from View -> Messages and attach it. I can't see anything obviously wrong, but the most logical for me is that the last images in the log should be the problematic ones and shoudl thus be converted to eps? log Description: Binary data
Re: Managing acknowledgements and disclosures?
On 05/21/2012 10:31 PM, Chris Hennick wrote: Tonight I decided that when I was citing books or reprints that had been given to me, I should probably add an acknowledgement, like so: The authors wish to thank donors for the following reference materials: [#] from Jane Doe, [#] from John Doe, and [#, #] from anonymous sources. However, I'll have to manually edit this acknowledgement if I drop one of those sources, or if I receive and cite another reprint. It also occurs to me that I'd have the same issue if I were buying source materials with grant money, since then the citations would determine which grant numbers went on which papers. (At least, that's how I understand funding disclosure, although as a grad student I'm new to the subject.) Is it possible in LyX to automatically manage acknowledgements and grant disclosures, when some of them are tied to particular citations? The answer is that it should be possible to do this in LaTeX---you can do anything in LaTeX---but it is not trivial. Most bibliographical citations print a "note" field. One could put into the note field a LaTeX command that would add an acknowledgement to some existing list of acknowledgements. So you'd have something like: \def\addtoacks#1{ \@ifundefined\myacks {\def\myacks{#1}} {\def\myacks{\myacks; #1}}} to set it up, and then in each thing you want to acknowledge, in the BibTeX note field: \addtoacks{\cite{mykey}, from Jane Doe} or whatever. The nice thing about this is that the acknowledgements will appear in order, though you won't get the collapse [#, #]. The bad thing is that this version won't work unless the acknowledgement is printed after the bibliography, which may not be what you want. In that case, you could try printing the acknoweldgement to a file and then loading that file on a later run of LaTeX, but that gets more complicated. Richard
Re: program to use Lyx as a code-evaluating notebook
On Mon, May 28, 2012 at 8:34 AM, Richard Heckwrote: > If you're at all serious about this program, then I'd suggest > you create a git repo for it somewhere like gitorious, and > then people can have easy access, as well as follow the > changes you're making. List it as pre-alpha or whatever, > and people know what they're getting. +1 Git has become my preferred downloader for these sorts of things. There's a number of git service providers (github, gitorious, ...), and you can always host your own. Nico --