Re: HTMLSave and Numbering
- To: mathgroup at smc.vnet.net
- Subject: [mg41748] Re: HTMLSave and Numbering
- From: Leonid Paramonov <leonid at mip.sdu.dk>
- Date: Wed, 4 Jun 2003 08:34:34 -0400 (EDT)
- Organization: UNI-C
- References: <bbf2su$q1u$1@smc.vnet.net> <bbi0r3$7a9$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Yes thanks. It works with some modifications In[3]:= > out = in/.Cell[cont_, "NumberedEquation", opts___] :> > Cell[cont, "NumberedEquation", opts___, > CounterAssignments->{{"NumberedEquation", n++}}]; should be: out = in/.{ Cell[cont_, "NumberedEquation", opts___] :> Cell[cont, "NumberedEquation", opts, CounterAssignments->{{"NumberedEquation", ne++}}], Cell[cont_, "NumberedFigure", opts___] :> Cell[cont, "NumberedFigure", opts, CounterAssignments->{{"NumberedFigure", nf++}}] }; to work with numeration both eqns and figs. But the funny part is: HTMLSave did work with eqns before. How do you make sure that you refer to correct number of the equation or figure from the text by other ( AutomaticNumberingObject )? regards, Leonid Paramonov Guillermo Sanchez wrote: > I posted the same message an recived this answer: > > The problem is that the HTML is created cell-by-cell. So any numbering is > lost. To get the correct numbering you need to explicitly assign the > counter for each cell. The following will do the trick. > > Let's say the NotebookObject for the target notebook is stored in the > variable nb. (You could use something like nb=EvaluationNotebook[] or > nb=Notebooks[][[i]] to do this.) > > In[1]:= > in = NotebookGet[nb]; > > In[2]:= > n=0; > > In[3]:= > out = in/.Cell[cont_, "NumberedEquation", opts___] :> > Cell[cont, "NumberedEquation", opts___, > CounterAssignments->{{"NumberedEquation", n++}}]; > > In[4]:= > Export["file.html", out]; > > Leonid Paramonov <leonid at mip.sdu.dk> wrote in message news:<bbf2su$q1u$1 at smc.vnet.net>... > >>Hi, My Name is Leonid >> >>I'v just joined to the newsgroup. >> >>I have one problem with HTMLSave and AutomaticNumbering. >> >>HTMLSave and Export do not want to put correct numbers on numbered >>figures but it works with numbered equations. >> >>All figures are number one after conversion. >> >>Regards, >>Thanks >>Leonid >> >>PS >> >>There is one mail called "HTMLSave and Heading" in MathGroup Archive >>from 16 May 2002 about close topic. >> >>And this is about all of it, which could be found > >