stick to plain tex?by Alex Jordan - Number of replies: 13
Looking at the tex mode output though, pretty much everything is in plain tex. Is there a reason it should stay this way? Or could I try using tabular environments and related macros to make tables with captions?
Re: stick to plain tex?by Davide Cervone -
unionTables.pl, then that is my doing. When I learned TeX, LaTeX was not yet out (or just in its infancy perhaps), and so I learned to do everything I needed in plain TeX, and never took time to learn LaTeX except what I absolutely had to.
If you want to convert over to LaTeX, I don't see any problem with that.
Re: stick to plain tex?by Danny Glin -
Nonstandard LaTeX package?by Alex Jordan -
My question is how bad is it to add installation of a nonstandard LaTeX package to the WeBWorK installation process?
I'm almost done with a new macro file for tables in PG. At the recent code camp, I showed it to people, and have incorporated suggestions as well as added some of my own enhancements. The file makes `DataTable()` and `LayoutTable()` commands, which have important accessibility distinctions.
I've added these packages to hardcopyPreamble.tex without issue: `booktabs`, `tabularx`, `colortbl`, `caption`, `xcolor`. I think these are a standard part of a LaTeX distribution.
But now I may need one more package that is not standard. Here's the issue. A `tabular` environment will not break across pages in LaTeX. And a common kind of layout table in problems in the OPL will involve at least two rows of graphs which take up lots of vertical space. So in printing a hard copy, if problems with layout tables like this are present, there may be tons of white space so that the `tabular` can start on the following page or column.
The `longtable` package is a standard solution for this issue (giving you the `longtable` environment in place of `tabular`), but it is not compatible with the two-columns mode that is the WeBWorK hard copy default. The `supertabular` and `xtab` packages do work with two-columns, but do not seem to come standard with a LaTeX distribution.
I think two-columns is a good approach to making hard copies and I wouldn't consider changing that. And using other two-column production methods (like `multicols`) will not help with using `longtable`. So the question is, how bad is it to add `xtab` to the hardcopy preamble, and how bad is it to add installation of `xtab` to the WeBWorK installation process?
Right now the only alternative that I can think of is to live with the excess white space in hard copies. (I think that is what happens with tables in problems currently in the OPL.) This may be less bad than adding new packages.
Re: Nonstandard LaTeX package?by Danny Glin -
Re: Nonstandard LaTeX package?by Alex Jordan -
It says these components of the TeXLive distribution will be installed:
Lists of what specifically are in these collections are here: https://trac.macports.org/wiki/TeXLivePackages
although texlive-latex-base and texlive-base are not listed. I assume that those are actually texlive-latex and texlive-basic.
The xtab package is part of texlive-latex-extra, which is not installed with the Debian/Ubuntu texlive package. (That collection does come with the Debian/Ubuntu texlive-full package.)
An option that occurs to me is to add the Debian/Ubuntu package texlive-latex-extra to the list of Ubuntu packages that are named in the Ubuntu-for-WeBWorK installation guide here: http://webwork.maa.org/wiki/Installation_Manual_for_2.7_on_Ubuntu_12.04#.U-0ePEjaFgs
That would give access to more semi-standard latex packages, but perhaps it would be more desirable to only target the packages that we expect to use (like xtab).
I'd only hesitate if you would be worried about installing too much. The TeXLive collection texlive-latex-extra has a lot of latex packages in it, way more than WeBWorK documents would ever need (and I don't know what all is in liblatex-table-perl). I'm not sure how much extra space or installation time this would add, but maybe it is trivial amounts.
If these concerns are not really concerns, then actually I would look into replacing the Ubuntu package texlive with the Ubuntu package texlive-full in that long list of Ubuntu packages.
With access to all of the LaTeX packages that this will enable, I could begin looking into more "improvements" to the hard copy appearance and utility. One thing I was considering was making it so that a hard copy with printed solutions would push the solutions to the end (with hyperlinking between question and solution) which would more closely simulate a traditional solutions manual.
If projects like this end up needing texlive-full, I'll revisit.
Thanks Arnie - I'll proceed with alterations to niceTables.pl so that xtab is used to allow table-breaking.
I have been unable to make a two-column format work with tables that can split across column breaks or page breaks. Every approach has a problem with it. So niceTables.pl will not use tables that break (the native tables and unionTables tables don't break either.)
So the initial reason for including texlive-latex-extra is no longer with us. However I still think it would be good to keep it, because I may be able to do some neat things with hard copy production if I can assume the presence of these latex packages.
Re: Nonstandard LaTeX package?by Danny Glin -
Re: stick to plain tex?by Alex Jordan -
I've decided to make something new instead of updating unionTables.pl. Mainly the issue was that in unionTables.pl, the EndTable() and Row() commands doesn't have access to parameters you may have passed to BeginTable(). So I'm working on having just two commands that handle the whole table: DataTable() and LayoutTable().
On the HMTL side, I'm giving the user ability to throw in whatever CSS styling options they want. I'd like to do this in a much more limited capacity with the TeX side too. But there isn't a lot that can be done without adding at least a few more packages. How do you feel about me adding the xcolor, colortbl, booktabs, and tabularx packages to the general preamble?
For online accessibility purposes, what I've got going on the HTML side will be all that's needed. So these enhancements to the TeX side are more for cosmetics and making the pdfs that float around the tutoring centers look more professional. And also because I'm a LaTeX enthusiast :) But I respect objections to bringing in more packages.
It would be nice for efficiency if packages like what I am proposing could somehow only be loaded if they are going to be needed later down in the .tex body.