ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Modern CV like cover letter example
Date: Thu, 20 Apr 2017 23:40:37 -0700 (PDT)	[thread overview]
Message-ID: <alpine.OSX.2.02.1704202338350.46388@nqv-znpobbx> (raw)
In-Reply-To: <4e836b42-4e2e-b334-78d1-8d1d2225c7b3@gmail.com>

On Thu, 20 Apr 2017, Jonas Baggett wrote:

> Hi Pablo,
>
> Thanks ! I think you are right about that labeltext doesn't support an 
> extra parameter. Then I will need to do it that way, I guess :
>
> \def \gender {male}
>
> \doifelse {\gender} {male} {
>   \setuplabeltext [en] [longtitle=Mister]
>   \setuplabeltext [fr] [longtitle=Monsieur]
> }{ % female
>   \setuplabeltext [en] [longtitle=Madam]
>   \setuplabeltext [fr] [longtitle=Madame]
> }
>
> \starttext
>   \mainlanguage[fr] \labeltext{longtitle}
>   \mainlanguage[en] \labeltext{longtitle}
> \stoptext

You can also do:

\setuplabeltext [en] [male:longtitle=Mister, female:longtitle=Madam]
\setuplabeltext [fr] [male:longtitle=Monsieur, female:longtitle=Madame]

\mainlanguage[fr] \labeltext{\gender:longtitle}

etc.

Aditya
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2017-04-21  6:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-17 12:34 Jonas Baggett
2017-04-18  8:09 ` Henri Menke
2017-04-18 20:18   ` Jonas Baggett
2017-04-20  5:08   ` Jonas Baggett
2017-04-20  5:56     ` Pablo Rodriguez
2017-04-20 20:16       ` Jonas Baggett
2017-04-21  6:40         ` Aditya Mahajan [this message]
2017-04-22  5:42           ` Jonas Baggett
2017-12-02 14:13           ` Jonas Baggett
2017-12-02 14:37             ` Aditya Mahajan
     [not found]             ` <eaa90b73-3fef-f32c-bef7-376a60ae3471@gmail.com>
2017-12-02 18:13               ` Jonas Baggett
2017-12-03 13:10                 ` How to make context show different languages? Elof Ng
2017-12-03 17:57                   ` Henning Hraban Ramm

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=alpine.OSX.2.02.1704202338350.46388@nqv-znpobbx \
    --to=adityam@umich.edu \
    --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).