Hi there !!
Here are the literate programming patches again. I did all the
requested modifications and put them in one single patch (against
pre6). I will go quickly over each one and tell what I have modified
from my original post.
If there is no opposition, the patch is ready to be committed
(I have being using them for several days).
Thanks.
Edmar W. Jr.
> 1 - The first patch is to allow the choice of the color of the
> new-line character. ...
> Obs: The default color is the same it is today.
This patch remains the same.
> 2 - Patch to include new shortcut buttons in the toolbar. ...
> Obs: The customization of the toolbar itself is left to the user do in
> his/her lyxrc file. Thus, the toolbar defaults to its present looks.
This patch remains the same.
> 3 - Patch to not output the protected space '~' during translation of
> latex paragraphs. ...
This patch remains the same.
> 4 - Patch to always produce "nice-latex"....
This patch is not done anymore. Now, I save the buffer as a "usual"
latex, keeping *almost* everything as it was before. The only change
is in the makeLateXFile. I now always set the
tex_code_break_column = lyxrc->ascii_linelen
which allows similar effect of the original patch, but doesn't remove
\batchmode, etc...
Except for the break column everything else stays as original.
> 5 - Patch to allow Item_Environment and Environment layouts to have a
> "dummy" latex command name....
Eliminated.
> 6 - The addition of the Scrap layout to lyxmacros.inc....
Not anymore...
The Scrap layout now resides in its own document class. i.e. New
documents types were created: web-article, web-book, web-report. They
are very simple. Each one has an include for the original class
definition (article, book, report, respectively) and an include for a
file containing the basic scrap layout definition.
Virtually, any type of document can have a corresponding web
version. (If somebody needs one for "letter", ...)
If the user creates a plain text document, for example a article,
the "Scrap" layout will not show in the list of layouts. On the other hand
if he creates the document as a web-article, he can enter scraps
paragraphs on it.
The Scrap itself is defined as a plain paragraph.
> 7 - Patch to have different buttons and menu options for running
> latex, and building the code. The following new entries in the lyxrc
> are possible now:
>
> command: default:
> \web_command noweave -delay -index
> \web_extension .nw
> \web_error_filter cat
> \build_command make
> \build_error_filter cat
>
> When the "build program" menu option is chosen or the corresponding
> button in the toolbar is pressed, a nice latex file is generated, the
> only difference is that the file extension will not ".tex" but the one
> specified by \web_extension. Then lyx invokes \build_command and
> \build_error_filter. This filter is to allow lyx to identify
> web/compiler errors independently of the web/compiler chosen. (As an
> example, the last attachment is the C program I use for filter).
The user interface remains the same in this patch. But the
implementation is completely different. (actually it got simpler).
Since the document is defined to be a web at the moment of its
creation, (by choosing it to be web-report...), I defined the
web-report OutputType to be of a new created type: WEB.
In lyx_cb a check for the type of the buffer is done, and the
appropriate function is called (runWeb or runLaTeX) whenever the
user selects "Run Latex" from the file menu.
A new class was created: Web. It is derived from LaTeX and has a few
variables more (the ones initialized from lyxrc) and 2 new functions.
The functions do the initial process of weaving/untangling (to get a
.tex file from a WEB buffer) and them jump to the same LaTeX processing a
regular document goes through.
In summary, the only difference a plain text user will notice in LyX
is the new entry in the file menu: "Build Program". If a user tries
to execute it in a plain text document, a message will pop up. (Other
way would be to gray it out ...)
As a reference, I am reproducing here an excerpt of my original post:
-----------------------------------
"run latex" on plain document:
-> generate .tex -> invoke latex -> show errors (today behavior)
"run latex" on web document:
-> generate same -> invoke \web_command -> invoke latex -> show latex errors
file above but that generates the \______________ -> show web errors
renamed to .nw .tex file (line numbers
are not changed !!)
"build program" on web document:
-> generate same -> invoke \build_command -> show compilation errors
file above but that generates .c .h files
renamed to .nw compiles program, etc..
----------------------------------
> 8 - Patch to implement "server-goto-file-row" function....
>
This patch remains the same.
--
/*----------------------------------------------------------------------*/
/* Edmar Wienskoski Jr. - [EMAIL PROTECTED] */
/* - http://www.cs.rice.edu/~wiensk */
/*----------------------------------------------------------------------*/
____
| [] | ______()_||_
---+----+--- ------------ ------------ ------------ | [] |
| | | | | | | | | | ___| |
|_|______|_| |__________| |__________| |__________| |______________\
"o-o o-o""o-o o-o""o-o o-o""o-o o-o""o-o O-O-O o-o "
edmar-981227.patch