AndyClifton / accessibility

A CTAN-compliant version of the LaTeX `accessibility` package
37 stars 6 forks source link

Create Beamer MWE #38

Open jimbotyson opened 4 years ago

jimbotyson commented 4 years ago

I realise that the package was probably no designed with beamer in mind, however may there is an easy fix. When trying to render a (minimal) beamer presentation, I get

/usr/local/texlive/2019/texmf-dist/tex/latex/accessibility/accessibility.sty, line 138

LaTeX Error: Command \alt already defined.

and of course \alt is indeed a beamer command.

Making (reasonably) accessible presentations using LaTeX would be a very good thing in many academic contexts, especially the STEM disciplines.

Any ideas as to what might be done?

AndyClifton commented 4 years ago

Thanks for reporting this.

One solution at this point is to assume that Beamer got there first and then rename the \alt command in accessibility to something more suitable, such as \alternative or \accalt. The problem here is that we usually refer to alternative text for images, etc. in PDFs as "alt text".

I'll look to see if latex has ways to work around this. I think though that commands get clobbered, so whichever package gets loaded last, wins.

Suggested actions

I'd like to use this issue as the basis for a new project (see https://github.com/AndyClifton/accessibility/projects/2).

  1. @jimbotyson: please feel free to add a minimal beamer example to the tests directory. If you'd like to fork the code, add your code to the "tests" directory, and then raise a pull request, I can include it that way. Alternatively if that's too much, feel free to add the MWE as a comment below. (I'm also going to rename this issue to "Create Beamer MWE" to reflect this.)
  2. @anyone reading: Suggest new names for the \alt command in issue #39
ChrisLeary commented 4 years ago

I'm nowhere close to having a MWE for this, but once I got past the \alt problem, the next thing that I had to deal with was having a lot of commands that accessibility was looking for not being defined. My hack for that was just to add the following \newcommand's to my .tex file before the \usepackage{accessibility} call:

\newcommand{\paragraph}{}
\newcommand{\subparagraph}{}
\makeatletter
\newcommand{\@opargbegintheorem}{}
\newcommand{\@makecaption}{}
\newcommand{\@idxitem}{}
\makeatother
\newcommand{\labelitemi}{}
\newcommand{\labelitemii}{}
\newcommand{\labelitemiii}{}
\newcommand{\labelitemiv}{}
\newcommand{\labelenumi}{}
\newcommand{\labelenumii}{}
\newcommand{\labelenumiii}{}
\newcommand{\labelenumiv}{}
\newcommand{\descriptionlabel}{}
\newcommand{\hyperpage}{}
\newcommand{\theindex}{}

Then the thing complained about trying to write \pdfminorversion after writing to the pdf file--I sidestepped that by commenting out line 136 of accessibility.sty--so I have

%\pdfminorversion=6% Bestimmt die PDF - Version der Ausgabe

Now I am stymied by the error message:

`Argument of \XC@col@rlet has an extra }.

\par l.213 \end{frame} ` which, although I can't figure out how to fix (I think it's in beamer), at least my TeXShop will let me "ignore all", and then compile the file. Sorry for the clunky code and the possibly stupid fixes--I hope you can find something cleaner! Do let me know if I'm doing something stupid/dangerous! :) TeXShop v. 4.44 accessibility.sty v. 2.0.3
AndyClifton commented 4 years ago

@ChrisLeary your solution is basically what I would have done as well, so no need to apologise for clunky code! Anything that helps is welcome.

I noticed it’s a couple of weeks since you filed this update. Did you have any more luck