bug-auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-AUCTeX] 11.86; fill-paragraph command does not work in captions


From: Worik Stanton
Subject: Re: [Bug-AUCTeX] 11.86; fill-paragraph command does not work in captions
Date: Thu, 19 May 2011 15:19:16 +1200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10

Another example, a figure this time. I know it is unconventional to have two includegraphics statements in one float but AFAIK it is valid.

This time it is not in the caption wher the fill-paragraph command does not work but in the includegraphics statement. It worked in the first but not the second.

\begin{figure}
  \includegraphics[height=0.5\textheight,
  angle=270]{Fragments/S99/RandomSamplingNorm.OP.eps}
\includegraphics[height=0.5\textheight,angle=270]{Fragments/S99/RandomSamplingNorm.CorTP.eps}
  \caption{Testing Random Sampling on the HSI index. }
  \label{FIG:RS.TEST.HSI}
\end{figure}

cheers
Worik


On 16/05/11 07:56, Ralf Angeli wrote:
* Worik Stanton (2011-05-13) writes:

When editing the caption fro a float (a figure or table) using M-q to
run fill paragraph does not adjust the text.

Running 'fill-paragraph' directly does not work either

address@hidden

\begin{table}[!h]
    \begin{tabular}{rccc}
      \input{Fragments/S99/20110513.NA.Band.2DayMA}
    \end{tabular}
    \caption{Trading the Dow Jones Industrial
      Averages index using a 2--Day moving average signal and bands of
0.001 $\pm$ 0.0005
      \label{TAB:2 Day MA, 0.001 B NA}}
\end{table}
Unfortunately this is not easy to fix.  The problem is that the commands
for moving a paragraph forward and backward (which are used to determine
the extension of the paragraph to be filled) address@hidden disagree in your
special case.  The command for moving a paragraph forward finds the
\caption macro and moves to its end because the macro is a so-called
paragraph command which should be put on a line of its own.  Then the
command for moving a paragraph backward finds the \label at the start of
the line and stops there because \label is a paragraph command as well
and at the start of the line it marks the start of a paragraph.  So the
paragraph to be filled only consists of the \label.

What you can do to work around this is to move the \label to the end of
the previous line, so that it is not at the start of the line anymore,
or to put the \label after the \caption macro on a line of its own.  The
latter option is the one AUCTeX uses when you insert an environment with
`C-c C-e'.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]