Simplest approach to hanging indent paragraph?

2005-11-27 Thread Paul Johnson
What is the best advice now for LyX users who want paragraphs shaped 
like this


X
 

 But we want to control both the indentation of the lines 2-3 as well 
as the negative indentation of line 1. A negative indentation on the 
first line of an itemized list would be about right for this.


Searching in the LyX archive, I find that I asked this before.  This 
message that Herbert Voss sent in response to my question in 2001:


http://www.mail-archive.com/lyx-users@lists.lyx.org/msg08531.html

Is there simplification available now?

I notice the tips  tricks page is gone now, as this link no longer 
leads anywhere:


http://www.lyx.org/help//layouts/layout.html#hangindent

I am wishing there were a simpler solution *within LyX* to do this, 
without creating a layout file or such, because I primarily need this 
for use of students in our computer lab.  I've been pushing them to use 
LaTeX and LyX, and if I say that is not possible they just say we 
will use Open Office instead.  So the you can't get there from here 
problems with LyX are creating a bother.  Students tell me MS Word has a 
hanging option for paragraphs that makes this super simple.  When I 
told them  we don't need that because real publishers don't do that 
they turned up with several journals in which itemized lists and 
bibliographic entries are formatted in that way.



--
Paul E. Johnson   email: [EMAIL PROTECTED]
Dept. of Political Sciencehttp://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504  
University of Kansas  Office: (785) 864-9086

Lawrence, Kansas 66044-3177   FAX: (785) 864-5700



Re: Simplest approach to hanging indent paragraph?

2005-11-29 Thread Paul Johnson

Kenward Vaughan wrote:

On Mon, Nov 28, 2005 at 11:52:08AM +0100, Helge Hafting wrote:


Paul Johnson wrote:


What is the best advice now for LyX users who want paragraphs shaped 
like this


  X
   

But we want to control both the indentation of the lines 2-3 as well 
as the negative indentation of line 1.

...


Have you tried using the verse paragraph type instead of standard?
It looks like your example above.  Perhaps a bit counterintuitive when you
aren't writing poetry, but it has a hanging indent and is very simple to 
use.




The big problem was paragraph positioning. Verse has margins that are 
too big.


 \parindent=-3em pushes the first line back into the margin and does 
not indent the rest of the paragraph.


I found the magic bullet.  After hours and hours of stumbling around the 
Internet, I found ERT


\leftskip=3em

to push the whole paragraph in .  Then

\parindent=-3em

works to pull back the first line. This is a good solution, EXCEPT if 
you are doing this to the first paragraph of a section.  As another 
poster noted, LyX (and LaTeX) are stubborn about that one.



The Verse environment is a better approach, the only problem is margins 
are too big. But ERT \leftskip fixes it:


\leftskip=-3em


Man, this one was hard to find. Here is where I got this idea:

http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/TeTeX-HOWTO.html

I worry that using the verse environment might be dangerous because some 
layouts might have fancy fonts or nonsense for verses.




For lists, see if the paragraph type labeling might be useful.  Here 
the indent

is adjustable thorugh paragraph settings.

If you really want a negative indent (first line of paragraph stick into 
the margin)

try setting the document to use indented text and put \parindent=-2em
in the document preamble.  (Or in an ERT box in the first paragraph you want
to be this way.  In this case, make sure there is a space after the 
command.)



The \parindent works fine for the 1st line, but not the 1st paragraph,
which is stubborn in its insistence about being non-indented (at least,
after a heading of some sort).  


Yes, This is true.

:(


Kenward



--
Paul E. Johnson   email: [EMAIL PROTECTED]
Dept. of Political Sciencehttp://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas  Office: (785) 864-9086
Lawrence, Kansas 66044-3177   FAX: (785) 864-5700


Re: LyX 1.4 test

2006-01-16 Thread Paul Johnson
Be Cautious!

IF you edit a document with Lyx-1.4, then you will not be able to edit
with Lyx-1.3.X.

pj

On 1/16/06, Georg Baum [EMAIL PROTECTED] wrote:
 Am Montag, 16. Januar 2006 20:56 schrieb Horacio Emilio Pérez Sánchez:

  I would like to install this new version in my system without
  uninstalling/deleting/erasing the old one (lyx 1.3.5), in order to test
 the
  new features and to be able to use the old version if the new one
 doesn't
  work right for me or to be able to use the new or the old version at my
 choice.
 
  Does anybody know how to do this ? Is it supposed that I need to remove
 the
  old version to install the new one ?

 You don't need to remove the old one. After unpacking the source, call
 configure with the --version-suffix parameter, e.g.

 ./configure --with-version-suffix=-1.4

 and it will install as lyx-1.4 and not mix up the support files either.


 Georg




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


Re: LyX 1.3.7pre6 available

2006-01-22 Thread Paul Johnson
I don't use Windows, so please pardon me if this is too obvious. I'm
installing LyX/Win for a friend.

This may fall under the cleaning out redundant programs category. 
Does installing a newer LyX replace the older LyX in Windows (as it
may in Linux)?

A few months ago, I installed lyx-1.3.6 with the installer that refers
to other sites from which Python, shell, MikTeX and other things are
installed. That works.

When 1.3.7 came out, I pointed and clicked in lyx.org and (mistakenly)
used Uwe Stöhr's installer for Lyx-1.3.7pre6.  It was a mistake
because I was not alert to realize that was the pre-release lyx.

Now I need to install the 1.3.7 final release.  If I uninstall
1.3.7pre6, does it take away with it all of the support programs that
it installed (sh.exe, all that other stuff)?

Does the supported LyX windows installer co-operate with Uwe's
all-in-one installer?  I mean, if I install 1.3.7, will it erase
1.3.7pre6 automatically?

On 1/4/06, Uwe Stöhr [EMAIL PROTECTED] wrote:
 Angus Leeming wrote:

  No doubt Uwe will be packaging this up in his super installer as time
  allows.

 ;-) Sure I will. I hope the next version can be out this weekend.

 regards Uwe



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


Method to deliver converter preferences with document? (Using Lyx as literate programming tool with R statistical software)

2006-01-27 Thread Paul Johnson
Hey, everybody:

I've been using Lyx in conjunction with noweb and R to make
statistical writeups.  I've boiled this down to a pretty simple thing,
described here:

http://www.ku.edu/~pauljohn/latex/lyxAndSweave.txt

And I've got example lyx documents where you can test this yourself.

http://www.ku.edu/~pauljohn/stats/Distributions/Gamma-02.lyx

http://www.ku.edu/~pauljohn/stats/Distributions/Normal-01.lyx

Those make documents that look nice!

http://www.ku.edu/~pauljohn/stats/Distributions/Gamma-02.pdf

http://www.ku.edu/~pauljohn/stats/Distributions/Normal-01.pdf

In our computer lab, I've already done the basic system settings,
putting Rweave script in /usr/local/bin and making sure noweb stuff is
installed.  The last problem that I've been able to solve is that when
users take a file like Normal-01.lyx, then they can't view or export
it because the converter from Noweb to LaTeX has not been set in their
preferences.  I think the preference dialogue is confusing and hard to
describe to students.

Is there a way I can automate the delivery of the preference

\converter literate latex Rweave $$i 

with the lyx document itself, to save the users the re-configution problem?

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


Lyx with R in wiki; why don't my lines wrap?

2006-01-28 Thread Paul Johnson
Some list members suggested I write this up, so I just inserted this
in your Wiki:

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

When I browse that, the lines of text don't wrap, they just go on and
on.  Do you see that too?

I've only worked in the TWiki Wiki very much, so I may accidentally
have hit some button that causes this ikky result :)

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


quotation marks don't work in Lyx-Code when using article (Noweb) document

2006-03-06 Thread Paul Johnson
Strange, but true. Does it happen to you?

Make a new lyx document in default article type. Insert some text in
the environment Lyx-Code. Type a quotation mark or two. The document
turns into dvi just fine.

Then change the document type to article(noweb)  Now the quotation
marks show on the screen as black boxes.

Blech!  I need the quotation marks and must have noweb.

I had been using noweb documents for a long time and just thought
there was a fundamental font problem. But now I notice the fonts are
OK in article documents, and I'm puzzled if you see this too and if
you can explain it.

I'm running Lyx-1.3.7 on Fedora Core 4.

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


Lyx 1.4.0 won'http://www.codeweavers.com/support/tickets/browse/?list=6;ticket_level=2t allow quotation marks inside ERT boxes

2006-04-04 Thread Paul Johnson
I'm writing NoWeb documents using LyX and the statistical program R.
In my Fedora Core 5 systems, I notice lyx updated to 1.4.0 from the
Fedora Extras and most things work well (thanks!).  The guide we
prepared for LyX to weave statistical results into documents still
works great.

However, LyX will not let me type double quotation marks:   inside
ERT boxes.  And that's vital for the R code.  I am allowed to copy and
paste quotation marks from ERT boxes that I wrote with LyX 1.3.7, so
that is a work around.  But I can't understand why LyX would disable
the  key altogether.

Thanks in advance.

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


How about giving us snapshots? Or, If I build from CVS should I expect huge problems?

2006-04-08 Thread Paul Johnson
I built lyx from CVS (on Fedora Core 5) because I wanted to use
quotation marks in ERT (a bug in 1.4.0), and I find that problem is
solved.  This version of lyx runs fine.

Thanks very much.

Ihave not seen major bugs in this CVS version.  But they may hide from
me.  I would feel more confident about using this version if somebody
who is familiar with CVS would tell me don't worry, we are not in the
middle of some major code changes and there are no known huge
problems, as of yesterday.  For that matter, I wish that somebody who
works in this would either make snapshots at the safer moments, or
perhaps put in cvs  tags at safe times and announce the tags.

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


Re: lyx 1.4.1 FC4

2006-04-30 Thread Paul Johnson

Assuming there are not additional tetex packages you are missing, then
you have to do the installs by hand.

Install the LaTeX class files you need, probably under
/usr/local/share/texmf/tex/latex, then run texhash to make the LaTeX
system recognize them,  then re-run the lyx reconfigure command and
restart lyx.  When you do that, start lyx from a terminal so youcan
watch the detailed error messages, showing which LaTeX classes it
finds.

Now, about installing the LaTeX classes.  Not all classes are good,
you know, so some experimentation is required.  SOme come with
detailed instructions about installers, others are just a *.sty or
*.cls file.  You can usually find them in CTAn and take the tar.gz
package, and then if you open that as a subdirectory under
/usr/local/share/texmf/tex/latex, then all is well. I don't hold
myself out as the greatest Linux administrator ever, but maybe you can
just copy my example. Here's a cut and paste:

$ pwd
/usr/local/share/texmf/tex/latex

$ ls -l
total 76
drwxr-xr-x 11 root root 4096 Apr  5 09:20 beamer
drwxr-xr-x  2 root root 4096 Dec  5  2004 dissertation
drwxr-xr-x  2 root root 4096 Jun 25  2003 foilhtml
drwxr-xr-x  2 root root 4096 Jun 25  2003 foiltex
drwxr-xr-x  2 root root 4096 Dec  6  2004 harvard
drwxr-xr-x  2 root root 4096 Jun 25  2003 kbk
drwxr-xr-x  2 root root 4096 Nov  4  2004 noweb
drwxr-xr-x  2 root root 4096 Apr 30  2005 osborne
drwxr-xr-x  6 root root 4096 Apr  5 09:24 pgf-1.01
drwxrwxr-x  3 pauljohn pauljohn 4096 Jan  4 16:34 powerdot
drwxr-xr-x  2 root root 4096 Feb 22  2004 ppower4
drwxr-xr-x  2 root root 4096 Jun 20  2005 preview
drwxr-xr-x  3 root root 4096 Jun 25  2003 prosper
drwxr-xr-x  2 root root 4096 Feb 15  2005 ps4pdf
drwxr-xr-x  2 root root 4096 Apr  1  2005 psfig
drwxr-xr-x  2 root root 4096 Jun 20  2005 pst-pdf
drwxr-xr-x  4 root root 4096 Aug 28  2004 texpower
drwxr-xr-x  2 root root 4096 Apr  5 09:33 xcolor
drwxrwxr-x  3 pauljohn pauljohn 4096 Jan  4 16:54 xkeyval

After you dump the LaTeX file in those subdirectories, then the
texhash command re-builds the index of installed packages.  Then Lyx
reconfigure will see that.

Good Luck.  LyX and Linux get better all the time.

pj


On 4/29/06, hbrhodes [EMAIL PROTECTED] wrote:

hi there, i'm using FC4 and lyx 1.4.1
i installed using YUM by asking for tetex, and then lyx-qt.  the system
installed both.  (i am a new user by the way)  So i figured out that by
creating a new document and then going to Document Settings it would
create the document as a book or as an APA style class.  However, there
is a problem.  Several of the classes including the APA class are listed
as unavailable; i can use the book class to make a book, however, i have
another question about that later.  main concern is how do i obtain more
classes?  i read in the tutorial (or introduction) that there was
something that i might need to install to get the rest of the classes.
i THINK it was latex2e.  but yum didn't know what that was.

with concern towards the book class, i was wondering how do i set the
document up to print exactly like a book, for instance, their will be
five pages stacked on top of one another; i need the top right side to
read ONE, and the top left one to read SIXTEEN (i hope i got that right).




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


Re: APA.cls missing, not apa.layout

2006-04-30 Thread Paul Johnson

OK, I just saw this second message about apa and got curious why
anybody would want it, so I installed it.  Here is the step-by-step
instruction on how you can install apa and apacite.

# su
(assuming you don't have the directory already: )
# mkdir -p /usr/local/share/texmf/tex/latex
# cd /usr/local/share/texmf/tex/latex
# wget ftp://tug.ctan.org/pub/tex-archive/biblio/bibtex/contrib/apacite.zip
# unzip apacite.zip
# wget ftp://tug.ctan.org/pub/tex-archive/macros/latex/contrib/apa.zip
# unzip apa.zip
# texhash
# exit

Open a terminal, then type

lyx


In there, run tools/reconfigure, close lyx.

In the terminal, look back and make sure it found apa apacite.  Mine
did, I bet yours will too.

Good Luck

PJ


On 4/29/06, hbrhodes [EMAIL PROTECTED] wrote:

i found an article on the internet stating how apa.layout was present
from the install of 1.4.1 of lyx-qt but that the apa.cls was missing.
i'm experiencing the same problem, anyone know how to fix this?  i know
i wrote this earliar, but i thought this would be easier to understand
than my first e-mail!




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


Re: Vector graphics in Lyx

2006-04-30 Thread Paul Johnson

On 4/29/06, Russell Davie [EMAIL PROTECTED] wrote:



With all your suggestions I found what works efficiently is

1) use raw data to make graph in gnumeric
2) export graph as svg
3) open inkscape and edit svg
4) save graphic as eps
5) insert graphic into Lyx

Thanks to all who helped with solving this

Russell


If you are going to make a lot of graphs, and keep doing this over
your career, I'd strongly suggest you learn to use the free
statistical program R, which can make publication quality graphics,
write on them however you like, and export ot pdf, png, eps, or
whatever.  http://www.r-project.org.  If you have trouble getting
started, I have a tipsheet with explanations for things like how to
save a graph.  http://pj.freefaculty.org/R look for Rtips.html

pj


--
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


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


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


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


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: 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: [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}{}{}


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: 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


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: [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


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: 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:
 echo=T=
 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


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 Sweaveeditor editor
 \format rR   R/S code  editor editor
 \format pdflatex tex LaTeX (pdflatex)  editor editor
 \format latextex LaTeX (plain) editor editor document

 # CONVERTERS SECTION ##
 \converter literate rR 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: 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: 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 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: 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: 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: 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


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: 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


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


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


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
C:/ProgramFiles/LyX/bin/MakeSweave.R %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


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
C:/ProgramFiles/R/bin/MakeRweave.R %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: 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: 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


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


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


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: Space around floats

2011-08-28 Thread Paul Johnson
Hi

On Fri, Aug 26, 2011 at 2:58 AM, Lastalda lasta...@gmail.com 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


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: 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
florian.wilh...@gmail.com wrote:
 Mukhtar Ullah mukhtar.ullah at 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


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: horizontal alignment of graphics and ERT table

2011-11-18 Thread Paul Johnson
On Fri, Nov 18, 2011 at 1:23 AM, Liviu Andronic landronim...@gmail.com wrote:
 On Fri, Nov 18, 2011 at 7:40 AM, Paul Johnson pauljoh...@gmail.com 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


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 pauljoh...@gmail.com wrote:
 On Fri, Nov 18, 2011 at 1:23 AM, Liviu Andronic landronim...@gmail.com 
 wrote:
 On Fri, Nov 18, 2011 at 7:40 AM, Paul Johnson pauljoh...@gmail.com 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


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: 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 rgh...@comcast.net 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


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 rgh...@comcast.net 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


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: 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-usersm=116026623917165w=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


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


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-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


Re: Drawing tool for LyX

2009-11-07 Thread Paul Johnson
On Sat, Nov 7, 2009 at 6:17 AM, Waluyo Adi Siswanto was.u...@gmail.com 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: Lyx + gnuplot epslatex

2009-12-24 Thread Paul Johnson
On Fri, Dec 11, 2009 at 12:21 PM, Jonathan Brandmeyer
jbrandme...@earthlink.net 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


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: 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


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.

copyover, fig=F, echo=T, include=T=
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


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.

copyover, fig=F, echo=T, include=T=
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


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


Re: Copying From PDF

2011-01-05 Thread Paul Johnson
On Tue, Jan 4, 2011 at 8:48 AM, Bruce Pourciau
bruce.h.pourc...@lawrence.edu 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


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={$},%
alsoletter={.-},%
 

Re: Ubuntu 10.10 - Unsuccessful installation

2011-02-11 Thread Paul Johnson
on Fri, Feb 11, 2011 at 9:55 AM, stefano franchi
stefano.fran...@gmail.com 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 21

$ make  lyxbuild.txt 21

$ make install  lyxbuild.txt 21

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 sahga...@gmail.com 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}

\modepresentation
{
  \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},%


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 ru...@msu.edu 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


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


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

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 pauljoh...@gmail.com 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


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


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


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


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


Re: Lyx/ Biblatex import Problems

2009-02-02 Thread Paul Johnson
On Mon, Feb 2, 2009 at 4:55 AM, Christofer Zwanzig
christo...@zwanzig-online.de 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


Re: Big document

2009-02-02 Thread Paul Johnson
On Wed, Jan 28, 2009 at 5:29 AM, Piero Faustini
pierofaust...@hotmail.com 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


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


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 input-HTML-file -output
output-LaTeX-file [-css css-file-assigned-to-input file] [-config
configuration-file]
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


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 r.m.k...@gmail.com 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.
inserted text
\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


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 r.m.k...@gmail.com wrote:
 On Mon, Mar 2, 2009 at 10:30 PM, Paul Johnson pauljoh...@gmail.com 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


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


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


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 uwesto...@web.de 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


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.

testfn, fig=true, include=false=
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


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
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
Smithgraham.sm...@myotis.co.uk 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


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
Lohmanndaniel.lohm...@informatik.uni-erlangen.de 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: 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

Re: Anyone used Lytex?

2009-09-29 Thread Paul Johnson
On Tue, Sep 8, 2009 at 3:13 PM, Sharma, Vivek shar...@upmc.edu 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


Lyx works with R Sweave. Followup question enclosed

2004-11-15 Thread Paul Johnson
I followed along with the LyX noweb instructions and have succeeded in 
using LyX to create NoWeb documents that can be sent to the statistical 
program R and turned into LaTex by R's Sweave program.

I was using Emacs for things like this, but found I made about 9 times 
more errors writing equations in the old LaTeX way than I make with LyX. 
Because I figure I will have to do this on 10 different computers with 
10 different users, I wrote down how I did it and pasted it below.

Here's my question.  I would like to make LyX send code chunks to R 
interactively, so that I don't have to process the whole monstrously 
huge LyX document and all attendant R code.  If I'm using Emacs, there's 
a package called ESS that allows me to open an R session and then pipe 
command chunks over.

How about telling me how I can do that with LyX?

HOWTO info---
For information on the statistical program R, consult 
http://www.r-project.org.

For more info on Sweave in R, you can consult the FAQ from the author of 
Sweave, the R component that does the processing of the Rnw file.

http://www.ci.tuwien.ac.at/~leisch/Sweave/FAQ.html
There are 3 steps to make LyX work with Sweave.
1. Put the batch script for processing Rnw files into an executable 
file and save it in your path.  That file is in the Sweave 
documentation, but here it is again for reference. I named it Rweave. 
The version recommended by the Sweave author is this:

Rweave:
#!/bin/sh
echo library(tools); Sweave(\$1\) | R --no-save --no-restore
I've seen various renditions of this script.
2. Fool LyX into thinking you have the whole of Noweb installed.  Noweb 
is a package you can download and install, but you don't need it all. 
All you need is the noweb.sty file, the LaTeX style file.  Install that 
in your LaTeX, I put it under

/usr/local/share/texmf/tex/latex/noweb
because that's a standard place to store user added latex files.  If you 
want, I could package up my /usr/local/share/texmf directory and you 
could untar into your system.  I also have the LaTeX files for the 
beamer presentations I make in LyX, those are the ones I show in Pols 
110 when I don't use Powerpoint.

After dropping the noweb.sty file in, then run
 texhash
to make sure your LaTeX system knows about the file.
3. Configure LyX.
First, open LyX, choose edit and reconfigure and let it run. You 
should notice in the output it finds the noweb style and now you get new 
document classes.

Close LyX, restart.
Now you need to configure LyX. LyX needs to know that your file is a 
NoWeb file and that it has to be post processed. Ordinarly, LyX goes 
directly from *.lyx format to *.tex format, but now it will go from 
*.lyx to *.nw format. You have to tell it how to handle the nw file.

In Lyx, you will see the document classes now include Noweb variants. 
Choose article(Noweb).  THat tells Lyx that you want to process your 
file through another program.  Now you have to tell LyX what that other 
program is.  In Lyx's Edit / Preferences dialog, choose the Converters 
option.  This menu interface is confusing. Here's the way it should go.

a. In the From pulldown, choose NoWeb
b. In the To pulldown, choose LaTeX
c. Hit the new button toward the bottom.
d. Make sure the Converter NoWeb-LaTeX is chosen, and then in the box 
called Converter type the name of the batch script you saved above. 
Mine was called Rweave, so I put Rweave in there.   THe syntax should be

Rweave $$i
--
Paul E. Johnson   email: [EMAIL PROTECTED]
Dept. of Political Sciencehttp://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas  Office: (785) 864-9086
Lawrence, Kansas 66044-3177   FAX: (785) 864-5700


Re: PDF Generation - URL problem

2004-11-22 Thread Paul Johnson
I have had the too long URL problem in the past and was monitoring 
this thread. I changed Herbert's test file just slightly (attached), and 
I don't see any difference in the way the 2 urls are treated.  Both are 
broken correctly with pdflatex, but in the other pdf and xdvi output, 
they run off into the right margin and off the edge of the page.

I have the same problem with equations, and in that case I think I have 
no alternative but to break into lines manually.  But with URLs, where 
line placement is more unpredictable, I'm concerned.

Herbert Voss wrote:
Jason L W Lynn wrote:
  I guess there isn't a solution to this problem as of yet.  Perhaps I
  will have to keep the URL as standard text and put the link somewhere
  else (for those that are using the electronic copy).
you do not understand what I mean. Attached your doc, run
it with pdflatex and everything will be as you expect.
HErbert

\the_end

--
Paul E. Johnson   email: [EMAIL PROTECTED]
Dept. of Political Sciencehttp://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas  Office: (785) 864-9086
Lawrence, Kansas 66044-3177   FAX: (785) 864-5700
#LyX 1.3 created this file. For more info see http://www.lyx.org/
\lyxformat 221
\textclass article
\begin_preamble
\usepackage[colorlinks]{hyperref}
\end_preamble
\language english
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
\spacing single 
\papersize Custom
\paperpackage a4
\use_geometry 1
\use_amsmath 0
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
\paperwidth 15cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default

\layout Standard

This URL is one example that is causing trouble with PDF generation What
 if this does not have a full line to work with?
\begin_inset LatexCommand 
\url{http://www.blkaskjsd.lsdkjslkjsd.com/sdlkjlsd/alksjdlkjsd/lksdjlkjsd.html}

\end_inset 

.
\layout Standard

While this URL is one example that is not causing troubles with PDF.
 This one runs off the end of the page.
 
\begin_inset LatexCommand 
\url{http://www.blkaskjsd.lsdkjslkjsd.com/sdlkjlsd/alksjdlkjsd/lksdjlkjsd.html}

\end_inset 


\the_end


relyx, book format, dissertation example trouble

2004-12-05 Thread Paul Johnson
Hello LyX users.
I'm trying to coach a student through a dissertation using LyX, and I've 
not used LyX for anything bigger than an article (so far).

I found online at the U of Texas a dissertation format for LaTeX, and I 
can make it work with LaTeX, but when I use relyx to grab it into Lyx, I 
end up with some pretty serious problems.

Here's the URL
http://www.utexas.edu/ogs/etd/LaTeX/index.html
The one I'm trying is utdiss2, which comes complete with a main 
document disstemplate.tex which includes several other files.

The relyx import properly creates the main document and lyx files for 
the included chapters and appendices.  If you want to try it and see, it 
won't take more than a couple of minutes.  Unfortunately, after 
importing in LyX, the latex command generates many errors, and I have a 
hard time figuring out what's going on.

Problems.
1. LaTeX errors caused by commands in the included files show as LaTeX 
errors in the main file, and don't give any hint which file the came 
from.  I was able to do some grepping about and find that almost all of 
the errors trace back to the math and latex drawing and figure chapters.

If you try it, I think you will see the first block of LaTeX errors 
refer to an attempt to do a commutative diagram in chapter-math.lyx. 
That uses the package amscd, which I do have, and when I proces the 
tex file with latex, the diagram is created. But inside lyx, it does not 
work.

2. I want to see what is wrong with the imported chapter 
chapter-math.lyx.  I can't make much headway because that chapter 
can't be compiled apart from the others because the others have a huge 
piece of preamble that enables a lemma environment and so forth.

Should I copy the whole preamble from disstemplate.lyx into 
chapter-math.lyx?

I tried that and the problems all focus on that attempt to use a 
commutative diagram.

3. In the Idx items that are imported, there are words that lyx objects 
to.  If you look at chapter-appendix2.lyx you see the first Idx item 
has this text:

Appendix!My Appendix #2@
The inside-LyX latex error says that the symbol # cannot be used in 
horizontal environments. Why does it work with latex and not LyX?

Can you tell me what kinds of words are allowed/needed inside the Idx box?
4. Suppose I solved those LaTeX problems. Then I'd like to write a LyX 
layout utdiss2 so that users could get at the lemma and theorem 
environments that are in the preamble. That's not hard, is it?  If I 
take the report.layout file from the LyX distro, I can add items?

The latex preamble elements look like this:
%%
%   Some math support.   %
%%
%
%   Theorem environments (these need the amsthm package)
%
%% \theoremstyle{plain} %% This is the default
\newtheorem{thm}{Theorem}[section]
\newtheorem{cor}[thm]{Corollary}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}
\newtheorem{ax}{Axiom}
\theoremstyle{definition}
\newtheorem{defn}{Definition}[section]
\theoremstyle{remark}
\newtheorem{rem}{Remark}[section]
\newtheorem*{notation}{Notation}
%\numberwithin{equation}{section}
Paul E. Johnson
Political Science
University of Kansas


lyx/latex works on some computers, not others

2005-01-12 Thread Paul Johnson
I have 2 Fedora Core 3 systems. On one, everything is fine.
In the other, Latex processing on document fails because the bibliogrphy 
has some accented characters in it.  The LaTeX error in the Lyx document 
is Package inputenc Error: Keyboard character is undefined
 [then it lists a snip from the bib entry]
You need to provide a definition with \DeclareInputText or 
\DeclareInputMath before using this key.

What has me baffled is that it works on one, but not the other.
I do not know much about LANG or locale, can you give me a pointer?
--
Paul E. Johnson   email: [EMAIL PROTECTED]
Dept. of Political Sciencehttp://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas  Office: (785) 864-9086
Lawrence, Kansas 66044-3177   FAX: (785) 864-5700


Weird Inconsitencies in handling of xfig drawings (converter preference question)

2005-01-19 Thread Paul Johnson
I have a little back end trouble with output of xfig drawings.
I wrote a chapter and in the process discovered that LyX can directly 
import xfig drawings. I previously was using EPS export versions of the 
drawings. but it was very very convenient to leave them in fig format, 
so I can edit them and they automagically update in LyX.

Then I notice this horrible/weird thing.  On 2 Fedora Core systems, the 
appearance of the xfig drawings is grossly different.  On one system, 
the figures are automatically cropped to display just the drawing with 
no whitespace.  On another system, with the exact same document, the 
figures are rotated 90 degrees and a lot of whitespace shows around the 
edges, so they go off the page.

After freaking out, I started inspecting the preferences for converters. 
 I'm gradually figuring out that some preferences saved in ~/.lyx on 
one system from older versions of LyX, and so perhaps they are 
incomplete. One has converters for xfig-eps and the other does not. 
After I install a converter, then the onscreen display and postscript 
output is correct.

But the pdflatex output is not.
If you want to see what I mean, please look at page 30 in these two 
documents:

The Right output
http://lark.cc.ku.edu/~pauljohn/ps608/Johnson_MathVoting.pdf
The Wrong output
http://lark.cc.ku.edu/~pauljohn/ps608/WrongFigureVoting.pdf
I HYPOTHESIZE that, in order to get the pdf (pdflatex) output correct, I 
need a filter configured for XFig-PDF(pdflatex).  Is that right? What 
should I put down?

--
Paul E. Johnson   email: [EMAIL PROTECTED]
Dept. of Political Sciencehttp://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas  Office: (785) 864-9086
Lawrence, Kansas 66044-3177   FAX: (785) 864-5700


Re: Harvard referencing style with Bibdesk

2005-02-12 Thread Paul Johnson
I've recently been through the learning experience trying to use 
Harvard, and gave up because it doesn't work with natbib.  So I made 
some notes about customizing bst files and hope people think the notes 
are useful.

http://www.ku.edu/~pauljohn/latex/LaTeX_Bibliographies.html
In that same directory, I left the apsa2.bst and apsa2.dbj files that 
are mentioned in there.

Good luck.
pj
Tomoharu Nishino wrote:
A couple of things to try:
Make sure that Use Natbib is enabled in Layout-Documents and you've 
selected Author-Date.

When inserting BibTex Reference, you might try one of the following styles:
apsrmp
apalike
apsrev
As far as I can tell, apsrmp looks pretty much like the Harvard style, 
though I haven't really checked carefully for differences.

If for some reason the above are not good enough and you must have 
precisely the Harvard style, I think there is a Harvard style out 
there.  But I don't think it is installed as part of the Mac/fink 
installation of TeTeX (it might be part of the i-installer 
installation).  If it is not installed, you need to go to tug.ctan.org 
and locate the harvard.sty and appropriate .bst files (agsm.bst, I 
think, but there are probably others).  Install these files, then do 
\usepackage{harvard} in the preamble (LayoutDocument).

Hope this helps.
Tn

On Feb 9, 2005, at 11:58 PM, James Bennett wrote:
Thanks Stephano - I've got LyX and Bibdesk talking to each other okay
(in the manner you described), but I can't get it to produce the
referencing style I'm after: I  should have made myself clearer.
Basically my problem is that I can't find the style I'm after in the
InsertLists  Toc BibTex Reference
dialogue box (after I have selected my .bib file). I want to add the
Harvard referencing style to this box, but I have no idea how to do
this, or whether I can even do this in LyX.
If anyone is nifty with this sort of thing, I'd greatly appreciate any
advice.
Cheers,
James

--
Paul E. Johnson   email: [EMAIL PROTECTED]
Dept. of Political Sciencehttp://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas  Office: (785) 864-9086
Lawrence, Kansas 66044-3177   FAX: (785) 864-5700


Re: Using Pstricks Within LyX

2005-02-12 Thread Paul Johnson
If pstricks things don't display in pdflatex output, don't you think you 
should put out a big warning to everybody on your wiki?  To me, that's a 
pretty big danger of using pstricks.

pj
Paul Smith wrote:
On Wed, 9 Feb 2005 16:03:50 +, Paul Smith [EMAIL PROTECTED] wrote:
I can send you an example of a LyX file with a PSTricks figure, in case
you want it.
How about putting the example .lyx-file on the wiki? I've prepared a
page with an 'attach'-link, so you can just upload it here
   http://wiki.lyx.org/Examples/PSTricks
I will do it very soon, Christian.

Done!
Paul

--
Paul E. Johnson   email: [EMAIL PROTECTED]
Dept. of Political Sciencehttp://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas  Office: (785) 864-9086
Lawrence, Kansas 66044-3177   FAX: (785) 864-5700


Re: Incorporating PSTricks Figures in a Document

2005-02-15 Thread Paul Johnson
This thread is making me feel too stupid.  I don't really care how pdf 
output gets created, I'm happy to use any of the methods you recommend. 
 In fact, sometimes I can't make it work in lyx but the script 
tex2pdf does what I need. But I now notice it calls pdflatex, and so 
the pstricks do not display.

I have Paul's example of a pstrick in lyx. If I want to process that 
through pdflatex, you say I need ps4pdf.  But I can't understand how it 
is supposed to work.  I downloaded ps4pdf.sty and the script ps4pdf, put 
the former in my latex distro (ran texhash) and put the script in the 
path (after making it executable).

Now, what magical incantation is needed to take the lyx doc with the 
pstricks in it into pdflatex?

Paul Smith wrote:
On Mon, 14 Feb 2005 15:13:51 -0800 (PST), Rich Shepard
[EMAIL PROTECTED] wrote:
  Would I open a figure float, center the paragraph, then open the ERT box
to write the pstricks code?

Yes, Rich. An example is below.
Regards, Paul
#LyX 1.3 created this file. For more info see http://www.lyx.org/
\lyxformat 221
\textclass report
\begin_preamble
\usepackage{pst-plot}
\end_preamble
\language american
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize 12
\spacing single 
\papersize Default
\paperpackage a4
\use_geometry 0
\use_amsmath 1
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default

\layout Standard
\begin_inset Float figure
wide false
collapsed false
\layout Standard
\align center 

\begin_inset ERT
status Collapsed
\layout Standard
{
\layout Standard
\backslash 
psset{unit=1.5}
\layout Standard

\backslash 
pspicture(-1.1,-0.5)(5.2,2.5)
\layout Standard

\backslash 
psplot{0}{4.95}{x sqrt}
\layout Standard

\backslash 
pscustom{
\layout Standard
   
\backslash 
psplot{1}{4}{x sqrt}
\layout Standard
   
\backslash 
gsave
\layout Standard
  
\backslash 
psline(4,2)(4,0)
\layout Standard
  
\backslash 
psline(1,0)(4,0)
\layout Standard
  
\backslash 
psline(1,0)(1,1)
\layout Standard
  
\backslash 
fill[fillstyle=solid]
\layout Standard
   
\backslash 
grestore
\layout Standard
}
\layout Standard

\backslash 
psaxes[labels=all,ticks=all]{-}(0,0)(-0.1,-0.1)(5,2.3)
\layout Standard

\backslash 
rput(1.1,1.8){$f
\backslash 
left( x 
\backslash 
right) =
\backslash 
sqrt x$}
\layout Standard

\backslash 
uput[0](0,2.3){$y$}
\layout Standard

\backslash 
uput[-90](5,0){$x$}   
\layout Standard
%
\backslash 
uput[-90](1.08,0){$1$}   
\layout Standard

\backslash 
endpspicture
\layout Standard
}
\layout Standard

\end_inset 

\layout Caption
This is a PSTricks figure.
\end_inset 

\the_end

--
Paul E. Johnson   email: [EMAIL PROTECTED]
Dept. of Political Sciencehttp://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas  Office: (785) 864-9086
Lawrence, Kansas 66044-3177   FAX: (785) 864-5700


Re: Dead keys problem, v. 1.3.5 Spanish accents

2005-02-15 Thread Paul Johnson
I don't have luck getting the compose key to work on my FC3 systems 
either. For me it is a matter of keyboard setup and compose key not 
working well with other elements.

However, in the online Lyx reference manual, I find I can get the 
symbols with accents in another way

http://www.fnal.gov/docs/products/lyx/Reference.tex.html
Section 3.3.1 show  how to get all manner of special characters.
In the command slot at the bottom of lyx, type accent-acute and  hit 
enter, then the next letter you  hit will appear with the acute.

I THINK this works fine for me.

indy wrote:
Hi,
I'm using Lyx under Fedora Core 3. I have a problem with dead keys. I
need write accents but this is not posible with my version. Example: á
 see like 'a in Lyx.
I'm reading there is a problem with qt, but I no found any solution. 
How can I solve it?

thanks!

--
Paul E. Johnson   email: [EMAIL PROTECTED]
Dept. of Political Sciencehttp://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas  Office: (785) 864-9086
Lawrence, Kansas 66044-3177   FAX: (785) 864-5700


  1   2   3   4   >