From 2a71306d7744931ad486dce86168c54098a46b26 Mon Sep 17 00:00:00 2001 From: Michael Schmitt Date: Wed, 23 Aug 2006 11:16:08 +0000 Subject: [PATCH] drop linuxdoc support (part 4) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14821 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/FORMAT | 2 +- development/scons/scons_manifest.py | 5 - lib/Makefile.am | 3 - lib/examples/linuxdoc_manpage.lyx | 257 -------------------- lib/external_templates | 14 -- lib/layouts/linuxdoc.layout | 352 ---------------------------- lib/templates/linuxdoc_article.lyx | 87 ------- po/POTFILES.in | 1 - src/Makefile.am | 2 - src/paragraph.C | 195 --------------- src/paragraph.h | 9 +- src/tabular.C | 42 ---- src/tabular.h | 3 - 13 files changed, 2 insertions(+), 970 deletions(-) delete mode 100644 lib/examples/linuxdoc_manpage.lyx delete mode 100644 lib/layouts/linuxdoc.layout delete mode 100644 lib/templates/linuxdoc_article.lyx diff --git a/development/FORMAT b/development/FORMAT index 314f9b0b20..aa8f8232c1 100644 --- a/development/FORMAT +++ b/development/FORMAT @@ -315,7 +315,7 @@ Paragraph text. extra LaTeX "draft" 'extra' data passed to the primary command for this output format. (Possible formats LaTeX, PDFLaTeX, - LinuxDoc, DocBook, Ascii.) + DocBook, Ascii.) The string can contain spaces and so is wrapped in "...". rotateAngle 30 Rotation of the data. diff --git a/development/scons/scons_manifest.py b/development/scons/scons_manifest.py index 89504ad813..0d3ed613be 100644 --- a/development/scons/scons_manifest.py +++ b/development/scons/scons_manifest.py @@ -1483,7 +1483,6 @@ src_header_files = Split(''' output.h output_docbook.h output_latex.h - output_linuxdoc.h output_plaintext.h outputparams.h paper.h @@ -1590,7 +1589,6 @@ src_pre_files = Split(''' output.C output_docbook.C output_latex.C - output_linuxdoc.C output_plaintext.C outputparams.C paragraph.C @@ -1747,7 +1745,6 @@ lib_examples_files = Split(''' it_ItemizeBullets.lyx it_splash.lyx landslide.lyx - linuxdoc_manpage.lyx listerrors.lyx mathed.lyx multicol.lyx @@ -2453,7 +2450,6 @@ lib_layouts_files = Split(''' kluwer.layout latex8.layout letter.layout - linuxdoc.layout literate-article.layout literate-book.layout literate-report.layout @@ -2540,7 +2536,6 @@ lib_templates_files = Split(''' koma-letter2.lyx latex8.lyx letter.lyx - linuxdoc_article.lyx revtex.lyx revtex4.lyx slides.lyx diff --git a/lib/Makefile.am b/lib/Makefile.am index c992a754f3..8b3b5c8da0 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -116,7 +116,6 @@ dist_examples_DATA = \ examples/it_ItemizeBullets.lyx \ examples/it_splash.lyx \ examples/landslide.lyx \ - examples/linuxdoc_manpage.lyx \ examples/listerrors.lyx \ examples/mathed.lyx \ examples/multicol.lyx \ @@ -818,7 +817,6 @@ dist_layouts_DATA =\ layouts/kluwer.layout \ layouts/latex8.layout \ layouts/letter.layout \ - layouts/linuxdoc.layout \ layouts/literate-article.layout \ layouts/literate-book.layout \ layouts/literate-report.layout \ @@ -904,7 +902,6 @@ dist_templates_DATA = \ templates/koma-letter2.lyx \ templates/latex8.lyx \ templates/letter.lyx \ - templates/linuxdoc_article.lyx \ templates/revtex.lyx \ templates/revtex4.lyx \ templates/slides.lyx \ diff --git a/lib/examples/linuxdoc_manpage.lyx b/lib/examples/linuxdoc_manpage.lyx deleted file mode 100644 index 56655bb1dd..0000000000 --- a/lib/examples/linuxdoc_manpage.lyx +++ /dev/null @@ -1,257 +0,0 @@ -#LyX 1.5.0svn created this file. For more info see http://www.lyx.org/ -\lyxformat 245 -\begin_document -\begin_header -\textclass manpage -\options title="LyX" sectnum="1" -\language english -\inputencoding default -\fontscheme default -\graphics default -\paperfontsize 10 -\spacing single -\papersize default -\use_geometry false -\use_amsmath 0 -\cite_engine basic -\use_bibtopic false -\paperorientation portrait -\secnumdepth -2 -\tocdepth -1 -\paragraph_separation indent -\defskip medskip -\quotes_language english -\papercolumns 1 -\papersides 1 -\paperpagestyle default -\tracking_changes false -\output_changes true -\end_header - -\begin_body - -\begin_layout Section - -Name -\end_layout - -\begin_layout Standard - -lyx - A Document Processor -\end_layout - -\begin_layout Section - -Synopsis -\end_layout - -\begin_layout Standard - -lyx [ command-line switches] [name.lyx ... - ] -\end_layout - -\begin_layout Section - -Description -\end_layout - -\begin_layout Standard - - -\emph on -LyX -\emph default - is too complex to be described completely in the "man" page format. - If your system is properly configured, you can access the full documentation - within -\emph on -LyX -\emph default - under the Help menu. - -\end_layout - -\begin_layout Standard - - -\emph on -LyX -\emph default - is a modern approach of writing documents with a computer which breaks - with the tradition of the obsolete typewriter concept. - It is designed for people who want a professional output with a minimum - of time effort, without becoming specialists in typesetting. - Compared to common word processors, -\emph on -LyX -\emph default - will increase the productivity a lot, since most of the typesetting will - be done by the computer, not the author. - With -\emph on -LyX -\emph default - the author can concentrate on the contents of his writing, since the computer - will take care of the look. - Read more about this concept in the online documentation under the Help - menu. - -\end_layout - -\begin_layout Standard - -Currently, -\emph on -LyX -\emph default - uses the XForms library as a toolkit. - -\emph on -LyX -\emph default - should run everywhere, where XForms runs. - This is on all major Unix platforms as well as some PC platforms, including - Sun, SGI, HP, Compaq Tru64, IBM RS6000, Convex, Cray, i386/Linux, Alpha/Linux, - i386/FreeBSD, i386/NetBSD, DecSystem(mips)/Ultrix, OS/2 with XFree or PMX - and others. - -\end_layout - -\begin_layout Section - -Options -\end_layout - -\begin_layout Standard - - -\emph on -LyX -\emph default - supports the following command-line switches, which can also be specified - as X resources (e. - g. - in .Xdefaults) with class name -\emph on -LyX -\emph default -: -\end_layout - -\begin_layout Description - --help summarizes LyX usage -\end_layout - -\begin_layout Description - --sysdir directory sets system directory. - Normally not needed. -\end_layout - -\begin_layout Description - --userdir directory sets user directory. - Needed if you want to use LyX with different lyxrc settings. -\end_layout - -\begin_layout Description - --geometry WxH+X+Y specifies the preferred size and position of the main - LyX window; see X(1). -\end_layout - -\begin_layout Description - --dbg feature[,feature...] where feature is a name or number. - Use "lyx -dbg" to see the list of available debug features. -\end_layout - -\begin_layout Description - --x [--execute] command where command is a lyx command. -\end_layout - -\begin_layout Description - --e [--export] fmt where fmt is the export format of choice. -\end_layout - -\begin_layout Description - --i [--import] fmt file.xxx where fmt is the import format of choice and file.xxx - is the file to be imported. - -\end_layout - -\begin_layout Standard - -Furthermore, LyX understands the following generic command line options - from the Forms Library: -\end_layout - -\begin_layout Description - --display host:display specifies the server to connect to. -\end_layout - -\begin_layout Description - --bw borderwidth specifies the border width to use to built-in objects. -\end_layout - -\begin_layout Description - --visual visualName requests a visual by name such as TrueColor etc. - By default the Forms Library always selects the visual that has the most - depth. -\end_layout - -\begin_layout Description - --depth depth requests a specific depth. - Try "-depth best" or "-depth 8" if you get a bad match. -\end_layout - -\begin_layout Description - --debug level generates some info about the state of the XForms. - where level is an integer between 1-5 and controls the amount of information - to output. - Depending on the options used when the Forms Library was built, a level - more than 3 might not be available. -\end_layout - -\begin_layout Description - --sync runs the application in synchronous mode with debug level set to 4. -\end_layout - -\begin_layout Description - --private requests a private colormap for the application. -\end_layout - -\begin_layout Description - --shared requests a shared colormap even if the application needs more colors - than available. - For those colors that can't be allocated in the shared colormap, substitutions - are made so the closest matching color is used. -\end_layout - -\begin_layout Description - --stdcmap requests a standard colormap. -\end_layout - -\begin_layout Description - --name newname specifies the application name under which resources are to - be obtained, rather than the default executable file name. - -\end_layout - -\end_body -\end_document diff --git a/lib/external_templates b/lib/external_templates index f6ad4cce23..b3393ad010 100644 --- a/lib/external_templates +++ b/lib/external_templates @@ -96,9 +96,6 @@ Template RasterImage ReferencedFile docbook "$$AbsPath$$Basename.eps" ReferencedFile docbook-xml "$$AbsPath$$Basename.eps" FormatEnd - Format LinuxDoc - Product "[Bitmap: $$FName]" - FormatEnd TemplateEnd @@ -151,9 +148,6 @@ Template XFig ReferencedFile docbook "$$AbsPath$$Basename.eps" ReferencedFile docbook-xml "$$AbsPath$$Basename.eps" FormatEnd - Format LinuxDoc - Product "[XFig: $$FName]" - FormatEnd TemplateEnd @@ -199,9 +193,6 @@ Template ChessDiagram Format DocBook Product "[Chess: $$AbsOrRelPathMaster$$Basename]" FormatEnd - Format LinuxDoc - Product "[Chess: $$FName]" - FormatEnd TemplateEnd @@ -234,9 +225,4 @@ Template Date UpdateFormat dateout UpdateResult "$$Tempname" FormatEnd - Format LinuxDoc - Product "$$Contents(\"$$Tempname\")" - UpdateFormat dateout - UpdateResult "$$Tempname" - FormatEnd TemplateEnd diff --git a/lib/layouts/linuxdoc.layout b/lib/layouts/linuxdoc.layout deleted file mode 100644 index 390675335a..0000000000 --- a/lib/layouts/linuxdoc.layout +++ /dev/null @@ -1,352 +0,0 @@ -#% Do not delete the line below; configure depends on this -# \DeclareLinuxDocClass[article]{LinuxDoc article (SGML)} -# LinuxDoc textclass definition file. -# Author : Pascal André - - -Format 2 -Columns 1 -Sides 1 -PageStyle Plain -OutputType linuxdoc -DefaultStyle Standard - -ClassOptions - Header "labeltype == LABEL_MANUAL) { - font_old = style->labelfont; - desc_on = true; - } else { - font_old = style->font; - desc_on = false; - } - - LyXFont::FONT_FAMILY family_type = LyXFont::ROMAN_FAMILY; - LyXFont::FONT_SERIES series_type = LyXFont::MEDIUM_SERIES; - LyXFont::FONT_SHAPE shape_type = LyXFont::UP_SHAPE; - bool is_em = false; - - stack tag_state; - // parsing main loop - for (pos_type i = 0; i < size(); ++i) { - - PAR_TAG tag_close = PAR_NONE; - list < PAR_TAG > tag_open; - - LyXFont const font = getFont(buf.params(), i, outerfont); - - if (font_old.family() != font.family()) { - switch (family_type) { - case LyXFont::SANS_FAMILY: - tag_close |= SF; - break; - case LyXFont::TYPEWRITER_FAMILY: - tag_close |= TT; - break; - default: - break; - } - - family_type = font.family(); - - switch (family_type) { - case LyXFont::SANS_FAMILY: - tag_open.push_back(SF); - break; - case LyXFont::TYPEWRITER_FAMILY: - tag_open.push_back(TT); - break; - default: - break; - } - } - - if (font_old.series() != font.series()) { - switch (series_type) { - case LyXFont::BOLD_SERIES: - tag_close |= BF; - break; - default: - break; - } - - series_type = font.series(); - - switch (series_type) { - case LyXFont::BOLD_SERIES: - tag_open.push_back(BF); - break; - default: - break; - } - - } - - if (font_old.shape() != font.shape()) { - switch (shape_type) { - case LyXFont::ITALIC_SHAPE: - tag_close |= IT; - break; - case LyXFont::SLANTED_SHAPE: - tag_close |= SL; - break; - default: - break; - } - - shape_type = font.shape(); - - switch (shape_type) { - case LyXFont::ITALIC_SHAPE: - tag_open.push_back(IT); - break; - case LyXFont::SLANTED_SHAPE: - tag_open.push_back(SL); - break; - default: - break; - } - } - // handle tag - if (font_old.emph() != font.emph()) { - if (font.emph() == LyXFont::ON) { - tag_open.push_back(EM); - is_em = true; - } - else if (is_em) { - tag_close |= EM; - is_em = false; - } - } - - list < PAR_TAG > temp; - while (!tag_state.empty() && tag_close) { - PAR_TAG k = tag_state.top(); - tag_state.pop(); - os << "'; - if (tag_close & k) - reset(tag_close,k); - else - temp.push_back(k); - } - - for(list< PAR_TAG >::const_iterator j = temp.begin(); - j != temp.end(); ++j) { - tag_state.push(*j); - os << '<' << tag_name(*j) << '>'; - } - - for(list< PAR_TAG >::const_iterator j = tag_open.begin(); - j != tag_open.end(); ++j) { - tag_state.push(*j); - os << '<' << tag_name(*j) << '>'; - } - - value_type c = getChar(i); - - - if (c == Paragraph::META_INSET) { - getInset(i)->linuxdoc(buf, os, runparams); - font_old = font; - continue; - } - - if (style->latexparam() == "CDATA") { - // "TeX"-Mode on == > SGML-Mode on. - if (c != '\0') - os << c; - ++char_line_count; - } else { - bool ws; - string str; - boost::tie(ws, str) = sgml::escapeChar(c); - if (ws && !isFreeSpacing()) { - // in freespacing mode, spaces are - // non-breaking characters - if (desc_on) { // if char is ' ' then... - ++char_line_count; - sgmlLineBreak(os, char_line_count, 6); - os << ""; - desc_on = false; - } else { - sgmlLineBreak(os, char_line_count, 1); - os << c; - } - } else { - os << str; - char_line_count += str.length(); - } - } - font_old = font; - } - - while (!tag_state.empty()) { - os << "'; - tag_state.pop(); - } - - // resets description flag correctly - if (desc_on) { - // not closed... - sgmlLineBreak(os, char_line_count, 6); - os << ""; - } -} - - bool Paragraph::emptyTag() const { for (pos_type i = 0; i < size(); ++i) { diff --git a/src/paragraph.h b/src/paragraph.h index bab6fb3ce6..c5b4270c32 100644 --- a/src/paragraph.h +++ b/src/paragraph.h @@ -146,17 +146,10 @@ public: LyXFont const & outerfont, std::ostream &, TexRow & texrow, OutputParams const &) const; - /// Writes to stream the content of the paragraph for linuxdoc - void simpleLinuxDocOnePar(Buffer const & buf, - std::ostream & os, - LyXFont const & outerfont, - OutputParams const & runparams, - lyx::depth_type depth) const; - /// Can we drop the standard paragraph wrapper? bool emptyTag() const; - /// Get the id of the paragraph, usefull for docbook and linuxdoc + /// Get the id of the paragraph, usefull for docbook std::string getID(Buffer const & buf, OutputParams const & runparams) const; diff --git a/src/tabular.C b/src/tabular.C index cdfa5e320f..60c20f9d55 100644 --- a/src/tabular.C +++ b/src/tabular.C @@ -2262,48 +2262,6 @@ int LyXTabular::latex(Buffer const & buf, ostream & os, } -int LyXTabular::linuxdoc(Buffer const & buf, ostream & os, - const OutputParams & runparams) const -{ - os << "\n"; - idx_type cell = 0; - int ret = 0; - for (row_type i = 0; i < rows_; ++i) { - for (col_type j = 0; j < columns_; ++j) { - if (isPartOfMultiColumn(i, j)) - continue; - shared_ptr inset = getCellInset(cell); - - ret += inset->linuxdoc(buf, os, runparams); - - if (isLastCellInRow(cell)) { - os << "@\n"; - ++ret; - } else { - os << "|"; - } - ++cell; - } - } - os << "\n"; - return ret; -} - - int LyXTabular::docbookRow(Buffer const & buf, ostream & os, row_type row, OutputParams const & runparams) const { diff --git a/src/tabular.h b/src/tabular.h index 77da49b087..6b2fb6afde 100644 --- a/src/tabular.h +++ b/src/tabular.h @@ -305,9 +305,6 @@ public: int latex(Buffer const &, std::ostream &, OutputParams const &) const; // - int linuxdoc(Buffer const & buf, std::ostream & os, - OutputParams const &) const; - /// int docbook(Buffer const & buf, std::ostream & os, OutputParams const &) const; /// -- 2.39.2