Hello Russell and Gunnar,
Thanks for your replies.
Russell, what I meant was not a DVI/PDF preview as you type, but
rather the preview in LyX itself, for example, as you type math, LyX
converts it as you type without needing to run LaTeX on the document.
Gunnar, your suggestion works. I added the following command
\bind "M-s e c t i o n" "layout Section"
So, if I type Alt-section (close enough to \section for me), it has
the desired effect, and a new section environment begins. I'm sure
I'll get tired of it soon, and want to learn the shortcuts in
mac.bind. But it will help the transition for LaTeX users who are not
familiar with shortcuts. Once we have a bind file with shortcuts like
this for all common LaTeX commands, if we don't remember the
shortcut, we can just type the full LaTeX command, while replacing \
with Alt.
Russell, for automatically running LaTeX, I use latexmk (http://
www.phys.psu.edu/~collins/software/latexmk-jcc/) which runs pdflatex
+bibtex the required number of times automatically when the file
changes. The effect is similar to your cron job + kdvi method, but
with the possible advantage that it runs latex and bibtex
automatically as many times as needed.
Regards,
Ravi
From: Russell Davie <[EMAIL PROTECTED]>
Date: August 13, 2006 9:55:29 PM MST
To: lyx-users@lists.lyx.org
Subject: Re: LaTeX commands instead of KB shortcuts
On Sun, 13 Aug 2006 16:35:18 -0700
Ravi Rao <[EMAIL PROTECTED]> wrote:
Hello,
This may have been asked before, but I can't think of the right
keywords to search for it. I'm an experienced LaTeX user, and I
would like to use LyX because it gives me an instant preview of what
I "meant". However, I find it's MS Word-like GUI interface with
toolbars, menus, etc. tiresome. As I already know LaTeX, can't I
simply type the LaTeX code, and have Lyx interpret it on the fly?
This functionality is already partially present in the Math editing.
When I type \alpha, it immediately becomes the symbol alpha. I would
think it should be even easier to do things like convert \title{ into
a title style. Is there some way to do this right now in LyX? Are
there others who think this would be a desirable feature?
Ravi
It would be nice to have this functionality, but it requires a
compile of the .lyx or .tex file each keystroke. Using existing
means recompile the source with each keystroke (lyx -> tex -> dvi -
> ps/pdf) would make this a computer intensive task. To make the
"real-time" rendering of the dvi/ps/pdf and reduce the redundant
file compiling and cpu workload would need a different way than is
currently implemented. IMHO.
So far what I have is to use a cron job to make a dvi/ps/pdf each
minute. (using Linux)
eg making a pdf from cron:
0-59 * * * * /usr/local/bin/lyx1.4.2 -e pdf2 ~/name-of-doc.lyx
>> /dev/null 2>&1
The command for lyx (or latex) and location of the edited file may
differ.
If you want an email each time its done, remove the ">> /dev/null
2>&1"
Also setup the editor to save the file every minute, and do a save
5 seconds before the minute, so the cron job gets the most recent
addition to your file.
Set up the file viewers set to "watch file". kdvi, gv and kpdf will
do this for dvi, ps and pdf respectively.
If you have dual monitors, set the viewer on one and editor on the
other. It works a treat!
HTH
Russell
From: Gunnar <[EMAIL PROTECTED]>
Date: August 13, 2006 11:54:20 PM MST
To: lyx-users@lists.lyx.org
Subject: Re: LaTeX commands instead of KB shortcuts
Reply-To: [EMAIL PROTECTED]
Have you tried to add a customized keyboard shortcut for your own
commands?
That might work. But I think recognizing the leading "\" can be a
problem.
I use keyboard shorcuts for everything and I find it to be very
efficient
(most of the time less keystrokes compared to the corresponding latex
command).
I get the \alpha by M-m g a (Alt-M followed by "g" and "a" ).
You shouldn't use the GUI interface, you really shouldn't.
Have a look at the files in ~/.lyx/bind
start by looking at the file cua.bind and math.bind see how it is
done.
I think you will figure it out.
On Monday 14 August 2006 01:35, Ravi Rao wrote:
Hello,
This may have been asked before, but I can't think of the right
keywords to search for it. I'm an experienced LaTeX user, and I
would like to use LyX because it gives me an instant preview of what
I "meant". However, I find it's MS Word-like GUI interface with
toolbars, menus, etc. tiresome. As I already know LaTeX, can't I
simply type the LaTeX code, and have Lyx interpret it on the fly?
This functionality is already partially present in the Math editing.
When I type \alpha, it immediately becomes the symbol alpha. I would
think it should be even easier to do things like convert \title{ into
a title style. Is there some way to do this right now in LyX? Are
there others who think this would be a desirable feature?
Ravi