## Features & Development

### stick to plain tex?

by Alex Jordan -
Number of replies: 13
I'm trying to make tables in pg problems conform to accessibility standards, and part of that is giving tables captions. As long as I'm doing that for the HTML side, I should do it for the hardcopy side too.

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 -
If you are talking about 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 -
One thing I'll add is to avoid any packages that aren't part of the standard LaTeX distribution if possible, as this adds another hassle to installing WeBWorK.

Just my two cents.

Danny

### Nonstandard LaTeX package?

by Alex Jordan -
Hi Danny, and anyone else who can offer input,

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 -
I just checked my Centos (RedHat) 6.5 installation, and it already had the xtab package installed.  What OS are you using?  How did you go about installing the package?  Was there a system package, or did you install it manually.

I don't see a problem with adding packages if they benefit WeBWorK.  This would just have to be properly documented.  Though I'm not the authority on what goes into the main WeBWorK distribution.

### Re: Nonstandard LaTeX package?

by Alex Jordan -
Here is described what comes with the Debian/Ubuntu package called texlive:
http://www.tug.org/texlive/debian.html

It says these components of the TeXLive distribution will be installed:
• texlive-latex-recommended
• texlive-fonts-recommended
• texlive-latex-base
• texlive-base

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).

### Re: Nonstandard LaTeX package?

by Arnold Pizer -
Hi,

Neither xtab or supertabular seems to be installed in the standard configuration when installing WeBWorK on Ubuntu 14.04.  supertabular is contained in the Ubuntu package texlive-latex-extra (which is listed as a "supported" package whatever that means) and xtab is contained in the Ubuntu package liblatex-table-perl.  Since both are in Ubuntu packages, installation on Ubuntu would be easy and we would just add them to the long list of required Ubuntu packages.  Would you need both?

Arnie

### Re: Nonstandard LaTeX package?

by Alex Jordan -
From a little bit of looking on-line to solve the "two-column layout, with a table that should be breakable over pages" problem, it appears that supertabular was the original solution and xtab is an upgrade. So I guess xtab is the one we'd want. Is xtab not in the Ubuntu package texlive-latex-extra? Becuase it is in the TeXLive collection with that name. (See https://trac.macports.org/wiki/TeXLivePackages.)

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.

### Re: Nonstandard LaTeX package?

by Arnold Pizer -
Hi,

Now that I look at bit more closely, xtab is in the Ubuntu package texlive-latex-extra.  Do we need texlive-full?  If I understand things correctly, in Debian starting in 2014, texlive-full pulls in texlive-latex-extra but looking quickly, I'm not sure that is true in Ubuntu 14.04.

Arnie

### Re: Nonstandard LaTeX package?

by Alex Jordan -
How about we add texlive-latex-extra, and leave it at that for now. texlive-full may not be all that larger than the combination of texlive and texlive-latex-extra, but for the sake of settling on something, adding texlive-latex-extra should be good for now.

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.

### Re: Nonstandard LaTeX package?

by Arnold Pizer -
Hi Alex et al,

I have included directions at the three places

http://webwork.maa.org/wiki/Installation_Manual_for_2.9_on_Ubuntu_14.04
http://webwork.maa.org/wiki/Installing_from_WW2.9_Ubuntu14.04_Vanilla_LiveDVD
http://webwork.maa.org/wiki/Installing_from_WW2.9_Ubuntu14.04_Vanilla_Virtual_Machine_Image

Arnie

### Re: Nonstandard LaTeX package?

by Alex Jordan -
Thanks Arnie!

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 -
FYI in the RedHat world, xtab is provided by the texlive-texmf package.  I tend to overinstall packages when setting up a new server, so I'm not sure if this package is actually required for anything else in WeBWorK.

If you happen to update the generic installation manual, you should include this package as a requirement (I guess that goes out to Jason as well for his install script).

I personally don't have an issue with asking WeBWorK sysadmins to install more LaTeX packages.  They take up a marginal amount of disk space, and are not loaded into memory, so they shouldn't have any impact on performance.  This is in contrast to additional perl packages, since they are loaded into memory for every apache process, and therefore can quickly start to eat up RAM.

Danny