ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Putting chord names above the lyrics
       [not found] <mailman.251.1263333743.4207.ntg-context@ntg.nl>
@ 2010-01-12 22:51 ` Vyatcheslav Yatskovsky
  2010-01-12 23:09   ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Vyatcheslav Yatskovsky @ 2010-01-12 22:51 UTC (permalink / raw)
  To: ntg-context

Thanks, Wolfgang!

Good toy )

\usemodule[ruby]

\define[1]\chord{\dontleavehmode\ruby[position=before,align=left,inbetween={\blank[big]}]{}{#1}}

\starttext

\setupinterlinespace[big]

\startlines

\chord{E}Cvet dišeč z \chord{H7}jutrom se od\chord{cis}pre,

\chord{A}sonce od\chord{E}pira o\chord{H}či.

\chord{E}Polje z vetrom v \chord{H7}plesu ziblje \chord{cis}se.

Gos\chord{E}pod, pov\chord{H}sod vidim \chord{E}Te.

\stoplines

\stoptext


However, it was tricky to find out that "inbetween={\blank[big]}"key 
controls the distance between chords and lyrics. Can this distance be 
set more precisely?

And "position=before" or "after" would better be "above" and "below", 
respectively. Don't you dare to change this? )

Regards,
Vyatcheslav

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

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

* Re: Putting chord names above the lyrics
  2010-01-12 22:51 ` Putting chord names above the lyrics Vyatcheslav Yatskovsky
@ 2010-01-12 23:09   ` Wolfgang Schuster
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2010-01-12 23:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 12.01.2010 um 23:51 schrieb Vyatcheslav Yatskovsky:

> However, it was tricky to find out that "inbetween={\blank[big]}"key controls the distance between chords and lyrics. Can this distance be set more precisely?

You can use \blank[<dimen>] or \vskip xxpt or whatever else inserts a vertical space.

> And "position=before" or "after" would better be "above" and "below", respectively. Don't you dare to change this? )

The names for keys/values are taken from ruby documentation on the W3C page,
changing them to context is something i left out so far. I want to keep before
and after but i can make above/below synonyms (just one extra line for each name).

Wolfgang

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


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

* Re: Putting chord names above the lyrics
  2010-01-12  9:08   ` Mojca Miklavec
@ 2010-01-12  9:25     ` Wolfgang Schuster
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2010-01-12  9:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 12.01.2010 um 10:08 schrieb Mojca Miklavec:

> In ConTeXt an approximately the same, but unoptimized solution could be
> 
> \def\Ch#1{%
> 	\strut\hbox to 0pt{\raisebox{0.8\baselineskip}\hbox{\bf#1}\hss}}
> \setupwhitespace[big]
> 
> and then the same lyrics.
> 
> Mojca

Or he can use my ruby module (where i should put the latest version to the garden)
and define himself a command with

\define[1]\Chord{\ruby[position=after,align=left]{}{#1}}

text text tex\Chord{Chord}t text

Wolfgang


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


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

* Re: Putting chord names above the lyrics
  2010-01-12  2:48 ` Vyatcheslav Yatskovsky
  2010-01-12  8:24   ` Wolfgang Schuster
@ 2010-01-12  9:08   ` Mojca Miklavec
  2010-01-12  9:25     ` Wolfgang Schuster
  1 sibling, 1 reply; 6+ messages in thread
From: Mojca Miklavec @ 2010-01-12  9:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Jan 12, 2010 at 03:48, Vyatcheslav Yatskovsky wrote:
> Hello,
>
> How to put chord names above the lyrics? I have the following in mind
>
> \starttext
> \setupinterlinespace[big]
> \startlines
> \chord[C6]Pardon me, boy
>
> Is that the Chattanooga choo choo?
>
> Track twenty-nin\chord[Gadd9/D]e
> Boy, you can gimme a sh\chord[C6]ine

I'm just copy-pasting some of old songs. (written LaTeX):

The following LaTeX code worked perfectly:

\def\Ch#1{%
	\makebox[0pt][l]{%
		\raisebox{0.4\baselineskip}{\bf #1}%
	}}

\setlength{\baselineskip}{1.8\baselineskip}}

\Ch{E}Cvet dišeč z \Ch{H7}jutrom se od\Ch{cis}pre, \par
\Ch{A}sonce od\Ch{E}pira o\Ch{H}či. \par
\Ch{E}Polje z vetrom v \Ch{H7}plesu ziblje \Ch{cis}se. \par
Gos\Ch{E}pod, pov\Ch{H}sod vidim \Ch{E}Te. \par}

In ConTeXt an approximately the same, but unoptimized solution could be

\def\Ch#1{%
	\strut\hbox to 0pt{\raisebox{0.8\baselineskip}\hbox{\bf#1}\hss}}
\setupwhitespace[big]

and then the same lyrics.

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

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

* Re: Putting chord names above the lyrics
  2010-01-12  2:48 ` Vyatcheslav Yatskovsky
@ 2010-01-12  8:24   ` Wolfgang Schuster
  2010-01-12  9:08   ` Mojca Miklavec
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2010-01-12  8:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 12.01.2010 um 03:48 schrieb Vyatcheslav Yatskovsky:

> Hello,
> 
> How to put chord names above the lyrics? I have the following in mind

Do you need them at the begin of the line or can you live with a solution
where the chord names are place at the same horizontal position where you
inserted them in your text?

Wolfgang

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


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

* Putting chord names above the lyrics
       [not found] <mailman.0.1263207601.24456.ntg-context@ntg.nl>
@ 2010-01-12  2:48 ` Vyatcheslav Yatskovsky
  2010-01-12  8:24   ` Wolfgang Schuster
  2010-01-12  9:08   ` Mojca Miklavec
  0 siblings, 2 replies; 6+ messages in thread
From: Vyatcheslav Yatskovsky @ 2010-01-12  2:48 UTC (permalink / raw)
  To: ntg-context

Hello,

How to put chord names above the lyrics? I have the following in mind

\starttext
\setupinterlinespace[big]
\startlines
\chord[C6]Pardon me, boy

Is that the Chattanooga choo choo?

Track twenty-nin\chord[Gadd9/D]e
Boy, you can gimme a sh\chord[C6]ine

\stoplines
\setupinterlinespace[small]
\stoptext

which should look like

C6
Pardon me, boy

Is that the Chattanooga choo choo?
Gadd9/D

Track twenty-nine
C6
Boy, you can gimme a shine


Regards,
Vyatcheslav


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


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

end of thread, other threads:[~2010-01-12 23:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.251.1263333743.4207.ntg-context@ntg.nl>
2010-01-12 22:51 ` Putting chord names above the lyrics Vyatcheslav Yatskovsky
2010-01-12 23:09   ` Wolfgang Schuster
     [not found] <mailman.0.1263207601.24456.ntg-context@ntg.nl>
2010-01-12  2:48 ` Vyatcheslav Yatskovsky
2010-01-12  8:24   ` Wolfgang Schuster
2010-01-12  9:08   ` Mojca Miklavec
2010-01-12  9:25     ` Wolfgang Schuster

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