emacs-devel
[Top][All Lists]

## Re: Several suggestions for image support

 From: Kim F. Storm Subject: Re: Several suggestions for image support Date: 21 Apr 2004 14:51:40 +0200 User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

David Kastrup <address@hidden> writes:

> Ok, here is the next problem I see:  assume that I have the input in
> preview-latex:
>
>
> \begin{smallmatrix} 1&2\\ 3&4 \end{smallmatrix}
>
> This will produce a single image split into 4 slices that I want to
> have arranged
>
>    12
>    34
>
> This stuff we will split into 4 overlays covering
> \begin{smallmatrix} 1&
> 2\\
> 3&
> 4 \end{smallmatrix}
>
> Now here come the somewhat ugly things: in order to have this
> composition arranged properly, the first overlay will also have to
> contain a before-string of "\n", and the second and fourth overlay
> will contain an after-string of "\n".  Cursor up/down will not produce
> any sensible results.

Sounds like a problem with cursor motion in the presense of newlines
in before and after string properties -- maybe something for our
"line-move" experts to look into.

>
> Ok, I mean with preview-latex the solution is not too bad: require the
> source to be formatted appropriately, or the image does not get
> sliced, period.  Namely, have a newline after every row and only a
> constant non-printing fillprefix before each row (as a requirement for
> slicing).

As in:

.. (newline)
\begin{smallmatrix} 1&2\\ (newline)
3&4 \end{smallmatrix} (newline)

I.e. if input is like this, image can be sliced; otherwise, image is
not sliced.  Sounds like a sensible approach to me -- if the
latex-mode (or whatever) can help you write in the proper format and
warn (different coloring like in makefile-mode) if there are things
which breaks that format.

>            And better use align-current to align all & signs
> (optionally, will make cursor movement nicer).  If we place those
> requirements on source formatting, we won't be needing any
> before-string and after-string, and things get slightly more sane.
>
> So I think we might get along without more heavyweight support here
> for now.

Good.

--