* caption setup
@ 2015-04-08 22:13 Csikos Bela
2015-04-09 6:57 ` Otared Kavian
2015-04-09 9:07 ` Wolfgang Schuster
0 siblings, 2 replies; 7+ messages in thread
From: Csikos Bela @ 2015-04-08 22:13 UTC (permalink / raw)
To: mailing list for ConTeXt users
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:#.)
Another question: for caption text I want it to be justified and the last line of the caption
centered. How can I do that?
Thanks,
bcsikos
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: caption setup
2015-04-08 22:13 caption setup Csikos Bela
@ 2015-04-09 6:57 ` Otared Kavian
2015-04-09 9:07 ` Wolfgang Schuster
1 sibling, 0 replies; 7+ messages in thread
From: Otared Kavian @ 2015-04-09 6:57 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
Maybe something like the following gives what you want:
\setupcaption[figure][numberstopper={ ábra.}]
\setuplabeltext[figure={}]
However I don’t know how you would like the reference to a figure appear in the text: maybe the above solution doesn’t give what you want, and so there is a need to setup alos the referencing commands.
Best regards: OK
> On 09 Apr 2015, at 00:13, Csikos Bela <bcsikos425@freemail.hu> wrote:
>
> 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:#.)
>
> Another question: for caption text I want it to be justified and the last line of the caption
> centered. How can I do that?
>
> Thanks,
>
> bcsikos
>
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: caption setup
2015-04-08 22:13 caption setup Csikos Bela
2015-04-09 6:57 ` Otared Kavian
@ 2015-04-09 9:07 ` Wolfgang Schuster
2015-04-09 11:14 ` Csikos Bela
1 sibling, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2015-04-09 9:07 UTC (permalink / raw)
To: mailing list for ConTeXt users
> Am 09.04.2015 um 00:13 schrieb Csikos Bela <bcsikos425@freemail.hu>:
>
> 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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: caption setup
2015-04-09 9:07 ` Wolfgang Schuster
@ 2015-04-09 11:14 ` Csikos Bela
2015-04-09 11:37 ` Wolfgang Schuster
2015-04-09 11:59 ` Wolfgang Schuster
0 siblings, 2 replies; 7+ messages in thread
From: Csikos Bela @ 2015-04-09 11:14 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: TEXT/plain, Size: 2855 bytes --]
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?
The alignment=last option works. (This option is not mentioned among the options at the contextgarden wiki site, http://wiki.contextgarden.net/Command/setupcaptions.)
Thanks,
bcsikos
[-- Attachment #2: caption-example-2.pdf --]
[-- Type: APPLICATION/pdf, Size: 35039 bytes --]
[-- Attachment #3: caption-example.pdf --]
[-- Type: APPLICATION/pdf, Size: 11497 bytes --]
[-- Attachment #4: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: caption setup
2015-04-09 11:14 ` Csikos Bela
@ 2015-04-09 11:37 ` Wolfgang Schuster
2015-04-09 11:59 ` Wolfgang Schuster
1 sibling, 0 replies; 7+ messages in thread
From: Wolfgang Schuster @ 2015-04-09 11:37 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 3381 bytes --]
> Am 09.04.2015 um 13:14 schrieb Csikos Bela <bcsikos425@freemail.hu>:
>
> 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?
The \setupcaption command needs a numbercommand key which can be used to set
\setupcaption[numbercommand=\groupedcommand{}{…}]
> The alignment=last option works. (This option is not mentioned among the options at the contextgarden wiki site, http://wiki.contextgarden.net/Command/setupcaptions.)
Take a look at the \setupalign page: http://wiki.contextgarden.net/Command/setupalign <http://wiki.contextgarden.net/Command/setupalign>
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 5153 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: caption setup
2015-04-09 11:14 ` Csikos Bela
2015-04-09 11:37 ` Wolfgang Schuster
@ 2015-04-09 11:59 ` Wolfgang Schuster
2015-04-10 12:46 ` Csikos Bela
1 sibling, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2015-04-09 11:59 UTC (permalink / raw)
To: mailing list for ConTeXt users
> Am 09.04.2015 um 13:14 schrieb Csikos Bela <bcsikos425@freemail.hu>:
>
> 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?
Method 1 (set the left and right texts for the reference with the \in command):
%%%% begin example
\useMPlibrary[dum]
\mainlanguage[hu]
\setuplabeltext [hu] [figure={, ábra.}]
\setupcaption[figure][numberstopper=.]
\definereferenceformat[infigure][label=figurereference]
\starttext
\startplacefigure[reference=fig:dummy,title=Dummy figure]
\externalfigure[dummy]
\stopplacefigure
See figure~1 (\in{}{ ábra}[fig:dummy]).
\stoptext
%%%% end example
Method 2 (create your own reference command which uses a label without the period at the end):
%%%% begin example
\useMPlibrary[dum]
\mainlanguage[hu]
\setuplabeltext [hu] [figure={, ábra.}]
\setuplabeltext [hu] [figurereference={, ábra}]
\setupcaption[figure][numberstopper=.]
\definereferenceformat[infigure][label=figurereference]
\starttext
\startplacefigure[reference=fig:dummy,title=Dummy figure]
\externalfigure[dummy]
\stopplacefigure
See figure~1 (\infigure[fig:dummy]).
\stoptext
%%%% end example
BTW: The plain TeX method for quotation marks (``…’’) doesn’t work with MkIV, use correct quotation marks (“…”) or the \quotation command (\quotation{…}).
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: caption setup
2015-04-09 11:59 ` Wolfgang Schuster
@ 2015-04-10 12:46 ` Csikos Bela
0 siblings, 0 replies; 7+ messages in thread
From: Csikos Bela @ 2015-04-10 12:46 UTC (permalink / raw)
To: mailing list for ConTeXt users
Wolfgang Schuster írta:
LONG CUT, see previous messages
Thanks you, finally I chose the following setup:
% begin code
\mainlanguage[hu]
\setuplabeltext[hu][figure={,. ábra.}]
\setupcaption[figure][numberstopper=]
\definereferenceformat[infigure][label=figurereference]
\starttext
placefigure[][figure-1]{Caption 1}{figure1}
placefigure[][figure-2]{Caption 2}{figure2}
\in[figure-1]. ábra and \in[figure-2]/A ábrán
\stoptext
% end code
In this case the \in[] command only inserts the pure number without punctuation and
any additional text. I add the punctuation and additional text manually in the text.
>\setuplabeltext [hu] [figure={, ábra.}]
What is the function of the comma exactly? It isn't shown in the output.
>BTW: The plain TeX method for quotation marks (``…’’) doesn’t work with MkIV, use correct quotation marks (“…”) or the \quotation command (\quotation{…}).
It's a pity. This is a very nice feature of tex.
Wolfgang, thank you for your help. Probably I return soon with other questions because I'm learnig context.
bcsikos
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-04-10 12:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-08 22:13 caption setup Csikos Bela
2015-04-09 6:57 ` Otared Kavian
2015-04-09 9:07 ` Wolfgang Schuster
2015-04-09 11:14 ` Csikos Bela
2015-04-09 11:37 ` Wolfgang Schuster
2015-04-09 11:59 ` Wolfgang Schuster
2015-04-10 12:46 ` Csikos Bela
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).