[OS X TeX] Pdfsync breaks the verse package

Ramon M. Figueroa-Centeno ramonf at hawaii.edu
Sun Sep 5 04:51:52 CEST 2004


Hi,

I am typesetting some poetry and decided to use the "verse" package, found
at <http://www.tug.org/tex-archive/macros/latex/contrib/verse/> (to install
download the verse.ins and verse.dtx files, in the terminal go to the
directory where they are and type "latex verse.dtx", then move the resulting
"verse.sty" file to your texmf folder in your Library folder; you may also
want to run texhash in the terminal).

I get what I want (the poem nicely centered) when I compile the following:

\documentclass{book}
\usepackage{verse}
\begin{document}
``A Kiss'', by Austin Dobson (1840--1921):
\settowidth{\versewidth}{But the pleasure gives way}
\begin{verse}[\versewidth]
 Rose kissed me to-day.\\
\vin Will she kiss me tomorrow?\\
 Let it be as it may,\\
 \vin Rose kissed me today.\\
 But the pleasure gives way\\
 \vin To a savor of sorrow;--\\
 Rose kissed me to-day--\\
 \vin Will she kiss me tomorrow?
\end{verse}
\end{document}

However if I add "\usepackage{pdfsync}" to the preamble I get an error:

! Missing number, treated as zero.
<to be read again> 
                   ]
l.7 \begin{verse}[\versewidth]

Enclosing the verse between \pdfsyncstop and \pdfsyncstart does not work.

I understand that pdfsync modifies the verse environment and that is why my
problems occur. So my solution, so far, is to only turn on pdfsync if verse
is not loaded in the preamble, i.e.,

\documentclass{book}
%comment the next line out if wanting to use pdfsync
\usepackage{verse}

\ifx \versewidth\undefined %\versewidth is defined in verse.sty
\usepackage{pdfsync}
\newlength{\versewidth}
\newcommand{\vin}{\hspace{1.5em}}
\newenvironment{verso}[1]{\begin{verse}}{\end{verse}}
\else
\newenvironment{verso}[1]{\begin{verse}[#1]}{\end{verse}}
\fi

\begin{document}
``A Kiss'', by Austin Dobson (1840--1921):
\settowidth{\versewidth}{But the pleasure gives way}
\begin{verso}{\versewidth}
 Rose kissed me to-day.\\
\vin Will she kiss me tomorrow?\\
 Let it be as it may,\\
 \vin Rose kissed me today.\\
 But the pleasure gives way\\
 \vin To a savor of sorrow;--\\
 Rose kissed me to-day--\\
 \vin Will she kiss me tomorrow?
\end{verso}
\end{document}

If any of you can think of something more elegant please let me know (I have
to typeset a lot of poems).

Thanks,

Ramon

-- 

Ramón M. Figueroa-Centeno, Ph.D.
Assistant Professor

Mathematics Department
University of Hawaii at Hilo
College Hall 4-A
200 W. Kawili St.
Hilo, HI 96720-4091

(808) 974-7387 (office)
(808) 933-3473 (fax)

http://www2.hawaii.edu/~ramonf/



--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list