fix table example; protect warning in buffer.C

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4348 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2002-06-07 15:49:38 +00:00
parent fb29f01377
commit b523000e96
4 changed files with 144 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2002-06-06 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* examples/TableExamples.lyx: fix footnotes inside tables
(bug 442)
2002-06-05 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr> 2002-06-05 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* external_templates: change the requirements of the xfig and * external_templates: change the requirements of the xfig and

View File

@ -2861,7 +2861,25 @@ d
\layout Standard \layout Standard
\begin_inset ERT
status Collapsed
\layout Standard
\backslash
multirow{4}{14mm}{
\end_inset
Text in column 1 Text in column 1
\begin_inset ERT
status Collapsed
\layout Standard
}
\end_inset
\end_inset \end_inset
</cell> </cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@ -2877,7 +2895,25 @@ C2a
\layout Standard \layout Standard
\begin_inset ERT
status Collapsed
\layout Standard
\backslash
multirow{4}{14mm}{
\end_inset
Text in column 1 Text in column 1
\begin_inset ERT
status Collapsed
\layout Standard
}
\end_inset
\end_inset \end_inset
</cell> </cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
@ -3030,7 +3066,7 @@ centering
position 0 position 0
inner_position 0 inner_position 0
height "0pt" height "0pt"
width "25p%" width "25col%"
collapsed false collapsed false
\layout Standard \layout Standard
@ -3091,7 +3127,25 @@ b
\layout Standard \layout Standard
1example1 cell(b,1) 1
\begin_inset ERT
status Collapsed
\layout Standard
\backslash
footnote{
\end_inset
example1 cell(b,1)
\begin_inset ERT
status Collapsed
\layout Standard
}
\end_inset
\end_inset \end_inset
</cell> </cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@ -3175,7 +3229,25 @@ d
\layout Standard \layout Standard
9example1 cell(d,9) 9
\begin_inset ERT
status Collapsed
\layout Standard
\backslash
footnote{
\end_inset
example1 cell(d,9)
\begin_inset ERT
status Collapsed
\layout Standard
}
\end_inset
\end_inset \end_inset
</cell> </cell>
</row> </row>
@ -3276,170 +3348,25 @@ b
\layout Standard \layout Standard
1example2 cell(b,1)
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\layout Standard
2
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\layout Standard
3
\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\layout Standard
c
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\layout Standard
4
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\layout Standard
5
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\layout Standard
6
\end_inset
</cell>
</row>
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\layout Standard
d
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\layout Standard
7
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\layout Standard
8
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\layout Standard
9example2 cell(d,9)
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\end_deeper
\layout Enumerate
\emph on
Using footnotemark and footnotetext LaTeX commands
\begin_deeper
\layout Standard
This is a heavy way to do it but just to demonstrate that it works, here
it is.
Use this method in minipages to get footnotes at the bottom of the page.
\layout Standard
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center
\begin_inset Tabular
<lyxtabular version="3" rows="4" columns="4">
<features>
<column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
<column alignment="center" valignment="top" leftline="true" width="0pt">
<column alignment="center" valignment="top" leftline="true" width="0pt">
<column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\layout Standard
a
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\layout Standard
b
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\layout Standard
c
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\layout Standard
d
\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\layout Standard
b
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\layout Standard
1 1
\begin_inset ERT
status Collapsed
\layout Standard
\backslash
footnote{
\end_inset
example2 cell(b,1)
\begin_inset ERT
status Collapsed
\layout Standard
}
\end_inset
\end_inset \end_inset
</cell> </cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none"> <cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
@ -3524,6 +3451,207 @@ d
\layout Standard \layout Standard
9 9
\begin_inset ERT
status Collapsed
\layout Standard
\backslash
footnote{
\end_inset
example2 cell(d,9)
\begin_inset ERT
status Collapsed
\layout Standard
}
\end_inset
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\end_deeper
\layout Enumerate
\emph on
Using footnotemark and footnotetext LaTeX commands
\begin_deeper
\layout Standard
This is a heavy way to do it but just to demonstrate that it works, here
it is.
Use this method in minipages to get footnotes at the bottom of the page.
\layout Standard
\added_space_top 0.3cm \added_space_bottom 0.3cm \align center
\begin_inset Tabular
<lyxtabular version="3" rows="4" columns="4">
<features>
<column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
<column alignment="center" valignment="top" leftline="true" width="0pt">
<column alignment="center" valignment="top" leftline="true" width="0pt">
<column alignment="center" valignment="top" leftline="true" rightline="true" width="0pt">
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\layout Standard
a
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\layout Standard
b
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\layout Standard
c
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\layout Standard
d
\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\layout Standard
b
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\layout Standard
1
\begin_inset ERT
status Collapsed
\layout Standard
\backslash
footnotemark
\end_inset
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\layout Standard
2
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\layout Standard
3
\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\layout Standard
c
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\layout Standard
4
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\layout Standard
5
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\layout Standard
6
\end_inset
</cell>
</row>
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\layout Standard
d
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\layout Standard
7
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\layout Standard
8
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\layout Standard
9
\begin_inset ERT
status Collapsed
\layout Standard
\backslash
footnotemark
\end_inset
\end_inset \end_inset
</cell> </cell>
</row> </row>

View File

@ -1,3 +1,7 @@
2002-06-06 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* buffer.C (sgmlError): hide #warning
2002-06-05 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr> 2002-06-05 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* xtl/*: get rid of xtl, which is not in use anyway * xtl/*: get rid of xtl, which is not in use anyway

View File

@ -3201,12 +3201,14 @@ void Buffer::simpleLinuxDocOnePar(ostream & os,
void Buffer::sgmlError(Paragraph * /*par*/, int /*pos*/, void Buffer::sgmlError(Paragraph * /*par*/, int /*pos*/,
string const & /*message*/) const string const & /*message*/) const
{ {
#ifdef WITH_WARNINGS
#warning This is wrong we cannot insert an inset like this!!! #warning This is wrong we cannot insert an inset like this!!!
// I guess this was Jose' so I explain you more or less why this // I guess this was Jose' so I explain you more or less why this
// is wrong. This way you insert something in the paragraph and // is wrong. This way you insert something in the paragraph and
// don't tell it to LyXText (row rebreaking and undo handling!!!) // don't tell it to LyXText (row rebreaking and undo handling!!!)
// I deactivate this code, have a look at BufferView::insertErrors // I deactivate this code, have a look at BufferView::insertErrors
// how you should do this correctly! (Jug 20020315) // how you should do this correctly! (Jug 20020315)
#endif
#if 0 #if 0
// insert an error marker in text // insert an error marker in text
InsetError * new_inset = new InsetError(message); InsetError * new_inset = new InsetError(message);