Trouble exporting multi-part documents

2019-04-01 Thread Paul Johnson
I have a dissertation template for students at my University. There is a
main thesis document and then the separate chapters are in subdirectories. (
http://crmda.ku.edu/node/555)

Currently, in version, "KU-thesis-20190201.zip
", it
appears to work for everybody to use LyX to edit either the main document
or the individual chapters.

However, I have students who want to use the dissertation template as raw
LaTexX files, rather than within LyX.  Here I run into a bad problem.

In my 20190201 version, the people who want to edit the exported LaTeX file
in raw LaTeX could not compile the document.  There's an error about
commands in the chapter heading that are only allowed in the document
preamble.  From that error message, I tracked back to changes I made and I
understand what is going wrong.

If I start with the master document and do Export to LaTeX (pdflatex), the
individual chapter .tex files are created.  They are not free-standing
documents. At the top, there was no preamble. It starts in line 1 with the
chapter name

\chapter{Elementary Regression}

and also the includegraphics lines have full project paths:

\includegraphics[width=4in]{Chapter2/importfigs/carinced}

Those chapters could not be compiled individually.

I thought I'd get around this problem by using LyX to individually
exporting each separate chapter as a tex document. I did not realize that
caused an entirely different export than I got by starting with the master
document in LyX and doing export LaTeX(pdflatex).

My individually exported chapter files allows the users to edit the
individual .tex chapters, but when they try to compile the master document,
they get errors caused by the fact that the individual chapters have their
own preambles AND the graphics paths are incorrect.

Because I individually exported the .tex files within the Chapter
directories, then the master document level Export to LaTeX does not
replace the existing chapters.  Thus I am allowed to zip up the directory
and have a master document that does not compile because the child
documents have preambles in them.

Now that I understand the problem, I wonder if other people have noticed
this and if they have suggestions for a fix?

I wondered if perhaps we might have the necessary preamble created as a
separate file in each chapter with some if/then magic in each chapter
preamble to specify whether or not the master file is in control.

Some fix about the figure paths is necessary as well, I don't have a guess
about that.

pj

-- 
Paul E. Johnson   http://pj.freefaculty.org
Director, Center for Research Methods and Data Analysis http://crmda.ku.edu

To write to me directly, please address me at pauljohn at ku.edu.


Re: you say install latest version of MiKTeX before installing LyX - what is the minimal version needed?

2018-10-15 Thread Paul Johnson
Hi:

I was trying to compile texinfo on Windows, if you succeed, let me know how.

https://www.gnu.org/software/texinfo
On Sat, Oct 13, 2018 at 1:12 PM Richard Kimberly Heck  wrote:
>
> On 10/13/18 1:58 PM, Paul Johnson wrote:
> >
> > The only critical flaw in TeXLive we have encountered is that it does
> > not include texi2pdf. Because of that absence, the R team is still
> > devoted to MikTeX as a part of the tool chain to build/use R for
> > windows. I spent a while trying to figure out how to compile texi2pdf
> > on Windows and gave up.
>
> Can you point me at the source code? I'd certainly have a go at
> cross-compiling it on Linux with mingw.
>
> Riki
>
>


-- 
Paul E. Johnson   http://pj.freefaculty.org
Director, Center for Research Methods and Data Analysis http://crmda.ku.edu

To write to me directly, please address me at pauljohn at ku.edu.


Re: you say install latest version of MiKTeX before installing LyX - what is the minimal version needed?

2018-10-13 Thread Paul Johnson
On Fri, Sep 14, 2018 at 9:10 PM Richard Kimberly Heck  wrote:
>
> On 9/14/18 2:38 AM, Baris Erkus wrote:
> > If the intention is more like a complete WYSIWYG software package (or
> > bundle) allowing users to produce documents right after installation
> > without much hassle of Tex and other setups and preventing them from
> > dealing with low-level Latex programming, it would be more reasonable
> > to develop LyX as a bundle/package of LyX Frontend+TeX system+misc
> > components. This would make the bundle more predictable and manageable
> > if the components of the package are package-specific and they are
> > developed specifically for the package. In this case, the TeX system
> > should be customized by the LyX developers and should not be allowed
> > to be updated by a third party software. This is the approach taken by
> > Scientific Workplace and Bakoma, I guess.
> >
> > If the intention is develop only a powerful frontend that allows users
> > to juggle around the TeX system, to do their own customization, allow
> > different TeX systems to be used  (and let the TeX developers to do
> > job of developing TeX systems) and even maybe allow users install
> > their own addons and functions to LyX, then LyX should have a module
> > that can communicate with different TeX systems efficiently and should
> > be immune to changes and updates in the TeX system.
> >

This was a great thread last month and I'm sorry I did not add this back then.

1. We changed over to TeXLive on Windows systems and encourage all LyX
users here to do the same.  It seemed as though every time we had a
workshop, the MiKTeX users were chronically locked up by the failure
to get the packages installed. It is much easier to take the "one
giant distribution" and install it. (https://crmda.ku.edu/latex-help)

The only critical flaw in TeXLive we have encountered is that it does
not include texi2pdf. Because of that absence, the R team is still
devoted to MikTeX as a part of the tool chain to build/use R for
windows. I spent a while trying to figure out how to compile texi2pdf
on Windows and gave up. (It appears to me the efforts to make open
source things work on windows are fraught with danger. The Windows
test system here has 5 or 6 different Cygwin-based installations and
the path is a tangled web of incompatible libraries and executables.
Sorry, that's just a Unix guy in foreign territory whining.)

There is one LaTeX distribution project worth tracking in this vein.
Yihui Xie, who LyX users will remember as an important contributor in
LyX support for Sweave and knitr, offers an R package "tinytex"
(https://yihui.name/tinytex/).  It is a MikTeX-style alternative
distribution based on TeXlive.  Although I gave up with the "on demand
package installation" idea  for LyX/MikTeX, I also would not bet
against this new thing.  The creator has been wildly successful in
ways that, frankly, I thought were impossible.

But, honestly, for the absolute beginner, the simplest thing is to
just install LaTeX  everything: TeXLive!  A 2GB download is feasible
for almost everybody these days.  Disk space is cheap and not too many
of us are running LaTeX in our cell phones.


2. I wrote a help page called "How to Cheat on your LaTeX Homework: A
Beginner's Guide to LyX and LaTeX" and has the theme of the earlier
posts in this tread. We offer workshops with that idea. I agree with
the idea that one of LyX's best contributions is the Code view window.

I prefer to write with LyX, but sometimes my team members are hard
core "raw" LaTeX users and I have to go with that. Also, we have more
demand to write documents with R markdown.  I keep LyX open so I can
remember "how did LyX turn a table sideways" or how did they get a
table to have borders and joined cells "just so." Without LyX, I find
it is much more error prone to make he layout just right.  I end up
Googling and finding incorrect answers from strangers.There are too
many people that are willing to offer advice that is based on
incorrect code or outmoded and unusual packages.   And, once you
follow the badly thought-out advice of an isolated individual in the
internet, you are in a world of hurt.  Almost all of the time, the
LaTeX code that LyX prepares is accurate and understandable in the
"raw" LaTeX document we write.

Best regards
pj

-- 
Paul E. Johnson   http://pj.freefaculty.org
Director, Center for Research Methods and Data Analysis http://crmda.ku.edu

To write to me directly, please address me at pauljohn at ku.edu.


Ubuntu: keep lyx 2.2.3 and 2.3.1 in same system

2018-10-13 Thread Paul Johnson
I have some projects based on LyX 2.2.3 that I want to work on and I
don't want to update to new. However, I also have projects based on
2.3 and I can't edit those with old LyX.

Liviu Andronic worked out a way for this to be possible a few years
ago, but I cannot find documents about it. I wish I could have old and
new lyx installed at same time, to easily run one or the other.
I've tried to do this by installing 2.3.1 from the Ubuntu package and
then compiling 2.2.3 from source and installing off the path, but then
I found the 2 versions should not share a user configuration folder.
After using 2.3.1 and allowing it to revise ~/.lyx, then lyx 2.2.3
cannot start. Error like this:

$ ./lyx
Warning: Could not read configuration file

Error while reading the configuration file
preferences.
Please check your installation.

So obviously I need to be more graceful, separate config folders.

I thought about building a new Debian package "lyx223". I'm pretty
sure that's what I think Liviu did.  For me that was a fail because
the deb packaging code for the lyx project has a lot of hard coded
folders like /usr/share/lyx, so it is not too easy to rebuild a
package to use alternate folders.

If you have advice about this, I would be glad to  hear it.

-- 
Paul E. Johnson   http://pj.freefaculty.org
Director, Center for Research Methods and Data Analysis http://crmda.ku.edu

To write to me directly, please address me at pauljohn at ku.edu.


Re: user interface bug latin9 -> Unicode

2018-09-27 Thread Paul Johnson
I apologize. My LyX test machine where I found the problem has LyX 2.2.3.

We have built LyX 2.3.1 for RedHat and the problem is solved, the smiley
unicode character is replaced by \smiley{}, just as Jurgen said.

Also confirm that problem does not exist in LyX 2.3.0 in Ubuntu.


On Wed, Sep 26, 2018 at 3:47 AM Jürgen Spitzmüller  wrote:

> Am Dienstag, den 25.09.2018, 14:15 -0500 schrieb Paul Johnson:
> > This looks like a bug to me.
> >
> > Create a new empty article and use the Insert Symbol tool to put in
> > some miscellaneous smiley faces and what not. This is the source view
> > of the file, which does compile.:
> >
> > \documentclass[english]{article}
> > \usepackage[T1]{fontenc}
> > \usepackage[latin9]{inputenc}
> > \usepackage{wasysym}
> > \usepackage{babel}
> > \begin{document}
> > \frownie \smiley \blacksmiley \sun{}
> > \end{document}
> >
> > Then I went into Settings -> Language and changed input to utf-8.
> >
> > That had the effect of automatically replacing \frownie and \smiley
> > with unicode symbols in the LaTeX source, like so:
> >
> > \documentclass[english]{article}
> > \usepackage[T1]{fontenc}
> > \usepackage[utf8]{inputenc}
> > \usepackage{wasysym}
> > \usepackage{babel}
> > \begin{document}
> > ☹☺☻☼
> > \end{document}
> >
> > That does not compile, rather the error messages say:
> >
> > Package inputenc Error: Unicode char ☹ (U+2639)
> > Package inputenc Error: Unicode char ☺ (U+263A)
> > Package inputenc Error: Unicode char ☻ (U+263B)
> > Package inputenc Error: Unicode char ☼ (U+263C)
> >
> > My thought was that LyX should not replace \frownie with ☹ unless the
> > document would otherwise compile correctly.
>
> Which version of LyX is this? The macros are output here also with
> utf8, and this should be the case at least as of 2.3.0.
>
> Jürgen
>
>

-- 
Paul E. Johnson   http://pj.freefaculty.org
Director, Center for Research Methods and Data Analysis http://crmda.ku.edu

To write to me directly, please address me at pauljohn at ku.edu.


Re: Graceful beamer <-> beamerarticle transition; help with conditional preamble code?

2018-09-27 Thread Paul Johnson
On Wed, Sep 26, 2018 at 4:02 AM Jürgen Spitzmüller  wrote:
>
> Am Dienstag, den 25.09.2018, 15:08 -0500 schrieb Paul Johnson:
> > This seems like my LyX day to ask questions. Thanks for your help.
> >
> > We have some instructional web pages that have accompanying Beamer
> > slides. It is a hassle to edit the web page and the Beamer slides,
> > content goes out of sync.
> >
> > The idea hit me to write one document that can be exported as Beamer
> > Slides or as a Beamer Article.  I've explored the details quite a bit
> > and the process almost works smoothly. My preamble for slides has a
> > lot of customized settings and LyX does not gracefully convert from
> > Beamer slides to Beamer article as a result. I manually insert some
> > code... I need the \mode<> statements to adjust for the output
> > format.
> > I control input for each format with \mode{} and
> > \mode{}.  I find the back-and-forth transition mostly works.
>
> I'd suggest to use two documents: the actual beamer document that
> contains all the text and a portmanteau beamer-article file that
> basically simply \includes the beamer document. Then you can add
> specific preamble code to either document.
>
> See beamer-article.lyx in examples as a model.
>
> > However, there is one piece of conditional code where I need your
> > help. A Beamer slide document  is declared like so
> >
> > \documentclass[english]{beamer}
> >
> > Because beamer is the class, then "\mode" is immediately available.
> >
> > However, the Beamer article is declared as an article:
> >
> > \documentclass[english]{article}
> >
> > Because the \mode macro is not available yet, I am not able to
> > conditionalize setup statements for the article. I want to take the
> > "BeamerArticle" preamble code and wrap inside \mode:
>
> If you use the textclass "Article (Beamer)" (not "Article"), the
> beamerarticle package will be loaded and \mode is defined.
>
Thanks very much. I understand your suggestion and will follow it.


> HTH
> Jürgen



-- 
Paul E. Johnson   http://pj.freefaculty.org
Director, Center for Research Methods and Data Analysis http://crmda.ku.edu

To write to me directly, please address me at pauljohn at ku.edu.


Graceful beamer <-> beamerarticle transition; help with conditional preamble code?

2018-09-25 Thread Paul Johnson
This seems like my LyX day to ask questions. Thanks for your help.

We have some instructional web pages that have accompanying Beamer
slides. It is a hassle to edit the web page and the Beamer slides,
content goes out of sync.

The idea hit me to write one document that can be exported as Beamer
Slides or as a Beamer Article.  I've explored the details quite a bit
and the process almost works smoothly. My preamble for slides has a
lot of customized settings and LyX does not gracefully convert from
Beamer slides to Beamer article as a result. I manually insert some
code... I need the \mode<> statements to adjust for the output format.
I control input for each format with \mode{} and
\mode{}.  I find the back-and-forth transition mostly works.

However, there is one piece of conditional code where I need your
help. A Beamer slide document  is declared like so

\documentclass[english]{beamer}

Because beamer is the class, then "\mode" is immediately available.

However, the Beamer article is declared as an article:

\documentclass[english]{article}

Because the \mode macro is not available yet, I am not able to
conditionalize setup statements for the article. I want to take the
"BeamerArticle" preamble code and wrap inside \mode:


\mode{
\makeatletter
% Textclass specific LaTeX commands.
\usepackage{beamerarticle,pgf}
% this default might be overridden by plain title style
\newcommand\makebeamertitle{\frame{\maketitle}}%
\AtBeginDocument{
\let\origtableofcontents=\tableofcontents
\def\tableofcontents{\@ifnextchar[{\origtableofcontents}{\gobbletableofcontents}}
\def\gobbletableofcontents#1{\origtableofcontents}
}
\makeatother
}

That fails, pdflatex error:

\mode{
The control sequence at the end of the top line of your error message
was never \def'ed.

Well, that should happen. "\mode" is an unrecognized symbol in the
article document. I can't have any \mode or
\mode settings until "\usepackage{beamerarticle}" package is
loaded.

I need to write a conditional statement like "if this document is not
a Beamer slide document, then include the following code" to fix the
problem. That's where I'm stuck at the current time.

pj

-- 
Paul E. Johnson   http://pj.freefaculty.org
Director, Center for Research Methods and Data Analysis http://crmda.ku.edu

To write to me directly, please address me at pauljohn at ku.edu.


user interface bug latin9 -> Unicode

2018-09-25 Thread Paul Johnson
This looks like a bug to me.

Create a new empty article and use the Insert Symbol tool to put in
some miscellaneous smiley faces and what not. This is the source view
of the file, which does compile.:

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{wasysym}
\usepackage{babel}
\begin{document}
\frownie \smiley \blacksmiley \sun{}
\end{document}

Then I went into Settings -> Language and changed input to utf-8.

That had the effect of automatically replacing \frownie and \smiley
with unicode symbols in the LaTeX source, like so:

\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{wasysym}
\usepackage{babel}
\begin{document}
☹☺☻☼
\end{document}

That does not compile, rather the error messages say:

Package inputenc Error: Unicode char ☹ (U+2639)
Package inputenc Error: Unicode char ☺ (U+263A)
Package inputenc Error: Unicode char ☻ (U+263B)
Package inputenc Error: Unicode char ☼ (U+263C)

My thought was that LyX should not replace \frownie with ☹ unless the
document would otherwise compile correctly.

I had not too much understanding of Unicode when I started to look
into this.  I found several ways to deal with this. The easiest is to
simply put "\frownie" and "\smiliey" back in the document. So far as I
can see, there's no real benefit to me that those things are entered
as ☹ symbol. I can understand, however, that when authors need to
enter letters with accents, then they have a more pressing need to
make this work.

I wrote out ways this can be corrected, with preamble adjustments
using either DeclareUnicodeCharacter or newunicodechar, on
Stackexchange 
(https://tex.stackexchange.com/questions/452494/lost-my-smilies-it-is-worth-the-effort-to-make-unicode-work),
we'll see what they say about it. I'm predicting the answer will be
"learn the ins and outs of xelatex".

But I do think it is a LyX bug that Unicode symbols are introduced but
can't be compiled.

I'm interested to hear your ideas.

pj

-- 
Paul E. Johnson   http://pj.freefaculty.org
Director, Center for Research Methods and Data Analysis http://crmda.ku.edu

To write to me directly, please address me at pauljohn at ku.edu.


customize \code output in Logical Markup module?

2017-05-19 Thread Paul Johnson
Can you help me make output of \code{} in inline logical markup look
similar to the listings output for code sections?  I'd like to do this
in a Beamer slideshow.

The \code{} result is typewriter font, but not colorized like the
listings output I'm using.

I found out here:

https://tex.stackexchange.com/questions/28179/colored-background-in-inline-listings

that I can insert

\usepackage{realbox}
\definecolor{light-gray}{gray}{0.95}

in the preamble and get more-or less what I want from \Colorbox, with
ERT like this

\Colorbox{light-gray}{\lstinline{A=@#$%^&*()1}}

I don't want to manually type that (or something like it) every place
where I've used the LyX right-click code logical markup. Would you
tell me if I can redefine \code{} in preamble?


-- 
Paul E. Johnson   http://pj.freefaculty.org
Director, Center for Research Methods and Data Analysis http://crmda.ku.edu

To write to me directly, please address me at pauljohn at ku.edu.


Re: Miktex package management inadequate, want to transition to TexLive.

2016-11-02 Thread Paul Johnson
As long as the MikTeX server is awake and answering, you can rest easy.

It just so happens that whenever I need MikTeX to work for a workshop,
the server gets turned off/taken down.

In the design of MikTeX, the package installer cannot retrieve package
from other CTAN servers without first checking with that one MikTeX
server.  If anybody thinks that I'm not correct, please speak up.  The
links I provided on the original post explain that is the case.

Over the years, we have had a lot of hassles with MikTeX and
inabilility to get packages for new LaTeX files.  Its just better to
have all of them with TeXLive.  If a user walks in with a file that
depends on 10 classes I've never heard of, it is more likely to work
now.

The only part I've not worked out yet is spell checking and using the
Thesaurus.  But I will try harder later.

On Wed, Nov 2, 2016 at 12:25 PM, Roberto Fanciulli  wrote:
> I have uninstalled MiKTeX 2.9 and later also LyX 2.2.2.
> Then I reinstalled MiKTeX2.9 and updated packages.
> Finally I reinstalled LyX2.2.2.
> Currently it seems that everything works.
>
> (o.s.: Windows 10)
> Roberto
>
> 2016-11-02 6:24 GMT+01:00 UD :
>>
>> On 11/02/2016 05:56 AM, Paul Johnson wrote:
>>>
>>>
>>> It worked once. Failed next two times.
>>>
>>> I'm putting it in the rearview mirror.
>>>
>>> pj
>>> Paul Johnson
>>> http://pj.freefaculty.org
>>>
>>>
>>> On Oct 29, 2016 2:27 PM, "Andrew Parsloe" >> <mailto:apars...@clear.net.nz>> wrote:
>>>
>>>
>>>
>>> On 29/10/2016 7:35 p.m., CarLaTeX wrote:
>>>
>>>
>>> 2016-10-29 8:09 GMT+02:00 Paul Johnson >> <mailto:pauljoh...@gmail.com>
>>> <mailto:pauljoh...@gmail.com <mailto:pauljoh...@gmail.com>>>:
>>>
>>> I wonder if Windows users see this problem in MikTeX
>>> regularly. I'm a
>>> Linux user, but I try to help the Windows students around
>>> here.
>>>
>>> [...]
>>>
>>>
>>> --
>>> Paul E. Johnson http://pj.freefaculty.org
>>> Director, Center for Research Methods and Data Analysis
>>> http://crmda.ku.edu
>>>
>>> To write to me directly, please address me at pauljohn at
>>> ku.edu <http://ku.edu>
>>> <http://ku.edu>.
>>>
>>>
>>> I'm using LyX (various version, now 2.2.2) with MiKTeX (2.9)
>>> on Windows
>>> (10) since April 2015 with no problems.
>>> Today the site is down but you should only have to wait few
>>> hours.
>>> Bye!
>>>
>>> Carla
>>>
>>>
>>> Yesterday, like others, I couldn't update MiKTeX. This morning
>>> (8.20 a.m. New Zealand time) everything proceeded smoothly.
>>>
>>> Andrew
>>>
>>> ---
>>> This email has been checked for viruses by Avast antivirus software.
>>> https://www.avast.com/antivirus <https://www.avast.com/antivirus>
>>>
>>
>> I used to use MikTex under Windows, but several years ago, when I switched
>> to Linux, which uses TexLive, I switched to TexLive under Windows too, and
>> it has worked very well.  I liked the MikTex package manager better than
>> TLMGR, but it was a small price to pay for uniformity, stability and
>> continued support.
>>
>> Ehud Kaplan
>>
>> --
>>
>



-- 
Paul E. Johnson   http://pj.freefaculty.org
Director, Center for Research Methods and Data Analysis http://crmda.ku.edu

To write to me directly, please address me at pauljohn at ku.edu.


Re: Miktex package management inadequate, want to transition to TexLive.

2016-11-01 Thread Paul Johnson
It worked once. Failed next two times.

I'm putting it in the rearview mirror.

pj
Paul Johnson
http://pj.freefaculty.org

On Oct 29, 2016 2:27 PM, "Andrew Parsloe"  wrote:

>
>
> On 29/10/2016 7:35 p.m., CarLaTeX wrote:
>
>>
>> 2016-10-29 8:09 GMT+02:00 Paul Johnson > <mailto:pauljoh...@gmail.com>>:
>>
>> I wonder if Windows users see this problem in MikTeX regularly. I'm a
>> Linux user, but I try to help the Windows students around here.
>>
>> [...]
>
>>
>> --
>> Paul E. Johnson http://pj.freefaculty.org
>> Director, Center for Research Methods and Data Analysis
>> http://crmda.ku.edu
>>
>> To write to me directly, please address me at pauljohn at ku.edu
>> <http://ku.edu>.
>>
>>
>> I'm using LyX (various version, now 2.2.2) with MiKTeX (2.9) on Windows
>> (10) since April 2015 with no problems.
>> Today the site is down but you should only have to wait few hours.
>> Bye!
>>
>> Carla
>>
>
> Yesterday, like others, I couldn't update MiKTeX. This morning (8.20 a.m.
> New Zealand time) everything proceeded smoothly.
>
> Andrew
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
>


Re: Miktex package management inadequate, want to transition to TexLive.

2016-10-29 Thread Paul Johnson
MikTeX server intermittent this morning. It worked on one computer, fails
on other 3.  Suspect that server is just flaky.

There are good arguments for installing TexLive.  Its maintained by a
community, not just one person, being the most important among them.  Plus,
with TexLive we are consistent across platforms, my Linux workstation and
the Macintosh ones seem same.

On the machines where I've done both installs, it appears to me that pdf
compile with TexLive is quite a bit faster. Have no idea why, but others
have made same claim.

TexLive is a surprisingly slow install. Even if you put the whole iso on
disk, and disconnect entirely from the internet, the install takes 1 hour.
I've done it on 3 machines during the night.  At first I thought it was
slow because it was trying to pull updates or something, but no.  It is
just a slow install.

Aside from that, it appears fine to me.  Make sure texlive/bin/win32 is put
in the path, all can work. Previously installed LyX still looks for MikTex,
but you can make sure LyX knows is supposed to use TeXLive if you remove
LyX and re-install.  It will ask which LaTeX to use.  Seems like we ought
to have a post-install config setting there, but don't know how. (PS:
don't use the LyX Bundle for LyX).

Only puzzle I did not work out so far is how to get spell check and other
pieces from LyX bundle to work with LyX installed separately.   If the LyX
website pointed at the installers for spellcheckers and JabRef and whatever
comes in bundle, with some install tips, it would be nice.

Since I don't do Windows much, I ask a lot of stupid questions


On Sat, Oct 29, 2016 at 11:46 AM, Roberto Fanciulli 
wrote:

> By several days the Paul Johnson problem is also my problem and I do not find
> a solution.
> I reinstalled MiKTeX many times, but MiKTeX Package, and MiKTeX Update do
> not work (they do not find any package repository).
>
> [image: Immagine incorporata 1]
> The two alternatives that have remained are:
> 1) uninstall MiKTeX, uninstall and reinstall LyX2.2.2 bundle version (LyX-
> 222-Bundle-2.exe) hoping for a successful installation of MiKTeX too;
> 2) setting LyX to TeXLive and forget MiKTeX.
>
>
> Tips for other less drastic solutions already tested?
>
> (My system: LyX2.2.2 with MiKTeX2.9 on Windows 10)
>
> Roberto
>
> 2016-10-29 8:35 GMT+02:00 CarLaTeX :
>
>>
>> 2016-10-29 8:09 GMT+02:00 Paul Johnson :
>>
>>> I wonder if Windows users see this problem in MikTeX regularly. I'm a
>>> Linux user, but I try to help the Windows students around here.
>>>
>>> I've done several LyX installs in Windows systems while preparing for
>>> a workshop this week.  I think the LyX-2.2.2 installation of MikTeX
>>> has some improvements. It pulls in quite a few more packages when it
>>> first starts.
>>>
>>> Even though the LyX bundle installer works OK, I'm frustrated with
>>> MikTeX. Today, I experience the problem that my MikTeX can't install
>>> new packages on any of these systems. Others have described it
>>> http://tex.stackexchange.com/questions/251242/unable-to-conn
>>> ect-to-repository-in-miktex-2-9.
>>>
>>> MikTeX cannot retrieve the list of repositories from the central
>>> MikTeX server.   Even if the package-server I want to use is online,
>>> the MikTeX routine fails. This has me angry enough now to use TexLive
>>> instead.
>>>
>>> TexLive  is a big download, but it seems to come with all of the
>>> packages, no problem. It does not have the on-the-fly install, but
>>> maybe I don't care.
>>>
>>> I don't want to remove MikTex yet, I don't think I should have to.
>>>
>>> I had a little trouble getting LyX to use TexLive, however.  I thought
>>> it should be sufficient to put the TexLive bin\win32 folder in the
>>> path ahead of MikTex\bin, but that was not sufficient.
>>>
>>> In LyX itself, the preferences have a path variable in which I must
>>> delete MikTeX and replace it with TeXLive.
>>>
>>> This seems to work within my user account.
>>>
>>> I'd like to make this change in LyX on a system-wide basis, so that
>>> all new users who try LyX will get TeXLive. Know what I mean?
>>>
>>> Before I tell students who maintain their own PCs, I wonder if there
>>> are problems ahead. Do you have some ideas?
>>>
>>> --
>>> Paul E. Johnson   http://pj.freefaculty.org
>>> Director, Center for Research Methods and Data Analysis
>>> http://crmda.ku.edu
>>>
>>> To write to me directly, please address me at pauljohn at ku.edu.
>>>
>>
>> I'm using LyX (various version, now 2.2.2) with MiKTeX (2.9) on Windows
>> (10) since April 2015 with no problems.
>> Today the site is down but you should only have to wait few hours.
>> Bye!
>>
>> Carla
>>
>
>


-- 
Paul E. Johnson   http://pj.freefaculty.org
Director, Center for Research Methods and Data Analysis http://crmda.ku.edu

To write to me directly, please address me at pauljohn at ku.edu.


Miktex package management inadequate, want to transition to TexLive.

2016-10-28 Thread Paul Johnson
I wonder if Windows users see this problem in MikTeX regularly. I'm a
Linux user, but I try to help the Windows students around here.

I've done several LyX installs in Windows systems while preparing for
a workshop this week.  I think the LyX-2.2.2 installation of MikTeX
has some improvements. It pulls in quite a few more packages when it
first starts.

Even though the LyX bundle installer works OK, I'm frustrated with
MikTeX. Today, I experience the problem that my MikTeX can't install
new packages on any of these systems. Others have described it
http://tex.stackexchange.com/questions/251242/unable-to-connect-to-repository-in-miktex-2-9.

MikTeX cannot retrieve the list of repositories from the central
MikTeX server.   Even if the package-server I want to use is online,
the MikTeX routine fails. This has me angry enough now to use TexLive
instead.

TexLive  is a big download, but it seems to come with all of the
packages, no problem. It does not have the on-the-fly install, but
maybe I don't care.

I don't want to remove MikTex yet, I don't think I should have to.

I had a little trouble getting LyX to use TexLive, however.  I thought
it should be sufficient to put the TexLive bin\win32 folder in the
path ahead of MikTex\bin, but that was not sufficient.

In LyX itself, the preferences have a path variable in which I must
delete MikTeX and replace it with TeXLive.

This seems to work within my user account.

I'd like to make this change in LyX on a system-wide basis, so that
all new users who try LyX will get TeXLive. Know what I mean?

Before I tell students who maintain their own PCs, I wonder if there
are problems ahead. Do you have some ideas?

-- 
Paul E. Johnson   http://pj.freefaculty.org
Director, Center for Research Methods and Data Analysis http://crmda.ku.edu

To write to me directly, please address me at pauljohn at ku.edu.


Adobe PDF viewer in Windows stopped previewing

2016-02-15 Thread Paul Johnson
We have a lab of windows machines that did work fine with LyX and the
free Adobe pdf viewer.  Today, we notice there is an update so that
LyX View causes the PDF to build, then Adobe pops open, but it does
not show the document, it just shows a list of recently viewed PDF.

We are allowed to File -> export (pdflatex) from LyX and view the
file, so I'm sure the pdf system still works.

I'm not surprised this comes up, as the Adobe pdf viewer has become
more and more cumbersome, bothering us to use their cloud storage and
so forth.

I've looked and find same has happened to others over time, and
suggestion seems to be "install Sumatra pdf viewer".  In our lab, the
problem is that the system admins refuse to install things except
during the twice-per-year update period, so that's not a great option.

I was hoping there is some setting or registry hack that will make
this work again.

Ideas?

We have
LyX version 2.1.3
Adobe Acrobat Reader DC (15.010.20056)

pj
-- 
Paul E. Johnson
Professor, Political ScienceDirector
1541 Lilac Lane, Room 504  Center for Research Methods
University of Kansas University of Kansas
http://pj.freefaculty.org  http://crmda.ku.edu


Re: Re: esint.sty in RedHat/Centos 7. Where? Why omitted?

2015-04-07 Thread Paul Johnson
I think I've got to bottom of esint problem on Centos/RedHat.

There simply is no esint.sty available.

#  yum install 'tex(esint.sty)'
Loaded plugins: fastestmirror, langpacks
base | 3.6 kB 00:00
epel/x86_64/metalink |  14 kB 00:00
extras   | 3.4 kB 00:00
pjku | 2.9 kB 00:00
updates  | 3.4 kB 00:00
Loading mirror speeds from cached hostfile
 * base: mirror.team-cymru.org
 * epel: kdeforge2.unl.edu
 * extras: bay.uchicago.edu
 * updates: mirror.team-cymru.org
No package tex(esint.sty) available.
Error: Nothing to do

The RedHat/Centos packagers did not include esint, on the grounds that
the particular integrals provided there are probably available
elsewhere. On Fedora, however, the full TexLive collection includes
about 3 times as much stuff, and one of the packages is the one we
need,

# rpm -qa | grep esint
texlive-esint-type1-svn15878.0-1.1EL7.noarch
texlive-esint-svn15878.1.1-1.1EL7.noarch

I got the source packaging from Fedora and built the whole TexLive
snapshot on EL7. I couldn't believe my eyes. They've split TexLive
into 5500 packages. You can see, I put them in the repo I maintain.

http://pj.freefaculty.org/EL

I did install the esint and apa6 packages, but in this test system, I
left the TeXLive that was delivered with Centos in place. LyX 2.1.2
works well in this Centos system.

I believe this may not be entirely necessary, however.  The esint
package is not truly required to compile an elementary document.
However, inside LyX, there is a switch under document / settings that
says use esint automatically. I think that doesn't work properly, it
tries to use esint even on an
ordinary integral.  If we change esint to "do not load" then the basic
document compiles.

I see a few other wrinkles in Centos with documents that have
bibliographies (references filled with (?) but LyX does not throw an
error). If I figure those things out, I'll let you know.


On Thu, Mar 26, 2015 at 7:12 AM, José Matos  wrote:
> On Wednesday 25 March 2015 12:51:53 Paul Johnson wrote:
>> Hello, Jose.
>>
>> Am I typing this incorrectly?
>>
>> # yum install tex(esint.sty)
>> bash: syntax error near unexpected token `('
>>
>
> Could you try
>
> # yum install 'tex(esint.sty)'
>
> that idea is to avoid having bash interpret the parenthesis. In my case I get:
>
> # yum install 'tex(esint.sty)'
> ...
> Package 4:texlive-esint-svn15878.1.1-6.fc22.noarch already installed and 
> latest version
> Nothing to do
>
> Regards,
> --
> José Abílio



-- 
Paul E. Johnson
Professor, Political Science  Assoc. Director
1541 Lilac Lane, Room 504  Center for Research Methods
University of Kansas University of Kansas
http://pj.freefaculty.org   http://quant.ku.edu


Re: esint.sty in RedHat/Centos 7. Where? Why omitted?

2015-03-25 Thread Paul Johnson
On Tue, Mar 24, 2015 at 6:53 AM, José Matos  wrote:
> On Saturday 21 March 2015 22:38:09 Paul Johnson wrote:
>> Can somebody explain the problems surrounding packaging of esint.sty?
>
> Note that I am writing this from Fedora, so I am not sure that all applies to 
> RHEL/CentOS (although I suspect it does).
>
> Since the tex installed comes from texlive that means that all the (la)tex 
> packages have been split into its package.
>
> If you want to install something like the previous mega packages, there are 
> several schemes available:
>
> $ yum list texlive-scheme*
> .
> texlive-scheme-basic.noarch
> texlive-scheme-context.noarch
> texlive-scheme-full.noarch
> texlive-scheme-gust.noarch
> texlive-scheme-medium.noarch
> texlive-scheme-minimal.noarch
> texlive-scheme-small.noarch
> texlive-scheme-tetex.noarch
> texlive-scheme-xml.noarch
>
> If you install texlive-scheme full you will get all the packages. Medium 
> should be a nice compromise.
>
>> On a fresh install of RHEL 7, I find LyX 2.1 works well enough, except
>> the old problem about missing esint.sty re-appears. Any documents with
>> integrals won't compile because esint.sty is missing.
>
> Could you try:
>
> # yum install tex(esint.sty)
>
> And see if this works?
>

Hello, Jose.

Am I typing this incorrectly?

# yum install tex(esint.sty)
bash: syntax error near unexpected token `('

I searched like this:

# yum provides esint.sty
Loaded plugins: fastestmirror, langpacks
base
  | 3.6 kB  00:00:00
epel/x86_64/metalink
  |  15 kB  00:00:00
epel
  | 4.4 kB  00:00:00
extras
  | 3.4 kB  00:00:00
pjku
  | 2.9 kB  00:00:00
updates
  | 3.4 kB  00:00:00
epel/x86_64/primary_db
  | 4.0 MB  00:00:00
(1/2): epel/x86_64/updateinfo
  | 317 kB  00:00:00
(2/2): epel/x86_64/pkgtags
  | 1.4 MB  00:00:00
Loading mirror speeds from cached hostfile
 * base: mirror.trouble-free.net
 * epel: mirror.oss.ou.edu
 * extras: centos-mirror.jchost.net
 * updates: mirrors.centarra.com
epel/x86_64/filelists_db
  | 6.1 MB  00:00:00
updates/7/x86_64/filelists_db
  | 3.9 MB  00:00:00
No matches found

There is a separate package for this in Fedora, texlive-esint, but not
in any EL7 repos I could find.

http://koji.fedoraproject.org/koji/rpminfo?rpmID=5907414

I'd like to build my own version of that RPM, but apparently I have to
rebuild the whole texlive package for Fedora in order to do that.  I
made the mistake once of doing that in the RHEL 5 era, may do again.

I'll keep trying, will let you know

pj



> Note that this will work for all other .sty file.
>
>> In Ubuntu systems there is no similar problem.  I find esint.sty is
>> included in a package texlive-latex-extra.  I'm not finding it in
>> similar on RedHat, but I have to admit that their "new improved"
>> package management system is somewhat unhelpful.
>>
>> I searched long enough to see there is some peculiar history with
>> packaging of esint.sty. I DO find the Fedora package in rpmfind.net
>> "texlive-esint-...".  I will rebuild that on the EL7 systems if I have
>> to. But I can't see why this is necessary at all.
>>
>> pj
>
> I guess that there is a missing requirement for texlive packages in 
> Fedora/EPEL, if that happens again please report it here or on Redhat 
> bugzilla.
>
> That type of issues in on my TODO list to determine a minimum list of 
> dependencies for the lyx rpms on Fedora/EPEL.
>
> Regards,
> --
> José Abílio



-- 
Paul E. Johnson
Professor, Political Science  Assoc. Director
1541 Lilac Lane, Room 504  Center for Research Methods
University of Kansas University of Kansas
http://pj.freefaculty.org   http://quant.ku.edu


esint.sty in RedHat/Centos 7. Where? Why omitted?

2015-03-21 Thread Paul Johnson
Can somebody explain the problems surrounding packaging of esint.sty?

On a fresh install of RHEL 7, I find LyX 2.1 works well enough, except
the old problem about missing esint.sty re-appears. Any documents with
integrals won't compile because esint.sty is missing.

In Ubuntu systems there is no similar problem.  I find esint.sty is
included in a package texlive-latex-extra.  I'm not finding it in
similar on RedHat, but I have to admit that their "new improved"
package management system is somewhat unhelpful.

I searched long enough to see there is some peculiar history with
packaging of esint.sty. I DO find the Fedora package in rpmfind.net
"texlive-esint-...".  I will rebuild that on the EL7 systems if I have
to. But I can't see why this is necessary at all.

pj

-- 
Paul E. Johnson
Professor, Political Science  Assoc. Director
1541 Lilac Lane, Room 504  Center for Research Methods
University of Kansas University of Kansas
http://pj.freefaculty.org   http://quant.ku.edu


new warning about missing cls file in LyX 2.0.7 annoying

2014-02-25 Thread Paul Johnson
Hey, developers. Can you make LyX look in the current working directory for
class files and turn off the warnings the pop up with LyX 2.0.7? Please?

For our doctoral students, I worked out a LyX example (LaTeX as well) and
it uses a custom class file. I have the cls file in the document directory.
Along with a biblio style and the document itself.  All was well until LyX
2.0.7

http://pj.freefaculty.org/guides/Computing-HOWTO/KU-thesis/

(I'd like advice on how to create a real LyX template that would conceal
the ERT in the LyX main document, but that's a different email I need to
write to you).

The PDF output passed the inspection of our administrators, and we have
started teaching students how to use this. So far, there have been 6
dissertations written with LyX at KU.

LyX 2.0.7 seems to have introduced a new warning that is driving the users
crazy. I had never seen it before this Saturday.  Maybe this is just in
Windows. Every time they open the LyX dissertation document, warnings pop
up over and over saying the kuthesis.cls file is not installed and they
cannot compile anything until they get it.

I say ignore those warnings, click OK 5 times, the document compiles, all
is well. But I'd rather not bother with the warnings.

I suppose you are thinking I should teach them LaTeX distribution
maintenance so they can install the cls file. I want to resist. It should
not be needed. Windows has made doing even the most basic user accountant
maintenance chores into a frustrating battle for users.  I don't think it
should be necessary, just make LyX take notice of the cls file in the
current working directory and move on.

Just to whine about Windows for a while, since I complain all the time
about it.  I spent Saturday afternoon installing LyX on student computers
and no two Windows systems behaved in the same way to the LyX install.  The
new installer works quite nicely, really, except for interaction with the
MikTeX package manager is still problematic.  It hangs the LyX process
completely on about 1/2 of the systems we tried. There can be a silent
failure of communication between LyX and MikTeX, I've never gotten to the
bottom of it.

I realize now the right thing is to just ask for help in preparing
instructions for MikTeX users. For people that have admin powers, here is
what to do. Maybe you double check me.

1. Find your MikTeX under c:\Program Files 

2. Find a subdirectory in there texmf\tex\latex. You might have to search
for it, but it is certainly under the main MikTeX folder

3. You could drop the kuthesis.cls file into that directory, but don't.
Please be tidy. Inside tex\latex, make a directory, call it whatever you
want. For example, we used "misc" or "kuthesis".

But, wait, you are not done yet. MikTeX does not know about that file.

4. In the Start Menu, find the MikTeX settings (admin) program, there
should be a button on the first panel that says "update FNDB", which will
have the same effect as "texhash" on Linux & mac systems. It indexes the
class & style files.  I found it difficult to describe to people how to
find this menu on Windows 8, so I said get a command box open as
administrator and run this at the prompt:

*> initexmf --update-fndb*

The only tricky part there is getting the command box with admin powers. On
the start screen, type "cmd" and when it suggests a program, right click
the launcher, choose run as administrator.

5. Run Lyx, do Preferences -> Reconfigure.  Hopefully, all is well after
you close LyX and re-start.

In my experience, this is the least error probe method, but it only works
for people who have admin powers to write in tex\latex.

We did not succeed on the system where the user could not be the
administrator. I realize there are documents that say a local Windows user
can set up a personalized LaTeX tree, but I've not seen it succeed with my
own eyes. We did try, adding a folder in the hidden AppData folder of the
user account

pj

-- 
Paul E. Johnson
Professor, Political Science  Assoc. Director
1541 Lilac Lane, Room 504  Center for Research Methods
University of Kansas University of Kansas
http://pj.freefaculty.org   http://quant.ku.edu


Re: bold matrix and vector. Need customization help.

2013-02-24 Thread Paul Johnson
On Sun, Feb 24, 2013 at 1:43 PM, Paul A. Rubin  wrote:
> I would use a math macro (section 22.2 of Help > Math). Create the macro
> somewhere near the front of the document (Insert > Math > Macro inside a math
> inset). If the symbol you are bolding is always 'x', define a macro with an 
> easy
> to type name (say \XX or \bX) that has no arguments and inserts the LaTeX code
> including the 'x'. If you have a few symbols, maybe do one such macro for 
> each.
> If you have a lot of symbols, create a macro (say \bv) that takes an argument
> and then hit every vector over the head with it (replace 'x' with '\bv{x}' 
> etc.).
>

Thanks. This is what I was trying before.  Alls well that ends well.
Your comment made me try harder to wade through  the documentation.
This is difficult to describe.

In case another user needs help with LyX macros, here is what I found out.

I hit the "\foo :=" button to create my macro.

That opens a box with 3 parts. There's the macro definition, and two
boxes that say TeX and LyX.

When I start, I see like this
__
\newmacroname:  |_|  |_|
  TeX LyX

First, rename the thing on the left. It provides the starting
backslash, Don't add another one. Just replace the letters
"newmacroname" with "vb" or something nice.

Caution: the macroname must also include the argument definition.  You
must not simply type "vb{#1}", even if that is what you really want.
If you type {#1}, LyX will show that in big blue letters. It is trying
to make "#1" part of the name, rather than an argument.

LyX GUI has a tool to define the argument.  When you open the macro
editor, LyX pops up a menu similar to the math editor. Use that! In
there I choose the two green braces like {} with a popup "append
argument". Hit that button, and the macro editor inserts {#1} at the
end of your macro name and it also plops a #1 into the "TeX" box.

The documentation says, "The wanted formula is inserted in the first
blue box."  How it gets in there is the big mystery to me.

After I did the "append argument" button, the last two boxes look like this:
 _  _
|#1|  |_|
TeX LyX

It is a bit tricky to put the desired macros into the box on the left.
You can't just type them. My first try was to just type;

\bm{\mathrm{#1}}

Epic fail. Just as I could not type #1 in my macro name, I can't type
it here. Typing #1 leads to a big blue #1, where LyX thinks I mean the
math symbols are #1, not that I mean the argument placeholder.

So I have to go back and figure a way to enter my \bm{\mathrm{}} so
that wraps itself around the #1 that the append argument button
inserted for me.

I've not found a perfectly safe way to do that.  I highlight the #1 in
the little box, then what?

When I type in \bm, that "disappears".  Then I type \mathrm, it
disappears.  Which to type first? My first guess was that I'd type
"\mathrm" as the inner argument, and then \bm.
That's backwards, It turns out.

I get a different result if I write the macro as \mathrm{\bm{}} or
\bm{\mathrm{}}, so getting the macro correct is a hit-and-miss
proposition.  With View Source turned on, I can see that LyX is
creating markup for my macro like this:

\global\long\def\vb#1{\mathrm{\bm{#1}}}

That has \mathrm and \bm backwards. After some fiddling, the view
source shows me this:

\global\long\def\vb#1{\bm{\mathrm{#1}}}

And then my \vb math macro seems to work as intended.

What goes in the little box called "LyX"? I don't know.

Maybe section 22.2 of Math begins with a too-difficult example.

pj


> Paul
>



-- 
Paul E. Johnson
Professor, Political Science  Assoc. Director
1541 Lilac Lane, Room 504  Center for Research Methods
University of Kansas University of Kansas
http://pj.freefaculty.org   http://quant.ku.edu


helping Windows-user: document with lots of invalid characters

2012-04-07 Thread Paul Johnson
Greetings, LyX Land:

I've encouraged people to learn to use LyX, so when they run into trouble,
I feel responsible to try and help.  I use Linux to prepare documents, so
I have not experienced this problem before.  Many people still use Windows
and MS word and such, and so they do things that I would not expect, and
I am frustrated when these things arise.

I think the question I need to ask you is this: How can I find out what encoding
is currently used in the LyX document and what should it be to make it
work properly?
And how can I wrestle all of the characters into the correct encoding? Is there
no magic want to scan a lyx text file and change everything to a desired
encoding?

Here's the long version:

A student has LyX documents have lots and lots of
invalid characters.  I'm virtually certain most of these were inserted
into LyX by
a Copy & Paste from MS Word and/or Adobe Acrobat. In all of the places
where Word used an apostrophe, we seem to have an illegal character.  I
think quotation marks as well. Probably other characters. I'm pretty sure the
quotation marks and apostrophe problems result from Word's use of "smart
quotes" by default.

I wondered if we shouldn't open the LyX document in Emacs and then search
and replace the bad characters.   If I knew how to insert characters that LyX
would accept, I would do that.

I think she has a lot of the same trouble with her Bibliography, which
is a bib file
exported from Zotero.  I have had the problem in my own work that Zotero will
export unexpected encodings, such as the long dash in place of -- in
page numbers.
But in the student's document, all of the dates of the citations show
up as 
when LaTeX processes the document.

So, how to fix this up?

First, How should she configure "Document Settings/ Language"?

She's from South East Asia, but writing in English.  So perhaps her PC
has more international language features than I'm used to.  For LyX
language encoding, "default" is not good?  How about utf8?
Or one of the other unicode options.

Incidentally, LyX has the Font button to select XeTeX, supported fonts.
why doesn't that fix the encoding problem?  A font selection is not the same as
encoding?

Second, we need to force the document to use only the desired encoding.
It is a bit outside my comprehension that a document would allow one to
paste in an invalid character, but that's just me.

But isn't there a way to convert the characters in one command?

In Linux, I'd try a program like "iconv", if I had a good guess for what
the "from" encoding should be.

I'd appreciate any advice that I can assemble and pass along to the
students.

I expect that this hassle will end up discouraging everybody and they
revert back to MS Word.


-- 
Paul E. Johnson
Professor, Political Science    Assoc. Director
1541 Lilac Lane, Room 504     Center for Research Methods
University of Kansas               University of Kansas
http://pj.freefaculty.org            http://quant.ku.edu


Re: need working example of copier to customize pdf output

2012-03-01 Thread Paul Johnson
Oh, heck. I broke the regular export of the one-page at a time PDF
when I added my copier for the 4 sheets on one page.

Details below, please advise.


On Mon, Feb 27, 2012 at 2:15 PM, Richard Heck  wrote:
> On 02/27/2012 01:11 PM, Paul Johnson wrote:

When this finally seemed to work, I was so happy.  However, I see now
I've broken the pdf export.

The weird thing is that LyX asks me if I want to replace the old pdf
version, and I say yes, it still does not get copied.

Just now, I worked on lecture notes and exported to PDF(Beamer). I end up with
-rw-r--r--  1 337226 Mar  2 00:57 Regression-MultipleInputs-lecture-2-2x2.pdf
-rw-r--r--  1  56429 Mar  2 00:55 Regression-MultipleInputs-lecture-2.lyx
-rw-r--r--  1543209 Sep 29 12:17 Regression-MultipleInputs-lecture-2.pdf

I do get the 4 slides on 1 page output, the one with 2x2 on the end.
The lyx file is saved, but last semester's pdf is stuck there.

Here's what I'm using now.

In .lyx/preferences, I add:

\format "pdf5" "pdf" "PDF (Beamer)" "" "evince" "" "document,vector,menu=export"

\converter "pdflatex" "pdf5" "pdflatex $$i" "latex=pdflatex"

\copier pdf5 "pdfcopier.sh \"$$i\" \"$$o\""

And here's "pdfcopier.sh"

#!/bin/bash
INFILE="$1";
pdfnup --nup 2x2  --frame true --suffix '2x2' --batch "$INFILE";

Inside LyX, I can Export to PDF(Beamer) and it does export the file
with the 2x2 format, and the name is set correctly.
.
What do you think?

-- 
Paul E. Johnson
Professor, Political Science    Assoc. Director
1541 Lilac Lane, Room 504     Center for Research Methods
University of Kansas               University of Kansas
http://pj.freefaculty.org            http://quant.ku.edu


Re: need working example of copier to customize pdf output

2012-02-27 Thread Paul Johnson
On Sat, Feb 25, 2012 at 3:00 PM, Richard Heck  wrote:
> On 02/25/2012 01:43 PM, Paul Johnson wrote:

> Copiers are tied to formats, so you will need to create a new format first.
> Call it "PDF (beamer)", or something of the sort. When you do, you can
> assign a copier program. The copier will have to be responsible for the
> actual copying, as well as the conversion you want. Write a little shell
> script that takes two arguments, the input file and its output location. So
> something like:
>
> #!/bin/bash
> INFILE="$1";
> OUTFILE="$2";
> if [ -z "$OUTFILE" ]; then exit 1; fi
> pdfnup -nup 2x2 --suffix 2x2' --frame true --output "$OUTFILE" --batch "$1";
>
> Save it somewhere in your path, say to /home/you/bin/pdfcopier.sh, make it
> executable, and then enter
>    pdfcopier.sh "$$i" "$$o"
> into the copier field for your new format.
>
> Richard
>

Thanks, Richard.

I think I'm missing a converter line in preferences. Well, I still
don't understand how the ordinary work of pdflatex is supposed to get
done before my copier gets called.

I created the pdfcopier shell script you mention, it is in the path.

I run into some trouble configuring preferences in LyX. Can we just
talk about what is in preferences itself? The LyX preferences gui is
difficult for me.

What do I need for "short name".  I was guessing something unique like "pdf5".

#
# FORMATS SECTION ##
#

\format "pdf5" "pdf" "PDF (BEAMER)" "" "evince" "auto"
"document,vector,menu=export"

#
# COPIERS SECTION ##
#

\copier pdf5 "pdfcopier.sh \"$$i\" \"$$o\""


That fails thusly:

$ lyx -e pdf5 hpcexample-1.lyx
Error: Couldn't export file

No information for exporting the format PDF (BEAMER).


PDF (BEAMER) does not show in the LyX export menu.


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


need working example of copier to customize pdf output

2012-02-25 Thread Paul Johnson
I'm generating a lot of slide shows for my statistics class. Sometimes
I forget to run the followup program
to create a compressed version of the presentation. It want to make
that automatic.[1]

When I export a document in pdf from a Beamer slides project, I also
want this shell program to run.
It automatically creates another pdf document that is 4 slides on one page.

#!/bin/bash

pdfnup --nup 2x2 --suffix '2x2' --frame true --batch $1


pdfnup is from package called "pdfjam" on Debian Linux. The output is
awesome, quick, convenient.


I am reading the LyX customization manual about copiers, but I just
can't understand it!

I don't want to destroy the existing copy behavior that writes the PDF
output to the document folder,
I just want that additional command to run.  But I don't want this 2x2
PDF type for all PDF I create,
just for the Beamer slide projects.

Thanks in advance.


[1] I've got example output here, in case you want to see what I mean:

http://pj.freefaculty.org/guides/stat/Regression/ElementaryOLS

I just upload the full working directory, let the students take the
source code or the pdf output,
or the 2x2 pdf output.

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: horizontal alignment of graphics and ERT table

2011-11-18 Thread Paul Johnson
On Fri, Nov 18, 2011 at 9:23 AM, Paul Johnson  wrote:
> On Fri, Nov 18, 2011 at 1:23 AM, Liviu Andronic  
> wrote:
>> On Fri, Nov 18, 2011 at 7:40 AM, Paul Johnson  wrote:
>>> I wrote a test in LyX and have trouble getting a graphic to sit "side
>>> by side" with a LaTeX table.
>>>
>>> http://pj.freefaculty.org/latex/test2-part2.pdf
>>>
Liviu's pointer led me off into a search through a lot of pages about
horizontal alignment of latex graphics.

The simplest workaround I've found so far is to wrap the troublesome
graphic,  table or minipage in
\raisebox{10mm}{   graphic or table  }

That lifts up the troublesome thing 10mm.  If you want to lower the
thing, put a negative number.  Here are the "new" versions, where I've
tested this both with simple side-by-side minipages (not in table
cells) and minipages or tables inside cells. Either way, you can
manually force things into line

http://pj.freefaculty.org/latex/test2-part2-new.pdf
http://pj.freefaculty.org/latex/test2-part2-new.lyx

This is not entirely satisfactory, we wish it were automatic.



-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: horizontal alignment of graphics and ERT table

2011-11-18 Thread Paul Johnson
On Fri, Nov 18, 2011 at 1:23 AM, Liviu Andronic  wrote:
> On Fri, Nov 18, 2011 at 7:40 AM, Paul Johnson  wrote:
>> I wrote a test in LyX and have trouble getting a graphic to sit "side
>> by side" with a LaTeX table.  After fiddling around with this for
>> quite a while, my bright idea was to nest them both in a 1x2 tabular,
>> but it always seems like the table (inside a minibox) wants to sink to
>> the bottom of the right side of the table, while the figure wants to
>> float to the top.
>>
>> Would you mind looking at the output? I've got one example like this
>> on page 1 and another on page 5.
>>
>> http://pj.freefaculty.org/latex/test2-part2.pdf
>>
>> I do want to have the graphic and the table side by side, but I'm open
>> to making this happen any way you recommend.
>>
> I feel that this is related to this discussion [1], which suggests
> several solutions.
>
> [1] http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg167267.html
>
Thanks very much for the pointer.  I agree that is aimed at the problem I see.
>
>> This is an out-of-the-usual document. It is Sweave'd through R to
>> generate the graphic and the regression output, and I don't expect
>> most people will want to bother to try to compile it. Nevertheless, I
>> uploaded the LyX file, in case you want to look it over.
>>
>> http://pj.freefaculty.org/latex/weirdRotations-lyx.tar.gz
>>
> I'm not sure that this is the file that you intended to link to, since
> it has little to do with the PDF above.
>

Dammit.  My copy/paste skills are getting worse and worse.  Here's the
correct link to the suspicious file:

http://pj.freefaculty.org/latex/test2-part2.tar.gz


> Regards
> Liviu
>
>
>> --
>> Paul E. Johnson
>> Professor, Political Science
>> 1541 Lilac Lane, Room 504
>> University of Kansas
>>
>
>
>
> --
> Do you know how to read?
> http://www.alienetworks.com/srtest.cfm
> http://goodies.xfce.org/projects/applications/xfce4-dict#speed-reader
> Do you know how to write?
> http://garbl.home.comcast.net/~garbl/stylemanual/e.htm#e-mail
>



-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


horizontal alignment of graphics and ERT table

2011-11-17 Thread Paul Johnson
I wrote a test in LyX and have trouble getting a graphic to sit "side
by side" with a LaTeX table.  After fiddling around with this for
quite a while, my bright idea was to nest them both in a 1x2 tabular,
but it always seems like the table (inside a minibox) wants to sink to
the bottom of the right side of the table, while the figure wants to
float to the top.

Would you mind looking at the output? I've got one example like this
on page 1 and another on page 5.

http://pj.freefaculty.org/latex/test2-part2.pdf

I do want to have the graphic and the table side by side, but I'm open
to making this happen any way you recommend.

This is an out-of-the-usual document. It is Sweave'd through R to
generate the graphic and the regression output, and I don't expect
most people will want to bother to try to compile it. Nevertheless, I
uploaded the LyX file, in case you want to look it over.

http://pj.freefaculty.org/latex/weirdRotations-lyx.tar.gz

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: LyX with pgfplotstable

2011-09-27 Thread Paul Johnson
It seems to me you are working very hard there. If you are willing to
write out a path, can I suggest a simpler solution? Did you try just
writing in a path, as:

\pgfplotstabletypeset{/home/florian/Documents/lyx/example1.dat}

This is how I insert data in Sweave documents.  I have no reason to
believe it does/does not work with pgfplotstabletypset (since I've
never heard of it). But I just tried several test cases and both
"input' and "includegraphics" are OK:

\includegraphics{/home/pauljohn/ps/SVN-guides/Rcourse/plot-1/plots/t-bar06.pdf}

PJ

On Tue, Sep 27, 2011 at 7:34 AM, Florian Wilhelm
 wrote:
> Mukhtar Ullah  informatik.uni-rostock.de> writes:
>
>>
>> Follow this thread.Although about Inkscape but it addresses the same issue.
>> http://thread.gmane.org/gmane.editors.lyx.general/71928
>>
>> Mukhtar
>>
>>
>
>
> Thanks. I found a more suitable solution for me.
> - Open Command Buffer (Alt+X)
> - Type: info-insert buffer path
> - Result: A macro with the document's current path
> - Surround this macro with ERT to include whatever
>  you want to include like:
>
> ERT[\pgfplotstableread{]
> MACRO[/home/florian/Documents/lyx/]
> ERT[benchmarks/benchmarks.dat} \datatable]
>
> where ERT[...] is TeX code inserted with CTRL+L
> and MACRO[...] the aforementioned info-insert macro.
>
>



-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Lyx 2 windows install. babel missing from LyX-Installer-Bundle ??

2011-08-30 Thread Paul Johnson
Hi

I use Linux, but I tell my students who use windows to give LyX a try.
We had pretty good success with LyX-1.6.x, but the students say they
can't get 2.0 to work. I ignored them at first.  I decided to prove
that it works by filming a Screencast.  I created a Windows 7 32 bit
virtual machine and have tried to install lyx 2.0.0-3 in there. I've
tried both the LyX bundle and just Lyx with the net installer for
Miktex. Neither one works for me.

>From the Bundle, "lYX-2.0.0-3-Installer-Bundle.exe",  the LyX install
works fine.  That seems backwards to me, LyX should install itself
only after MikTeX works, nevertheless, it does trigger a MikTeX
install after LyX.  At the outset, I chose to set my papersize at
letter and to allow on-the-fly package installation. , it copies some
files and then dies. A pop up window appears:

"MikTeX Setup Wizard: The operation could not be completed for the
follwing reason: Windows API error 2: The  system cannot find the file
specified.
Details: C:\Program Files\MikTeX 2.9\tpm\packages\babel.tpm"

And then this pops up after:

MikTeX Setup Wizard: A problem caused the program to stop working
correctly. Windows will close the program and notify you if a solution
is available.

It is rather annoying that one cannot try to run the
Lyx-Installer-Bundle again in order to pick up where it died without
doing a complete re-install of LyX itself.

WHen I try the nonbundle installer, the one that triggers a net
install of MikTeX, I see the error popup

"Downloading MikTeX failed. Would you like to try again? (HTTP/1.1 404
Not Found)


I've gone to the MikTeX site and grabbed a copy of their installer. I
notice that when I run that, it forces me to choose a Mirror.  It is
not clear to me why the LyX installer does not cause me to do the
same.


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Space around floats

2011-08-28 Thread Paul Johnson
Hi

On Fri, Aug 26, 2011 at 2:58 AM, Lastalda  wrote:
> I'm trying to write my diploma thesis in Lyx. So far I'm managing mostly
> fine, but I'm very annoyed by the huge free space Lyx creates around floats.
> It looks terrible - and it's most annoying when this space is the only
> reason that the last 1 or 2 lines of a subsection are jostled to the next
> page.
> Example:
> http://lyx.475766.n2.nabble.com/file/n6727759/Diplomarbeit7%2B8.pdf
> Diplomarbeit7%2B8.pdf

That document is not available to me now, but can I suggest something
(just guessing after helping lots of students)?  Find out why your
inserted document has so much white space around it.

WHen my students make figures with R, for example, sometimes they are
careless. A postscript file that is not created correctly has no
bounding box, and so LaTeX sees a whole page where you see only a
small figure.  In pdf figures, the default will mark off giant margins
and LaTeX respects what is in the figure.

I do LaTeX documents all the time and I never see any huge margins if
the graphics are created correctly.

pj

ps. graphics are not automatically centered in figures, but there is
preamble magic to make them all come out that way. Here's part of the
boilerplate I use:


\usepackage{ifthen}
\renewenvironment{figure}[1][]{%
 \ifthenelse{\equal{#1}{}}{%
   \@float{figure}
 }{%
   \@float{figure}[#1]%
 }%
 \centering
}{%
 \end@float
}


\renewenvironment{table}[1][]{%
 \ifthenelse{\equal{#1}{}}{%
   \@float{table}
 }{%
   \@float{table}[#1]%
 }%
 \centering
}{%
 \end@float
}




-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Anybody make a ScreenCast video of the LyX WIndows installation?

2011-08-26 Thread Paul Johnson
Is there a movie demonstrating the Windows install of LyX (from start to end?).

Why I wish it were so:

I'm using Linux, but I have installed it in the occasional Windows
system.  The install is not like other Windows programs, there are
lots of ways people get it wrong and have to start over.  I've gotten
the install wrong and started over, students seem to hit that as well.
 One came in yesterday saying he couldn't compile to dvi.  I have no
idea how that happens.

Now I'm teaching 50 people in a stats class and I don't have time to
install LyX for all of them individually. I feel certain that if a
video could convey the idea that a sequence of separate pieces is to
be installed, and we need to make sure they all get done, one by one,
then the whole problem could be addressed.

PJ

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Including SAS output in latex

2011-02-12 Thread Paul Johnson
On Mon, Feb 7, 2011 at 12:51 AM, Sid Sahgal  wrote:
> Hello,
>     I am a new Lyx user. I want to include a latex file created by SAS ( a
> statistical software program). I follow the instructions on this website
> http://support.sas.com/rnd/base/ods/odsmarkup/latex.html.

Greetings

I've been doing a lot of stats work lately and I think I can suggest
an alternative that will be a bit better.

The Lyx insert-> listings menu creates a little box, where you can
paste output if you want. Turn on the view latex option  in lyx.
Insert a program listing object, note this is very customizable.  A
listings box has right click config, set the language to SAS. It may
be exactly what you need.  In the latex code box, you see what lyx is
doing,

\begin{lstlisting}[language=SAS]

The output format for listing boxes is easily customizable, of course,
and there are many pre-defined styles for various languages.  I don't
happen to find a pre-defined one that matches my needs, but I have
learned that the preamble can define your own style to look the way
you want.   You experiment with that, and then your next step can be
to save your sas in separate text files and then use LaTeX input
commands to bring the file into your document.  As you note this is
nicer than re-running and then cutting and pasting again from Excel.

Here's a document i made in that way

http://pj.freefaculty.org/ps909/terminal-2.pdf

I'm pasting in the whole preamble below.  I needed to have listings
appear as-if they were from Sweave, but in fact they are not.  This
just takes the Rstyle that Frank Harrell created at Vanderbilt and
then extracts the customized listings commands.
It creates 2 styles for listings, "Rstyle" and "Routstyle" and then in
the document, when a listing, you can just use the LyX
insert->listings, and if you have the "view latex source" turned on,
you see the code it uses is:


\begin{lstlisting}
vi newthing.txt # The old school editor, probably strictly black and white
\end{lstlisting}

Because my preamble uses "lstset" to put "Rstyle" as the default, this
gives output with the right listings. But you can easily change. You
can either type this in ERT or in the listings optional settings,
there is a last menu tab where you can type on the right side
"style=Routstyle", and the LaTeX markup ends up like this:

\begin{lstlisting}[style=Routstyle]
vi newthing.txt # The old school editor, probably strictly black and white
\end{lstlisting}

I DO NOT know the difference in meaning of "language" and "style" as
listings options, I've been doing this with styles, but as I inspect
what lyx does with the pull down menus (monitor the latex view,
again), I see it does language.

Now, how to input a separate file into a listing environment? The
manual for listings says you can do:

\lstinputlisting[language=SAS]{example.sas}

I just tested and found it accepts both options at the same time as well:

\lstinputlisting[language=SAS,style=Routstyle]{example.sas}

Oh, well.  I see this is difficult to describe.

I just decided to make you a working example:

http://pj.freefaculty.org/latex/smallExample.lyx

My example is a Beamer slide presentation, and there is a complication
that listings is not compatible with the default slide frame, so I
have to put those in in ERT. But if you download my example, I think
you can make it work.  Please note: Supply your own "example.sas" in
the working directory.

I hope this is my good deed for the day. Or I've not done too much damage.

pj

%%%That preamble, then %%

\usepackage{dcolumn}
\usepackage{booktabs}

% use 'handout' to produce handouts
%\documentclass[handout]{beamer}
\usepackage{wasysym}
\usepackage{pgfpages}
\newcommand{\vn}[1]{\mbox{{\it
#1}}}\newcommand{\vb}{\vspace{\baselineskip}}\newcommand{\vh}{\vspace{.5\baselineskip}}\newcommand{\vf}{\vspace{\fill}}\newcommand{\splus}{\textsf{S-PLUS}}\newcommand{\R}{\textsf{R}}


\usepackage{graphicx}
\usepackage{listings}

\mode
{
  \usetheme{KU}
  \usecolortheme{dolphin} %dark blues
}

\usepackage{fancyvrb}
% In document Latex options:
\fvset{listparameters={\setlength{\topsep}{0em}}}
\def\Sweavesize{\normalsize}
\def\Rcolor{\color{black}}
\def\Rbackground{\color[gray]{0.95}}

\providecommand{\Rcolor}{\color[rgb]{0, 0.5, 0.5}}
\providecommand{\Routcolor}{\color[rgb]{0.461, 0.039, 0.102}}
\providecommand{\Rcommentcolor}{\color[rgb]{0.101, 0.043, 0.432}}

\providecommand{\Rbackground}{\color[gray]{0.91}}
\providecommand{\Routbackground}{\color[gray]{0.935}}
% Can specify \color[gray]{1} for white background or just \color{white}


\lstdefinestyle{Rstyle}{fancyvrb=false,escapechar=`,language=R,%
basicstyle={\Rcolor\Sweavesize},%
backgroundcolor=\Rbackground,%
showstringspaces=false,%
keywordstyle=\Rcolor,%
commentstyle={\Rcommentcolor\ttfamily\itshape},%

literate={<-}{{$\leftarrow$}}2{<<-}{{$\twoheadleftarrow$}}2{~}{{$\si

Re: Ubuntu 10.10 - Unsuccessful installation

2011-02-11 Thread Paul Johnson
on Fri, Feb 11, 2011 at 9:55 AM, stefano franchi
 wrote:
>> Try
>> ./configure --with-version-suffix=-svn --enable-build-type=release
>>
>
>
> I haven´t tried beta4, but later svn releases compile fine on my
> Ubuntu 10.10 installation.
> I do use the same configure options Liviu mentioned (see above).
>
>
> Stefano
>

On my Ubuntu 10.10 with the all of the "pre-packaged" compilers and
qt, I get a completely clean compile with all of the usual procedures.

And I have the full build output to prove it:

http://pj.freefaculty.org/latex/lyxbuild.txt

Because I saved all the output.  And I suggest the people who have
trouble on Ubuntu do the same virtuous thing so we can actually see
the whole dead body to perform the autopsy.  (Sorry, watching too many
CSI lately).

$ ./configure --prefix=/tmp/lyxb4 > lyxbuild.txt 2>&1

$ make >> lyxbuild.txt 2>&1

$ make install >> lyxbuild.txt 2>&1

pj

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


hundreds of listings, 4 custom types.

2011-01-20 Thread Paul Johnson
I have a "how to" document with hundreds of code listings.  They do
not follow standard language definitions in lyx's listings options, I
have been trying to avoid doing the right-click on the listing to
customize every little bit in the output.

I'd like to write a lyx layout file that has the 4 types of listings
as environments or some other easy to choose way, and I'm a bit
stumped on how to do it.  I don't understand the FlexInset
documentation in the Customize guide, but before I hammer on that, I
need to make the plain old LaTeX markup work.  I can't even make a
successful LaTeX example using newenvironment.

If you look below at my example document "ex.tex", you see I'm using a
style file Sweavel, and I've attached that as well

Sweavel provides the listings idioms in its own way, this works in ex.tex:

\begin{Schunk}
\begin{Sinput}
A wopr example <-
\end{Sinput}
\end{Schunk}



So, I think to myself, I'll just put that in an environment and access
that from a LyX layout, but both latex and pdflatex can't process the
file. Here is what I tried:


In the preamble, add

\newenvironment{whopr}
{\begin{Schunk}\begin{Sinput}}
{\end{Sinput}\end{Schunk}}

Then use it

\begin{whopr}
some stuff
\end{whopr}

When I include those 3 lines, the compile just stops at an asterix.
There's no error, it just dies like so:

Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and firstline=lastline fix
<2008/02/07> (tvz)) (/usr/local/share/texmf/tex/latex/Sweavel.sty
(/usr/share/texmf-texlive/tex/latex/graphics/color.sty
(/etc/texmf/tex/latex/config/color.cfg)
(/usr/share/texmf-texlive/tex/latex/pdftex-def/pdftex.def))
(/usr/share/texmf-texlive/tex/latex/ltxmisc/relsize.sty)
(/usr/share/texmf-texlive/tex/latex/ae/ae.sty
(/usr/share/texmf-texlive/tex/latex/base/fontenc.sty
(/usr/share/texmf-texlive/tex/latex/base/t1enc.def)
(/usr/share/texmf-texlive/tex/latex/ae/t1aer.fd)))
(/usr/share/texmf-texlive/tex/latex/base/fontenc.sty
(/usr/share/texmf-texlive/tex/latex/base/t1enc.def))
(/usr/share/texmf/tex/latex/R/tex/latex/upquote.sty
(/usr/share/texmf-texlive/tex/latex/base/textcomp.sty
(/usr/share/texmf-texlive/tex/latex/base/ts1enc.def (./ex2.aux)
(/usr/share/texmf-texlive/tex/latex/base/ts1cmr.fd)
(/usr/share/texmf/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/share/texmf-texlive/tex/latex/listings/lstmisc.sty)
(/usr/share/texmf-texlive/tex/latex/listings/lstlang1.sty)
(/usr/share/texmf-texlive/tex/latex/listings/lstlang2.sty)
(/usr/share/texmf-texlive/tex/latex/listings/lstlang3.sty))
*



newenvironment will not cooperate with listings?

It is not absolutely vital for me to do this with Sweavel in
particular, but it does already provide the customized listings setup
to do what I want.

Schunk and Sinput are new environments in Sweavel, to save you trouble
of looking at full attached style file, here's the meat:


\newenvironment{Schunk}{}{}
\lstnewenvironment{Sinput}{\lstset{style=Rstyle}}{}


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


ex.tex
Description: TeX document
% Usage: \usepackage{Sweavel}
% To change size of R code and output, use e.g.: \def\Sweavesize{\normalsize}
% To change colors of R code, output, and commands, use e.g.:
% \def\Rcolor{\color{black}}
% \def\Routcolor{\color{green}}
% \def\Rcommentcolor{\color{red}}
% To change background color or R code and/or output, use e.g.:
% \def\Rbackground{\color{white}}
% \def\Routbackground{\color{white}}
% To use rgb specifications use \color[rgb]{ , , }
% To use gray scale use e.g. \color[gray]{0.5}
% If you change any of these after the first chunk is produced, the
% changes will have effect only for the next chunk.



\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{Sweavel}{}  % substitute for Sweave.sty using
 % listings package with relsize
\RequirePackage{listings,fancyvrb,color,relsize,ae}
\RequirePackage[T1]{fontenc}
\IfFileExists{upquote.sty}{\RequirePackage{upquote}}{}

\providecommand{\Sweavesize}{\smaller}

\providecommand{\Rcolor}{\color[rgb]{0, 0.5, 0.5}}
\providecommand{\Routcolor}{\color[rgb]{0.461, 0.039, 0.102}}
\providecommand{\Rcommentcolor}{\color[rgb]{0.101, 0.043, 0.432}}

\providecommand{\Rbackground}{\color[gray]{0.91}}
\providecommand{\Routbackground}{\color[gray]{0.935}}
% Can specify \color[gray]{1} for white background or just \color{white}


\lstdefinestyle{Rstyle}{fancyvrb=false,escapechar=`,language=R,%
basicstyle={\Rcolor\Sweavesize},%
backgroundcolor=\Rbackground,%
showstringspaces=false,%
keywordstyle=\Rcolor,%
commentstyle={\Rcommentcolor\ttfamily\itshape},%
literate={<-}{{$\leftarrow$}}2{<<-}{{$\twoheadleftarrow$}}2{~}{{$\sim$}}1{<=}{{$\leq$}}2{>=}{{$\geq$}}2{^}{{$^{\scriptstyle\wedge}$}}1,%
alsoother={$},%
alsolet

Re: Copying From PDF

2011-01-05 Thread Paul Johnson
On Tue, Jan 4, 2011 at 8:48 AM, Bruce Pourciau
 wrote:
> I have copied some passages from a pdf and pasted them into a LyX document.
> When I view this LyX document, the pasted in passages display some odd
> formatting: some lines extend beyond the margins and there seem to be extra
> spaces between some words. And the pasted in passages resist fixing.
>
> Any advice?
>

Others suggest doing more work to prepare the input material, but I'd
suggest you go in the other direction.

Close lyx.  make a copy of your lyx document.   Then:

Open that lyx file in an editor like Emacs, (any pure text editor will
do, Eclipse, Programmer's File editor, Notepad++, you get the idea?)
and you will be able to see that the funny formatting and other flaws
are caused by formatting markup that came in with your paste.  Quite
often, when I paste into LyX from other programs, there are all kinds
of set language and font commands.  If you look at a "normal" Lyx
paragraph, you will easily see what you have to do to fix the troubled
PDF part.  Just trim down to a working paragraph format, save, open
the document in LyX. And live happily ever after.

In times like this, it would be nice if LyX had an old-fashioned
"reveal codes" window like Word Perfect used to have.  When text comes
out funny, it is almost always because of some hidden formatting that
you didn't realize was there.



-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


inkscape with LaTeX markup: need an external document option?

2010-11-23 Thread Paul Johnson
I've been trying to understand how LyX's new (in 1.6.7) ability to
import svg via inkscape can cooperate with LaTeX markup.  I've been
experimenting with the inkscape "textext" extension, but, as others
have noticed, it is a bit dicey to install and sometimes has
unpredictable output.

As an alternative approach, it appears that inkscape 0.48 has an
exporter to make pdf_tex.  It is very similar to the ps+TeX approach
we used to use with xfig before LyX made the external document
interface to fig files.

There's a mention of this here:

http://wiki.inkscape.org/wiki/index.php/LaTeX

That points to CTAN here:

http://www.ctan.org/tex-archive/info/svg-inkscape/

I'm trying to see how that might work.  In the inkscape document, I
inserted text with markup $\gamma$.
Then in LyX I import as graphics, but the Latex markup does not get
converted to math.  It just appears as $\gamma$.

I've tested the CLI approach:

$ inkscape -D -z --file=draw.svg --export-pdf=draw.pdf --export-latex

It does work to create

draw.pdf

and

draw.pdf_tex

I can't seem to understand the last step of using that with LyX.

Suggestions?

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Noweb Sweave question: Need help to copy folder from lyx temp back to current document directory.

2010-08-28 Thread Paul Johnson
gmail just sent me a message that this post was not sent through on
Wednesday because it could not contact lyx-users. So I'm trying again.
Sorry if it is a repost.

In Sweave, we process a noweb document first through R to generate the
tex file, and then the usual processing occurs.

Because not all LyX/LaTeX systems have the noweb setup, it is
necessary for me to develop my document with Sweave/Lyx, and then save
the generated files (in a folder "plots") and use them in the final
document without invoking Sweave.  I do this with LyX branches. I have
a branch for the Sweave commands that generates the files in "plots",
and then I have \includegraphics{} or \input{} as needed.

It mostly works fine, there is just a wrinkle that bothers me. So far,
I have just used brute force to copy the whole "plots" folder from the
working directory back to the document root with a command inside the
document itself.

<>=
system("rsync -ra plots /home/pauljohn/ps/ps707/Workbook/Workbook-plot")
@

That is OK, except I have to "hardcode" the document directory.  And
no matter what I do, it seems like I have to process the document
through latex twice. The first time I run the process in LyX, it runs
the document through R Sweave and it makes the plots, but when the
pdflatex run happens,


LaTeX Error: Cannot determine size of grpahic in plots/plot-gss.pdf

After that, I check the plots folder in the document directory and the
files are copied over.  But they are not there "fast enough" to make
pdflatex happy? Really?

I was thinking there must be some work around in LyX config.  It the
LyX documents, I find info on converters and copiers and  $$p or  $$r.

The converter in .lyx/preferences, I have converters like so:

#
# CONVERTERS SECTION ##
#

\converter "literate" "latex" "R CMD Sweave $$i" ""
\converter "literate" "pdflatex" "R CMD Sweave $$i" ""
\converter "literate" "r" "R CMD Stangle $$i" ""
##

Put the copy on the end of the converter:

\converter "literate" "pdflatex" "R CMD Sweave $$i && cp -R plots $$r" ""

I believe it SHOULD work. The plot folder DOES get copied over.
However,  still not fast enough. I still see LaTeX errors:

LaTeX Error: Cannot determine size of graphic in plots/plot-gss.pdf

If I run everything through again, then the document goes get created.

But this is bad because the whole project has to be run through the R
Sweave process two times.

What do you think?

If you tell me how to fix this, I will feel happy.  In return, I will
show you the LyX file that uses Frank Harrell's Sweavel.sty (Sweave
using the listings class), which is nicer looking:

http://pj.freefaculty.org/latex/sweavel-01.pdf

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Noweb Sweave question: Need help to copy folder from lyx temp back to current document directory.

2010-08-27 Thread Paul Johnson
In Sweave, we process a noweb document first through R to generate the
tex file, and then the usual processing occurs.

Because not all LyX/LaTeX systems have the noweb setup, it is
necessary for me to develop my document with Sweave/Lyx, and then save
the generated files (in a folder "plots") and use them in the final
document without invoking Sweave.  I do this with LyX branches. I have
a branch for the Sweave commands that generates the files in "plots",
and then I have \includegraphics{} or \input{} as needed.

It mostly works fine, there is just a wrinkle that bothers me. So far,
I have just used brute force to copy the whole "plots" folder from the
working directory back to the document root with a command inside the
document itself.

<>=
system("rsync -ra plots /home/pauljohn/ps/ps707/Workbook/Workbook-plot")
@

That is OK, except I have to "hardcode" the document directory.  And
no matter what I do, it seems like I have to process the document
through latex twice. The first time I run the process in LyX, it runs
the document through R Sweave and it makes the plots, but when the
pdflatex run happens,


LaTeX Error: Cannot determine size of grpahic in plots/plot-gss.pdf

After that, I check the plots folder in the document directory and the
files are copied over.  But they are not there "fast enough" to make
pdflatex happy? Really?

I was thinking there must be some work around in LyX config.  It the
LyX documents, I find info on converters and copiers and  $$p or  $$r.

The converter in .lyx/preferences, I have converters like so:

#
# CONVERTERS SECTION ##
#

\converter "literate" "latex" "R CMD Sweave $$i" ""
\converter "literate" "pdflatex" "R CMD Sweave $$i" ""
\converter "literate" "r" "R CMD Stangle $$i" ""
##

Put the copy on the end of the converter:

\converter "literate" "pdflatex" "R CMD Sweave $$i && cp -R plots $$r" ""

I believe it SHOULD work. The plot folder DOES get copied over.
However,  still not fast enough. I still see LaTeX errors:

LaTeX Error: Cannot determine size of graphic in plots/plot-gss.pdf

If I run everything through again, then the document goes get created.

But this is bad because the whole project has to be run through the R
Sweave process two times.

What do you think?

If you tell me how to fix this, I will feel happy.  In return, I will
show you the LyX file that uses Frank Harrell's Sweavel.sty (Sweave
using the listings class), which is nicer looking:

http://pj.freefaculty.org/latex/sweavel-01.pdf

pj


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Biblio problem: extra 'crap' at end of citation

2010-07-27 Thread Paul Johnson
> On 23/07/2010 11:17 AM, Paul Johnson wrote:
>>
>> Hi, everybody.
>>
>> In the last year or so, I've been testing services like CiteULike and
>> Zotero to build a biblio database as I research.

>> I notice only one substantial problem. The citations from those online
>> services have extraneous information that I don't want to appear in
>> the bibliography.
>>
>> L’Ecuyer, P., Simard, R., Chen, E. J., and Kelton, W. D. (2002). An
>> Object-Oriented Random-
>> Number package with many long streams and substreams. Operations
>> Research, 50(6):1073–1075.
>> ArticleType: primary_article / Full publication date: Nov. - Dec.,
>> 2002 / Copyright  c 2002
>> INFORMS.
>>

Hi, everybody. I want you to know I found a good solution.

The BibTeX exporter in zotero includes stuff that most biblio styles
will include, even though you don't want them.

The fix is a better exporter from zotero.  The "low fat" and "non fat"
bibtex formats are just the fix I needed.  I found this by searching
in the zotero forum, the install is easy, just drop a java script file
in zotero/translators, and then use it to export to bibtex.

zotero-bibtex-sb is at this address:

http://github.com/commonman/zotero-bibtex-sb/blob/5d51eb68719b5415761af12dbea483649f8141c2/README.org

In case that link doesn't come through the email , just google "zotero
bibtex non fat" and you come to the right link at the top.

This does not work with LyZ (zotero plugin for LyX) because LyZ
doesn't have a place where you specify the translator, it always uses
the default. Probably would be easy to fix, though.

pj

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Biblio problem: extra 'crap' at end of citation

2010-07-23 Thread Paul Johnson
Hi, everybody.

In the last year or so, I've been testing services like CiteULike and
Zotero to build a biblio database as I research.  This works pretty
well to output the citations to a bib file and work with LyX.

I notice only one substantial problem. The citations from those online
services have extraneous information that I don't want to appear in
the bibliography.  But when I use natbib citations with a format like
"apalike" (or any other, as far as I can tell), the  extra info in the
bibtex data base comes into the final document.  I'm now pasting from
the pdf output from LyX

L’Ecuyer, P., Simard, R., Chen, E. J., and Kelton, W. D. (2002). An
Object-Oriented Random-
Number package with many long streams and substreams. Operations
Research, 50(6):1073–1075.
ArticleType: primary_article / Full publication date: Nov. - Dec.,
2002 / Copyright  c 2002
INFORMS.


The part that starts ArticleType and goes to the end is extraneous,
should not be printed.

The only fix I have found is to go through the bib file and just
manually delete that stuff.

But I know there must be a better way. yes?

pj

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Lyx + gnuplot epslatex

2009-12-24 Thread Paul Johnson
On Fri, Dec 11, 2009 at 12:21 PM, Jonathan Brandmeyer
 wrote:
> I am having difficulty using Gnuplot's epslatex output in conjunction
> with Lyx. Gnuplot itself is capable of separately providing EPS graphics
> as well as text and labels as Tex code. Strictly speaking, I'm using
> Octave as a front-end to Gnuplot, but that shouldn't matter.
>
> So, I have the .tex and the .eps files produced by gnuplot, and a .lyx
> file that attempts to use the file as input.
>


I'm testing this in Ubuntu. I am NOT "testme" it with LyX, since give
us a LaTeX file "testme.tex". Using your example code, I do get 2
graphs, one complete, one a skeleton. The second inclusion in your
file is a mistake.  With the attached "testme.tex", I get good dvi
output with "latex testme.tex" and if I create a pdf version of your
eps file and run pdf latex thus:

$ epstopdf tangent_impulse.eps
$ pdflatex testme.tex

Then I get good output as well.  This makes me believe the problems
you are having trace back to the availability of fonts to your LaTeX
processing system or your pdf viewer.

I also attach a LyX file "pjtest.lyx"  I created that DOES work to
include the tangent_impulse graphics and LaTeX markup.  For me, the
only required change from a basic lyx doc was to put
\usepackage{graphicx} in the preamble. I get both dvi and pdf output
that are fine.

HTH
pj

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


testme.tex
Description: TeX document


testme.dvi
Description: TeX dvi file


testme.pdf
Description: Adobe PDF document


pjtest.lyx
Description: application/lyx


Re: Drawing tool for LyX

2009-11-07 Thread Paul Johnson
On Sat, Nov 7, 2009 at 6:17 AM, Waluyo Adi Siswanto  wrote:
> Dear All
>
> I have been searching a drawing tool that generate LaTeX code then
> implemented (pasted) somewhere in LyX so I can get simple
> pictures/diagrams.
>
I just learned about a drawing program called "ipe" and I'm pretty
enthusiastic. I've also used xfig with Lyx, but ipe has a nicer
interface and you can type latex into the drawing.  it can save in pdf
or eps, and here is the magical thing.  ipe is smart enough to hide
its configuration settings inside the eps or pdf file and so ipe can
open the eps / pdf file and revise it.

I don't know if it is a plus for you, but ipe is available on all
major operating systems.


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Anyone used Lytex?

2009-09-29 Thread Paul Johnson
On Tue, Sep 8, 2009 at 3:13 PM, Sharma, Vivek  wrote:
> Hi
>
> I do not have administrative privileges at work computers but am so dependent 
> on using lyx for my writing and want to be able to use it on a USB drive or a 
> network drive that I have access to. I wondered if anyone has used Lytex  as 
> suggested in the wiki?
> I tried it and get error messages. The home page for Lytex does not give any 
> email addresses for requesting help.
>
> Regards
> Vivek
>
If I were you, I'd compile LyX in my user account. All it requires is
a --prefix option to build it to install under your home.  I build
things and run from /home/pauljohn/packages all the time.

pj

If you want us to advise you about "Lytex",  you should please provide
a precise URL so I can see what the hell you are talking about.


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: bibLatex with Lyx

2009-08-12 Thread Paul Johnson
you did not make a complete install of biblatex. It is much more than
just that one style file. In linux, these are the installed files from
biblatex:

usr/share/texmf
/usr/share/texmf/bibtex
/usr/share/texmf/bibtex/csf
/usr/share/texmf/bibtex/csf/biblatex
/usr/share/texmf/bibtex/csf/biblatex/bibtoolrsc
/usr/share/texmf/bibtex/csf/biblatex/winansi_no.csf
/usr/share/texmf/bibtex/csf/biblatex/latin1_se.csf
/usr/share/texmf/bibtex/csf/biblatex/latin9_se.csf
/usr/share/texmf/bibtex/csf/biblatex/latin9_no.csf
/usr/share/texmf/bibtex/csf/biblatex/latin1_no.csf
/usr/share/texmf/bibtex/csf/biblatex/latin1.csf
/usr/share/texmf/bibtex/csf/biblatex/README
/usr/share/texmf/bibtex/csf/biblatex/winansi_dk.csf
/usr/share/texmf/bibtex/csf/biblatex/latin9_dk.csf
/usr/share/texmf/bibtex/csf/biblatex/latin1_de.csf
/usr/share/texmf/bibtex/csf/biblatex/winansi.csf
/usr/share/texmf/bibtex/csf/biblatex/latin9.csf
/usr/share/texmf/bibtex/csf/biblatex/winansi_se.csf
/usr/share/texmf/bibtex/csf/biblatex/latin1_dk.csf
/usr/share/texmf/bibtex/csf/biblatex/latin9_de.csf
/usr/share/texmf/bibtex/csf/biblatex/winansi_de.csf
/usr/share/texmf/bibtex/bst
/usr/share/texmf/bibtex/bst/biblatex
/usr/share/texmf/bibtex/bst/biblatex/biblatex.bst
/usr/share/texmf/tex
/usr/share/texmf/tex/latex
/usr/share/texmf/tex/latex/biblatex
/usr/share/texmf/tex/latex/biblatex/biblatex.def
/usr/share/texmf/tex/latex/biblatex/lbx
/usr/share/texmf/tex/latex/biblatex/lbx/canadian.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/swedish.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/portuges.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/UKenglish.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/norsk.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/brazilian.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/nynorsk.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/naustrian.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/norwegian.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/australian.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/portuguese.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/german.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/spanish.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/ngerman.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/austrian.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/brazil.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/american.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/british.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/newzealand.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/USenglish.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/danish.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/english.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/italian.lbx
/usr/share/texmf/tex/latex/biblatex/lbx/french.lbx
/usr/share/texmf/tex/latex/biblatex/biblatex.cfg
/usr/share/texmf/tex/latex/biblatex/bbx
/usr/share/texmf/tex/latex/biblatex/bbx/debug.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/authoryear.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/alphabetic.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/authortitle-tcomp.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/authoryear-comp.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/numeric.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/authortitle-comp.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/verbose-note.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/authortitle.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/standard.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/numeric-comp.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/authortitle-ibid.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/numeric-verb.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/verbose-inote.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/verbose-trad1.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/authortitle-terse.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/draft.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/authortitle-icomp.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/alphabetic-verb.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/reading.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/verbose-ibid.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/authoryear-ibid.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/verbose.bbx
/usr/share/texmf/tex/latex/biblatex/bbx/verbose-trad2.bbx
/usr/share/texmf/tex/latex/biblatex/biblatex.sty
/usr/share/texmf/tex/latex/biblatex/bibnatex.def
/usr/share/texmf/tex/latex/biblatex/cbx
/usr/share/texmf/tex/latex/biblatex/cbx/verbose-trad1.cbx
/usr/share/texmf/tex/latex/biblatex/cbx/alphabetic-verb.cbx
/usr/share/texmf/tex/latex/biblatex/cbx/authortitle-comp.cbx
/usr/share/texmf/tex/latex/biblatex/cbx/authoryear-comp.cbx
/usr/share/texmf/tex/latex/biblatex/cbx/draft.cbx
/usr/share/texmf/tex/latex/biblatex/cbx/authoryear-ibid.cbx
/usr/share/texmf/tex/latex/biblatex/cbx/numeric-comp.cbx
/usr/share/texmf/tex/latex/biblatex/cbx/authortitle.cbx
/usr/share/texmf/tex/latex/biblatex/cbx/numeric.cbx
/usr/share/texmf/tex/latex/biblatex/cbx/debug.cbx
/usr/share/texmf/tex/latex/biblatex/cbx/authoryear.cbx
/usr/share/texmf/tex/latex/biblatex/cbx/numeric-verb.cbx
/usr/share/texmf/tex/latex/biblatex/cbx/alphabetic.cbx
/usr/share/te

Re: How to get a preview for "custom" graphics format?

2009-08-12 Thread Paul Johnson
On Fri, Aug 7, 2009 at 9:52 AM, Daniel
Lohmann wrote:
> Hi,
>
>
>
> So here is what I want to achieve:
>
> I have some TikZ figures (which are actually stand-alone LaTeX-documents
> with the extension .tikz) that I want to embed (not the source, but the
> PDF/EPS via \includegraphics) into my LyX document in a way that (1) the
> LyX-Preview does work (2) PDF generation does work, and (3) the .tikz-file
> is opened in vim when I select "Edit externally..."
>
I am sorry if I am telling you something you already know, but...

It seems to me you are throwing away the value of TikZ by doing this.

Recall that one of the strengths of TikZ/pgf is that the fonts and
such in the figure will match the document. If you persist in keeping
the TikZ as stand alone latex documents, you are destroying that
possibility.  I don't think the document will ever compile because of
the duplicate preambles and such that the latex system encounters.

On the  other hand, if the TikZ file is just the TikZ figure, then I'd
be more optimistic.

But I don't think it is wise to convert the tikz to pdf and embed that
with includegraphics.
Rather, I think you just want to include the tikz code itself. You can
just use input on the TikZ figure itself. If you put that inside a LyX
floating graphic or a minipage, it "just works" in the final
processing. In Lyx, choose "Insert" "File" "Child Document" and then
choose your tikz text file.  As long as it is just the figure, it is
all good. I've just tested it, and it does work.

But you won't get an in-document preview in LyX without a  bit of
messing about.  I think that's where the other guy who refers you to
the Dia code has a good idea.  I've tried to figure that part out, but
no solution yet. We need a way to tell LyX to pass the Tikz figure
code straight through to LaTeX, but we also want an on-screen preview
of what that will be like.  But it is inherently impossible to get a
preview of what that will be like without compiling the whole
document.  A conundrum for me.


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: changing margins in article class when using Beamer

2009-08-12 Thread Paul Johnson
On Wed, Aug 12, 2009 at 5:13 PM, Graham M
Smith wrote:
> Paul
>>
>
> I could of course add a line for the margins in the preamble that I comment
> out and in depending on the output, but I was hoping for something a bit
> more automated than that.
>

I thank you for bringing the beamer(article) to my attention. That is
very handy for me as well. I can see that if I insert some branches,
then I can really customize which material is included in the article
output.  Nice!

To answer  your margin question, I wonder how you changed the margins?
In all of the beamer examples I find, the margin options are grayed
out and I can't change them.

That means we need to make the change either in the preamble or in the
lyx layout or latex style file.  Blech. I started to think "there has
to be a better way" and this way seems to do it.

\oddsidemargin 0.0in
\textwidth 6.0in
%%testing: does following have any effect?
%%\evensidemargin 0.0in

In the example beamer file with the lyx distribution, this does work
for me to make the margins smaller.

I got the idea from this document:

http://www.image.ufl.edu/help/latex/margins.shtml

In case you want to set more parameters.   This works in LyX because
lyx invokes the geometry package early in the startup, so if you put
these in your preamble, it all ends up good.

HTH!

pj




-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Writing an old fashioned paper: ever try biblatex and biblatex style customization?

2009-07-17 Thread Paul Johnson
I took a contract that requires "old fashioned" citations in
footnotes, not in-text citations with an attached set of references.
I've not written a paper in that format in 25 years and I've been
digging about for the best way to get it done. I first checked into
jurabib, but learned that it is no longer maintained or developed, and
its author suggests we try biblatex.  OK, I'm game for that. I found a
helpful introduction in the LyX wiki.
(http://wiki.lyx.org/BibTeX/Biblatex).

I wonder if others have experimented with biblatex and LyX beyond the
information in the LyX Wiki?  Here's why I ask. I don't get output
that is exactly right, and I'm casting about for the best way to
change the style of output.

I've installed biblatex-8e (the newest) and updated csquotes to go
with it.  After some trial and error, I'm able to generate a document
that has the biblatex verbose style of citations in footnotes.
Mainly, I'm just following the LyX Wiki to get that far.  HOWEVER, the
precise formatting of the footnotes does not match the publisher's
style sheet, so I started trying to understand the configuration of
biblatex and its manual. It is 176 terse pages, helpful when you
understand quite a bit already, probably not helpful otherwise.  I'm
pretty determined as Linux users go and have written some
documentation for new users (http://wiki.lyx.org/BibTeX/Introduction).
 I've designed bst files in the past for bibtex, but biblatex does not
have any simple scripts to create customized styles.  Furthermore, it
appears to me that customized styles for biblatex on CTAN may "break"
biblatex.

I came to that conclusion after I lookeded for a short-cut by using
the pre-existing styles on the CTAN like "biblatex-mla" and
"biblatex-chicago-df". The biblatex-mla style doesn't work on my
system--I can't even compile the example tex files.  That could be due
to a change inside biblatex, I don't know.

I can get biblatex-chicago to work, but the steps needed to make it go
are not consistent with the LyX module on the LyX/biblatex wiki page.
It is necessary in LyX to remove the biblatex module. Even then, it is
probably not worth the effort. For reasons I don't understand,
biblatex-chicago does not accept all of the options that biblatex
accepts. One of the most handy things about biblatex is the style
option natbib=true option. In LyX, you can "fool" the system by using
natbib citations that biblatex will convert to its format. The
biblatex-chicago package does not accept that option, and so one must
be absolutely sure in the LyX document that natbib citations are not
used.  Otherwise, a ton of latex errors will follow. Only plain \cite
will work, and inside LyX I had the trouble that the Document
Bibliography setting kept reverting to natbib, even though I would
repeatedly set it to 'default'. (Turned out the document had a  line
after the preamble that said "\use_default_options true"  and that was
causing LyX to unset my settings.)  After I got biblatex-chicago to
work, I concluded it was a waste of effort.  I don't think
biblatex-chicago output is a whole lot closer to my final format than
biblatex's builtin verbose style.

I conclude that biblatex users ought to stick with the built-in
biblatex styles, and that if specialized output is needed, one ought
to hack the provided files in the biblatex distribution.

One of the problems I had with biblatex's verbose footnote citations
was that the document issn and URLs were being included. I had a bunch
of ordinary journal citations from JSTOR that I gathered into BiBTeX
with the super-handy "citeulike" system. The citations were fine,
except they include some fields I consider extraneous, such as the
JSTOR download URL. Instead of deleting the issn and URL info in the
bib file, I wanted to adjust the style.  in the biblatex config files,
there is a file "standard.bbx" and one can "comment out" the
bothersome fields with % signs:

Here's what it looks like on lines 38-46

  \setunit{\bibpagespunct}%
  \printfield{pages}
  \newunit\newblock
  %\printfield{issn}%
  %\newunit\newblock
  %\printfield{doi}%
  %\newunit\newblock
  %\usebibmacro{eprint}
  %\newunit\newblock
  %\usebibmacro{url+urldate}%

In addition, for some reason I don't understand, all journal citations
inserted the letters "In:" before every journal name. I've never need
"In:" except for proceedings or collections.

The offending bit is in standard.bbx, on lines 637-639:

\newbibmacro*{in:}{%
  \bibstring{in}\addcolon
  \setunit{\space}}

and commenting out the middle like eliminates the "In:" from the output.

For me, this has been hard work.  I've not found a biblatex email list
or support forum.  The biblatex support page on sourceforge is sparse;
It simply recommends we go discuss in the Usenet in comp.text.tex.  I
would do that, except I have not found a way to post in the Usenet
since my ISP eliminated Usenet service a year ago.

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
Univ

Can I please have an example of conditional ERT in LyX

2009-04-21 Thread Paul Johnson
Can I please have an example of how to use the ifelse package for
LaTeX with LyX?  I want to manage a NoWeb/Literate programming
document so that some commands are included in the document only
sometimes.  (I'm sending LyX documents to R through Sweave:
http://wiki.lyx.org/LyX/LyxWithRThroughSweave.

This ERT makes sure that R- Sweave drops the images in a folder "foo"
and prefixes all with "bar".

\SweaveOpts{prefix.string=foo/bar}

This is a NoWeb "code chunk" that will create an image in foo called
bar-testfn.eps.

<>=
curve(sin, from = 1, to = 5)
@


Then the image can be used later with some LaTeX:

\includegraphics{foo/bar-testfn}

I would like to conditionalize the figure creation, so that only when
I really want new figures will the code chunk be executed.

In the r-help list I asked about ways to avoid re-doing calculations,
but the answers were focused on ways in which R calculations can be
cached, rather than avoiding asking R for calculations in the first
place. Since I am doing this work within LyX, and LyX has its own way
of handling the temporary LaTeX files, it is not immediately apparent
that the caching strategies proposed from within R are going to help
(the LyX "current working directory" is an unpredictable directory
inside /tmp while the R working directory is inside there, and the R
stuff disappears once LyX exits.

I'm sorry, this is hard to explain.  If you can just give me a
concrete ifthen example in ERT, I think I can make it work.  I just
don't understand the ifelse package instructions because they assume a
person is fluent in LaTeX.

pj




-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Parbox footnote disappears. LyX example attached

2009-03-28 Thread Paul Johnson
On Mon, Mar 16, 2009 at 10:11 PM, Uwe Stöhr  wrote:
> Paul Johnson schrieb:
>
>> I have been testing the LyX box insert.  I don't know much about
>> minipages, but I can see one major advantage is that footnotes in them
>> are not numbered with the notes in the rest of the document and they
>> print at the bottom of the minipage. Neat!  The test document is
>> attached. Inside a parbox, I can insert a footnote and it is numbered
>> in sequence with the document, but the footnote never prints out.
>
> This behaviour is described in detail in LyX's EmbeddedObjects manual that
> you find in LyX's Help menu.
>
> regards Uwe
>
Ah, thanks.

I find myself wondering why LyX  allows one to insert of a footnote in
a parbox, if that is forbidden by LaTeX.

Do  you think that the various LyX manuals can ever be "linked
together" or connected somehow with a unified table of contents?  For
the user, it is difficult to know which manual to look through when
trying to find things like this.

PJ

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Parbox footnote disappears. LyX example attached

2009-03-16 Thread Paul Johnson
I have been testing the LyX box insert.  I don't know much about
minipages, but I can see one major advantage is that footnotes in them
are not numbered with the notes in the rest of the document and they
print at the bottom of the minipage. Neat!  The test document is
attached. Inside a parbox, I can insert a footnote and it is numbered
in sequence with the document, but the footnote never prints out.

Aside from "never use a footnote in a parbox", what lesson is to be learned??

pj

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


minipageAndParbox.lyx
Description: application/lyx


branch users: some howto advice?

2009-03-13 Thread Paul Johnson
Hi! I'm running LyX 1.6.1 on a variety of Linux platforms.

I never used branches before, but now I'm trying to use a branch in a
book project I'm writing. I hope you find it entertaining that my book
is called "Stuff Worth Knowing (And Not Much More)".  It includes tips
for people who are beginning a graduate career in research.

In the various child documents, I have questions and want to put
answers in a separate branch so that I can separately print out an
Instructor's manual.

Here are some of the questions I have.

1. Viewing the whole book from the master document does display the
answer branch.  However, when viewing the child documents
individually, the branches do not show, even if they are enabled in
both the master and the child.  Have you seen this?

2. I see some weird, unpredictable behaviors in the use of branches.

If I highlight a whole branch box and copy it and paste it, then LyX
sometimes crashes and leaves this in the terminal:

This is an intermittent problem...


$ lyx
LyX Code: 36 name: Branch
../../../src/support/lassert.cpp(21): ASSERTION false VIOLATED IN
../../src/insets/Inset.cpp:137
  
/home/pauljohn/ps/ps707/Workbook/Workbook-matrices/workbook-Matrices.lyx.emergency
LyX Code: 36 name: Branch
../../../src/support/lassert.cpp(21): ASSERTION false VIOLATED IN
../../src/insets/Inset.cpp:137
terminate called after throwing an instance of 'lyx::support::ExceptionMessage'
  what():  Inset::buffer_ member not initialized!
LyX Code: 36 name: Branch
Aborted

As far as I can see, this happens only in a child document, not in the
master document of the book.

I will share the source code to anybody who wants to investigate this.
 There is one significant complication. The master document uses some
Noweb/Rweave functionality and so people who don't have the Sweave
class and R installed won't be able to process the master document.
However, this crash can be reproduced even when are only working in a
child document that does not require Sweave.


pj


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Usinr Sweave / noweb in BEamer presentation

2009-03-03 Thread Paul Johnson
On Tue, Mar 3, 2009 at 3:23 AM, Rainer M Krug  wrote:
> On Mon, Mar 2, 2009 at 10:30 PM, Paul Johnson  wrote:
>> Hello, I don't have any answers, but I have some questions for you.. I
>> have an interest because I have been using LyX with Sweave a long
>> time, but have not yet needed a beamer Sweave.
>
> I wanted to use it for lectures, where it would be very nice to have
> the code and the result.
>
>

Wow, this is frustrating.  I've hammered on this all night and I've
only succeeded in re-producing the problem as you originally stated
it.

I believe I've gotten down the base of the problem by repeatedly
exporting documents to noweb format and then running them through R.
Recall the transformation from LyX first creates a noweb file *.Rnw
and then it runs "R CMD Sweave whatever.Rnw" to create the tex file,
which is then processed through latex. It is possible to monitor each
step and see where it goes wrong.

Using ERT in the lyx document can generate a working document. From
the attached example "beamerERTSweave.lyx", you should be able to
compile the document even if echo=T.  Processing that into Rnw and
then tex, the working LaTeX is like this:

\begin{frame}[containsverbatim]
\frametitle{Here's a title}

\begin{Schunk}
\begin{Sinput}
> plot(gl(5, 20))
\end{Sinput}
\end{Schunk}
\includegraphics{beamerERTSweave-001}

LaTeX can process that.

All we need to do is create a new Frame environment based on
beamer.layout that will add the right code.   I tried to take the
BeginPlainFrame environment and revise it to create
BeginVerbatimEnvironment.  Like you, I thought this should be a simple
change.

But it fails.  A file you can test is "beamertest-1.lyx".

I'm attaching the layout files I was using.

Maybe somebody who writes lots of layout files will take mercy and
tell us how we can modify a frame environment from beamer.layout so
that it creates the proper preamble to create the tex we need.  If we
start with this, which changes are needed?



Style BeginPlainFrame
  Category  Frames
  TocLevel  4
  KeepEmpty 1
  LatexType Command
  LatexName lyxframeend{}\lyxplainframe
  MarginFirst_Dynamic
  NextNoIndent  1
  ParSkip   0
  TopSep2.5
  BottomSep 0.5
  ParSep0
  Align Center
  LabelType Static
  LabelBottomSep0
  LeftMarginM
  LabelSep  xx
  LabelString   "Frame (no head/foot/sidebars)"

  Font
Series  Bold
SizeLargest
Color   Blue
  EndFont

  LabelFont
Family  Roman
Color   latex
  EndFont

  Preamble
\makeatletter
\long\def\lyxplainframe#...@lyxplainframe#1\@lyxframestop}%
\d...@lyxplainframe{\@ifnextchar<{\@@lyxplainframe}{\@@lyxplainframe<*>}}%
\long\def\@@lyxplainframe<#1>#...@lyxframestop#3\lyxframeend{%
  \frame<#1>[plain]{\frametitle{#2}#3}}
\makeatother
  EndPreamble
End


I tried to change "lyxplainframe" to "lyxverbatimframe" everywhere and
then simply replace [plain] with [containsverbatim] but it didn't get
the job done.

Oh, well.

I'm wondering if this will be useful in the end because it appears to
me that the R output does not want to fit itself very nicely onto the
tight pages of the beamer layout.  But, then again, we might find
enthusiasm to fix margins if we could make documents compile when they
have Schunk in them.

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


beamertest-1.lyx
Description: application/lyx


beamerERTSweave.lyx
Description: application/lyx


pjbeamer.layout
Description: Binary data


literate-beamer.layout
Description: Binary data


Re: Usinr Sweave / noweb in BEamer presentation

2009-03-02 Thread Paul Johnson
Hello, I don't have any answers, but I have some questions for you.. I
have an interest because I have been using LyX with Sweave a long
time, but have not yet needed a beamer Sweave.

  I've only spent 40 minutes looking at your case. I don't know what a
fragile frame is for, but I'll go read more about it.

The problem is obviously that you have an error in the latex macros in
your layout file.  Trying to find where those problems might be is,
well, difficult (since I don't see why you care about changing the
frame, mainly).

On Mon, Mar 2, 2009 at 1:53 AM, Rainer M Krug  wrote:
> Hi
>
> I want to use sweave in a beamer presentation. I found the following article
> http://ggorjan.blogspot.com/2008/09/using-beamer-with-lyx-sweave.html
>
> and I implemented the laypout file as suggested, but changed it, based
> on the BeamerUserGuide.pdf 3.13 Verbatim Text, tho include a fragile
> frame and a verbatim environment (see layout file attached).
>
> But there must be something wrong: when I try to compile the attached
> lyx file, it gives an error message ()\\i the LaTeX log:
>

I've downloaded your test case on my Ubuntu Linux 8.1 system and I can
confirm that your fragile frame environment causes the compile to
fail.  Here's one way to try and figure what is going on. Instead of
using the LyX Layout approach, just write ERT in your lyx document. If
that DOES work, then  you have good information because it means the
fragile frame will work.  Then concentrate on the LyX layout.

I suppose it would help if we had a tex file with the fragile frame in
use, so we could compare the working tex against the tex that LyX
creates.

With the existing Layout file you provide, you can see a bit more
about where this is going wrong if you export the LyX document to TeX
format.  Then we could compare that TeX file with a working tex file.
The file LyX creates will default to batchmode, but you can edit that
tex file and erase line 1, the  batchmode line.  After that, you can
run  latex or pdflatex on the tex file to see what happens.

>From looking at that tex file, it appears to me there is a mismatch in
the frame begin and end markers.   Here's a snip


\lyxframeend{}\lyxfragileframe{Slide 1}

\includegraphics{beamertest-001}


\lyxframeend{}\lyxframe{Slide 2}


Note that your Layout causes a \lyxframeend to be inserted, then a
\lyxfragileframe, but there is no \lyxfragileframeend, only
\lyxframeend. Do you think that is related to the trouble?

Here are some latex errors I see when I run that through.  I believe
the first one is superficial, but the second is more serious.

(/usr/share/texmf-texlive/tex/latex/ltxmisc/url.sty)

Package hyperref Warning: Option `pdfpagelabels' is turned off
(hyperref)because \thepage is undefined.

Hyperref stopped early
)
*hyperref using default driver hdvips*


(/usr/share/texmf/tex/latex/beamer/themes/color/beamercolorthemewhale.sty))
(/usr/share/texmf-texlive/tex/generic/babel/babel.sty
(/usr/share/texmf-texlive/tex/generic/babel/english.ldf
(/usr/share/texmf-texlive/tex/generic/babel/babel.def)))
(/usr/share/texmf/tex/latex/R/Sweave.sty
(/usr/share/texmf-texlive/tex/latex/base/ifthen.sty)
(/usr/share/texmf-texlive/tex/latex/fancyvrb/fancyvrb.sty
Style option: `fancyvrb' v2.6, with DG/SPQR fixes <1998/07/17> (tvz)
No file fancyvrb.cfg.
) (/usr/share/texmf/tex/latex/R/upquote.sty
(/usr/share/texmf-texlive/tex/latex/base/textcomp.sty
(/usr/share/texmf-texlive/tex/latex/base/ts1enc.def (./beamertest.aux)
(/usr/share/texmf-texlive/tex/latex/base/ts1cmr.fd)
(/usr/share/texmf-texlive/tex/latex/hyperref/nameref.sty
(/usr/share/texmf-texlive/tex/latex/oberdiek/refcount.sty)) (./beamertest.out)
(./beamertest.out)
No file beamertest.nav.
)
Runaway argument?
! File ended while scanning use of \next.

\par
<*> beamertest.tex



I hope you get this working and let us know how you did it.




> ###
> ...
> No file BeamerSweaveExample.nav.
> \openout3 = `BeamerSweaveExample.vrb'.
>
> )
> Runaway argument?
> ! File ended while scanning use of \next.
> ...
> ###
>
> When I change from "Frame (fragile)" to "Frame", it compiles, but when
> setting one "echo=TRUE", it does not as it is not in "verbtim". If I
> set the environment of the ERT to Verbatim, it still does not compile.
>
> What am I missing?
>
> Thanks,
>
> Rainer
>
>
> --
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
> Biology, UCT), Dipl. Phys. (Germany)
>
> Centre of Excellence for Invasion Biology
> Faculty of Science
> Natural Sciences Building
> Private Bag X1
> University of Stellenbosch
> Matieland 7602
> South Africa
>



-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


need advice about html to latex conversion

2009-03-01 Thread Paul Johnson
Here's a Linux (ubuntu) system administration question for you. What
is the best html -> latex converter?  To help LyX users access the
htmltolatex program,what is the best approach?

Explanation:

I never tried to import an html file until yesterday, and I got the
error from LyX indicating that java could not find htmltolatex.jar.
While tracking that down, I was surprised that preferences for lyx
converters assumed I had htmltolatex installed.  The LyX preference
was set "java htmltolatex.jar --input $$i --output $$o".

I don't know why it is set that way!  I don't have htmltolatex.jar
installed, obviously it should fail.

I'm reading the LyX configure script, and I see it checks for  3
possible converters, "html2latex",  then "gnuhtml2latex", and then
htmltolatex.

Are these supposed to be in order of quality?  I tried GNUhtml2latex
first because there is an Ubuntu package for it. The imported file
didn't look great in LyX.

It appears to me that html2latex is a perl script and the homepage for
it was last edited in 1998.

Is htmltolatex better?  Its web page is more up-to-date. Either that
means it is not done yet or that it has great new features :)

The sourceforge page for htmltolatex is
http://htmltolatex.sourceforge.net.  The download link the points to a
tarball that does not have system administrator information.  How is a
person supposed to install this?

$ ls
build.xml  config.xml  gpl.txt  htmltolatex.jar  LICENCE.txt
README.txt  src
classesconfig.xsd  htmltolatex  javadoc  manual   samples

The file "htmltolatex" is a shell script that calls java on the
indicated file, and it accesses htmltolatex.jar.  Here's what I mean:

===

$ cat htmltolatex
#!/bin/sh

if [ $# -lt 1 ]; then
echo "Usage: $0 -input  -output
 [-css ] [-config
]"
exit 1
fi


java -jar htmltolatex.jar $@


==

I tested the C programmer approach. Put htmltolatex script in the path
somewhere, and put the htmltolatex.jar file somewhere like
/usr/share/htmltolatex, and then edit the htmltolatex script to adjust
for the path? :

java -jar /usr/share/htmltolatex/htmltolatex.jar $@

I tried that approach and it failed because it can't find other files it wants.

Error: Cannot convert file

An error occurred whilst running htmltolatex -input 'News.html'
-output 'News.tex'
Fatal error: Can't load configuration.
/home/pauljohn/config.xml (No such file or directory)
Error: Cannot convert file

An error occurred whilst running htmltolatex -input 'New.html' -output 'New.tex'

Then I copied config.xml into /usr/share/htmltolatex and modified the
script by adding a -config file option.

java -jar /usr/share/htmltolatex/htmltolatex.jar $@ -config
/usr/share/htmltolatex/config.xml

Horray, it runs from LyX with no crash.  I have no way of knowing if
it will work in other test cases.   The LaTeX markup does include
images, that is encouraging. HTML enumerated and bullet lists do come
into LyX correctly. However, LyX can't compile the document. It
complains about an undefined option in this ERT:

\href{http://pj.freefaculty.org}{thing}

I see the LyX Document->settings->pdf properties menu has a hypreref
option, and once I enable that support, then the document will
compile.  That's awesome.

Its a little encouraging, but still troublesome.  Am I taking the best
approach?  It reminds me of a time about 5 years ago when I was trying
to generate HTML from LyX.  The default converters were tex4ht  or
latex2html or something like that, and we were debating about how to
configure those programs, and somebody spoke up "hevea" works much
better than either of those.

Anyway, I wonder if people who have wrestled with html -> latex will
speak up and let us know which html to latex converter works best, and
if it is the Java one htmltolatex, can we hear how you install that on
a multiuser system.

PJ

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Windows bundle 1.6.1; path questions about spaces and paths

2009-02-08 Thread Paul Johnson
I'm a linux user, but I have students who have this thing called MS
Windows.  I've not heard of that system before, I pretended to the
students that they were using some weird, minority operating system
:).  I noticee Lyx 1.6.1 had an installer for that Windoze thing.  We
installed the lyx bundle that has MixTeX included with it, not the
alternative Windows installer, but the one from the LyX team itself.

As far as I can tell, that bundle already has ghostscript and python
inside the MikTeX part.  Is that correct?

When I installed the bundle, I did not change settings, except I
removed the spaces from the proposed paths, i.e., it went into
c:\ProgramFiles\Lyx161 and so forth.  After making the install, we
start LyX and there is the usual long delay while additional LaTeX
packages are downloaded.

I've done this on 4 different systems, all seem to be Windows XP, but
I don't know which Service Pack is applied.

The systems do not all work in the same way.  2 especiall peculiar
things have happened so far.

1. On some systems, spaces in directory structure of LyX document
causes view to bomb.  On 2 of the student systems, when we try to view
a LyX file, we get a window popping up saying spaces in file names are
not allowed.  If I move the user's lyx files to c:\whatever, then LyX
does work.

I understand that, I think, because spaces in directories & file names
are bad. Generally.

However, I made the exact same install on another Windows XP system
while I was standing in front of the class. Guess What?  The LyX
default structure was the same a before, C:\Documents and
Settings\whatever\whatever .  LyX Created "newfile.lyx" in there, and
I was saying to the class "Now this view will fail because of spaces
in the file name," and after I hit View/PDF(pdflatex), guess what
happened?  The pdf file popped up on the screen.

Why would it work on one system and not another?  How is LyX/LaTeX
dealing with spaces?

As far as I know, no previous version of LyX was ever installed on
these systems.

2. I wanted to view an eps file that R produced on one of these
systems.  From looking at the MikTeX install, it appears to me that
the bundle included ghostscript and python. Yes?

I got that idea from reading posts in the Lyx-help list about the
windows installer bundle. A post by Uwe Stohr about a previous version
of the LyX installer bundle included a Change log excerpt

Installer Changelog:
-
Version 4.09
- LyX 1.6rc3
 (list of current regressions: http://tinyurl.com/yu4the )
 (list of current crashes and critical bugs: http://tinyurl.com/653prg)
- updated to MiKTeX 2.7 (build 3164)
- updated to Python 2.5.2
- updated to Ghostscript 8.63
- updated to ImageMagick 6.4.4-1
-


After installing LyX, I wanted to install gsview32 so students can
view eps files generated from R, but the gsview installer fails,
claiming that ghostscript was not installed.  But ghostscript is part
of the LyX bundle? I don't think latex would be working at all without
ghostscript.

This made me wonder what the LyX Windows installer is supposed to be
doing to the Windows environment.  Is it supposed to put LyX and gs
and latex and pdflatex and everything else into the PATH variable?  I
tried to run LyX from a command shell, but the system does not find
the executable (I looked in the bin directory to find out the correct
exe file name, still no go).   So perhaps the gsview32 install fails
because it runs "gs" in a shell and doesn't find it in the path.

Do you think the LyX installer should add those directories to the path?

PJ

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Big document

2009-02-02 Thread Paul Johnson
On Wed, Jan 28, 2009 at 5:29 AM, Piero Faustini
 wrote:
> Hello fellow LyX users,
> I have to take a decision: wether to split my doctoral thesis in different
> files or not. Some people told me a thesis is HUGE and I should split the file
> into chapters or parts, but I'm afraid that something goes wrong at any time
> during the writing.
> It will be around 300 pages italian book (600,000 characters) in koma-script,
> with several Lilypond-imported examples, BibLaTeX-driven bibliography, 
> indexes,
> cross-references, loads of tables, etc. etc.
> I'm using Lyx 1.6.1 in a quite healthy Windows XP sp3 environment on the best
> laptop system you could buy 4 years ago, a Dell Inspiron 9400.
> I already wrote something like 1/4 of the thesis and PDF output need some 10
> seconds to be produced (less if I just refresh and made small edits) - if the
> proportion is the same, I expect to wait not more than 40 seconds once the 
> work
> is about to the end (which is annoying but won't kill): am I wrong?
> Some opinion/suggestion/experience?
>
>
>
>
I have converted from a big document to a single small master document
that includes the separate chapters.

Here is the result, so far. My manuscript, "Stuff Worth Knowing (And
Not Much More)" http://pj.freefaculty.org/stat/StuffWorthKnowing.pdf.

Here are some problems I've run into.

1. Chapters that use literate programming/noweb are not processed by
LyX when they are inserted into the main book.  This is a
long-standing known bug that we've discussed in LyX-devel email.  If
you have some literate markup in you chapters, it is necessary to put
that material in the main document in order to force the noweb
processor to manage it.

2. It is much nicer to work on the separate chapters in separate
files.  They are smaller, more manageable.  If you are smart and you
keep the chapters in separate directories, your life will be happier.
If  you make LaTeX mistakes, it is easier to diagnose them by looking
at individual chapters.

There are no show-stopping problems for me, but a few little problems.
 Even though each chapter setup indicates that it has a master
document, and I *thought* Lyx would get a pre-amble from that master
document, it appears to have no effect when I look at chapters. I want
ragged-right output, and it appears necessary to put the \RaggedRight
stuff in every chapter preamble.  When I view chapters by themselves,
they do not inherit the preamble of the master document.  So I end up
copying the whole preamble from the master document into each chapter.
 Boring.

Also, it is a problem that Chapter numbering is not correct when you
work on chapters by themselves.  There is an easy fix to set the
chapter counter in ERT at the top of the document, but it is a bit of
a pain.

Another problem I notice is that it is tedious to experiment with
different document settings when working on separate chapters.  If the
main document, the one that has all the includes, is KOMA script, but
then a chapter is just regular book, then when you use LyX to try view
the whole document, you will get a lot of warnings about child
documents of different types every time you view.

When there are things to go wrong, it seems like I can usually find
them.  Hope that helps.



-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Lyx/ Biblatex import Problems

2009-02-02 Thread Paul Johnson
On Mon, Feb 2, 2009 at 4:55 AM, Christofer Zwanzig
 wrote:
> Hello,
>
> trying to import a tex-file with the biblatex-command \Cite (with capitals)
>  into lyx file occures the following problem:
>
> For example the command \Cite[Vgl. z.B.][52]{Holzfurtner:1984} is imported
> as \Cite{[}Vgl. z.B.{]}{[}52{]}{Holzfurtner:1984}. As it seems, Lyx doesn´t
> know this the biblatex-command \Cite (with capitals).
>
> Is there a way to solve this problem?
>
> Thank you,
>
> Christofer.
>
It is not apparent to me why you are doing it this way.

I just prepared some "howto" notes for my students about including a
bibliography file in lyx and using the lyx citation mechanism.  You
might look this over:

http://pj.freefaculty.org/stat/StuffWorthKnowing.pdf

Scroll down to p. 96.

I also put basically the same information in a writeup on the LyX wiki
some years ago:

http://wiki.lyx.org/BibTeX/Introduction

Get in the LyX spirit. Avoid ERT where possible to live a happy life.

pj


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


I want to create a literate scrbook, not just a literate book

2009-01-20 Thread Paul Johnson
Dear everybody:

Can I use the Lyx literate-book textclass to create a KOMA script
book, rather than just a boring old book?  For that matter, if one is
using a literate-article textclass, isn't there a way to specify the
*type* of article?

I realize I can output the tex file from the noweb document and change
book to scrbook, but it seems like it should be easier.

It this question clear?   I want the tex file created by LyX to have
"book" changed to "scrbook", as in this case:

>From this:

\batchmode
\makeatletter
\def\in...@path{{/tmp//}}
\makeatother
\documentclass[oneside,english]{scrbook}
...

to this:

\batchmode
\makeatletter
\def\in...@path{{/tmp//}}
\makeatother
\documentclass[oneside,english]{scrbook}
...

Hmm.  I've been looking at this quite a bit.

Am I right in guessing that there's no way to customize a book (noweb)
document inside the LyX document itself, but I can create a new layout
file that changes the literate-book.layout from this:

#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[book,noweb.sty]{book (Noweb)}

to this:

#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[scrbook,noweb.sty]{book (Noweb)}

Supposing that is needed, can I ask a follow up question?

Suppose a document has to be used by many people who do not have the
customized layout file in their preferences folder.  Is there a way
that I could tell LyX to look for the layout file in the *same
directory* as the LyX file and the figures and bibliography?  If I
could do that, users might actually be able to edit a document without
customizing their layout collection.

PJ
-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Want to write Chinese in LyX? Please give me some feedback on this HOWTO

2009-01-19 Thread Paul Johnson
I've worked out a little update for the XeTeX page on the LyX Wiki.
(http://wiki.lyx.org/LyX/XeTeX)

After obtaining feedback from prospective users of Chinese or other
languages that require non-roman character sets, I'd like to add this
to the LyX wiki page on Xetex.

In case you don't know, XeTeX offers a program "xelatex" a replacement
for the "pdflatex" program. Xelatex creates a pdf and in the TeX
document one can include all Unicode fonts that are available on the
system that are in the OpenType and true type formats.

I've posted the pdf output from a lyx file that demonstrates several
different font choices.

http://pj.freefaculty.org/latex/xetex-3.pdf

http://pj.freefaculty.org/latex/xetex-3.lyx

The title of my document is "Getting Reasonable Chinese Characters in
LATEX Documents". I suppose I should have LyX in the title, but the
first drafts of this were written in Emacs.

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Chinese support: What is relationship between Lyx, CJK, and xetex?

2009-01-17 Thread Paul Johnson
In our Linux lab, a student asked for installation of Chinese support.
We have machines with TeXLive-2007 and LyX 1.5.6 or 1.6.1.   I spent
most of the afternoon and evening trying to figure out what might be
the bare minimum change needed so that a person can write & print
documents in Chinese via LyX. It is confusing mainly because there are
a lot of half-finished ways to do this. Should we use the separate
package LyX-CJK or LyX with Unicode font support or LyX with CJK font
support.

After installing a lot of packages for latex-cjk support and the scim
tool for multi-language input, I arrived at a working version of LyX
that could accept Chinese characters that would show on the screen,
but none of the Lyx View options would work.  I was stuck on that
problem for a long time. Errors kept saying that the Chinese symbols
were not recognized or fonts were missing. It may be I did not have
the preamble or Language options specified correctly, I tried many
things.  I saw on the LyX Wiki that Japanese and Chinese are supposed
to work "out of the box," (  ) but I don't see how

The Debian readme with latex-cjk explains how a commercial font
Cyberbit.ttf can be obtained and installed (Wow, that's a big
project).  After that, I do succeed with latex in compiling a example
file UTF8.tex that comes with latex-cjk. I even succeeded in building
a LyX file that does work!   It surprised me a bit that the proper
character is simply utf8 and the language English. None of the
encodings for CJK worked.

I put the pdf output and the lyx file here so you can see for
yourselves.  (Remember, the fonts from Cyberbit.ttf are needed).
http://pj.freefaculty.org/latex/UTF8.pdf
http://pj.freefaculty.org/latex/UTF8.lyx

I don't know if the result is "nice looking" in the eyes of a Chinese
reader, but I bet I'll find out later.

If you have a lyx file that works with Chinese characters that does
not require such an exotic font, I wish you'd share your example.

We found another alternative that seems to work.  XeTeX is described
in the LyX wiki (http://wiki.lyx.org/LyX/XeTeX).

I took the document xetex.lyx and followed its instructions and, to my
surprise, xelatex did work! If you look to the bottom of the pdf, you
see the Chinese characters do print.

http://pj.freefaculty.org/latex/xetex.lyx
http://pj.freefaculty.org/latex/xetex.pdf

I was even able to use LyX preferences to create a new output format
PDF(xetex) and configure it so the Lyx View menu would trigger xetex.
It would be hard to describe the pointing and clicking, but here is
the bit from my LyX preferences file, and I believe if you add these
lines under FORMATS and CONVERTERS, then you will have same benefit.

#
# FORMATS SECTION ##
#
\format "pdf4" "pdf" "PDF(xelatex)" "" "xdg-open" "" "document,vector"
#
# CONVERTERS SECTION ##
#
\converter "pdflatex" "pdf4" "xelatex $$i " "latex"
#
lyx

At the end of the day, I suppose I've made some progress, but the road
forward does not seem so clear to me. Should I tell the students to
focus on using Xetex or latex with Unicode.


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


change font used in lyx-code environment ??

2009-01-16 Thread Paul Johnson
In Ubuntu 8.10 I'm running Lyx 1.6.1.  In Noweb documents, I notice
the problem that the typewriter font does not show double quotes.
They show as black boxes, as you can see in some example output.

http://pj.freefaculty.org/latex/foo.pdf

Until I find the problem in the weaving process that causes this, I
want to just eliminate all use of the typewriter font--whenever a lyx
environment calls for typewriter, I'd substitute sans serif or
something.  (Actually, I only need to replace `` and '' from the
typewriter family, but don't know if that is simpler.).

I've learned that I CAN hack the font setting in the lyxcode in the LyX file

lyxmacros.inc

to change the ttfamily to sffamily, but I don't like that answer so
much because it changes lyxcode for all classes.

Is there a way I can, in the document itself, tell the Lyx-Code
environment not to use typwriter font?

I guess I need to change all environments that might invoke the typewriter font.


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Best advice on Fonts and PDF output from Lyx

2008-12-12 Thread Paul Johnson
On Fri, Dec 12, 2008 at 4:20 PM, Paul Johnson  wrote:
>  I've run LyX on RedHat, Fedora, and Ubuntu Linux at various times for
> about 10 years. Until a year or so, the LaTeX distribution was TeTeX,
> but recently I've converted over to TeXLive.
>
> Like many other LyX users, I've been wrestling with PDF output from
> LyX for a long time.  It used to be that the default fonts in LyX
> would look very bad in PDF output.  There were a number of workarounds
> considered in this list.
>
> For a long time, I've followed Herbert V's the advice to use the
> lmodern fonts in order to get nice PDF output. That still appears to
> be the best advice in the LyX wiki:  http://wiki.lyx.org/FAQ/PDF
>
> In recent times, however, we've seen PDF output that looks really bad
> in Adobe Acrobat reader 8 if a document uses the lmodern fonts.  The
> problem is that, at some levels of magnification, the fonts are
> "uneven" on the screen.  I uploaded a screenshot
>
> http://pj.freefaculty.org/latex/adobeUnevenFonts.pdf
>
I'm sorry.  The screenshot is a png, not pdf, so I've renamed it:

http://pj.freefaculty.org/latex/adobeUnevenFonts.png

> As far as I can tell, the output on paper is fine.  It is not uneven
> as it appears on the screen in acroread.  If I change the document to
> different fonts, I don't see that same kind of uneven output.
>
> Some of my students generate PDF output that is worse, some better.
> Students who have Windows machines on which they primarily use Chinese
> seem to have the worst trouble.  In Linux, I can use other pdf
> readers, but it appears Windows users are pretty much stuck with
> Adobe.
>
> I've seen this problem recently on Ubuntu 8.04 with TeXLive and also
> with Centos Linux 5.2 with TexLive.  So that is making me thing it is
> a TexLive problem.
>
> pj
>
>
> --
> Paul E. Johnson
> Professor, Political Science
> 1541 Lilac Lane, Room 504
> University of Kansas
>



-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Best advice on Fonts and PDF output from Lyx

2008-12-12 Thread Paul Johnson
 I've run LyX on RedHat, Fedora, and Ubuntu Linux at various times for
about 10 years. Until a year or so, the LaTeX distribution was TeTeX,
but recently I've converted over to TeXLive.

Like many other LyX users, I've been wrestling with PDF output from
LyX for a long time.  It used to be that the default fonts in LyX
would look very bad in PDF output.  There were a number of workarounds
considered in this list.

For a long time, I've followed Herbert V's the advice to use the
lmodern fonts in order to get nice PDF output. That still appears to
be the best advice in the LyX wiki:  http://wiki.lyx.org/FAQ/PDF

In recent times, however, we've seen PDF output that looks really bad
in Adobe Acrobat reader 8 if a document uses the lmodern fonts.  The
problem is that, at some levels of magnification, the fonts are
"uneven" on the screen.  I uploaded a screenshot

http://pj.freefaculty.org/latex/adobeUnevenFonts.pdf

As far as I can tell, the output on paper is fine.  It is not uneven
as it appears on the screen in acroread.  If I change the document to
different fonts, I don't see that same kind of uneven output.

Some of my students generate PDF output that is worse, some better.
Students who have Windows machines on which they primarily use Chinese
seem to have the worst trouble.  In Linux, I can use other pdf
readers, but it appears Windows users are pretty much stuck with
Adobe.

I've seen this problem recently on Ubuntu 8.04 with TeXLive and also
with Centos Linux 5.2 with TexLive.  So that is making me thing it is
a TexLive problem.

pj


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


I built some lyx160 packages for Ubuntu 8.10 you can install alongside lyx-1.5.6

2008-11-29 Thread Paul Johnson
Hey, Ubuntu running lyx guys:

I saw in the lyx list that it is possible to build lyx-1.6.0  from
source so that it will be installed without damaging lyx-1.5.6.  I
wanted to try the newest lyx, but need to make sure the old faithful
lyx-1.5.6 is available.

The configure option that builds a parallel version
"--with-version-suffix=-1.6.0". I wanted that same function, but
in a deb package so I could easily uninstall later.

I took the upstream Debian source code for the lyx-1.6.0 packages and
hacked the build scripts so that the new lyx is built with a suffix
-1.6.0, so you run it by typing lyx-1.6.0.  I'm an RPM packager by
nature, the Debian thing is still kinda new to me and I still stuggle
a bit.Eventually I made it work.  (I've pasted the list of
installed files shown below.  You can see it really is separate from
the old verison.)

I've not yet learned how to setup an apt archive, but you can just
download the deb packages and install with dpkg.

Unlike RPM based systems, the Debian package system will not allow
installation of 2 packages called lyx, so this new one is named lyx160
and it depends on lyx160-common.  As far as I can tell, this does no
damage at all to the Ubuntu provided packages lyx and lyx-common.

I've not yet learned how to setup an apt archive, but you can just
download the deb packages and install with dpkg.

http://pj.freefaculty.org/Ubuntu/8.10/i386/lyx160-common_1.6.0-2ubuntu_all.deb
http://pj.freefaculty.org/Ubuntu/8.10/i386/lyx160_1.6.0-2ubuntu_i386.deb

Here's my PGP key in case you are *that kind* of person (security conscious).

http://pj.freefaculty.org/Ubuntu/PaulJohnson-BinaryPackageSigningKey

pj

When the user runs lyx-1.6.0, it creates a configuration directory
~/.lyx-1.6.0, so settings and such are kept completely separate from
the existing settings for lyx-1.5.6 that are kept in ~/.lyx.

Here are the installed files. Note the -1.6.0 suffix added to
executables and directory names.  This installed version does work for
me.

$ dpkg -L lyx160
/.
/usr
/usr/bin
/usr/bin/lyxclient-1.6.0
/usr/bin/tex2lyx-1.6.0
/usr/bin/lyx-1.6.0
/usr/share
/usr/share/doc
/usr/share/doc/lyx160
/usr/share/doc/lyx160/NEWS.Debian.gz
/usr/share/doc/lyx160/changelog.Debian.gz
/usr/share/doc/lyx160/copyright
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/lyxclient-1.6.0.1.gz
/usr/share/man/man1/tex2lyx-1.6.0.1.gz
/usr/share/man/man1/lyx-1.6.0.1.gz
$ dpkg -L lyx160-common | more

/usr
/usr/share
/usr/share/texmf
/usr/share/texmf/tex
/usr/share/texmf/tex/latex
/usr/share/texmf/tex/latex/lyx-1.6.0
/usr/share/texmf/tex/latex/lyx-1.6.0/revtex.cls
/usr/share/texmf/tex/latex/lyx-1.6.0/lyxskak.sty
/usr/share/texmf/tex/latex/lyx-1.6.0/broadway.cls
/usr/share/texmf/tex/latex/lyx-1.6.0/hollywood.cls
/usr/share/texmf/tex/latex/lyx-1.6.0/lyxchess.sty
/usr/share/lyx-1.6.0
/usr/share/lyx-1.6.0/bind
/usr/share/lyx-1.6.0/bind/math.bind
/usr/share/lyx-1.6.0/bind/greekkeys.bind
/usr/share/lyx-1.6.0/bind/cyrkeys.bind
/usr/share/lyx-1.6.0/bind/pt
/usr/share/lyx-1.6.0/bind/pt/menus.bind
/usr/share/lyx-1.6.0/bind/hollywood.bind
/usr/share/lyx-1.6.0/bind/site.bind
/usr/share/lyx-1.6.0/bind/sv
/usr/share/lyx-1.6.0/bind/sv/menus.bind
/usr/share/lyx-1.6.0/bind/de
/usr/share/lyx-1.6.0/bind/de/menus.bind
/usr/share/lyx-1.6.0/bind/xemacs.bind
/usr/share/lyx-1.6.0/bind/latinkeys.bind
/usr/share/lyx-1.6.0/bind/menus.bind
/usr/share/lyx-1.6.0/bind/fi
/usr/share/lyx-1.6.0/bind/fi/menus.bind
/usr/share/lyx-1.6.0/bind/mac.bind
/usr/share/lyx-1.6.0/bind/emacs.bind
/usr/share/lyx-1.6.0/bind/cua.bind
/usr/share/lyx-1.6.0/bind/broadway.bind
/usr/share/lyx-1.6.0/bind/aqua.bind
/usr/share/lyx-1.6.0/bind/sciword.bind
/usr/share/lyx-1.6.0/chkconfig.ltx
/usr/share/lyx-1.6.0/commands
/usr/share/lyx-1.6.0/commands/default.def
/usr/share/lyx-1.6.0/configure.py
/usr/share/lyx-1.6.0/scripts
/usr/share/lyx-1.6.0/scripts/lyxpreview_tools.py
/usr/share/lyx-1.6.0/scripts/clean_dvi.py
/usr/share/lyx-1.6.0/scripts/fig_copy.py
/usr/share/lyx-1.6.0/scripts/ext_copy.py
/usr/share/lyx-1.6.0/scripts/fig2pdftex.py
/usr/share/lyx-1.6.0/scripts/lyxpreview-platex2bitmap.py
/usr/share/lyx-1.6.0/scripts/listerrors
/usr/share/lyx-1.6.0/scripts/fig2pstex.py
/usr/share/lyx-1.6.0/scripts/date.py
/usr/share/lyx-1.6.0/scripts/csv2lyx.py
/usr/share/lyx-1.6.0/scripts/TeXFiles.py
/usr/share/lyx-1.6.0/scripts/lyxpreview2bitmap.py
/usr/share/lyx-1.6.0/scripts/tex_copy.py
/usr/share/lyx-1.6.0/scripts/fen2ascii.py
/usr/share/lyx-1.6.0/scripts/convertDefault.py
/usr/share/lyx-1.6.0/scripts/legacy_lyxpreview2ppm.py
/usr/share/lyx-1.6.0/scripts/layout2layout.py
/usr/share/lyx-1.6.0/ui
/usr/share/lyx-1.6.0/ui/classic.ui
/usr/share/lyx-1.6.0/ui/stdcontext.inc
/usr/share/lyx-1.6.0/ui/default.ui
/usr/share/lyx-1.6.0/ui/stdtoolbars.inc
/usr/share/lyx-1.6.0/ui/stdmenus.inc
/usr/share/lyx-1.6.0/external_templates
/usr/share/lyx-1.6.0/templates
/usr/share/lyx-1.6.0/templates/de_beamer-conference-ornate-20min.lyx
/usr/share/lyx-1.6.0/templates/slides.lyx
/usr/share/ly

double spaced documents have too much white space around display math, according to my students

2008-09-26 Thread Paul Johnson
Students are having fun learning lyx and LaTeX, but some are bothered
that when they use double-spaced text, the display-math equations have
"too much space" around them.  They want a single line equation to be
lined up on the ordinary double-spacing, with no extra vertical space.

We have fiddled around with document classes, and we notice that with
article(amsmath), then the white space around display math equations
in double spaced documents is smaller, more to our liking.  However,
we don't like the style of Header and Section labels in AMS documents,
we like the style in the ordinary article class.

Can you point us at the LaTeX magic to fiddle display math vertical
spacing in the article class?

pj

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Ubuntu missing screen fonts for symbols: solution.

2008-09-03 Thread Paul Johnson
I was asking  about missing or incorrect symbols yesterday.  I found a solution.

In Lyx on Ubuntu 8.04, I noticed that SOME mathematical characters do
not show properly on the screen. (Many symbols are fine.)  For
example, "\cdot" shows as "x" where it should have the centered dot
and "\succ" just shows ERT "succ", where it should have a curved
greater-than sign.  I saw one other person post about this problem in
this list, so I'm recording the answer for posterity.

So far, in Ubuntu, I've found 2 solutions.

Following advice on http://wiki.lyx.org/FAQ/Qt, I get the idea that a
truetype font will fix this.  One approach is to install the font
package "http://movementarian.org/latex-xft-fonts-0.1.tar.gz"; under
~/.fonts and run "fc-cache -fv".

That works. The math symbols in lyx all seem to display correctly.
I've confirmed that the above workaround also works if one uses the
supposedly better BaKoMa fonts, but I don't see much difference
myself.

These are the magic fonts that are installed by either package:

cmmi10.ttf  eufm10.ttf   msam10.ttf  cmsy10.ttf
cmex10.ttf   cmr10.ttf   msbm10.ttf  wasy10.ttf

The one that fixes "\cdot" and "\succ" is cmsy10.ttf.

I wondered why more Ubuntu users aren't befuddled by this.  After some
googling, I learned that "cmsy10.ttf" is available as an optional
Ubuntu package "latex-xft-fonts".  So I suppose that many Ubuntu users
have that installed automatically so they never fight the mystery of
missing screen fonts. I'll suggest to Ubuntu's lyx packager that
latex-xft-fonts should be a required package.

I try to tell myself I'm a better person for having spent an afternoon
wading through this, but it is difficult to do it with a straight
face.

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Math symbol displayed incorrectly on screen

2008-09-02 Thread Paul Johnson
On Sat, Aug 16, 2008 at 2:19 AM, Jürgen Spitzmüller
<[EMAIL PROTECTED]> wrote:
> Geevarghese Philip wrote:
>> I am using LyX 1.5.5 on Linux. In math mode, \cdot appears as \times
>> should (as an 'X' shape) on the screen. The dvi output is fine -- \cdot
>> appears as a centred dot. I have attached a sample lyx file which has
>> this problem.
>>
>>Is this a known problem? What would be a workaround? Which
>> configuration file(s) control(s) LyX's display of math symbols on the
>> screen?
>
> Works here. This is probably a problem with your font installation.
>
> Jürgen
>


I see the same problem on Ubuntu 8.04 with LyX 1.5.5. on screen
appearance of \cdot and \times is the same, "x".  Also, screen
translation of \succ fails, and just shows "succ".

Ubuntu supplies texlive 2007

What do you think might be wrong with the font installation?  I was a
Fedora user until now, and the mathml package was installed with lyx
and it seemed to take care of things like this. I could use a little
Ubuntu/Debian related help.  Which font is lyx looking for?

pj


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: No figures in PDF output

2008-05-19 Thread Paul Johnson
On Sat, May 17, 2008 at 12:39 PM, Adrian Peter <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am using Lyx (1.5.1 on WinXP) to write my thesis.  When I try exporting the 
> multi-part document as pdf (using dvipdfm) I get errors but the output pdf 
> has no figures in it.  All the captions and everything are in the right 
> place.  There is white space where the figure should be.  Could someone help 
> me figure out what is going on?  Thank you.
>
> Adrian
>
>
Your question does not have all of the information we need.

1. What format are the images in?  Possibly there is no translator
installed on your system for that conversion approach you are using.

2. Do your individual parts compile & view fine? If they do, then
we've got a real puzzle.

3. Can you give us a small working example to demonstrate the problem?

4. Did you know that "pdflatex" is the recommended method of
processing documents into pdf output?  I think the way you are using
is considered the least dependable.  It would be preferable to use
ps2pdf, I think.

5. There is a script tex2pdf, that can handle lyx or tex files.  When
I encounter a difficult problem, I use that.

http://tex2pdf.berlios.de/

6. It seems like your version of LyX is pretty old. If you think there
is a bug in LyX itself, you won't get anybody's attention until you
install the latest release and test this.


>
-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Converter failure with Sweave

2008-03-20 Thread Paul Johnson
I Just made it work on a Windows XP machine like this,

>From the LyX for windows faq, I learned you can open a dos box and run

lyx -dbg 3

and that lets you see the error messages and such. If I were using
windows, I would always start LyX that way. From the errors I see
there, it appears to me as if the "R CMD Sweave" approach for the
converter will never work under the DOS shell, and people for whom it
does work in Windows are probably using a replacement shell, such as
BASH.

Never fear, it can still work.

I put a copy of noweb.sty in the MikTex\tex\latex hierarchy, also had
to copy the R\share\texmf directory contents into the MikTeX\tex\latex
hierarchy. For reasons I don't understand, MikTeX would not let me add
that to the search path.  Have done it in Linux before, but that's
TeTeX, what can I say?

Then I put R\bin into the system path. On my system, that is
C:\ProgramFiles\R\bin.  Note I always omit spaces because they suck.

Then Put 2  files (MakeRweave.R and Rweave.bat) into R\bin directory.
I attached MakeRweave.R, but Gmail will not let me assign the
Rweave.bat.  So here it is (all on one line):

C:/ProgramFiles/R/bin/Rterm --no-save --args "%1"
 "%1.log

Any other place that you are sure is in the path would be OK for those
files.  You may need to revise Rweave.bat to fit your paths. In there,
  I don't know for sure how to make it work if you have spaces in your
directory names. To me, spaces are a curse.  They really suck.

In the R preferences dialog, look for Noweb-> latex. If you now  have
"R CMD Sweave $$i" replace that with the name of the bat file I give,
"Rweave $$i".  No need to insert "bat" there.

I also attach sample LyX document that does view in PDF

pj



On Thu, Mar 20, 2008 at 11:30 AM, Paul Johnson <[EMAIL PROTECTED]> wrote:
> The other thing I notice about your approach.  You did the noweb.sty
>  trick I recommended,but if you are using Gregor's converter
>  configuraiton, you need to put the R Sweave.sty directory into your
>  latex path.  I don't think you can mix/match the two approaches.
>
>
>  pj
>
>  On Thu, Mar 20, 2008 at 9:39 AM, Andrew Barr <[EMAIL PROTECTED]> wrote:
>
>
> > Hi all,
>  >
>  >  Using Lyx 1.5.2 and MiKTeX 2.5 on XP.  I am trying to use the Sweave
>  >  to create literate-article documents.  I haven't found great
>  >  documentation for how to do this on a windows install, but I have
>  >  pieced together the following steps, that ultimately fail when I try
>  >  to produce any layout by any method.  I get the following error.
>  >  "Lyx:Cannot convert file.  An error occured whilst running R CMD
>  >  Sweave "newfile2.Rnw"".  Anybody know why?
>  >
>  >
>  >  What I did
>  >  (1) download Noweb.sty file
>  >  (2) verify that MiKTeX is indexing the directory containing Noweb.sty.
>  >  (3) create a preferences file that contains the following code, store
>  >  this in the Lyx Users directory, and verify through Lyx menu that this
>  >  correctly updates converters
>  >
>  >  # FORMATS SECTION ##
>  >  \format "literate" "Rnw" "Sweave" "" "editor" "editor"
>  >  \format "r" "R" "R/S code" "" "editor" "editor"
>  >  \format "pdflatex" "tex" "LaTeX (pdflatex)" "" "editor" "editor"
>  >  \format "latex" "tex" "LaTeX (plain)" "" "editor" "editor" "document"
>  >
>  >  # CONVERTERS SECTION ##
>  >  \converter "literate" "r" "R CMD Stangle $$i" ""
>  >  \converter "literate" "latex" "R CMD Sweave $$i" ""
>  >  \converter "literate" "pdflatex" "R CMD Sweave $$i" ""
>  >
>  >  (4) Copy literate-article layout files to users directory.
>  >  (5) reconfigure Lyx.
>  >
>  >  Then comes the error when I try to get any output.  Thanks.
>  >
>  >
>  >
>  >
>  >
>  >  --
>  >  W. Andrew Barr
>  >  Department of Anthropology
>  >  University of Texas at Austin
>  >  1 University Station C3200
>  >  Austin, TX 78712-0303
>  >  Email: [EMAIL PROTECTED]
>  >
>
>
>
>  --
>
>
> Paul E. Johnson
>  Professor, Political Science
>  1541 Lilac Lane, Room 504
>  University of Kansas
>



-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


MakeRweave.R
Description: Binary data


TestSweave.lyx
Description: application/lyx


Re: Converter failure with Sweave

2008-03-20 Thread Paul Johnson
On Thu, Mar 20, 2008 at 9:39 AM, Andrew Barr <[EMAIL PROTECTED]> wrote:
> Hi all,
>
>  Using Lyx 1.5.2 and MiKTeX 2.5 on XP.  I am trying to use the Sweave
>  to create literate-article documents.  I haven't found great
>  documentation for how to do this on a windows install, but I have
>  pieced together the following steps, that ultimately fail when I try
>  to produce any layout by any method.  I get the following error.
>  "Lyx:Cannot convert file.  An error occured whilst running R CMD
>  Sweave "newfile2.Rnw"".  Anybody know why?
>

Hello, everybody.

Here are the instructions for how we did succeed in using Sweave with
LyX in Windows.  I do not  use Windows, but I have seen this work.  I
might test it out and see if I can fix it if somebody promises to send
me a t-shirt.   I think either you can follow this plan or study this
plan and then try to update it to the approach that Gregor proposes.
Gregor takes advantage of the fact that Sweave is now a command line
batch option for R, but the way that Windows interacts with the
environment is so different from Unix that I'm not optimistic that
something so simple will work.

Here is my warning.  Your R code mistakes do not finish gracefully
with Lyx & Sweave.  The only way to tell what works is to run LyX from
a terminal window, where you can see the R error messages.  If you
start LyX from an Icon, as Windows users are prone to do, then you
will be completely helpless.


My student Frank Liu worked this set of instructions. I understand
that he has many students in Taiwan who are doing this, and I will
contact him to see if he has newer information.

I'm pretty sure that the library(tools) in the script below should be
changed to library(utils). I also think the last two lines of that
script are not strictly necessary.
pj

 Original Message 
Subject:Re: Rweave for Windows Lyx (problem solved!)
Date:   Sat, 04 Mar 2006 17:06:22 -0600
From:   Cheng-shan (Frank) Liu



Thank you, Nicolás. Also thank Uwe Ligges, Brian D. Ripley, and Paul
Johnson for their advices. Here is a summary of the advices about how to
make Rweave work in Lyx under Windows:

Suppose your Lyx is installed in C:\ProgramFiles\Lyx and your R in
C:\ProgramFiles\R-2.2.1.

1. Create a R file "MakeSweave.R" with the following lines and then put
it in "C:\ProgramFiles\Lyx\bin\" (this is a path registered in Lyx).

library(tools)
args <- commandArgs()
inp <- args[length(args)]
Sweave(inp)
base <- sub("\.(Rnw|Rtex)$", "", inp)
texi2dvi(paste("base", ".tex", sep=""), pdf=TRUE)
shell.exec(paste("base", ".pdf", sep=""))

2. Create a batch script called "Rweave.bat" with the follwowing line,
and put it in "C:\ProgramFiles\Lyx\bin\". (Note that back slash "/",
rather than slash "/", is used in the script.)
C:/ProgramFiles/R-2.2.1/bin/Rterm --no-save --args "%1"
 "%1.log"

3. Put noweb.sty (can be found in google, or simply grab this file:
http://www.lsi.upc.es/~tpl/noweb.sty) in
C:\ProgramFiles\Miktex\tex\latex\noweb\ and refresh MikTex.

4. Reconfigure Lyx (go to Edit-> Reconfigure). Check if you have
document class "article(noweb)" (Layout->Document), If not, you may need
to reinstall Lyx.

5. Last, make Lyx recognize the converter script Rweave. Go to
Edit->Preferences->Converters. In the "From" pulldown, choose Noweb. In
the "To" pulldown, choose LaTeX. Hit the "new" button toward the bottom.
Then, make sure the Converter Noweb->LaTeX is chosen, and in the box
called "Converter" type "Rweave $$i" without the quotation "".


To test if the installation is done, check out Dr. Paul Johnson's
example file (http://pj.freefaculty.org/stat/Distributions/Gamma-02.lyx
). See if you can view its pdf file.


-Frank Liu






-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


noweb book chapter include problem. How about "external material" strategy?

2008-03-19 Thread Paul Johnson
I've asked before, but have new enthusiasm because I just learned
about the ExternalMaterial handling in lyx-1.5.4.

I succeed using NoWeb strategy in LyX to interact with the statistics
program R.  There has been some posting about that in here lately by
other people doing it too and I see Gregor has updated the Wiki:
http://wiki.lyx.org/LyX/LyxWithRThroughSweave

Now I'm writing a book and want to include some of those Noweb
articles as chapters.  I create the book master document and try to
include the lyx files, but when I view the book in lyx, the included
documents are not put through the Noweb processor.  They just appear
in the output as they are in the lyx file.  They don't get sent
through the Lyx-> LaTeX (via noweb) step. I've tried many variations
on this theme.

Now I'm thinking that the LyX  Insert->File->Lyx Document was the
wrong approach from the start.  Instead, I think what I need is
Insert->file->external material where the external material is
customized for this type of document.  But I need help in making it
work.

Here's why I think it might work. I noticed a neat thing LyX does that
I did not know about before.

An Xfig drawing can be included in 2 ways into LyX.

1. Insert-> graphics

Choose the fig file, then LyX will process the fig file and it will
show as a graphic.  The processing lyx does to the fig file translates
it to postscript, I think.  It just treats the fig file as a picture.

2. Insert->File->External Material.

This does something different.  It will decipher LaTeX markup in text
in the fig file. (I think it is doing the 2 parts export to EPS
format, if you know what i mean).   If you put LaTeX text in your
file, and you marked it with the "special" attribute, then LyX will
"process" that xfig file to convert the LaTeX markup and fit it into
the graphic.  So in the xfig file, you can put in text like $\alpha$
and in the output, you see the Greek alpha.  Note this is different
from the Insert->graphics approach, where the literal string
"$\alpha$" appears.

Seeing this external handling made me wonder, why doesn't one of the
smart guys who knows LyX inside and out design a "Noweb" handler for
External Material.  The converter specified in LyX preferences to go
from he noweb format "Sweave" to LaTeX is

.R CMD Sweave $$i


So, If I want to include a lyx file, I need some way to tell Lyx it
needs that post processing, and that's  why the external material
thing seems just right.


If one of you would do it for me, it would be great.  More likely, you
will tell me what manual to read about writing external material
handlers in LyX.  That would be good too, but requiring more work :)

PJ

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


top margin disappearing in printout with lyx-1.5.4 on Fedora 8

2008-03-14 Thread Paul Johnson
Overnight, Lyx-1.5.4 installed from Fedora Linux updates.

Today I opened lyx and saw it re-scanning for preferences, so I
realized something was new.  I opened an old document and printed it
on a post script printer. The top margin was really small, the bottom
margin was really big. The margin appears normal in the dvi view.   I
exported the same file to pdf and opened in evince, and the top margin
was normal, and it prints out with correct margins.

I have had a lot of trouble with the CUPS printer system and drivers
for Hewlett Packard printers, but this one printer had been pretty
dependable.  I only suspect it has something to do with LyX because
LyX was updated overnight.

Where do you think I might find an explanation/fix?


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Inserting graphics of the "appropriate" type: how to?

2008-03-04 Thread Paul Johnson
On Tue, Mar 4, 2008 at 3:24 PM, Paul A. Rubin <[EMAIL PROTECTED]> wrote:
>
> Paul Johnson wrote:
>  > For many plots in a sub directory "PlotFigures", I have 2 versions,
>  > one in eps version and  one in pdf version.
>  >
>  > With Lyx-1.5.3 on Fedora Linux 8, I'm using a koma-script book format.
>  >  I've run up against this problem inserting graphics.  When I insert a
>  > pdf figure, then in the DVI/postscript output, the output is not good
>  > because there's a big blank area at the top of the figure.  In the pdf
>  > output, the document is good (presumably because the figure was pdf,
>  > the latex processor handles it well).  On the other hand, if I insert
>  > the eps figure in Lyx, then the DVI/postscript output is good, but the
>  > pdf output looks bad.
>  >
>  > I think this is happening because there really is a big white area at
>  > the top of the pdf files, and I will have to remedy that for future
>  > figures.
>  >
>  > But for working with the existing images, what is a good approach?
>  > I've been reading lyx-user archives.
>  >
>  > In some email messages from this list, I see users ask this question
>  > and they are advised to omit the image type from the LyX insert.  LyX
>  > will use eps for DVI output and pdf for pdf output.  I mean, if a
>  > graphic is available as Plot-001.eps or Plot-001.pdf,   then one
>  > should simply insert the figure name "Plot-001" and the LaTeX
>  > processor will choose the correct format. However, when I try that in
>  > LyX, I see "figure not found" on the screen.
>  >
>  > What's up with that?
>  >
>  > In retrospect, I see I need to do more work in the R script that
>  > manufactures the images, because I think I can stop the pdf output
>  > from including that giant white space at the top of the pdf.  But it
>  > seems weird to have to do that in order to get an EPS output file.
>  >
>
>  Have you tried specifying a clipping region in LyX?  Might be there's an
>  issue with reading the bounding box info from the PDF (or EPS) (or both).
>
>  /Paul
>

If I set the bounding box so that a pdf image looks good in the
DVI/postscript output, then it is not properly positioned in the
pdflatex pdf output.

I've been double checking and I do not believe the pdf images have a
big white space in them at the top.  It is appearing to me that LyX
wants to treat an inserted pdf graphic as if it is a thing on its own
8.5x11 inch sized piece of white paper.  WHen I view the pdf in
acroread or evince, there is no big white space at the top and the
properties properly indicate the size of the pdf is 5x7 inches, as I
intended when I created it.
pj



-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Inserting graphics of the "appropriate" type: how to?

2008-03-04 Thread Paul Johnson
For many plots in a sub directory "PlotFigures", I have 2 versions,
one in eps version and  one in pdf version.

With Lyx-1.5.3 on Fedora Linux 8, I'm using a koma-script book format.
 I've run up against this problem inserting graphics.  When I insert a
pdf figure, then in the DVI/postscript output, the output is not good
because there's a big blank area at the top of the figure.  In the pdf
output, the document is good (presumably because the figure was pdf,
the latex processor handles it well).  On the other hand, if I insert
the eps figure in Lyx, then the DVI/postscript output is good, but the
pdf output looks bad.

I think this is happening because there really is a big white area at
the top of the pdf files, and I will have to remedy that for future
figures.

But for working with the existing images, what is a good approach?
I've been reading lyx-user archives.

In some email messages from this list, I see users ask this question
and they are advised to omit the image type from the LyX insert.  LyX
will use eps for DVI output and pdf for pdf output.  I mean, if a
graphic is available as Plot-001.eps or Plot-001.pdf,   then one
should simply insert the figure name "Plot-001" and the LaTeX
processor will choose the correct format. However, when I try that in
LyX, I see "figure not found" on the screen.

What's up with that?

In retrospect, I see I need to do more work in the R script that
manufactures the images, because I think I can stop the pdf output
from including that giant white space at the top of the pdf.  But it
seems weird to have to do that in order to get an EPS output file.

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Why oh why did you drop xforms?

2008-02-19 Thread Paul Johnson
On Feb 19, 2008 1:38 PM, Steve Litt <[EMAIL PROTECTED]> wrote:
> On Tuesday 19 February 2008 02:01, Abdelrazak Younes wrote:
> > Steve Litt wrote:
>
> > > Interestingly, it appears that in order to upgrade to qt 2.2.3, I would
> > > need to upgrade my glibc (because of rtld(GNU_HASH)). I'm sorry, but
> > > that's just too much to expect from a user.
> >
> > No offense intended Steve but you are obviously confused with version
> > numbers etc.
>
> Of course offense was intended. A typo, or even a series of like typos, does
> not confusion make.
>
> > I even suspect that you didn't even fully read the README
> > and INSTALL that come with the source.
>
> Quite a leap of logic.
>
> > As an end-user, either you wait
> > for your distro to come with a binary package or you do the required
> > step by step things you need to do in order to compile LyX.
>
> That's exactly my point. When the step by step implies messing with the very
> vitals of your 1.5 year old OS, there's something very wrong with the step by
> step.
>
Well, I see why people are upset with your tone now.

Once we get to the point of compiling software, expecting instructions
to be 'idiot proof' is a mistake. The GNU software build process is
fairly widespread and pretty easy to use, but it is not intended for
people who aren't willing/able to experiment and learn.

Rebuilding QT is not messing with "The very vitals" of an operating
system.  At worst, it is mettling with an outer part of the graphical
interface.

But you can/should protect yourself by leaving your "operating system"
untouched.  If you are re-building QT from source, what you do is set
the prefix to install into a nonstandard place, say
/home/steve/packages/qt and then when you build LyX, you tell it to
use that version of QT.  And in the configure statement for LyX, you
set the prefix on LyX to install into /home/steve/packages/, so it
does not affect the "operating system" even in the littlest bit.  This
can all be installed as a non root user and it never affects anyone.


> > Many users
> > compile LyX without problems.
>
> That's relevent why?

That is supposed to give you the confidence to feel that, if you
understood what was going on in the build process, you would succeed.
If you pay attention to the advice people give you, you can make it
work.

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Why oh why did you drop xforms?

2008-02-19 Thread Paul Johnson
Oh, please.  The suspense is killing me.  Did Steve succeed in
building the LyX he wants?

If not, lets help him do it.  The troubles that were posted early on
were common errors in configure/make stages of building software.

My recollection is that Mandriva is an RPM based system that branched
out of Mandrake, which began as a simple re-packaging of RedHat linux
with "optimized" packages for i586 and i686. I see nothing in their
pages to make me think I'm wrong.   Ignore the complaining about the
build system, lets just find out what Mandriva has, and if it doesn't
have the right thing, lets build RPMS for those things too.  Hell, we
could even build a new gcc if we have to.


I am confident I can build LyX if the devel package for QT4 is
installed and the devel package for QT3 is not installed.  I believe
getting this to work will probably require some environment settings
for QT related things and I notice the settings that QT4 looks for are
different than the ones that QT3 looks for.

I am confident I can do this because I built LyX for Scientific Linux
5 a few weeks ago, and that is an old distribution (compared to Fedora
9, anyway).  The "new" Scientific Linux is built on Fedora from about
18 months ago.

I'm willing to prove myself wrong:

If anybody has a Mandriva system of the right vintage, create an
account for me that has ssh privileges and email me a password.  I can
build RPMS, and then make them available for everybody.  The owner may
need to install some devel tools, but when I'm done, that account
where I'll build everything can be erased and no lasting damage will
be done.

PJ

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: lyx crash when loading eps files

2008-02-19 Thread Paul Johnson
On Feb 19, 2008 11:06 AM, Andre Poenitz
<[EMAIL PROTECTED]> wrote:
> On Mon, Feb 18, 2008 at 11:55:21PM -0600, Paul Johnson wrote:
> > I can't understand how/why LyX depends on kdelibs.
>
> LyX doesn't depend on KDE.
>
> Andre'
>

Yes, that is what I said at the start.  Then how in the world can it
be an update of kdebase from version 3 to 4.0.1 makes lyx break?

Or, more to the point, what should I do to make LyX or tetex use the
other eps tools that do work? Maybe in the xdg setup I can tell Lyx to
use xdvi rather than the apparently broken kde thing?

I only use KDE because i can have different backgrounds on different
workspaces.

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: lyx crash when loading eps files

2008-02-18 Thread Paul Johnson
On Feb 19, 2008 12:20 AM, Jürgen Spitzmüller <[EMAIL PROTECTED]> wrote:
> Paul Johnson wrote:
> > I can't understand how/why LyX depends on kdelibs.
>
> Here's the explanation from a kdelibs developer:
>
> [...]
>
>  Qt uses the QImageIO Plugins for rendering images. Since KDE installs
>  such a plugin for the EPS format, every Qt application picks that plugin
>  as well. Unfortunately in KDE4 the EPS plugin used a class which is only
>  available in applications which use KApplication instead of
>  QApplication, so the plugin asserted and Lyx was terminated.
>
>  I've fixed that issue in trunk and the KDE4.0 branch (will be part of
>  4.0.1 release) now by using only Qt classes in the EPS plugin.
>
> [...]
>
> Jürgen
>

This is not explaining how LyX depends on kdebase.  That's the part
i'm puzzled over.  Is it kdvi that is the trouble?

pj

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Why oh why did you drop xforms?

2008-02-18 Thread Paul Johnson
Nobody cautioned you yet in this thread.  Delete the source tree and
untar a fresh copy before re-setting the environment and re-running
configure.  Otherwise, same old mistakes just happen again and again.

I did this recompile myself a few weeks ago on Scientific Linux and I
ended up setting QTDIR and QTHOME in the environment.  That fixed it.

Also, you should only have the devel package for one version of QT at
a time.  So after putting in the qt4 devel thing, make sure  you have
no qt3 devel stuff left.

pj

On Feb 18, 2008 3:39 PM, Steve Litt <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Well, after 2 hours I got libqt4-devel loaded, and a 30 minute make ended like
> this:
>
> make  all-recursive
> make[6]: Entering directory `/home/slitt/junk/lyx-1.5.3/src/frontends/qt4'
> Making all in ui
> make[7]: Entering directory `/home/slitt/junk/lyx-1.5.3/src/frontends/qt4/ui'
> /usr/lib/qt3//bin/uic -tr lyx::qt_ AboutUi.ui -o AboutUi.h
> uic: File generated with too recent version of Qt Designer (4.0 vs. 3.3.6)
> make[7]: *** [AboutUi.h] Error 1
> make[7]: Leaving directory `/home/slitt/junk/lyx-1.5.3/src/frontends/qt4/ui'
> make[6]: *** [all-recursive] Error 1
> make[6]: Leaving directory `/home/slitt/junk/lyx-1.5.3/src/frontends/qt4'
> make[5]: *** [all] Error 2
> make[5]: Leaving directory `/home/slitt/junk/lyx-1.5.3/src/frontends/qt4'
> make[4]: *** [all-recursive] Error 1
> make[4]: Leaving directory `/home/slitt/junk/lyx-1.5.3/src/frontends'
> make[3]: *** [all] Error 2
> make[3]: Leaving directory `/home/slitt/junk/lyx-1.5.3/src/frontends'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/home/slitt/junk/lyx-1.5.3/src'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/home/slitt/junk/lyx-1.5.3/src'
> make: *** [all-recursive] Error 1
> [EMAIL PROTECTED] lyx-1.5.3]$
>
> Back when we had xforms as an option, I could easily compile LyX. OK yeah it
> wasn't as pretty as QT, but it worked and got the job done, and at least I
> could use a LyX newer and more featureful than my Linux distro.
>
> Thanks
>
> SteveT
>
> Steve Litt
> Books written in LyX:
> Troubleshooting Techniques of the Successful Technologist
> Twenty Eight Tales of Troubleshooting
> Troubleshooting: Just the Facts
>



-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: lyx crash when loading eps files

2008-02-18 Thread Paul Johnson
On Jan 25, 2008 7:56 AM, Jürgen Spitzmüller <[EMAIL PROTECTED]> wrote:
> David Hewitt wrote:
> > Responding to myself... I had reason to just now try an EPS figure in LyX
> > and it worked fine. Is this known problem restricted to Linux, or
> > specifically Kubuntu?
>
> Well, you need to have KDE 4 installed. We had reports for various distros.
> Amd the problem is still there with KDE 4.0.
>
> Jürgen
>
Is there any news on this trouble?  I'm a little puzzled by it.

On Fedora 8, I just installed the bleeding edge KDE4 and found that
lyx crashed, and then I googled my way to this thread.  I am running
the lyx package that is distributed with Fedora updates.

I can confirm that un-installation of kdebase-4 and re-installation of
the kdebase 3 fixes the problem and LyX works again.

I can't understand how/why LyX depends on kdelibs. I knew this version
of LyX is using the QT libraries, but those are separate from KDE.  If
I installed the old xforms library, could I rebuild lyx in the old
fashioned way and be fine?

Oh, maybe the problem is not in lyx, by kdvi.  In that case, then
shouldn't some preference magic make it possible to use the other dvi
viewer?  xdvi or whatever? I guess not, since if it were that obvious,
then somebody would have said so.

The info from ldd doesn't clear it up for me very much.

$ ldd /usr/bin/lyx
linux-gate.so.1 =>  (0x0011)
libQtGui.so.4 => /usr/lib/libQtGui.so.4 (0x04c41000)
libQtCore.so.4 => /usr/lib/libQtCore.so.4 (0x005d)
libAiksaurus-1.2.so.0 => /usr/lib/libAiksaurus-1.2.so.0 (0x001cd000)
libaspell.so.15 => /usr/lib/libaspell.so.15 (0x046e3000)
libSM.so.6 => /usr/lib/libSM.so.6 (0x00c7c000)
libICE.so.6 => /usr/lib/libICE.so.6 (0x00c87000)
libz.so.1 => /lib/libz.so.1 (0x00c55000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00415000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0020f000)
libm.so.6 => /lib/libm.so.6 (0x00adb000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00dd1000)
libc.so.6 => /lib/libc.so.6 (0x0098)
libaudio.so.2 => /usr/lib/libaudio.so.2 (0x005b6000)
libXt.so.6 => /usr/lib/libXt.so.6 (0x00b66000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00ca3000)
libgthread-2.0.so.0 => /lib/libgthread-2.0.so.0 (0x00143000)
librt.so.1 => /lib/librt.so.1 (0x00dc2000)
libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x0490e000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00b0d000)
libXi.so.6 => /usr/lib/libXi.so.6 (0x008ad000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0x008a2000)
libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x00b28000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x008b8000)
libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x008fc000)
libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x008c4000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00ccb000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00d7c000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x008ea000)
libdl.so.2 => /lib/libdl.so.2 (0x00b06000)
libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0x0089e000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x008cc000)
/lib/ld-linux.so.2 (0x0095d000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00c5)
libexpat.so.1 => /lib/libexpat.so.1 (0x00d59000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00c44000)


I'm wishing I had not dumped the KDE4 test packages, so I could
explore this some more.

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Moving graphics from R into LyX - best format?

2008-01-24 Thread Paul Johnson
On 1/24/08, Liviu Andronic <[EMAIL PROTECTED]> wrote:
> On 1/23/08, Paul Johnson <[EMAIL PROTECTED]> wrote:
> > Brief correction. I worked out a way in which to use Sweave within
> > lyx. The instruction is posted in the Lyx Wiki
> >
> > http://wiki.lyx.org/LyX/LyxWithRThroughSweave
>
> Based on Gregor's article and on recent discussions, these were the
> changes needed to get LyX and Sweave up and running on my system
> (Gentoo Linux).
>
> 1. Put noweb.sty [1] in your TeX PATH, followed by TeX rehash and LyX
> reconfigure.
> 2. Add the following lines to the LyX preferences file:
> # FORMATS SECTION ##
> \format "literate" "Rnw" "Sweave"   "" "editor" "editor"
> \format "r""R"   "R/S code" "" "editor" "editor"
> \format "pdflatex" "tex" "LaTeX (pdflatex)" "" "editor" "editor"
> \format "latex""tex" "LaTeX (plain)""" "editor" "editor" "document"
>
> # CONVERTERS SECTION ##
> \converter "literate" "r""R CMD Stangle $$i" ""
> \converter "literate"  "latex" "R CMD Sweave $$i" ""
> \converter "literate"  "pdflatex" "R CMD Sweave $$i" ""
>
> As a result, using LyX 1.5.2, pdflatex and R 2.6.1, the documents that
> you made available Normal-01.lyx [2] and Gamma-02.lyx [3] compile like
> a sweet.

Awesome.  Sounds vain, but I feel stronger knowing those docs livve in
 moree computers than minne.



>
> Contrary to the Wikipedia entry, it doesn't seem necessary to create a
> specific "Rweave" "batch" script for processing Rnw-files. I never got
> into the subtleties of the applied changes, but those mentioned above
> seem enough to make LyX and Sweave interact well together.
>
R 2.6 added that function for us, so user no longer needs to.




> Regards,
> Liviu
>
> [1] http://tug.ctan.org/cgi-bin/getFile.py?fn=/web/noweb/src/tex/noweb.sty
> [2] http://wiki.lyx.org/uploads/LaTeX/SweaveR/Normal-01.lyx
> [3] http://wiki.lyx.org/uploads/LaTeX/SweaveR/Gamma-02.lyx
>


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Moving graphics from R into LyX - best format?

2008-01-23 Thread Paul Johnson
On Jan 22, 2008 5:17 PM, Liviu Andronic <[EMAIL PROTECTED]> wrote:
> Hello David,
>
> You might be interested in using Sweave. There, you only need to write
> the code. No export - import. Recent threads on Sweave contain all the
> pertinent information. Basically, you need to use the noweb class,
> tweak the preferences file (specify the converters specific to R) and
> write the code chunks in ERT, something similar to:
> "<>=
> 2+2
> @"
>
> Check this link for interesting demos [1]. They are not done in LyX,
> but the essentials stay the same.
>
> Liviu
>
> [1] http://www.stat.umn.edu/~charlie/Sweave
>
Brief correction. I worked out a way in which to use Sweave within
lyx. The instruction is posted in the Lyx Wiki

http://wiki.lyx.org/LyX/LyxWithRThroughSweave

A fellow Gregor Gorjanc has polished that up a bit and proposed an
article to R-News about using LyX as well.

http://gregor.gorjanc.googlepages.com/lyx-sweave

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


easiest way to type accents, graves, and other interesting letters

2008-01-22 Thread Paul Johnson
I've seen people asking for a simple way to enter accents and graves,
and the discussion here goes off into a configuration of the keyboard
and the X server.  I think you are misleading people a little bit.

I'm here to remind users that reconfiguring to use COMPOSE is
unnecessary, at least if you don't need to enter special symbols very
frequently.  I need accents only occasionally, and I often forget how
this is done.  I learned this trick from a docuement that was called
"Lyx Programmer's Guide" (or similar name) that was, apparently, never
officially published with LyX.  I can't find it today.  But, while
googling, I've noticed the easy way is explained in the LyX wiki in
the bottom of this page:

http://wiki.lyx.org/LyX/LyxFunctions

To see an example, just open lyx and hit alt-x and it opens a small
function bar at the bottom of the LyX display.  In there, one can type
commands.  To test, type

accent-acute a

when you hit enter, you should see the character you want in the text.

Honestly, I don't think we should encourage users to try for the
compose key solution before we point out this much simpler way to get
accents and other symbols for nonEnglish language documents.


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: [OT] Best KDE-centric Distribution?

2008-01-22 Thread Paul Johnson
On Jan 14, 2008 11:18 AM, rgheck <[EMAIL PROTECTED]> wrote:
>
> I've been using Fedora ever since I started using Linux, but the
> second-rate status of KDE under Fedora is starting to get to me, so I'm
> thinking about switching. But then: to what? I don't think Kubuntu is
> for me. Gentoo would be an option, but then I'm not sure I want to be
> quite that bleeding-edge. So, the question: What?
>
> Richard
>
>
I've been running KDE under Fedora using the special, more up-to-date
KDE rpms from the kde-redhat repo.  Seems better to me.
$ cat /etc/yum.repos.d/kde.repo

# kde.repo, v2.0

[kde]
name=kde
mirrorlist=http://apt.kde-redhat.org/apt/kde-redhat/fedora/mirrors-stable
gpgkey=http://apt.kde-redhat.org/apt/kde-redhat/kde-redhat.RPM-GPG-KEY
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-kde-redhat
enabled=1

[kde-all]
name=kde-all
mirrorlist=http://apt.kde-redhat.org/apt/kde-redhat/all/stable/mirrors
gpgkey=http://apt.kde-redhat.org/apt/kde-redhat/kde-redhat.RPM-GPG-KEY
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-kde-redhat
enabled=1

For more information, and the full repo info,

http://kde-redhat.sourceforge.net/

I don't run the kde-4 yet because it is still in their testing, but if
you are a gambler, I'd say go for it!


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Moving graphics from R into LyX - best format?

2008-01-22 Thread Paul Johnson
On Jan 13, 2008 3:13 PM, David Hewitt <[EMAIL PROTECTED]> wrote:
>
> I produce most of my statistical graphics in R and move them into LyX floats.
> I've been exporting them as JPGs from R. Is there a better format that plays
> well with LyX/LaTeX? Any suggestions are appreciated.
>
> -
>

If you want EPS output in R, be aware that you need to use some special options.
I tried to explain it all here for my students:
http://pj.freefaculty.org/R/Rtips.html#5.2

Don't forget the onefile=F option, or else you don't get EPS, you just
get ps with no preview.

Also, seriously consider getting into the habit of creating a screen
display device that is the correct size (in inches) for insertion into
your latex document.  That way, there will be no danger of damage due
to re-sizing when you take the figure into the document.

HTH
pj


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Compare Changes/Differences between LyX Documents

2008-01-22 Thread Paul Johnson
On Jan 22, 2008 11:59 AM, Ken <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Is there an easy way to compare the changes or differences between two
> LyX documents?
>

Open both files in Emacs.  Then choose tools/compare and you get an
awesome point by point display of differences (output from diff, I
think, but translated into a nice format).

pj


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


what is this: \usepackage[latin9]{inputenc} and why does TexLive hate it?

2008-01-21 Thread Paul Johnson
In Fedora 8 Linux, I'm using the TexLive version of latex that is now
available fore testing.  I can ask there about this trouble, but I'm
pretty sure they will send me back here to ask "why does LyX do
that?".

The problem:  I get weird output.  In a simple document created from
the default everything--with no fancy features-- no preface items
inserted by me, then I have the problem that the xvi and pdf output is
"jumbled".  Instead of the default characters, the type font that is
used looks like an old Courier typewriter, but the characters are not
evenly spaced. Some are typed on top of each other, some have extra
spaces between them. I'm attaching this small lyx file to this note,
wondering if anybody sees something funny about it.

I output the lyx document to latex for experimentation, and I cut
lines from the pre-amble until the document came out correct.  In all
of the troublesome files, the problem seems to be this one line:

\usepackage[latin9]{inputenc}

What is it? What is latin9?

When I run "pdflatex newfile1.tex", I see a lot of messages like this:

pdfTeX warning: pdflatex (file /var/lib/texmf/fonts/map/pdftex/updmap/pdftex.ma
p): ambiguous entry for `ebbx10': font file present but not included, will be t
reated as font file not present


pdfTeX warning: pdflatex (file /var/lib/texmf/fonts/map/pdftex/updmap/pdftex.ma
p): ambiguous entry for `ebmo10': font file present but not included, will be t
reated as font file not present
...

Back tracking, I note no errors in the latex run, but when I view the
dvi file the output looks like hell, and in the terminal I see:

$ xdvi newfile1.dvi
xdvi-xaw3d.bin: Warning: Font map calls for ecrm1200, but it was not
found (will try PK version instead).
xdvi-xaw3d.bin: Warning: Font map calls for ecrm1728, but it was not
found (will try PK version instead).
xdvi-xaw3d.bin: Warning: Font map calls for ecrm1000, but it was not
found (will try PK version instead).


After I delete that preamble line about latin9 input encoding, then
the document processes correctly! Looks great!

What do you think?  Where is "latin9" coming from?



-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


newfile1.lyx
Description: application/lyx


Re: [feature request] Using Sweave with LyX - "out of the box" support for creating R reports

2008-01-04 Thread Paul Johnson
On Jan 4, 2008 7:32 AM, Jean-Marc Lasgouttes <[EMAIL PROTECTED]> wrote:
> Gorjanc Gregor <[EMAIL PROTECTED]> writes:
>
> > take a look at
> > http://bugzilla.lyx.org/show_bug.cgi?id=4286
> >
> > I did try to change the milestone to 1.6, but was not able to do
> > that, since I was not the original poster.
>
> FWIW, I have downloaded the paper and began to read it. I am not sure
> what is the best way to proceed. I guess it would be enough to
> configure either noweb or Sweave depending on which one is available.
> Also it would be nice to be able to use this with any class. The new
> support for modules should be enough for that, but it needs thought
> and a bit of design. I doubt I will have time to work on it
> personally.
>
> Unfortunately, the target will be set to 1.6 only if we find somebody
> willing to work on it.
>
> JMarc
>

It appears to me that this is mostly superficial.  The change in the R
batch processing has simplified the problem somewhat from when I was
working on it originally.   Now it is no longer necessary to use that
small bash script to pass the LyX noweb output to R.  Rather, one can
simply make one Lyx preference change, either with the lyx GUI
preference changer or by adding a like like this in ~/.lyx/preferences

\converter "literate"  "latex" "R CMD Sweave $$i" ""

It appears to me this "does the trick" even if one does not install Sweave.sty.

Take one the lyx documents I have posted here (files that use the
ordinary Lyx noweb article layout)

http://pj.freefaculty.org/stat/Distributions

Take Normal-01.lyx. You can see how the output is supposed to look
because I have the pdf file posted as well.  If you have R installed,
then open the document in LyX and the document will be processed just
fine. I do not think it is necessary to put Sweave.sty in the LaTeX
path, but, as I originally said in 2006, it is necessary to have
noweb.sty.  It is not necessary to have the whole noweb installation,
just that file.

I think the other part--the layout part--is just cosmetic. It controls
the way the R code chunks look on the screen only. The R code chunks
can be written as ordinary ERT.  If the Lyx user is happy enough to
just put in ERT (without a layout representation in the on-screen
display), the document will go through LaTeX and R fine.  It does not
matter what the blocks of ERT are called.

You could follow Gregor's example and add a layout environment that is
common to all noweb document classes. It could be called "Scrap" or
"Schunk".  Note in Gregor's Layouts, the structure is simple.  He
includes the existing noweb document layout and a
"literate-scrap.inc".

There is a more serious problem that I was never able to overcome.  If
one writes a book LyX, the R code chunks will be properly processed
only if they are actually in the main book file.  If one follows the
usual practice of writing chapters and then putting them together with
includes in the main book file, then in my experience, the R code does
not get processed.  I would be eager to see a working example of an R
book that solved this problem.  I asked about this in the LyX user
list last year and didn't get any answers, so I assumed it was an
intractable problem.

pj
-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Here's Sweave.sty:

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{Sweave}{}

\RequirePackage{ifthen}
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

[EMAIL PROTECTED]
[EMAIL PROTECTED]
\ProcessOptions

\RequirePackage{graphicx,fancyvrb}
\IfFileExists{upquote.sty}{\RequirePackage{upquote}}{}

[EMAIL PROTECTED]
[EMAIL PROTECTED]
  \RequirePackage[T1]{fontenc}
  \RequirePackage{ae}
}{}%

\DefineVerbatimEnvironment{Sinput}{Verbatim}{fontshape=sl}
\DefineVerbatimEnvironment{Soutput}{Verbatim}{}
\DefineVerbatimEnvironment{Scode}{Verbatim}{fontshape=sl}

\newenvironment{Schunk}{}{}


Re: TeXLive rpm packages available to Fedora 8 users

2007-12-11 Thread Paul Johnson
Just wanted to let you know the TeXLive works great on my Fedora 8
system.  I notice no diamage compared to tetex.  In fact, if TeXLive
would just use the same configuration commands (no more "texhash") I
expect most people would never notice the difference.

Do my eyes deceive me?  With LyX 1.5.2 and
texlive-latex-2007-0.18.fc9, it appears to me that the default LyX
configuration now produces GOOD QUALITY pdf output.  No more sketchy
looking fonts.  No more work-arounds for fonts.

Perhaps I accidentally fixed it in the past in my ~/,lyx, but I don't think so.

pj


Re: Exporting

2007-08-31 Thread Paul Johnson
That output ends with a error saying it can't find the zip program in
your system.  zip is necessary in the creation of ODT format files,
because those files are simply xhtml markup text that is compressed
with zip.   So install zip, and try again!

pj

On 8/30/07, John Kane <[EMAIL PROTECTED]> wrote:
> Thank you Paul.
> I have tried your suggestion and it looks like there
> may be a font problem although I'm not good enough at
> reading the terminal output to be sure. I have posted
> the output at
> http://ca.geocities.com/jrkrideau/LyX/lyx.ooo.pdf .
>
> I am not getting any error messages but two warnings
> instead.
>
> I have tried changing the fonts with no success.  What
> did you change the font setting to?
>
>  As before, tex file is working just fine
>
> --- Paul Johnson <[EMAIL PROTECTED]> wrote:
>
> > I just tried export to OpenDocument format with the
> > new LyX and have
> > some advice that may help.  Run LyX from a terminal
> > window.  That way,
> > you can watch the error messages. emitted by the
> > programs that do the
> > translation.
> >
> > For me, the first export to ODT frailed--tex4ht
> > crashed because it
> > could not find a font.  WHen I went to LyX
> > document->settings and
> > changed the default font, then the export to ODT did
> > work.
> >
> > If you just run lyx from a menu, you don't see the
> > error messages.  If
> > you run it from a terminal, you see stuff like this:
> >
> >
> > 
> > --- error --- Can't find/open file `ecbx1000.tfm'
> > 
> > t4ht.c (2006-09-13-14:28 kpathsea)
> > t4ht -f/descriptions.tex
> >   -coo
> > (/usr/share/texmf/tex4ht/base/unix/tex4ht.env)
> > Entering descriptions.lg
> > Error: Cannot view file
> > 
> > File does not exist:
> >
> /tmp/lyx_tmpdir9646cneuJa/lyx_tmpbuf0/descriptions.odt
> >
> > Apparently I lack whatever package has the ecbx
> > fonts, so it dies.
> > But If I change the font to TimesRoman, then it does
> > work.
> >
> > But you don't see these errors unless you run LyX
> > from a Terminal.
> >
> >
> > --
> > Paul E. Johnson
> > Professor, Political Science
> > 1541 Lilac Lane, Room 504
> > University of Kansas
> >
>
>
>
>   Get news delivered with the All new Yahoo! Mail.  Enjoy RSS feeds right 
> on your Mail page. Start today at http://mrd.mail.yahoo.com/try_beta?.intl=ca
>


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Paul Johnson has invited you to open a Google mail account

2007-08-29 Thread Paul Johnson
I've been using Gmail and thought you might like to try it out. Here's
an invitation to create an account.

I suggest that you create a gmail account just for list memberships,
and in that gmail account, create a "Label" for each email list and
then create a Filter that automatically sorts the messages into the
Label groups.  I can show you example of Filter that works.

-------

Paul Johnson has invited you to open a free Gmail account.

To accept this invitation and register for your account, visit
http://mail.google.com/mail/a-ccdc402345-d2e1152a8f-9dcce2ff5f

Once you create your account, Paul Johnson will be notified with
your new email address so you can stay in touch with Gmail!

If you haven't already heard about Gmail, it's a new search-based webmail
service that offers:

- Over 2,700 megabytes (two gigabytes) of free storage
- Built-in Google search that instantly finds any message you want
- Automatic arrangement of messages and related replies into
  "conversations"
- Powerful spam protection using innovative Google technology
- No large, annoying ads--just small text ads and related pages that are
  relevant to the content of your messages

To learn more about Gmail before registering, visit:
http://mail.google.com/mail/help/benefits.html

And, to see how easy it can be to switch to a new email service, check
out our new switch guide: http://mail.google.com/mail/help/switch/

We're still working every day to improve Gmail, so we might ask for your
comments and suggestions periodically.  We hope you'll like Gmail.  We
do.  And, it's only going to get better.

Thanks,

The Gmail Team

(If clicking the URLs in this message does not work, copy and paste them
into the address bar of your browser).


Re: Exporting

2007-08-29 Thread Paul Johnson
I just tried export to OpenDocument format with the new LyX and have
some advice that may help.  Run LyX from a terminal window.  That way,
you can watch the error messages. emitted by the programs that do the
translation.

For me, the first export to ODT frailed--tex4ht crashed because it
could not find a font.  WHen I went to LyX document->settings and
changed the default font, then the export to ODT did work.

If you just run lyx from a menu, you don't see the error messages.  If
you run it from a terminal, you see stuff like this:



--- error --- Can't find/open file `ecbx1000.tfm'

t4ht.c (2006-09-13-14:28 kpathsea)
t4ht -f/descriptions.tex
  -coo
(/usr/share/texmf/tex4ht/base/unix/tex4ht.env)
Entering descriptions.lg
Error: Cannot view file

File does not exist: /tmp/lyx_tmpdir9646cneuJa/lyx_tmpbuf0/descriptions.odt

Apparently I lack whatever package has the ecbx fonts, so it dies.
But If I change the font to TimesRoman, then it does work.

But you don't see these errors unless you run LyX from a Terminal.


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Indented paragraph in description list.

2007-08-29 Thread Paul Johnson
On 8/29/07, Rudi Gaelzer <[EMAIL PROTECTED]> wrote:
> Returning to this thread:
> http://marc.info/?l=lyx-users&m=116026623917165&w=2
> which concerns the creation of a multi-paragraph description list, the recipe
> works, but the new paragraph is not indented inside the description.
>

It seems to me you are working too hard. Just use the LyX tools.  If
you type a standard paragraph after a description, and then increase
the depth of that environment, the you DO get the kind of
multiparagraph environment you are looking for.  That is, you get

TERM   Sentence
Indented paragraph
Indented paragrraph
NEWTERM  Some sentence
Intented paragraph.

If you don't want blank space ahead of each new paragraph, use a
control-return instead of a return between each.  Lyx document
attached.



-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


descriptions.lyx
Description: application/lyx


Need help with syntax while creating layout file for examdesign

2007-07-30 Thread Paul Johnson
I'm trying to make a lyx layout file to help with making multiple
choice exams with the examdesign LaTeX class.  This class has many
great features, including automatic randomization of questions to
create separate forms as well as automatic key generation for grading.

The question environment is used with LaTeX like this

\begin{question}
Here is a question
\choice{first}
\choice{second}
\end{question}.


When processed, it should create output that assigns a number and
letters like this

1. Here is a question
(a)  first
(b)  second

I am attaching a layout file and a test lyx file and hope you can
advise me.  The pdf file result is posted online here, so you can see
I have some success.

http://pj.freefaculty.org/latex/examdes-ex1.pdf

I've used LyX Enumerate components and when properly nested, the
questions and answers do "look right" in LyX.  But if it looks right
in LyX, it doesn't print out through LaTeX.

Here is what is wrong.  The "question" environment does not know how
to end.  I put in the choices as nested inside the question, and that
"looks right" inside lyx because the enumeration is correct.  After I
put in the last choice in LyX and go up one level, I insert a new
question, but the output shows the new question "inside" the previous
one.  The only workaround I find is to put in a separator paragraph of
another style.  That does force LyX to put in \end{question}, but then
Lyx's enumeration of the questions is broken.


I'm not an expert, but it appears to me there is something weird in
the way LyX takes new environments.  newcommand works as expected, but
environments that have custome Preamble simply don't compile.  Here's
an example. "myquestion" should be the exact same thing as the
"question" environment.  Note the Preamble makes it do the same thing.

Style Question
  LatexTypeEnvironment
  LatexNamemyquestion
  NextNoIndent 1
  Preamble
   \newenvironment{myquestion}{
   \begin{question}}
   {\end{question}}
   EndPreamble
End

I export to LaTeX from lyx and study the result, it appears it should
compile, but running latex fails. It says there is a runaway.

Is there a LaTeX "preprocessor" like a C preprocessor?  I found myself
wishing I could review the first phase of the latex document
processing. Is there a phase in the latex processor which takes all of
the newenvironments and inserts them into the document itself, so you
can read what is going wrong?  I can't see much when the LaTeX
document simply has a preamble like

\newenvironment{myquestion}{
  \begin{question}}
  {\end{question}
}

and then inside the document it has

\begin{myquestion}

\end{myquestion}

I can't see why the latex program complaining.

I'm using Fedora Linux 7 with the tetex distribution.


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


examdesign.layout
Description: Binary data


examdes-ex1.lyx
Description: application/lyx


Re: lyx layout file for multiple choice exam: anybody have examdesign.layout working?

2007-07-27 Thread Paul Johnson
On 7/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Selon Paul Johnson <[EMAIL PROTECTED]>:
>
> > examdesign appears to be the LaTeX class that most closely fits my
> > needs for writing tests.  There was some conversation here in 2000
> > about an effort to create a layout file for that package, but I can't
> > find any evidence of a result.
> >
> > Anybody have a working layout file?
>
> I personally  use exam.cls which comes along with an exam.layout. It contains
> all you need for most tests and exams. I found it on the lyx wiki, I think.

I'm googling and don't find a file exam.layout.  How about posting, or
emailing it either to this list or to me directly pauljohn32 at
gmail.com?

The examdesign package has some great features, and maybe I'll get an
idea of how to make the layout for it if I see exam.layout.

Here's where I am stuck.  In examdesign, questions are represented by
a block of elements like this

\begin{question}Here is the question
\choice{a possible answer}
\choice[!]{another possible answer}
\end{question}

The exclaimation mark indicates the correct answer, and the exam
design generates an answer key from it.  This looks (to my untrained
eye) exacly like a LaTeX list, except with different words, replacing
"item" with "choice".

In the LyX layout, what I want to do is create a thing that
automatically pops up a space for the question and 5 choices.  I have
found a way to create a question environment and a choice environment,
and can manually force in each component to make a multiple guess
question. (Insert a question environment, then put the choice objectes
"inside" its depth.  It works.   But it makes using LyX substantially
more difficult/tedious than just writing LaTeX in Emacs.  So I'm
hoping for something more automatic.


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


lyx layout file for multiple choice exam: anybody have examdesign.layout working?

2007-07-26 Thread Paul Johnson

examdesign appears to be the LaTeX class that most closely fits my
needs for writing tests.  There was some conversation here in 2000
about an effort to create a layout file for that package, but I can't
find any evidence of a result.

Anybody have a working layout file?

I don't really need all of the examdesign features, just \question \answer.

pj

--
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


noweb book child documents: don't get processed through the noweb handler

2006-08-29 Thread Paul Johnson

Hello, everybody.

If I have a book chapter in book-noweb document class, I can view it
and the R/Noweb linkage is fine--the code chunks run through R and the
documents are displayed.

If I take the same book chapter, and put it in as a child document
inside the whole book the Noweb processing is not done. he
over-arching document's setting is also book-noweb, and it is simply a
series of included lyx child documents.  The code chunks just show up
in the final document, along with the macro commands at the beginning
and end of each code chunk.

What do you think?

If you have R and are willing to set up your system according to the
instructions in the Lyx Wiki for using Rweave/Noweb, then I can give
you the files so you can see for yourself.

For system details, I have Fedora Core 5 with the newest LyX from the
Fedora Extras, 1.4.2

pj

--
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Inserting a tab indented outline into a lyx document

2006-06-21 Thread Paul Johnson

Seems easier to just use the itemize environment with customized
bullet symbols.  if you use the Document/Settings/Bullets options, you
can eliminate the symbols and then the output looks exactly the way
you want.

It would drive me nuts to keep turning the stevelist special
environment on and off.

pj

On 6/19/06, Paul A. Rubin <[EMAIL PROTECTED]> wrote:

Steve Litt wrote:

>
> That works perfectly, and I could make a LyX environment to eliminate the ERT.
> As it turned out, I just used the itemize environment for this particular
> application, but your example showed me how to directly translate my tab
> indented outline into LyX with a simple Ruby script.
>

You might also have a look at the algorithmicx LaTeX package, which I
think allows you to customize some of the commands.

/Paul





--
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Re: Trouble with eps inclusions in lyx-1.4.1

2006-06-01 Thread Paul Johnson

Well, this seems like a serious problem, not one where we should say
"there's nothing to do".

I'd suggest that LyX SHOULD NOT offer to export documents to pdf when
they have eps files in them, or at least users need a VERY BIG warning
because a lot of users will get in trouble unless they proof read
their output very carefully.  A bug of this sort, which crops up after
a project is finished and printed out and presented to
students/teachers, and appears only later in pdf output intended for
the Web, is very serious.

If tex2pdf works, couldn't LyX incorporate that (its GPL, right?) and
cut all usage of the other converters?

PJ

On 5/30/06, Georg Baum <[EMAIL PROTECTED]> wrote:

Sven Schreiber wrote:

> Paul, can eps files be portrait or landscape at all?

Yes. The %%Orientation comment is allowed in eps files. Unfortunately it is
interpreted differently by different programs (therefore gs has the
-dAutoRotatePages= switch): Some programs interpret "%%Orientation
Landscape" as "this file is already in landscape orientation", while others
interpret it as "this file should be in landscape orientation, therefore it
should be rotated by 90 degrees."
Whatever LyX does with these images will be correct for some and incorrect
for others. I don't see a solution for this problem that will work for all
eps creators and all viewers.


Georg





--
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


Trouble with eps inclusions in lyx-1.4.1

2006-05-29 Thread Paul Johnson

I just ran into a really weird lyx problem on Fedora Core 5 and
tetex-3.0-19.  It is so interesting I want to share and ask for help:

http://pj.freefaculty.org/latex/weirdRotations-lyx.tar.gz

That tarball has a lyx file and 3 eps files that I generated with R.
Two of the eps files are in landscape mode, one is portrait
(horizontal).  By default, R generates eps files in landscape mode and
using some interfaces for R, it is more-or-less difficult to make them
come out in portrait mode.  So it might be useful to have a good &
dependable way in LyX to manage eps files that are in landscape mode.

If you open the LyX document and view that in dvi, ps2pdf, pdflatex,
and dvipdfm, the treatment of the eps graphics is different in each
one.  The dvi output is about what I expect, but pdflatex turns the
graphs so they are right side up, ps2pdf turns the figure titles on
the right side in lanscape mode, and dvipdfm does something else
altogether. If I rotate the images so they are "right side up" in dvi
mode, then the pdf output is also excitingly different.  And it is not
a good kind of excitement.

If you would please download this and test it out, I would be glad to
hear if you see the same troubles.  Because a lot of my work depends
on being able to create pdf files that are accurate representations of
the dvi/ps files that LyX creates.

--
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


paste into ERT box from Emacs destroys line returns

2006-05-27 Thread Paul Johnson

Using Lyx-1.4.1 on Fedora Core Linux 5, we ran into a problem.

We do statistical analysis in Emacs (via R) and the results appear in
LaTeX markup in the Emacs buffer.  WHen we cut and paste with the
mouse (highlight left button, paste with middle mouse button) into the
LyX ERT, the pasted material is smashed into a single long line, the
paragraph returns are lost.  The LyX document will still compile &
view, but the ERT text is just about impossible to read.

If we save the same Emacs information into a text file, and then do
Insert->file->text as lines, then it preserves the carriage returns.
But it is inconvenient.

So that makes me think LyX needs a "paste special" or something to
allow pasters like us to get our work done more nicely.

--
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


  1   2   >