[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Arguments query of \parbox
From: |
Arash Esbati |
Subject: |
Arguments query of \parbox |
Date: |
Sun, 30 Jan 2022 12:39:18 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 |
Hi all,
I think the query of arguments for \parbox isn't correct with the
current implementation. FTR, \parbox has the following syntax:
\parbox[<position>][<height>][<inner-pos>]{<width>}{<contents>}
where supported values for <position> are t, b or c and the ones for
<inner-pos> are t, b, c or s. latex.el does this:
'("parbox" [ TeX-arg-tb ] [ "Height" ]
[ TeX-arg-tb "Inner position" ]
"Width" t)
and `TeX-arg-tb' is defined as:
(defun TeX-arg-tb (optional &optional prompt)
"Prompt for a LaTeX side with completion.[...]"
(TeX-argument-insert
(completing-read
(TeX-argument-prompt optional prompt "Position")
'(("") ("t") ("b"))
nil t)
optional))
I suggest to define a new function like (suggestions for better name are
welcome):
(defun TeX-arg-parbox-pos (optional &optional prompt innerpos)
(TeX-argument-insert
(completing-read
(TeX-argument-prompt optional prompt "Position")
(if innerpos
'("t" "b" "c" "s")
'("t" "b" "c"))
nil t)))
and then change the entry for "parbox" to:
'("parbox" [TeX-arg-parbox-pos]
[TeX-arg-length "Height"]
[TeX-arg-parbox-pos "Inner position" t]
(TeX-arg-length "Width")
t)
minipage environment has the same issue, but I have to look closer.
And while we're at it, I would delete the ("") entries in
`TeX-arg-corner' and `TeX-arg-lr' which are not necessary and were
always confusing to me.
Any comments welcome.
Best, Arash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Arguments query of \parbox,
Arash Esbati <=