[NTG-context] URLs [Re: \hyphenatedurl and the '%' character]

2010-06-03 Thread rogutes
Rogutės Sparnuotos (2010-06-03 00:16):
> Hello,
> 
> I defined
> 
>   \def\url[#1]{\hyphenatedurl{#1}}
> 
> for URLs, because I find 
> 
>   \useURL[][]
>   \from[]
> 
> inconvenient (there are ~30 URLs in my document and all of them unique).
> But \hyphenatedurl doesn't work with '%' (and '\%' gets printed
> literally). I'll just use \useURL as a workaround, but shouldn't
> \hyphenatedurl work as well?

1. Is anyone hyphenating URLs by hand? How? Is this ok?
   {\tt http://wiki.contextgarden.net/\crlf{}Article_Abstracts}

   Perhaps someone has done a macro like
   \urlparts{http://}{wiki.}{contextgarden}{.net}{Article_}{Abstract}?

   What about active URLs (\crlf doesn't work in \goto with MkII)?

2. Regarding URL hyphenation, why is an overfull line preferred over a
   slightly underfull one?

  \starttext
  \startframedtext[width=6.3cm]
\hyphenatedurl{http://wiki.contextgarden.net/Article_Abstracts}
  \stopframedtext
  \stoptext


Some observed MkII and MkIV differences follow (still don't know if anyone
is interested in these...):

3. It seems that one can't redefine \url[] and still use \useURL[][],
   \from[] with MkII (but it works with MkIV).

4. \from[] is not hyphenated with MkII, but is hyphenated with MkIV
   (with \setupinteraction[state=start]).

5. \from[] is typeset in typewriter font with MkII, and in roman with MkIV
   (without \setupinteraction[state=start]).

Example for 4., 5.:

\useURL[x][http://minimals.contextgarden.net/pragma/linux-64/texmf-linux-64/bin/]
\starttext
\from[x]
\stoptext

-- 
--  Rogutės Sparnuotos
___
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
___


Re: [NTG-context] hyphenation patterns

2010-05-24 Thread rogutes
Mojca Miklavec (2010-05-24 02:16):
> Dear Claudio,
> 
> Thanks a lot for your prompt reply.
> 
> On Mon, May 24, 2010 at 00:39, Claudio Beccari wrote:
> > Dear Mojca,
> > no proper Italian word ends in ch (this digraph in normal Italian words is
> > pronunced as k, not as č or ć).
> > Nevertheless there are a number of surnames dating back to the old times
> > (150 years ago) when North East Italy was under Austro-Hungarian ruling,
> > when Istrian names, mainly Croatian and Slovenian, where transliterated in
> > such a way that the tipical patronimic ending  -ič or -ić (I don't know the
> > exact spelling in Latin letters of the Croatian/Slovenian names) was
> > transliterated for the Empire bureaucracy with -ich.
> 
> Thanks a lot for some more insight. I admit that I didn't know the
> details (I should be ashamed) and in my area they were more radical
> with surname changes (mine was Michelazzi and I think that most
> surnames here were "properly Romanized", for example Filipčič ->
> Filippi, so again no problems with hyphenation :) :) :).
> 
> > This spelling remained
> > when North East Italy and Istria were annexed to the Kingdom of Italy at the
> > end of WW1. After WW2 most of Istria returned mainly to Croatia and a small
> > part to Slovenia, but the Slovenians and Croatians that had moved the NE
> > Italy and had become Italian citizens maintained their surnames with the
> > Austro-Hungarian spelling.
> >
> > When I prepared the hyphen patterns for Italian ad Latin I did think to
> > this particular spelling, but I concluded that it was not so important; I
> > was wrong, and I apologize.
> 
> There's no need to apologize. First, there's an "infinite" number of
> foreign names, so that one simply cannot get all of them right. I
> guess that Lju-bl-ja-na is not properly hyphenated either (Lu-bia-na
> is ok), but in my opinion it's a valid argument that one should change
> the language when writing foreign names if they are to be hyphenated
> properly. I can also easily imagine Slovenian patterns that would
> hyphenate:
> Fis-cher, Aac-hen, Go-ethe
> when not knowing that those letters represent a single "letter"/sound
> in foreign words.
> 
> Second, I have no idea, but I think it was a pure coincidence that the
> "problem" reported by Rogutės Sparnuotos is the same as that for
> surnames of a group of people on North-East (I think that the name in
> question comes from Russia with translitaration done by English). On
> the other hand if it's just a tiny pattern that solves them all ...

Thank you Mojca and Claudio for your replies.

Mojca has guessed correctly: I merely noticed that the surname Manovich is
hyphenated wrongly in the three languages I've tested. And I don't mind
using \hyphenation{} or switching language for foreign names.

I don't know how hyphenation patterns are made, so I was surprised to see
the main rule of at least Latin/Italian/Lithuanian hyphenation broken (a
syllable must contain a vowel). From your explanations it seems that
hyphenation patterns are kind of case-by-case rules, so this problem is
not suprising, since no common words end with '-ch' in these languages.

Wonder if I'll find a maintainer of the Lithuanian patterns...

-- 
--  Rogutės Sparnuotos
___
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
___


Re: [NTG-context] simple bibliography and dots after section numbering

2010-05-06 Thread rogutes
rogu...@googlemail.com (2010-05-05 05:12):
> 2. I would like to use something like this for bibliography:
>http://wiki.contextgarden.net/Simple_Bibliography#Another_Approach
>but adapting it seems too hard for me. Perhaps someone could help? A
>very crude example:
> 
>---
>People are writing about this \cite[ref1], (\cite[ref2] - page 25).
> 
>\startbibliography
>  \bibitem[ref1] This is the first reference.
>  \bibitem[Daniel, 2004][ref2] This is the second reference.
>\stopbibliography
>---
> 
>should be rendered as:
> 
>---
>People are writing about this [1], (Daniel, 2004 - page 25)
> 
>1. This is the first reference.
>2. This is the second reference.
>---
> 
>That is, I want an environment and 2 commands:
>  \startbibliography
>  \cite [key]
>  \bibitem [label_replacing_\cite[key]_but_not_the_item_number] [key]

A bump to my initial question to add that I am using MKIV and a question:
would this be hard to implement for a total ConTeXt newcommer?  What
should he use? TeX / Lua? Would ConTeXt commands be enough?

-- 
--  Rogutės Sparnuotos
___
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
___


[NTG-context] simple bibliography and dots after section numbering

2010-05-04 Thread rogutes
G'Day,

I'm trying out ConTeXt and have come up with 2 questions.

1. How does one add a dot after the numerals in headings, so that
 "\section{First}"
   becomes
 "1. First"
   instead of
 "1 First"
   ?

2. I would like to use something like this for bibliography:
   http://wiki.contextgarden.net/Simple_Bibliography#Another_Approach
   but adapting it seems too hard for me. Perhaps someone could help? A
   very crude example:

   ---
   People are writing about this \cite[ref1], (\cite[ref2] - page 25).

   \startbibliography
 \bibitem[ref1] This is the first reference.
 \bibitem[Daniel, 2004][ref2] This is the second reference.
   \stopbibliography
   ---

   should be rendered as:

   ---
   People are writing about this [1], (Daniel, 2004 - page 25)

   1. This is the first reference.
   2. This is the second reference.
   ---

   That is, I want an environment and 2 commands:
 \startbibliography
 \cite [key]
 \bibitem [label_replacing_\cite[key]_but_not_the_item_number] [key]


Thank you very much,
--  Rogutės Sparnuotos

P.S. Is there a paragraph somewhere describing the logic under the use of
 [] and {} for different commands (it seemed somehow more intuitive in
 LaTeX). What would a ConTeXt developer choose, \cite[x] or \cite{x}
 and why?
___
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
___