ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* bib module: author-date macros
@ 2005-10-02 23:43 Idris Samawi Hamid
  2005-10-07 14:41 ` Taco Hoekwater
  0 siblings, 1 reply; 8+ messages in thread
From: Idris Samawi Hamid @ 2005-10-02 23:43 UTC (permalink / raw)


Here are some macros that I use; I was wondering if the new bib module has a 
better way to implement the following, since this sort of thing is used quite 
frequently in the author-date system that t-bib defaults to. See the examples 
in the following file (three depend on \cite[year] which has a problem--see 
previous mail).

I would really appreciate suggestions for improving this-)

Best
Idris

==========test-bib-macros.tex==========
% output=pdf interface=en

\setupwhitespace[big]

\usemodule[bib]

\setuppublications[alternative=apa]
\setuppublications[autohang=yes]
\setuppublications[numbering=no]
\setuppublications[criterium=cite]
\setuppublications[sorttype=bbl]

\setuppublicationlist[totalnumber={},samplesize=,author={\invertedauthor}]

\setupcite[authoryears][left={(},inbetween={ }, right={)}]

\def\citeauthoryear[#1]{%
  {\setupcite[authoryears][right={)},inbetween={ }]%
   \cite[authoryears][#1]%
  }%
}

\def\citeyear[#1]{%
  {\cite[year][#1]%
  }%
}

\def\citeauthoryearpage[#1][#2]{%
  {\setupcite[authoryears][right={, #2)},inbetween={ }]%
   \cite[authoryears][#1]%
  }%
}

\def\citeyearpage[#1][#2]{%
  {\setupcite[year][right={, #2)},inbetween={ }]%
   \cite[year][#1]%
  }%
}

\def\citeauthorout[#1]{%
  {\setupcite[authoryears][left={}, right={)},inbetween={ (}]%
   \cite[authoryears][#1]%
  }%
}

\def\citeauthoroutpage[#1][#2]{%
  {\setupcite[authoryears][left={}, right={, #2)},inbetween={ (}]%
   \cite[authoryears][#1]%
  }%
}

\def\citeleft[#1]{%
  {\setupcite[authoryears][left={(}, right={, },inbetween={ }]%
   \cite[authoryears][#1]%
  }%
}

\def\citeleftpage[#1][#2]{%
  {\setupcite[authoryears][left={(}, right={, #2; },inbetween={ }]%
   \cite[authoryears][#1]%
  }%
}

\def\citemiddle[#1]{%
  {\setupcite[authoryears][left={}, right={, },inbetween={ }]%
   \cite[authoryears][#1]%
  }%
}

\def\citeright[#1]{%
  {\setupcite[authoryears][left={}, right={)},inbetween={ }]%
   \cite[authoryears][#1]%
  }%
}

\def\citemiddlepage[#1][#2]{%
  {\setupcite[authoryears][left={}, right={, #2; },inbetween={ }]%
   \cite[authoryears][#1]%
  }%
}

\def\citerightpage[#1][#2]{%
  {\setupcite[authoryears][left={}, right={, #2)},inbetween={ }]%
  \cite[authoryears][#1]%
  }%
}

\input test-bib.bbl

\starttext

% examples

\dots as someone else pointed out \cite[afghani60].

\dots as someone else pointed out\citeauthoryear[afghani60].

%\dots as Afghani points out \cite[year][afghani60]. % crashes

%\dots as Afghani points out \citeyear[afghani60]. % crashes

%\citeyearpage[afghani60][p.~20]. % crashes

\dots as someone else pointed out\citeauthoryearpage[afghani60][p.~20].

See \citeauthorout[afghani60].

See \citeauthoroutpage[afghani60][p.~20].

\dots as others have pointed
out\citeleft[afghani60]%
\citemiddle[afghani60]%
\citeright[afghani60].

\dots as others have pointed
out\citeleftpage[afghani60][p.~20]%
\citemiddlepage[afghani60][p.~20]%
\citerightpage[afghani60][p.~20].

% \citeypage[afghani60][p.~20]    %(1956, p. 20)

\section{References}{\tfx\setupinterlinespace
{\placepublications}}

\stoptext
=========================================

==============test-bib.bbl===============
\startpublication[k=afghani60,
                  t=book,
                  a=Afgh\=an\=i,
                  y=1960,
                  s=]
\author[]{Sa\high{c}\=id}[]{}{Al-Afgh\=an\=i}
\title{Asw\=aqu \~al-\high{c}Arab f\=i
    \~al-J\=ahiliyya\~h wa \~al-Isl\=am}
\pubname{D\=aru \~al-Fikr}
\city{Damascus}
\pubyear{1960}
\stoppublication
=========================================

============================
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: bib module: author-date macros
  2005-10-02 23:43 bib module: author-date macros Idris Samawi Hamid
@ 2005-10-07 14:41 ` Taco Hoekwater
  2005-10-08 22:58   ` Vowels with accent (teTeX - Linux) Jilani Khaldi
  0 siblings, 1 reply; 8+ messages in thread
From: Taco Hoekwater @ 2005-10-07 14:41 UTC (permalink / raw)



Hi,

Idris Samawi Hamid wrote:

> \def\citeauthoryear[#1]{%
>   {\setupcite[authoryears][right={)},inbetween={ }]%
>    \cite[authoryears][#1]%
>   }%
> }

The beta allows:

   \def\citeauthoryear[#1]{%
     \cite[alternative=authoryears,right={)},inbetween={ }][#1]%
   }

   \def\citeauthoryearpage[#1][#2]{%
    \cite[alternative=authoryears,extras={, #2}][#1]%
   }

etc.
And, especially now that the syntax is that much cleaner, I don't
really want to add such convenience macros to the module.

Cheers,

Taco

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Vowels with accent (teTeX - Linux)
  2005-10-07 14:41 ` Taco Hoekwater
@ 2005-10-08 22:58   ` Jilani Khaldi
       [not found]     ` <6faad9f00510090243n69cef293x@mail.gmail.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Jilani Khaldi @ 2005-10-08 22:58 UTC (permalink / raw)


Hi All,
using ConTeXt under Linux (teTeX - Slackware  10.2)  vowels with accent, 
like è, à, ... are not printed out.
What am I missing?
Thanks!

jk

ps.
Vowels with accent are printed out under Windows and MikTeX

-- 
// Jilani KHALDI
http://jkhaldi.oltrelinux.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Vowels with accent (teTeX - Linux)
       [not found]         ` <4349021F.5070604@virgilio.it>
@ 2005-10-09 11:43           ` Jilani Khaldi
  2005-10-09 12:42             ` VnPenguin
  2005-10-09 15:26             ` Re[2]: " Giuseppe Bilotta
  0 siblings, 2 replies; 8+ messages in thread
From: Jilani Khaldi @ 2005-10-09 11:43 UTC (permalink / raw)


example:

\mainlanguage[italian]
\setupbodyfont[12pt]
\setuppapersize[A4]

\starttext
perché, sarà, così, totò, più
\stoptext

texexec --pdf  context.tex => PDF output = perch, sar, cos, tot, pi

PDF example generated by ConTeXt 
http://jkhaldi.oltrelinux.com/context.pdf (6kb)
PDF example generated by LaTeX http://jkhaldi.oltrelinux.com/latex.pdf 
(gives the expected output.) (6kb)

locale =>
LANG=it_IT
LC_CTYPE="it_IT"
LC_NUMERIC="it_IT"
LC_TIME="it_IT"
LC_COLLATE="it_IT"
LC_MONETARY="it_IT"
LC_MESSAGES="it_IT"
LC_PAPER="it_IT"
LC_NAME="it_IT"
LC_ADDRESS="it_IT"
LC_TELEPHONE="it_IT"
LC_MEASUREMENT="it_IT"
LC_IDENTIFICATION="it_IT"
LC_ALL=it_IT

on Linux Slackware 10.2

Ciao!

jk


-- 
// Jilani KHALDI
http://jkhaldi.oltrelinux.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Vowels with accent (teTeX - Linux)
  2005-10-09 11:43           ` Jilani Khaldi
@ 2005-10-09 12:42             ` VnPenguin
       [not found]               ` <43491894.7070901@virgilio.it>
  2005-10-09 15:26             ` Re[2]: " Giuseppe Bilotta
  1 sibling, 1 reply; 8+ messages in thread
From: VnPenguin @ 2005-10-09 12:42 UTC (permalink / raw)


On 10/9/05, Jilani Khaldi <jilani.khaldi1@virgilio.it> wrote:
> example:
>
> \mainlanguage[italian]
> \setupbodyfont[12pt]
> \setuppapersize[A4]
>
> \starttext
> perché, sarà, così, totò, più
> \stoptext
>
> texexec --pdf  context.tex => PDF output = perch, sar, cos, tot, pi
>
> PDF example generated by ConTeXt
> http://jkhaldi.oltrelinux.com/context.pdf (6kb)
> PDF example generated by LaTeX http://jkhaldi.oltrelinux.com/latex.pdf
> (gives the expected output.) (6kb)

I don't know which "input encoding" do you use ? Me, I use always
UTF-8 for all my ConTeXt doc here and I have ALWAYS all accented
characters on it ;-)

> locale =>
> LANG=it_IT
> LC_CTYPE="it_IT"
> LC_NUMERIC="it_IT"
> LC_TIME="it_IT"
> LC_COLLATE="it_IT"
> LC_MONETARY="it_IT"
> LC_MESSAGES="it_IT"
> LC_PAPER="it_IT"
> LC_NAME="it_IT"
> LC_ADDRESS="it_IT"
> LC_TELEPHONE="it_IT"
> LC_MEASUREMENT="it_IT"
> LC_IDENTIFICATION="it_IT"
> LC_ALL=it_IT
>
> on Linux Slackware 10.2

Nothings to see with LOCALE of your Linux box! I product my vietnamese
PDF (by using UTF-8 input encoding) on my "en_US locale" Linux box ;-)

--
http://vnoss.org
Vietnamese Open Source Software Community

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Vowels with accent (teTeX - Linux)
       [not found]               ` <43491894.7070901@virgilio.it>
@ 2005-10-09 13:22                 ` VnPenguin
  0 siblings, 0 replies; 8+ messages in thread
From: VnPenguin @ 2005-10-09 13:22 UTC (permalink / raw)
  Cc: mailing list for ConTeXt users

On 10/9/05, Jilani Khaldi <jilani.khaldi1@virgilio.it> wrote:
> Hi,
>
> >I don't know which "input encoding" do you use ? Me, I use always
> >UTF-8 for all my ConTeXt doc here and I have ALWAYS all accented
> >characters on it ;-)
> >
> >
> Where can I see/set the "input encoding"?
> Thank you.

I used:

\enableregime[utf]
\setupencoding[default=t5]

For UTF-8 input encoding with T5 for vietnamese.

--
http://vnoss.org
Vietnamese Open Source Software Community

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re[2]: Vowels with accent (teTeX - Linux)
  2005-10-09 11:43           ` Jilani Khaldi
  2005-10-09 12:42             ` VnPenguin
@ 2005-10-09 15:26             ` Giuseppe Bilotta
  2005-10-09 17:13               ` Jilani Khaldi
  1 sibling, 1 reply; 8+ messages in thread
From: Giuseppe Bilotta @ 2005-10-09 15:26 UTC (permalink / raw)


Sunday, October 9, 2005 Jilani Khaldi wrote:

> \mainlanguage[italian]
> \setupbodyfont[12pt]
> \setuppapersize[A4]

\enableregime[il1] % il = iso-latin-1; change it
% based on the encoding you use in your editor

> \starttext
> perché, sarà, così, totò, più
> \stoptext

-- 
Giuseppe "Oblomov" Bilotta

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Vowels with accent (teTeX - Linux)
  2005-10-09 15:26             ` Re[2]: " Giuseppe Bilotta
@ 2005-10-09 17:13               ` Jilani Khaldi
  0 siblings, 0 replies; 8+ messages in thread
From: Jilani Khaldi @ 2005-10-09 17:13 UTC (permalink / raw)



>\enableregime[il1] % il = iso-latin-1; change it
>% based on the encoding you use in your editor
>
>  
>
Ok. Thank you (Grazie!).

jk

-- 
// Jilani KHALDI
http://jkhaldi.oltrelinux.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-10-09 17:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-02 23:43 bib module: author-date macros Idris Samawi Hamid
2005-10-07 14:41 ` Taco Hoekwater
2005-10-08 22:58   ` Vowels with accent (teTeX - Linux) Jilani Khaldi
     [not found]     ` <6faad9f00510090243n69cef293x@mail.gmail.com>
     [not found]       ` <4348FB6E.60103@virgilio.it>
     [not found]         ` <4349021F.5070604@virgilio.it>
2005-10-09 11:43           ` Jilani Khaldi
2005-10-09 12:42             ` VnPenguin
     [not found]               ` <43491894.7070901@virgilio.it>
2005-10-09 13:22                 ` VnPenguin
2005-10-09 15:26             ` Re[2]: " Giuseppe Bilotta
2005-10-09 17:13               ` Jilani Khaldi

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).