From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: caption setup
Date: Thu, 9 Apr 2015 13:37:42 +0200 [thread overview]
Message-ID: <7DE81D2C-13CC-48EE-A3E7-B6E414B73C6A@gmail.com> (raw)
In-Reply-To: <freemail.20150409131449.33139.1@fmxmldata02.freemail.hu>
[-- 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
___________________________________________________________________________________
next prev parent reply other threads:[~2015-04-09 11:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-08 22:13 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 [this message]
2015-04-09 11:59 ` Wolfgang Schuster
2015-04-10 12:46 ` Csikos Bela
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7DE81D2C-13CC-48EE-A3E7-B6E414B73C6A@gmail.com \
--to=schuster.wolfgang@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).