ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Csikos Bela <bcsikos425@freemail.hu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: caption setup
Date: Thu, 9 Apr 2015 13:14:49 +0200 (CEST)	[thread overview]
Message-ID: <freemail.20150409131449.33139.1@fmxmldata02.freemail.hu> (raw)
In-Reply-To: <F6C5DFAE-8B26-42BC-8C8A-B6EED2465915@gmail.com>

[-- 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
___________________________________________________________________________________

  reply	other threads:[~2015-04-09 11:14 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 [this message]
2015-04-09 11:37     ` Wolfgang Schuster
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=freemail.20150409131449.33139.1@fmxmldata02.freemail.hu \
    --to=bcsikos425@freemail.hu \
    --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).