Hi,
right, one needs \usepackage{bidi}, then this kind of works:
\setRTL
\begin{choicegroup}[flip]{\LRE{Which software do you prefere for
the following tasks?}}
% We have to add the possible choices at the start.
\groupaddchoice{\LRE{\LaTeX}}
\groupaddchoice{\LRE{LibreOffice}}
\groupaddchoice{\LRE{Microsoft Word}}
\groupaddchoice{\LRE{other}}
% After that it is possible to add each question.
\choiceline{\LRE{writing letters}}
\choiceline{\LRE{creating tables}}
\choiceline{\LRE{typesetting equations}}
\end{choicegroup}
\unsetRTL
The question is on the wrong side, but one can suppress it (empty
string) and typeset it manually, I suppose.
The \LRE for the header is not needed (i.e. the cells that end up being
the column header, not sure why). That seems like a bug somewhere.
Benjamin
On Fri, 2022-03-18 at 23:55 +0100, Benjamin Berg wrote:
> Hi René,
>
> sorry for the late response.
>
> On Tue, 2022-03-08 at 14:01 +0100, rene mayer wrote:
> > I've a multiple choice set up with the question in front of the
> > multiple choice check boxes.
> > The code below results in having the question first aligned to the
> > check boxes.
> >
> > begin{choicegroup}[layouter=rotated]{}
> > \groupaddchoice[text=choice 1]{überhaupt nicht}
> > \groupaddchoice[text=choice 2]{sehr stark}
> > \choiceline{1. Kopfschmerzen}
> >
> > I would like to have the check-boxes first followed by the question
> > left aligned to the check box.
> > How to do this?
>
> I don't think I have any support for this at the moment.
>
> This is really complicated conceptually. The "sdapsarray" is
> conceptually a matrix with row and column headers. What you want to do
> here, is to display the row header on the right rather than the left
> side.
>
> From a technical perspective, we have the layouter that allows hooking
> into the process. In there, the "row" macro deals with building a line.
> This is where the change would need to happen.
>
> I suspect, you would need to effectively create a new layouter. Then,
> override various functions:
> * row (i.e. \_sdaps_array_row:NNNN):
> Just change the order of boxes, pretty simple, see RTL code
> * rowhead (i.e. \_sdaps_array_rowhead_default:Nw):
> Change the alignment, also simple, see RTL code
>
> Would need some refactoring to make the code nice. Or, one would need
> to add an option that toggles the behaviour and makes the layouters
> behave as if the writing direction was flipped in some cases (RTL vs.
> LTR).
>
> That said, this actually shows a possible workaround. i.e. change the
> language to RTL and reverse the the order of the choices. But, to be
> honest I am not sure how to do that right now (in principle, if@RTL
> needs to evaluate to TRUE).
>
> Though, I just had a quick go it trying it by defining
> \makeatletter
> \newif\if@RTL
> \makeatother
>
> And setting it using
> \makeatletter
> \@RTLtrue
> \makeatother
>
> And, now I am getting an error while compiling the document, so I guess
> something might be broken with RTL support actually. I don't think I
> have regression tests for that currently :-/
>
> Benjamin
>
>
--
To unsubscribe, send mail to [email protected].