1999-12-15 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+ * src/buffer.C (writeFile): change once again the top comment in a
+ .lyx file to point to www.lyx.org and to use LYX_DOCVERSION
+ instead of an hardcoded version number.
+ (makeDocBookFile): ditto
+
+ * src/version.h: add new define LYX_DOCVERSION
+
+ * po/de.po: update from Pit Sütterlin
+ * lib/bind/de_menus.bind: ditto.
+
+ * src/lyxfunc.C (Dispatch): call MenuExport()
+ * src/buffer.C (Dispatch): ditto
+
+ * src/lyx_cb.C (MenuMakeHTML): new function, moved from
+ LyXFunc::Dispatch().
+ (MenuExport): new function, moved from
+ LyXFunc::Dispatch().
+
* src/trans_mgr.C (insert): small cleanup
* src/chset.C (loadFile): ditto
\bind "M-d p" "buffer-view-ps"
\bind "M-d i" "buffer-typeset"
\bind "M-d k" "buffer-typeset-ps"
-\bind "M-d e" "build-program"
+\bind "M-d r" "build-program"
\bind "M-d d" "buffer-print"
\bind "M-d f" "buffer-fax"
\bind "M-d m l" "buffer-import latex"
msgstr ""
"Project-Id-Version: LyX 1.0.4\n"
"POT-Creation-Date: 1999-12-13 23:06+0100\n"
-"PO-Revision-Date: 1999-12-01 00:20+01:00\n"
+"PO-Revision-Date: 1999-12-15 00:20+01:00\n"
"Last-Translator: Peter Sütterlin <P.Suetterlin@astro.uu.nl>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
#: src/buffer.C:255
msgid "Specified file is unreadable: "
-msgstr ""
+msgstr "Die angegebene Datei ist nicht lesbar: "
#: src/buffer.C:265
-#, fuzzy
msgid "Cannot open specified file: "
msgstr "Die angegebene Datei kann nicht geöffnet werden:"
msgstr "Fehler! Die Datei kann nicht geschrieben werden: "
#: src/buffer.C:1240 src/buffer.C:1243
-#, fuzzy
msgid "Error! Cannot open file: "
-msgstr "Fehler! Die Datei kann nicht geschrieben werden: "
+msgstr "Fehler! Die Datei kann nicht geöffnet werden: "
#: src/buffer.C:1291
msgid "Error: Cannot write file:"
msgstr "Fehler: Temporäre Datei kann nicht angelegt werden: "
#: src/buffer.C:1614
-#, fuzzy
msgid "Error: Cannot open file: "
-msgstr "Fehler! Die Datei kann nicht geschrieben werden werden: "
+msgstr "Fehler! Die Datei kann nicht geöffnet werden: "
#: src/buffer.C:2187 src/buffer.C:2777 src/buffer.C:3604 src/buffer.C:3626
#: src/paragraph.C:3577
#. / what appears in the minibuffer when opening
#: src/insets/figinset.h:51
-#, fuzzy
msgid "Opened figure"
-msgstr "Einfügung geöffnet"
+msgstr "Abbildungs-Einfügung geöffnet"
#: src/insets/form_url.C:19
-#, fuzzy
msgid "Url"
-msgstr "Url: "
+msgstr "Url"
#: src/insets/form_url.C:20
msgid "Url|#U"
msgstr "Url|#U"
#: src/insets/form_url.C:23
-#, fuzzy
msgid "Name"
-msgstr "Name:|#N"
+msgstr "Name"
#: src/insets/form_url.C:24 src/lyx.C:171
msgid "Name|#N"
msgstr "Name:|#N"
#: src/insets/form_url.C:27
-#, fuzzy
msgid "HTML type"
-msgstr "HTML-Typ|#H"
+msgstr "HTML-Typ"
#: src/insets/form_url.C:28
msgid "HTML type|#H"
msgstr "Index"
#: src/insets/insetindex.C:111
-#, fuzzy
msgid "Idx"
-msgstr "Index"
+msgstr "Idx"
#: src/insets/insetindex.C:139
msgid "PrintIndex"
#. / what appears in the minibuffer when opening
#: src/insets/insetinfo.h:60
-#, fuzzy
msgid "Opened note"
-msgstr "Einfügung geöffnet"
+msgstr "Notiz geöffnet"
#. /
#: src/insets/insetloa.h:37
#. /
#: src/insets/inseturl.h:61
-#, fuzzy
msgid "Opened Url"
-msgstr "Zeige Fehlermeldung"
+msgstr "URL geöffnet"
#. / what appears in the minibuffer when opening
#: src/insets/lyxinset.h:95
msgstr "Starte BibTeX."
#: src/LaTeXLog.C:44
-#, fuzzy
msgid "Unable to show log file!"
-msgstr "Die Datei kann nicht gelesen werden!"
+msgstr "Die Protokoll-Datei kann nicht angezeigt werden!"
#: src/LaTeXLog.C:47
msgid "NO LATEX LOG FILE!"
msgstr "Besonderes Spaltenformat"
#: src/Literate.C:57
-#, fuzzy
msgid "Weaving document"
-msgstr "Dokument wird gespeichert"
+msgstr "Dokument wird mit weave bearbeitet"
#: src/Literate.C:87
-#, fuzzy
msgid "Building program"
msgstr "Starte Build"
#: src/LyXAction.C:92
-#, fuzzy
msgid "Insert appendix"
-msgstr "Marke einfügen"
+msgstr "Anhang einfügen"
#: src/LyXAction.C:93
msgid "Describe command"
msgstr "Auswählen bis zum Ende des Dokuments"
#: src/LyXAction.C:119
-#, fuzzy
msgid "Export to"
-msgstr "|Exportieren%m%l"
+msgstr "Exportieren nach"
#: src/LyXAction.C:120
msgid "Fax"
msgstr "Gespeicherte Version wiederherstellen"
#: src/LyXAction.C:136
-#, fuzzy
msgid "Toggle read-only"
-msgstr "Fett an/aus"
+msgstr "Schreibschutz an/aus"
#: src/LyXAction.C:137
msgid "Update DVI"
msgstr "Trennmöglichkeit einfügen"
#: src/LyXAction.C:203
-#, fuzzy
msgid "Insert index item"
-msgstr "Randnotiz einfügen"
+msgstr "Index-Element einfügen"
#: src/LyXAction.C:205
-#, fuzzy
msgid "Insert last index item"
-msgstr "Randnotiz einfügen"
+msgstr "Letztes Index-Element einfügen"
#: src/LyXAction.C:206
-#, fuzzy
msgid "Insert index list"
-msgstr "BibTeX einfügen"
+msgstr "Indexliste einfügen"
#: src/LyXAction.C:207
msgid "Turn off keymap"
msgstr "Marke einfügen"
#: src/LyXAction.C:214
-#, fuzzy
msgid "View LaTeX log"
-msgstr "LaTeX Protokoll"
+msgstr "LaTeX Protokoll anzeigen"
#: src/LyXAction.C:218
msgid "Copy paragraph environment type"
msgstr "Auswählen bis zum Ende der Zeile"
#: src/LyXAction.C:238
-#, fuzzy
msgid "Insert list of algorithms"
-msgstr "Liste der Algorithmen"
+msgstr "Liste der Algorithmen einfügen"
#: src/LyXAction.C:240
-#, fuzzy
msgid "Insert list of figures"
-msgstr "Liste der Abbildungen"
+msgstr "Liste der Abbildungen einfügen"
#: src/LyXAction.C:242
-#, fuzzy
msgid "Insert list of tables"
-msgstr "Liste der Tabellen"
+msgstr "Liste der Tabellen einfügen"
#: src/LyXAction.C:243
msgid "Exit"
msgstr "Griechische Zeichen"
#: src/LyXAction.C:254
-#, fuzzy
msgid "Insert math symbol"
-msgstr "Marke einfügen"
+msgstr "Mathematik-Symbol einfügen"
#: src/LyXAction.C:259
msgid "Math mode"
msgstr "TeX Modus an/aus"
#: src/LyXAction.C:317
-#, fuzzy
msgid "Insert table of contents"
-msgstr "Inhaltsverzeichnis"
+msgstr "Inhaltsverzeichnis einfügen"
#: src/LyXAction.C:319
-#, fuzzy
msgid "View table of contents"
-msgstr "Inhaltsverzeichnis"
+msgstr "Inhaltsverzeichnis anzeigen"
#: src/LyXAction.C:321
msgid "Toggle cursor does/doesn't follow the scrollbar"
#: src/LyXAction.C:333
msgid "Register document under version control"
-msgstr ""
+msgstr "Dokument in Versionskontrolle registrieren"
#: src/LyXAction.C:555
msgid "No description available!"
#: src/lyx_cb.C:1166
msgid "Error! Specified file is unreadable: "
-msgstr ""
+msgstr "Fehler! Die angegebene Datei kann nicht gelesen werden: "
#: src/lyx_cb.C:1173
-#, fuzzy
msgid "Error! Cannot open specified file: "
msgstr "Fehler! Die angegebene Datei kann nicht geöffnet werden:"
msgstr "Standard"
#: src/lyxfr1.C:157 src/lyxfr1.C:213
-#, fuzzy
msgid "Sorry!"
-msgstr "Sorry."
+msgstr "Sorry!"
#: src/lyxfr1.C:157 src/lyxfr1.C:213
msgid "You cannot replace a single space, nor an empty character."
-msgstr ""
+msgstr "Einzelne Leerzeichen und andere leere Zeichen können "
+"nicht ersetzt werden"
#: src/lyxfr1.C:263 src/lyxfr1.C:328
-#, fuzzy
msgid "String not found!"
-msgstr "Der Zeichensatz wurde nicht gefunden!"
+msgstr "Die Zeichenkette wurde nicht gefunden!"
#: src/lyxfr1.C:266
-#, fuzzy
msgid "1 string has been replaced."
-msgstr "Neukonfiguration wurde durchgeführt."
+msgstr "Eine Zeichenkette wurde ersetzt."
#: src/lyxfr1.C:269
msgid " strings have been replaced."
-msgstr ""
+msgstr " Zeichenketten wurden ersetzt."
#: src/lyxfr1.C:324
-#, fuzzy
msgid "Found."
-msgstr "wurde geladen."
+msgstr "Gefunden."
#: src/lyxfunc.C:295
msgid "Unknown sequence:"
#: src/lyxfunc.C:837 src/lyxfunc.C:2920
msgid "Document exported as HTML to file `"
-msgstr ""
+msgstr "Dokument als HTML-Datei exportiert: `"
#: src/lyxfunc.C:840 src/lyxfunc.C:2923
-#, fuzzy
msgid "Unable to convert to HTML the file `"
-msgstr "Die Datei kann nicht gelesen werden!"
+msgstr "Die Datei kann nicht nach HTML konvertiert werden: `"
#: src/lyxfunc.C:846 src/lyxfunc.C:2929
msgid "Unknown export type: "
"Falls Probleme auftreten, starten Sie LyX unter angabe des vollen Pfades."
#: src/lyx_main.C:269
-#, fuzzy
msgid "LYX_DIR_11x environment variable no good."
-msgstr "Die Umgebungsvariable LYX_DIR_10x ist unbrauchbar."
+msgstr "Die Umgebungsvariable LYX_DIR_11x ist unbrauchbar."
#: src/lyx_main.C:271
msgid "System directory set to: "
msgstr "Verwenden Sie die Kommandozeilenoption `-sysdir' oder setzen"
#: src/lyx_main.C:281
-#, fuzzy
msgid "set the environment variable LYX_DIR_11x to the LyX system directory"
-msgstr "Sie die Umgebungsvariable LYX_DIR_10x auf das LyX Systemverzeichnis,"
+msgstr "Sie die Umgebungsvariable LYX_DIR_11x auf das LyX Systemverzeichnis,"
#: src/lyx_main.C:283
msgid "containing the file `chkconfig.ltx'."
"\n"
"Check the LyX man page for more options."
msgstr ""
+"Aufruf: lyx [ Befehlsoptionen ] [ name.lyx ... ]\n"
+"Kommandozeilenoptionen (groß/klein beachten):\n"
+"\t-help LyX Benutzung zusammenfassen\n"
+"\t-sysdir x Setze das Systemverzeichnis auf x\n"
+"\t-width x Legt die Breite des LyX Fensters fest\n"
+"\t-height y Legt die Höhe des LyX Fensters fest\n"
+"\t-xpos x Legt die hor. Position des LyX Fensters fest\n"
+"\t-ypos y Legt die vert. Position des LyX Fensters fest\n"
+"\t-dbg Feature[,Feature]...\n"
+" Wählt die Themenbereiche aus, für die eine\n"
+" ausführliche Fehlermeldung aktiviert wird.\n"
+" Mit `lyx -dbg' erhalten Sie eine Liste der\n"
+" vorhandenen Bereiche.\n"
+"\t-Reverse Vertauscht Vordergrund- und Hintergrundfarben\n"
+"\t-Mono Startet LyX im Schwarz-Weiß Modus\n"
+"\t-FastSelection Verwendet eine schnellere Routine, um markierte\n"
+" Bereiche anzuzeigen\n"
+"\n"
+"Weitere Optionen sind in der Online-Hilfe (man lyx) aufgeführt."
#: src/lyx_main.C:485
msgid "List of supported debug flags:"
-msgstr ""
+msgstr "Liste der unterstützten Debug Optionen:"
#: src/lyx_main.C:504
msgid "Missing directory for -sysdir switch!"
msgstr "Die Option -sysdir benötigt ein Verzeichnis!"
#: src/lyx_main.C:530
-#, fuzzy
msgid "Missing command string after -x switch!"
-msgstr "Die Option -dbg benötigt eine Zahl!"
+msgstr "Die Option -x benötigt einen Befehl als Argument!"
#: src/lyx_main.C:556
-#, fuzzy
msgid "Unknown file type '"
-msgstr "Unbekannter Export-Typ: "
+msgstr "Unbekannter Datei-Typ `"
#: src/lyx_main.C:557
msgid "' after "
-msgstr ""
+msgstr "' nach der "
#: src/lyx_main.C:558 src/lyx_main.C:563
msgid " switch!"
-msgstr ""
+msgstr " Option"
#: src/lyx_main.C:561
msgid "Missing file type [eg latex, ps...] after "
-msgstr ""
+msgstr "Fehlender Datei-Typ [zB latex, ps...] nach "
#: src/lyx_sendfax.C:21
msgid "Fax no.:|#F"
msgstr "Dokument an Shell-Befehl senden"
#: src/lyxvc.C:89 src/lyxvc.C:119
-#, fuzzy
msgid "Save document and proceed?"
-msgstr "Dokument speichern?"
+msgstr "Dokument speichern und fortfahren?"
#: src/lyxvc.C:101
msgid "LyX VC: Initial description"
-msgstr ""
+msgstr "LyX VK: Anfängliche BEschreibung"
#: src/lyxvc.C:102
msgid "(no initial description)"
-msgstr ""
+msgstr "(keine anfängliche Beschreibung)"
#: src/lyxvc.C:105
-#, fuzzy
msgid "Info"
-msgstr "Ignorieren"
+msgstr "Info"
#: src/lyxvc.C:105
msgid "This document has NOT been registered."
-msgstr ""
+msgstr "Dieses Dokument wurde NICHT registriert."
#: src/lyxvc.C:131
msgid "LyX VC: Log Message"
-msgstr ""
+msgstr "LyX VK: Protokollmeldung"
#: src/lyxvc.C:145
msgid "Ignore changes and proceed with check out?"
-msgstr ""
+msgstr "Änderungen ignorieren und mit Check-Out fortfahren?"
#. Here we should check if the buffer is dirty. And if it is
#. we should warn the user that reverting will discard all
#. changes made since the last check in.
#: src/lyxvc.C:160
msgid "When you revert, you will loose all changes made"
-msgstr ""
+msgstr "Mit Rückgängig verlieren Sie alle Änderungen, die an dem "
#: src/lyxvc.C:161
msgid "to the document since the last check in."
-msgstr ""
+msgstr "Dokument seit dem letzten Check-In durchgeführt wurden."
#: src/lyxvc.C:162
-#, fuzzy
msgid "Do you still want to do it?"
-msgstr "Möchten Sie das Dokument öffnen?"
+msgstr "Möchten Sie trotzdem weitermachen?"
#: src/lyxvc.C:265
-#, fuzzy
msgid "No VC History!"
-msgstr "|Entwicklung anzeigen%x56"
+msgstr "Keine Entwicklungsgeschichte der VK!"
#: src/lyxvc.C:272
-#, fuzzy
msgid "VC History"
-msgstr "|Entwicklung anzeigen%x56"
+msgstr "Entwicklungsgeschichte VK"
#: src/LyXView.C:379 src/minibuffer.C:218
msgid " (Changed)"
#. / what appears in the minibuffer when opening
#: src/mathed/formulamacro.h:62
-#, fuzzy
msgid "Math macro editor mode"
-msgstr "Mathematik Modus"
+msgstr "Mathematik Modus: Makro Editor"
#: src/mathed/math_forms.C:19
msgid "Close "
msgstr "FIM|Nn#n#N"
#: src/menus.C:489
-#, fuzzy
msgid ""
"Export%t|as LaTeX...%x40|as DVI...%x41|as PostScript...%x42|as Ascii "
"Text...%x43|as HTML...%x44|Custom...%x45"
#: src/menus.C:516
#, fuzzy
msgid "FEX|Hh#h#H"
-msgstr "EMV|hH#h#H"
+msgstr "FEX|Hh#h#H"
#: src/menus.C:517
msgid "FEX|mM#m#M"
"%l%x74|Algorithmus%x75"
#: src/menus.C:1594
-#, fuzzy
msgid "IMF|gG#g#G"
-msgstr "IM|Aa#a#A"
+msgstr "IMF|Aa#a#A"
#: src/menus.C:1595
msgid "IMF|Tt#t#T"
msgstr "Unnötig mit diesem Layout!"
#: src/ParagraphExtra.C:147
-#, fuzzy
msgid "Document is read-only. No changes to layout permitted."
-msgstr "Schreibgeschütztes Dokument, keine Änderung möglich."
+msgstr "Schreibgeschütztes Dokument, keine Änderung am Layout möglich."
#: src/ParagraphExtra.C:166
msgid "ParagraphExtra Layout"
msgstr "Fehler: Konnte nicht in das Verzeichnis wechseln: "
#: src/support/path.h:37
-#, fuzzy
msgid "Error: Dir already popped: "
-msgstr "Das Dokument ist bereits geöffnet:"
+msgstr "Fehler! Das Verzeichnis wurde bereits vom Stapel genommen: "
#: src/TableLayout.C:416
msgid "Table Extra Form"
#include "lyx_cb.h"
#include "minibuffer.h"
#include "lyxfont.h"
+#include "version.h"
#include "mathed/formulamacro.h"
#include "insets/lyxinset.h"
#include "insets/inseterror.h"
extern unsigned char GetCurrentTextClass();
extern void BeforeChange();
-extern void MenuMakeLaTeX(Buffer *);
-extern void MenuMakeLinuxDoc(Buffer *);
-extern void MenuMakeDocBook(Buffer *);
-extern void MenuRunLaTeX(Buffer *);
-extern void MenuPrint(Buffer *);
-extern void MenuMakeAscii(Buffer *);
-extern void MenuSendto();
+extern void MenuExport(Buffer *, string const &);
extern LyXAction lyxaction;
return false;
}
// The top of the file should not be written by params.
- // collect some very important information
- string userName(getUserName()) ;
// write out a comment in the top of the file
- ofs << "#LyX 1.1 Copyright 1995-1999 Matthias Ettrich"
- " and the LyX Team\n";
+ ofs << '#' << LYX_DOCVERSION
+ << " created this file. For more info see http://www.lyx.org/\n";
ofs.setf(ios::showpoint|ios::fixed);
ofs.precision(2);
ofs << "\\lyxformat " << setw(4) << LYX_FORMAT << "\n";
else
ofs << "\n [ " << params.preamble << " \n]>\n\n";
- string userName(getUserName());
- ofs << "<!-- DocBook file was created by LyX 1.1 (C) 1995-1999\n"
- << "by <" << userName << "> " << date() << " -->\n";
+ ofs << "<!-- DocBook file was created by " << LYX_DOCVERSION
+ << "\n See http://www.lyx.org/ for more information -->\n";
if(params.options.empty())
sgmlOpenTag(ofs, 0, top_element);
void Buffer::Dispatch(int action, const string & argument)
{
switch (action) {
- case LFUN_EXPORT: {
- // latex
- if (argument == "latex") {
- // make sure that this buffer is not linuxdoc
- MenuMakeLaTeX(this);
- }
- // linuxdoc
- else if (argument == "linuxdoc") {
- // make sure that this buffer is not latex
- MenuMakeLinuxDoc(this);
- }
- // docbook
- else if (argument == "docbook") {
- // make sure that this buffer is not latex or linuxdoc
- MenuMakeDocBook(this);
- }
- // dvi
- else if (argument == "dvi") {
- // Run LaTeX as "Update dvi..." Bernhard.
- // We want the dvi in the current directory. This
- // is achieved by temporarily disabling use of
- // temp directory. As a side-effect, we get
- // *.log and *.aux files also. (Asger)
- bool flag = lyxrc->use_tempdir;
- lyxrc->use_tempdir = false;
- MenuRunLaTeX(this);
- lyxrc->use_tempdir = flag;
- }
- // postscript
- else if (argument == "postscript") {
- // Start Print-dialog. Not as good as dvi... Bernhard.
- MenuPrint(this);
- // Since the MenuPrint is a pop-up, we can't use
- // the same trick as above. (Asger)
- // MISSING: Move of ps-file :-|
- }
- // ascii
- else if (argument == "ascii") {
- MenuMakeAscii(this);
- }
- else if (argument == "custom") {
- MenuSendto();
- break;
- }
- // HTML
- else if (argument == "html" && lyxrc->html_command != "none") {
- // First, create LaTeX file
- MenuMakeLaTeX(this);
-
- // And now, run the converter
- string file = fileName();
- Path path(OnlyPath(file));
- // the tex file name has to be correct for
- // latex, but the html file name can be
- // anything.
- string result = ChangeExtension(file, ".html", false);
- file = ChangeExtension(MakeLatexName(file), ".tex", false);
- string tmp = lyxrc->html_command;
- tmp = subst(tmp, "$$FName", file);
- tmp = subst(tmp, "$$OutName", result);
- Systemcalls one;
- /*int res = */ one.startscript(Systemcalls::System, tmp);
- //
- // Hi, Asger. This time I plead guilty and I promise to clean it up
- //
- // if (res == 0) {
- // setMessage(N_("Document exported as HTML to file `")
- // + MakeDisplayPath(result) +'\ '');
- // } else {
- // setErrorMessage(N_("Unable to convert to HTML the file `")
- // + MakeDisplayPath(file)
- // + '\'');
- // }
- }
- else {
- // setErrorMessage(N_("Unknown export type: ")
- // + argument);
- }
- }
- break;
+ case LFUN_EXPORT:
+ MenuExport(this, argument);
+ break;
+ break;
default:
lyxerr << "A truly unknown func!" << endl;
extern void DeleteSimpleCutBuffer(); /* for the cleanup when exiting */
extern bool send_fax(string const & fname, string const & sendcmd);
+extern void MenuSendto();
extern LyXServer * lyxserver;
extern FontLoader fontloader;
}
}
+void MenuMakeHTML(Buffer * buffer)
+{
+ // First, create LaTeX file
+ MenuMakeLaTeX(buffer);
+
+ // And now, run the converter
+ string file = buffer->fileName();
+ Path path(OnlyPath(file));
+ // the tex file name has to be correct for
+ // latex, but the html file name can be
+ // anything.
+ string result = ChangeExtension(file, ".html", false);
+ string infile = buffer->getLatexName();
+ string tmp = lyxrc->html_command;
+ tmp = subst(tmp, "$$FName", infile);
+ tmp = subst(tmp, "$$OutName", result);
+ Systemcalls one;
+ int res = one.startscript(Systemcalls::System, tmp);
+ if (res == 0) {
+ minibuffer->Set(_("Document exported as HTML to file `")
+ + MakeDisplayPath(result) +'\'');
+ } else {
+ minibuffer->Set(_("Unable to convert to HTML the file `")
+ + MakeDisplayPath(infile)
+ + '\'');
+ }
+
+}
+
+void MenuExport(Buffer * buffer, string const & extyp)
+{
+ // latex
+ if (extyp == "latex") {
+ // make sure that this buffer is not linuxdoc
+ MenuMakeLaTeX(buffer);
+ }
+ // linuxdoc
+ else if (extyp == "linuxdoc") {
+ // make sure that this buffer is not latex
+ MenuMakeLinuxDoc(buffer);
+ }
+ // docbook
+ else if (extyp == "docbook") {
+ // make sure that this buffer is not latex or linuxdoc
+ MenuMakeDocBook(buffer);
+ }
+ // dvi
+ else if (extyp == "dvi") {
+ // Run LaTeX as "Update dvi..." Bernhard.
+ // We want the dvi in the current directory. This
+ // is achieved by temporarily disabling use of
+ // temp directory. As a side-effect, we get
+ // *.log and *.aux files also. (Asger)
+ bool flag = lyxrc->use_tempdir;
+ lyxrc->use_tempdir = false;
+ MenuRunLaTeX(buffer);
+ lyxrc->use_tempdir = flag;
+ }
+ // postscript
+ else if (extyp == "postscript") {
+ // Start Print-dialog. Not as good as dvi... Bernhard.
+ MenuPrint(buffer);
+ // Since the MenuPrint is a pop-up, we can't use
+ // the same trick as above. (Asger)
+ // MISSING: Move of ps-file :-(
+ }
+ // ascii
+ else if (extyp == "ascii") {
+ MenuMakeAscii(buffer);
+ }
+ else if (extyp == "custom") {
+ MenuSendto();
+ }
+ // HTML
+ else if (extyp == "html") {
+ MenuMakeHTML(buffer);
+ }
+ else {
+ minibuffer->Set(_("Unknown export type: ")+ extyp);
+ }
+}
+
void QuitLyX()
{
extern void MenuSendto();
extern void QuitLyX();
extern void MenuFax(Buffer *);
-extern void MenuMakeLaTeX(Buffer *);
-extern void MenuMakeLinuxDoc(Buffer *);
-extern void MenuMakeDocBook(Buffer *);
-extern void MenuMakeAscii(Buffer *);
+extern void MenuExport(Buffer *,string const &);
extern void MenuPasteSelection(char at);
extern LyXAction lyxaction;
// (alkis)
break;
case LFUN_EXPORT:
- {
- //needs argument as string
- string extyp = argument;
-
- // latex
- if (extyp == "latex") {
- // make sure that this buffer is not linuxdoc
- MenuMakeLaTeX(owner->buffer());
- }
- // linuxdoc
- else if (extyp == "linuxdoc") {
- // make sure that this buffer is not latex
- MenuMakeLinuxDoc(owner->buffer());
- }
- // docbook
- else if (extyp == "docbook") {
- // make sure that this buffer is not latex or linuxdoc
- MenuMakeDocBook(owner->buffer());
- }
- // dvi
- else if (extyp == "dvi") {
- // Run LaTeX as "Update dvi..." Bernhard.
- // We want the dvi in the current directory. This
- // is achieved by temporarily disabling use of
- // temp directory. As a side-effect, we get
- // *.log and *.aux files also. (Asger)
- bool flag = lyxrc->use_tempdir;
- lyxrc->use_tempdir = false;
- MenuRunLaTeX(owner->buffer());
- lyxrc->use_tempdir = flag;
- }
- // postscript
- else if (extyp == "postscript") {
- // Start Print-dialog. Not as good as dvi... Bernhard.
- MenuPrint(owner->buffer());
- // Since the MenuPrint is a pop-up, we can't use
- // the same trick as above. (Asger)
- // MISSING: Move of ps-file :-(
- }
- // ascii
- else if (extyp == "ascii") {
- MenuMakeAscii(owner->buffer());
- }
- else if (extyp == "custom") {
- MenuSendto();
- break;
- }
- // HTML
- else if (extyp == "html" && lyxrc->html_command != "none") {
- // First, create LaTeX file
- MenuMakeLaTeX(owner->buffer());
-
- // And now, run the converter
- string file = owner->buffer()->fileName();
- Path path(OnlyPath(file));
- // the tex file name has to be correct for
- // latex, but the html file name can be
- // anything.
- string result = ChangeExtension(file, ".html", false);
- string infile = owner->buffer()->getLatexName();
- string tmp = lyxrc->html_command;
- tmp = subst(tmp, "$$FName", infile);
- tmp = subst(tmp, "$$OutName", result);
- Systemcalls one;
- int res = one.startscript(Systemcalls::System, tmp);
- if (res == 0) {
- setMessage(N_("Document exported as HTML to file `")
- + MakeDisplayPath(result) +'\'');
- } else {
- setErrorMessage(N_("Unable to convert to HTML the file `")
- + MakeDisplayPath(infile)
- + '\'');
- }
- }
- else {
- setErrorMessage(N_("Unknown export type: ")
- + extyp);
- }
- }
- break;
+ MenuExport(owner->buffer(), argument);
+ break;
case LFUN_IMPORT:
{
/* Version and release date definition */
#define LYX_VERSION "1.1.4cvs"
#define LYX_RELEASE "Mon, Dec 13, 1999"
+/* This version string is intended to be used in files created by LyX */
+#define LYX_DOCVERSION "LyX 1.1"