[Vorbis-dev] Again: Next libvorbis release?

Max Horn max at quendi.de
Sat Mar 7 07:44:57 PST 2009


[resending this w/o mini-algo attachments]

Am 06.03.2009 um 15:38 schrieb Ralph Giles:

> Ok, I've committed the spec conversion. Please test.

Cool :). Builds fine over here.

> Max, please merge your tree and let me know anything I missed.

Looks good. Now I can build on this and extend it a bit.

>
> On Fri, Mar 6, 2009 at 7:47 AM, Max Horn <max at quendi.de> wrote:
>
>> To change this, replace
>>  \usepackage{hyperref}
>> by either this (for colored text instead of boxes)
>> \usepackage[colorlinks]{hyperref}
>> or this (for no marking of links at all)
>> \usepackage[pdfborder={0 0 0}]{hyperref}
>> Other options can be used to tweak colors, see <http://www.tug.org/applications/hyperref/manual.html#x1-90003.5
>> >.
>
> I switched to 'colorlinks' for now. Note that I got an "unterminated
> command" error if I didn't remove the intermediate files after adding
> this option. 'make clean' seems to be sufficient.

Hm? Do you mean you got that error just after changing the option? Or  
is it reproducible? If you tell me how, I can look into it. But I just  
touch'ed  Vorbis_I_spec.tex, and run make again (no "make clean"), and  
got no errors of any kind.

Actually, I do get one crash, but unrelated: ghostscript dies trying  
to convert xifish.pdf to xifish.png. This can be avoided by invoking  
htlatex like this (in Makefile*):
  htlatex $< Vorbis_I_spec

This will tell it to use the *.cfg file, which in turn tells it to use  
only PNGs, never PDFs. Now, just provide a xifish.png as part of the  
repos and you are done. E.g.
  svn cp white-xifish.png xifish.png



[...]

> New questions:
>
> htlatex seems to use dvi->ps->png to generate equations and tex-side
> vector figures. We can probably assume dvips, but I guess I should add
> imagemagick's 'convert' util to the dependency check?

Yeah.

Well, actually, in theory one can tell tex4ht to use dvipng to create  
the PNGs, which is much faster and somewhat prettier. But I am not  
sure whether dvipng is widely available, either. But I believe that it  
is part of TeXLive 2007 at least. Furthermore, at least on my system  
this option is broken, due to a bug in a global config file  
(tex4ht.env). While I can fix that, it's no good to ask all users to  
edit a system wide config file just to get this working, I am afraid  
*sigh*.

Anyway, here is how you can use dvipng if your tex4ht.env is *not*  
broken:
  htlatex $< "Vorbis_I_spec.cfg" "" "-cdvipng"

Oh yeah: one can provide a custom tex4ht.env. Only that it completely  
replace the system's ones, and it has different content on Windows.  
Argh. I included a tex4ht.env.off in the tarball on my website, for  
the curious. To use it, either rename it to tex4ht.env, or invoke  
tex4ht this way:

  htlatex $< "Vorbis_I_spec.cfg" "" "-cdvipng -e tex4ht.env.off"


> Is there any way to capture the list of figure files it's generating?
> We need to be able to reliably clean/install/distribute that set. Can
> I rely on the current name scheme? Can we force a particular naming
> scheme or stuff them in a subdirectory so they're safer to glob?

To specify an output directory, use this (to specify "build"):

htlatex $< "Vorbis_I_spec" "" "-dbuild/"

The trailing slash is essential! So is the empty "". Combined with the  
above:

  htlatex $< "Vorbis_I_spec" "" "-dbuild -cdvipng"



> Does pdflatex use the .cfg file at all, or is that just a dependency
> for htlatex?

Only htlatex needs it, pdflatex never touches it.



> Any idea on the status of svg or mathml generation in htlatex? That
> would be better obviously, although we'll still need png equations for
> fallback.

tex4ht can generate XHTML + MathML, but I never tried that. See here: <http://www.cse.ohio-state.edu/~gurari/TeX4ht/mn-commands.html#QQ1-9-37 
 >. See also <http://www.cse.ohio-state.edu/~gurari/TeX4ht/mml.html>.  
I used this command to generate an .xml file, based on the suggestions  
from there:

  htlatex Vorbis_I_spec.tex "xhtml,mozilla" " -cmozhtf" "-cvalidate - 
dbuild/ -cdvipng -e tex4ht.env.off -i"

(the -cvalidate would run xmllint -- only that it doesn't because it  
is disabled in my global tex4ht.env. I re-enabled it in my custom .env  
file. Nasty).
Unfortunately, this generates invalid XML in my version of tex4ht.  
Maybe I did something wrong, though -- didn't investigate it. Please  
note that I don't know MathML, and have no idea what some in that  
command above really means.

Moreover, while I am a mathematician, I never used MathML and kinda  
thought it was a dead standard ;-). It seems that <http://www.math.union.edu/~dpvc/jsMath/ 
 > is a nice approach, though, checkout.. And tex4ht supports that,  
too, at least in theory, but I didn't try.


>
> Right now, I'd consider these issues with the spec release critical:
>
> * Resolve ambiguous floor 0 LSP formulae
> * Install/dist the generated png files for the html spec

Use the -dbuild/ (or whatever) option.

BTW, you could also keep the PNG files in a subdir in SVN, e.g.  
images/, and tell LaTeX to search there. There is already a command  
for that (commented out) in Vorbis_I_spec.tex.

> * Fix long psuedocode lines so the pdf is readable; either shrink the
> font or wrap the lines

You can set a smaller font by modifying
  \fvset{tabsize=4,fontsize=\small}
E.g. use this to get a smaller font, plus automatic line numbers on  
the left side:
  \fvset{tabsize=4,fontsize=\scriptsize,numbers=left}

I attached a patch which does that and also cleans up the preamble in  
Vorbis_I_spec.tex abit.


>
> Not release critical, but would be nice:
>
> * Add convert and other htlatex dependencies to the configure check
> * Remove the built docs from svn and --enable-docs by default (pending
> testing and the above fix)
> * Remove the obsolete docbook files
> * Avoid page breaks inside the bitpacker verbatim "figures"
> * Adapt the css file to integrate with the website theme

One can place custom CSS (e.g. a statment that includes another .css  
file) into the generated .css by adding commands to the .cfg file, see  
<http://www.tug.org/applications/tex4ht/mn11.html#QQ1-11-61>

> * Generate v-comment.html automatically from 05-comment.tex
> * Update xifish to the current version
> * Improve psuedocode layout and variable notation

One package I personally like is algoritmicx. I whipped up a quick  
example, together with a question on the render_line algo ... :). See  
here:
* http://dev.quendi.de/vorbis/mini-algo.tex
* http://dev.quendi.de/vorbis/mini-algo.pdf
* http://dev.quendi.de/vorbis/mini-algo.html
(the HTML version suffers from "wrong" indention on the line numbers,  
but I believe that could be fixed).


> * Redraw some of the figures in a vector format
>
> Thanks again for all your work on this,
> -r
>


Max
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Vorbis_I_spec.tex.patch
Type: application/octet-stream
Size: 4263 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20090307/a40abe64/attachment-0001.obj 


More information about the Vorbis-dev mailing list