Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

glossaries poorman option seems broken

66 views
Skip to first unread message

Thomas Arildsen

unread,
Nov 20, 2009, 5:25:29 AM11/20/09
to
I am having trouble with the glossaries package 'poorman' option.
Consider the following minimal example:


\documentclass{article}

\usepackage[poorman]{cleveref}

\begin{document}

Here is an equation:
\begin{equation}
\label{eq:1}
x = 1.
\end{equation}
Please see~\cref{eq:1}.

\end{document}


Running pdflatex once produces no errors and results in the following sed
script (clearly not very useful, see first line):


s/\\cref{eq:1}//g
s/\\crefrangeconjunction/ to~/g
s/\\crefrangepreconjunction//g
s/\\crefrangepostconjunction//g
s/\\crefpairconjunction/ and~/g
s/\\crefmiddleconjunction/, /g
s/\\creflastconjunction/ and~/g
s/\\crefpairgroupconjunction/ and~/g
s/\\crefmiddlegroupconjunction/, /g
s/\\creflastgroupconjunction/, and~/g
s/\\cref@theorem@name /theorem/g
s/\\cref@theorem@name@plural /theorems/g
s/\\Cref@theorem@name /\\expandafter \\MakeUppercase \\cref@theorem@name /
g
s/\\Cref@theorem@name@plural /\\expandafter \\MakeUppercase \
\cref@theorem@name@plural /g
s/\\cref@note@name /note/g
s/\\cref@note@name@plural /notes/g
s/\\Cref@note@name /Note/g
s/\\Cref@note@name@plural /Notes/g
s/\\cref@remark@name /remark/g
s/\\cref@remark@name@plural /remarks/g
s/\\Cref@remark@name /Remark/g
s/\\Cref@remark@name@plural /Remarks/g
s/\\cref@example@name /example/g
s/\\cref@example@name@plural /examples/g
s/\\Cref@example@name /Example/g
s/\\Cref@example@name@plural /Examples/g
s/\\cref@result@name /result/g
s/\\cref@result@name@plural /results/g
s/\\Cref@result@name /Result/g
s/\\Cref@result@name@plural /Results/g
s/\\cref@definition@name /definition/g
s/\\cref@definition@name@plural /definitions/g
s/\\Cref@definition@name /Definition/g
s/\\Cref@definition@name@plural /Definitions/g
s/\\cref@proposition@name /proposition/g
s/\\cref@proposition@name@plural /propositions/g
s/\\Cref@proposition@name /Proposition/g
s/\\Cref@proposition@name@plural /Propositions/g
s/\\cref@corollary@name /corollary/g
s/\\cref@corollary@name@plural /corollaries/g
s/\\Cref@corollary@name /Corollary/g
s/\\Cref@corollary@name@plural /Corollaries/g
s/\\cref@lemma@name /lemma/g
s/\\cref@lemma@name@plural /lemmas/g
s/\\Cref@lemma@name /Lemma/g
s/\\Cref@lemma@name@plural /Lemmas/g
s/\\cref@enumi@name /item/g
s/\\cref@enumi@name@plural /items/g
s/\\Cref@enumi@name /Item/g
s/\\Cref@enumi@name@plural /Items/g
s/\\cref@table@name /table/g
s/\\cref@table@name@plural /tables/g
s/\\Cref@table@name /Table/g
s/\\Cref@table@name@plural /Tables/g
s/\\cref@figure@name /fig\./g
s/\\cref@figure@name@plural /figs\./g
s/\\Cref@figure@name /Figure/g
s/\\Cref@figure@name@plural /Figures/g
s/\\cref@appendix@name /appendix/g
s/\\cref@appendix@name@plural /appendices/g
s/\\Cref@appendix@name /Appendix/g
s/\\Cref@appendix@name@plural /Appendices/g
s/\\cref@section@name /section/g
s/\\cref@section@name@plural /sections/g
s/\\Cref@section@name /Section/g
s/\\Cref@section@name@plural /Sections/g
s/\\cref@chapter@name /chapter/g
s/\\cref@chapter@name@plural /chapters/g
s/\\Cref@chapter@name /Chapter/g
s/\\Cref@chapter@name@plural /Chapters/g
s/\\cref@equation@name /eq\./g
s/\\cref@equation@name@plural /eqs\./g
s/\\Cref@equation@name /Equation/g
s/\\Cref@equation@name@plural /Equations/g
s/\\label\[[^]]*\]/\\label/g
s/\\usepackage\(\[.*\]\)\?{cleveref}//g
s/\\[cC]refformat{.*}{.*}//g
s/\\[cC]refrangeformat{.*}{.*}//g
s/\\[cC]refmultiformat{.*}{.*}{.*}{.*}//g
s/\\[cC]refrangemultiformat{.*}{.*}{.*}{.*}//g
s/\\[cC]refname{.*}{.*}//g
s/\\[cC]reflabelformat{.*}{.*}//g
s/\\[cC]refrangelabelformat{.*}{.*}//g
s/\\[cC]refdefaultlabelformat{.*}//g
s/\\renewcommand{\\crefpairconjunction}{.*}//g
s/\\renewcommand{\\crefpairgroupconjunction}{.*}//g
s/\\renewcommand{\\crefmiddleconjunction}{.*}//g
s/\\renewcommand{\\crefmiddlegroupconjunction}{.*}//g
s/\\renewcommand{\\creflastconjunction}{.*}//g
s/\\renewcommand{\\creflastgroupconjunction}{.*}//g
s/\\renewcommand{\\[cC]ref}{.*}//g
s/\\renewcommand{\\[cC]refrange}{.*}//g


Running pdflatex again results in errors:


ERROR: Undefined control sequence.

--- TeX said ---
\@@setcref #1#2->\old@@setcref
{#1}{#2}\expandafter \g@addto@macro
\expandaf...
l.12 Please see~\cref{eq:1}
.
--- HELP ---
TeX encountered an unknown command name. You probably misspelled the
name. If this message occurs when a LaTeX command is being processed,
the command is probably in the wrong place---for example, the error
can be produced by an \item command that's not inside a list-making
environment. The error can also be caused by a missing \documentclass
command.


And the resulting sed script goes:


s/\\cref{eq:1}/\\cref@equation@name ~\\textup {(\\ref {eq:1})}/g
s/\\crefrangeconjunction/ to~/g
s/\\crefrangepreconjunction//g
s/\\crefrangepostconjunction//g
s/\\crefpairconjunction/ and~/g
s/\\crefmiddleconjunction/, /g
s/\\creflastconjunction/ and~/g
s/\\crefpairgroupconjunction/ and~/g
s/\\crefmiddlegroupconjunction/, /g
s/\\creflastgroupconjunction/, and~/g
s/\\cref@theorem@name /theorem/g
s/\\cref@theorem@name@plural /theorems/g
s/\\Cref@theorem@name /\\expandafter \\MakeUppercase \\cref@theorem@name /
g
s/\\Cref@theorem@name@plural /\\expandafter \\MakeUppercase \
\cref@theorem@name@plural /g
s/\\cref@note@name /note/g
s/\\cref@note@name@plural /notes/g
s/\\Cref@note@name /Note/g
s/\\Cref@note@name@plural /Notes/g
s/\\cref@remark@name /remark/g
s/\\cref@remark@name@plural /remarks/g
s/\\Cref@remark@name /Remark/g
s/\\Cref@remark@name@plural /Remarks/g
s/\\cref@example@name /example/g
s/\\cref@example@name@plural /examples/g
s/\\Cref@example@name /Example/g
s/\\Cref@example@name@plural /Examples/g
s/\\cref@result@name /result/g
s/\\cref@result@name@plural /results/g
s/\\Cref@result@name /Result/g
s/\\Cref@result@name@plural /Results/g
s/\\cref@definition@name /definition/g
s/\\cref@definition@name@plural /definitions/g
s/\\Cref@definition@name /Definition/g
s/\\Cref@definition@name@plural /Definitions/g
s/\\cref@proposition@name /proposition/g
s/\\cref@proposition@name@plural /propositions/g
s/\\Cref@proposition@name /Proposition/g
s/\\Cref@proposition@name@plural /Propositions/g
s/\\cref@corollary@name /corollary/g
s/\\cref@corollary@name@plural /corollaries/g
s/\\Cref@corollary@name /Corollary/g
s/\\Cref@corollary@name@plural /Corollaries/g
s/\\cref@lemma@name /lemma/g
s/\\cref@lemma@name@plural /lemmas/g
s/\\Cref@lemma@name /Lemma/g
s/\\Cref@lemma@name@plural /Lemmas/g
s/\\cref@enumi@name /item/g
s/\\cref@enumi@name@plural /items/g
s/\\Cref@enumi@name /Item/g
s/\\Cref@enumi@name@plural /Items/g
s/\\cref@table@name /table/g
s/\\cref@table@name@plural /tables/g
s/\\Cref@table@name /Table/g
s/\\Cref@table@name@plural /Tables/g
s/\\cref@figure@name /fig\./g
s/\\cref@figure@name@plural /figs\./g
s/\\Cref@figure@name /Figure/g
s/\\Cref@figure@name@plural /Figures/g
s/\\cref@appendix@name /appendix/g
s/\\cref@appendix@name@plural /appendices/g
s/\\Cref@appendix@name /Appendix/g
s/\\Cref@appendix@name@plural /Appendices/g
s/\\cref@section@name /section/g
s/\\cref@section@name@plural /sections/g
s/\\Cref@section@name /Section/g
s/\\Cref@section@name@plural /Sections/g
s/\\cref@chapter@name /chapter/g
s/\\cref@chapter@name@plural /chapters/g
s/\\Cref@chapter@name /Chapter/g
s/\\Cref@chapter@name@plural /Chapters/g
s/\\cref@equation@name /eq\./g
s/\\cref@equation@name@plural /eqs\./g
s/\\Cref@equation@name /Equation/g
s/\\Cref@equation@name@plural /Equations/g
s/\\label\[[^]]*\]/\\label/g
s/\\usepackage\(\[.*\]\)\?{cleveref}//g
s/\\[cC]refformat{.*}{.*}//g
s/\\[cC]refrangeformat{.*}{.*}//g
s/\\[cC]refmultiformat{.*}{.*}{.*}{.*}//g
s/\\[cC]refrangemultiformat{.*}{.*}{.*}{.*}//g
s/\\[cC]refname{.*}{.*}//g
s/\\[cC]reflabelformat{.*}{.*}//g
s/\\[cC]refrangelabelformat{.*}{.*}//g
s/\\[cC]refdefaultlabelformat{.*}//g
s/\\renewcommand{\\crefpairconjunction}{.*}//g
s/\\renewcommand{\\crefpairgroupconjunction}{.*}//g
s/\\renewcommand{\\crefmiddleconjunction}{.*}//g
s/\\renewcommand{\\crefmiddlegroupconjunction}{.*}//g
s/\\renewcommand{\\creflastconjunction}{.*}//g
s/\\renewcommand{\\creflastgroupconjunction}{.*}//g
s/\\renewcommand{\\[cC]ref}{.*}//g
s/\\renewcommand{\\[cC]refrange}{.*}//g


Now the sed script works, but I suppose the running of pdflatex is not
supposed to result in errors?
The reason for my question is that I have a more complex (an actual
useful) document that I am trying to poorman'ify. The resulting sed
script does seem to contain (at least some) useful replacements, but
invoking the script does not replace all \cref commands in the document.
Being unfamiliar with sed and unable to interpret the error in the second
run of pdflatex, I was hoping someone here might be able to help clarify
the problem.
Thanks in advance,

Thomas Arildsen

--
All email to sender address is lost.
My real adress is at es dot aau dot dk for user tha.

Lars Madsen

unread,
Nov 20, 2009, 5:29:17 AM11/20/09
to
Thomas Arildsen wrote:
> I am having trouble with the glossaries package 'poorman' option.
> Consider the following minimal example:
>

that is not glossaries, that is cleverref


--

/daleif (remove RTFSIGNATURE from email address)

LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
http://www.minimalbeispiel.de/mini-en.html

Thomas Arildsen

unread,
Nov 20, 2009, 5:57:34 AM11/20/09
to
On Fri, 20 Nov 2009 11:29:17 +0100, Lars Madsen wrote:

> Thomas Arildsen wrote:
>> I am having trouble with the glossaries package 'poorman' option.
>> Consider the following minimal example:
>>
>>
> that is not glossaries, that is cleverref
>

True, I don't know what I was thinking, thanks.
I did mean cleverref...

Toby

unread,
Dec 5, 2009, 6:02:48 AM12/5/09
to
On Nov 20, 10:57 am, Thomas Arildsen <tha.es-aau...@spamgourmet.com>
wrote:

> On Fri, 20 Nov 2009 11:29:17 +0100, Lars Madsen wrote:
> > Thomas Arildsen wrote:
> >> I am having trouble with the glossaries package 'poorman' option.
> >> Consider the following minimal example:
>
> > that is not glossaries, that is cleverref

Thanks for reporting the bug.

This should be fixed in the latest version (0.15.1) available from my
web site: www.dr-qubit.org/latex.php#cleveref

I'll upload this version to CTAN shortly.

Toby Cubitt

0 new messages