[texhax] undertilde and MiKTeX
Peter Wilson
herries.press at earthlink.net
Sat Oct 28 21:06:00 CEST 2017
On 27/10/17 22:05, Rolf Turner wrote:
>
> The journal of which I am Technical Editor provides a document class
> file which implements the style conventions that papers published in the
> journal must meet.
>
> This document class makes use of the "\undertilde" command. Apparently
> there are licensing issues with the undertilde package, and for this
> reason (I think) my installation of texlive has no undertilde.sty file,
> but rather a file undertilde.tex. Explicitly:
>
> /usr/share/texlive/texmf-dist/tex/generic/genmisc/undertilde.tex
>
> For *that* reason the document class file for the journal uses
>
> \input{undertilde}
>
> rather than
>
> \usepackage{undertilde}
>
> An author contacted me just now saying that he is getting an error
>
> > File `undertilde.tex' not found. \input{undertilde}
>
> This author is using TeXstudio which is a front end for MiKTeX.
>
> I have difficulty investigating this problem, since I
> *don't do Windoze* !!! However some Googling indicates that MiKTeX
> should indeed have access to undertilde.
>
> The curly is that one Google hit appears to indicate that MiKTeX
> possesses undertilde.sty and another that it possesses undertilde.tex.
> These files would appear to live in
>
> ...\texmf\tex\generic\genmisc
>
> (a) Can someone who uses Windoze/MiKTeX please confirm whether either
> or both of the files undertilde.sty and undertilde.tex are present?
> Where they should be?
>
> (b) It strikes me that it is possible that some releases of MiKTeX have
> undertilde.sty and some (older ones perhaps?) have undertilde.tex.
>
> If this is indeed the case I would like to be able to construct a
> conditional input something along the lines of:
>
> if(the file undertilde.sty is found) {
> \usepackage{undertilde}
> } else if(the file undertilde.tex is found) {
> \input{undertilde}
> } else {
> Bail out with a message "undertilde not available"
> }
>
> Can some clever person instruct me (monosyllabically; I'm a Bear of
> Very Little Brain) as to how to construct such a conditional?
>
> Eternally grateful.
>
> cheers,
>
> Rolf Turner
>
Possibly like this (but beware of typos and missing {`s and/or }'s)
\documentclass{article}
\IfFileExists{fred.sty}%
{\usepackage{fred}}%
{\ClassWarning{article}{No file fred.sty}\IfFileExists{joe.tex}%
{\input{joe}}%
{\ClassWarning{article}{No file joe.tex}%
\ClassError{article}{Files not found}{Missing files}%
}}
\begin{document}
Your text
\end{document}
More information about the texhax
mailing list