Wolfgang Schuster írta:
Am 09.04.2015 um 00:13 schrieb Csikos Bela:
Hello:
I have to setup caption formatting for Hungarian.
In Hungarian I have to write "#. figure." instead of "Figure #:"
The exact word for "figure" is "ábra", so what I want exactly is:
"# ábra.", eg "1. ábra".
How can I do it? (If I set the document language to Hungarian, the
word "ábra" is shown correctly but the order is not correct; I get ,. ábra:#.)
Until the labels for hungarian are fixed you can use the \setuplabeltext command
to set the right labels.
Another question: for caption text I want it to be justified and the last line of the caption
centered. How can I do that?
\useMPlibrary[dum]
\mainlanguage[hu]
\setupcaption[figure][align=last,numberstopper=.]
\setuplabeltext[hu][figure={, ábra}]
\starttext
\startplacefigure[title=\input{ward}]
\externalfigure[dummy]
\stopplacefigure
\stoptext
Wolfgang
Wolfgang, Otared:
Thank you both for your suggestions. Unfortunately the caption modification works only partially. I could not make both the caption labels and the references look correct.
When I use Wolfgang's example, I get the following: attachment file caption-example-2.pdf.
I also tried different settings for caption label, here is the code:
------------------------------------------------
\starttext
\setupcaption[figure][numberstopper={. ábra.}]
\setuplabeltext[figure={}]
Code:
\verbatim{\setupcaption[figure][numberstopper={. ábra.}]} \par
\verbatim{\setuplabeltext[figure={}]}
Result:
Reference to figure 1 (\in{figure}[figure-1])
\placefigure[][figure-1]{This is the caption}{\framed{Some figure}}
\hairline
\setupcaption[figure][suffix={. ábra},numberstopper={.}]
\setuplabeltext[figure={}]
Code:
\verbatim{\setupcaption[figure][suffix={. ábra},numberstopper={.}]} \par
\verbatim{\setuplabeltext[figure={}]}
Result:
Reference to figure 2 (\in{figure}[figure-2])
\placefigure[][figure-2]{This is the caption}{\framed{Another figure}}
\hairline
The caption should be: ``1. ábra. This is the caption''
The reference should be: ``(1. ábra)'' -- NO period after ``ábra'', without the word ``figure''.
\stoptext
------------------------------------------------------------------------
I attach the generated pdf output: caption-example.pdf
Unfortunately none of the above code variants gives the correct result.
Despite of the bad "wording" I don't understand why numberstopper (.)
doesn't appear after suffix (. ábra) in figure 2.
Any way to fix these?