ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Putting citations in an e-book
@ 2011-03-08 14:36 Cecil Westerhof
  2011-03-08 15:36 ` Wolfgang Schuster
  2011-03-08 15:37 ` Cecil Westerhof
  0 siblings, 2 replies; 11+ messages in thread
From: Cecil Westerhof @ 2011-03-08 14:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1015 bytes --]

I am making my first e-book. And am now seriously using ConTeXt. But I have
a lot to learn.

In my ebook I want to use citations. In two different way. For starters I
want to let every chapter start with a citation. At the moment I think that
this does not need to be fancy. Just a little bigger font and a different
color and white-space after it. But if there is a better way, I do not mind
to hear it.

The trickier part is in the text itself. I would like to use citations near
the text itself. For example: when I write that you need to set goals to
fulfill your potential, I like to have nearby the citation from Abraham
Lincoln: 'A goal properly set is halfway reached'. I have this seen done in
several way: with and without a surrounding box. With and without flowing
text, etc.

What is the best way to do this? On one side concerning the medium. (I think
that an e-book asks for something else as a normal book.) On the other side
concerning the best way to implement it in ConTeXt.

-- 
Cecil Westerhof

[-- Attachment #1.2: Type: text/html, Size: 1567 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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
___________________________________________________________________________________

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

* Re: Putting citations in an e-book
  2011-03-08 14:36 Putting citations in an e-book Cecil Westerhof
@ 2011-03-08 15:36 ` Wolfgang Schuster
  2011-03-08 16:08   ` Cecil Westerhof
  2011-03-08 15:37 ` Cecil Westerhof
  1 sibling, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2011-03-08 15:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 08.03.2011 um 15:36 schrieb Cecil Westerhof:

> I am making my first e-book. And am now seriously using ConTeXt. But I have a lot to learn.
> 
> In my ebook I want to use citations. In two different way. For starters I want to let every chapter start with a citation. At the moment I think that this does not need to be fancy. Just a little bigger font and a different color and white-space after it. But if there is a better way, I do not mind to hear it.

\starttext

\chapter{Knuth}

\epigraph{Nikos Kazantzakis}{I hope for nothing. I fear nothing. I am free.}

\input knuth

\stoptext

with \epigraph defined as

\define[2]\epigraph
  {\blank
   \startframedtext[right][frame=off,align=flushright,offset=none,width=fit]%
   #2\par{\it – #1}%
   \stopframedtext
   \blank}

or

\usemodule[annotation]

\define[2]\EpigraphCommand
  {\startframedtext[right][frame=off,align=flushright,offset=none,width=fit]%
   #2\par{\it – \placeannotationtitle}%
   \stopframedtext}

\defineannotation
  [epigraph]
  [alternative=command,
       command=\EpigraphCommand,
       display=yes]

With the annotation module you can also write

\startepigraph{Nikos Kazantzakis}
I hope for nothing. I fear nothing. I am free.
\stopepigraph

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] 11+ messages in thread

* Re: Putting citations in an e-book
  2011-03-08 14:36 Putting citations in an e-book Cecil Westerhof
  2011-03-08 15:36 ` Wolfgang Schuster
@ 2011-03-08 15:37 ` Cecil Westerhof
  1 sibling, 0 replies; 11+ messages in thread
From: Cecil Westerhof @ 2011-03-08 15:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1436 bytes --]

2011/3/8 Cecil Westerhof <cldwesterhof@gmail.com>

> The trickier part is in the text itself. I would like to use citations near
> the text itself. For example: when I write that you need to set goals to
> fulfill your potential, I like to have nearby the citation from Abraham
> Lincoln: 'A goal properly set is halfway reached'. I have this seen done
> in several way: with and without a surrounding box. With and without flowing
> text, etc.
>
> What is the best way to do this? On one side concerning the medium. (I
> think that an e-book asks for something else as a normal book.) On the other
> side concerning the best way to implement it in ConTeXt.
>

At the moment I have tried the following:
Het probleem {\dontleavehmode
  \framedtext[
    bodyfont=big,
    location=middle,
    style=bold,
    align=middle]{%
      A goal properly set is halfway reached.
      \blank[small]
      Abraham Lincoln}
}
hierbij is dat over het algemeen je niet meer bereikt, dan je probeert te
bereiken. Dus als je de doelen te laag stelt, dan bereik je minder dan
mogelijk is.

It is a start, but there are a few problems:
- I want the citation in the middle.
- There is to much white-space around the citation.
- Only one line flows around the text. I want the text flow completely
around the citation.

I am thinking that it would be better to have the author right aligned and
in a smaller font. Is that a good idea?

-- 
Cecil Westerhof

[-- Attachment #1.2: Type: text/html, Size: 2195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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
___________________________________________________________________________________

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

* Re: Putting citations in an e-book
  2011-03-08 15:36 ` Wolfgang Schuster
@ 2011-03-08 16:08   ` Cecil Westerhof
  2011-03-08 17:02     ` Cecil Westerhof
  0 siblings, 1 reply; 11+ messages in thread
From: Cecil Westerhof @ 2011-03-08 16:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1520 bytes --]

2011/3/8 Wolfgang Schuster <schuster.wolfgang@googlemail.com>

>
> Am 08.03.2011 um 15:36 schrieb Cecil Westerhof:
>
> > I am making my first e-book. And am now seriously using ConTeXt. But I
> have a lot to learn.
> >
> > In my ebook I want to use citations. In two different way. For starters I
> want to let every chapter start with a citation. At the moment I think that
> this does not need to be fancy. Just a little bigger font and a different
> color and white-space after it. But if there is a better way, I do not mind
> to hear it.
>
> \starttext
>
> \chapter{Knuth}
>
> \epigraph{Nikos Kazantzakis}{I hope for nothing. I fear nothing. I am
> free.}
>
> \input knuth
>
> \stoptext
>
> with \epigraph defined as
>
> \define[2]\epigraph
>  {\blank
>
> \startframedtext[right][frame=off,align=flushright,offset=none,width=fit]%
>   #2\par{\it – #1}%
>   \stopframedtext
>   \blank}
>

I made it:
\define[2]\epigraph{
  \blank
  \startframedtext[right][frame=off,align=flushright,offset=none,width=fit]%
  \startcolor[darkgreen]#2\stopcolor
  \blank{\it – #1}%
  \stopframedtext
  \blank}

For one reason or another \par gave:
    Paragraph ended before \complexdefine was complete.

I also put a color on the citation itself. I am not satisfied with the
color. But I have enough time to decide on the real color.

One thing I am thinking about: making the citation centered and leave the
person right justified. Or is that a bad idea?

-- 
Cecil Westerhof

[-- Attachment #1.2: Type: text/html, Size: 1905 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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
___________________________________________________________________________________

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

* Re: Putting citations in an e-book
  2011-03-08 16:08   ` Cecil Westerhof
@ 2011-03-08 17:02     ` Cecil Westerhof
  2011-03-08 17:25       ` Wolfgang Schuster
  0 siblings, 1 reply; 11+ messages in thread
From: Cecil Westerhof @ 2011-03-08 17:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 534 bytes --]

2011/3/8 Cecil Westerhof <cldwesterhof@gmail.com>

> One thing I am thinking about: making the citation centered and leave the
> person right justified. Or is that a bad idea?
>

I made it:
\define[2]\epigraph{
  \blank
  \startframedtext[middle][frame=off,offset=none,width=fit]%
  \startalignment[middle]
  \startcolor[darkgreen]#2\stopcolor
  \stopalignment
  \startalignment[flushright]
  {\it #1}%
  \stopalignment
  \stopframedtext
  \blank
}

I think it does not look bad. But I have to let it grow on me.

-- 
Cecil Westerhof

[-- Attachment #1.2: Type: text/html, Size: 898 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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
___________________________________________________________________________________

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

* Re: Putting citations in an e-book
  2011-03-08 17:02     ` Cecil Westerhof
@ 2011-03-08 17:25       ` Wolfgang Schuster
  2011-03-08 17:41         ` Cecil Westerhof
  2011-03-08 18:57         ` Cecil Westerhof
  0 siblings, 2 replies; 11+ messages in thread
From: Wolfgang Schuster @ 2011-03-08 17:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 831 bytes --]


Am 08.03.2011 um 18:02 schrieb Cecil Westerhof:

> 2011/3/8 Cecil Westerhof <cldwesterhof@gmail.com>
> One thing I am thinking about: making the citation centered and leave the person right justified. Or is that a bad idea? 
> 
> I made it:
> \define[2]\epigraph{
>   \blank
>   \startframedtext[middle][frame=off,offset=none,width=fit]%
>   \startalignment[middle]
>   \startcolor[darkgreen]#2\stopcolor
>   \stopalignment
>   \startalignment[flushright]
>   {\it #1}%
>   \stopalignment
>   \stopframedtext
>   \blank
> }
> 
> I think it does not look bad. But I have to let it grow on me.

\define[2]\epigraph
  {\blank
   \startframedtext[middle][frame=off,offset=none,width=fit,align=middle]%
   \color[darkgreen]{#2}\endgraf
   \rightaligned{\it #1}%
   \stopframedtext
   \blank}

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 1574 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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
___________________________________________________________________________________

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

* Re: Putting citations in an e-book
  2011-03-08 17:25       ` Wolfgang Schuster
@ 2011-03-08 17:41         ` Cecil Westerhof
  2011-03-08 18:57         ` Cecil Westerhof
  1 sibling, 0 replies; 11+ messages in thread
From: Cecil Westerhof @ 2011-03-08 17:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 703 bytes --]

2011/3/8 Wolfgang Schuster <schuster.wolfgang@googlemail.com>

> I made it:
>
> \define[2]\epigraph{
>   \blank
>   \startframedtext[middle][frame=off,offset=none,width=fit]%
>   \startalignment[middle]
>   \startcolor[darkgreen]#2\stopcolor
>   \stopalignment
>   \startalignment[flushright]
>   {\it #1}%
>   \stopalignment
>   \stopframedtext
>   \blank
> }
>
> I think it does not look bad. But I have to let it grow on me.
>
>
> \define[2]\epigraph
>   {\blank
>    \startframedtext[middle][frame=off,offset=none,width=fit,align=middle]%
>    \color[darkgreen]{#2}\endgraf
>    \rightaligned{\it #1}%
>    \stopframedtext
>    \blank}
>

Thanks. That is better as my solution.

-- 
Cecil Westerhof

[-- Attachment #1.2: Type: text/html, Size: 1234 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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
___________________________________________________________________________________

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

* Re: Putting citations in an e-book
  2011-03-08 17:25       ` Wolfgang Schuster
  2011-03-08 17:41         ` Cecil Westerhof
@ 2011-03-08 18:57         ` Cecil Westerhof
  2011-03-08 19:39           ` Wolfgang Schuster
  1 sibling, 1 reply; 11+ messages in thread
From: Cecil Westerhof @ 2011-03-08 18:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1080 bytes --]

2011/3/8 Wolfgang Schuster <schuster.wolfgang@googlemail.com>

> \define[2]\epigraph
>   {\blank
>    \startframedtext[middle][frame=off,offset=none,width=fit,align=middle]%
>    \color[darkgreen]{#2}\endgraf
>    \rightaligned{\it #1}%
>    \stopframedtext
>    \blank}
>

I want to do something like:
\epigraph{Elbert Hubbard}{
Many people fail in life, not for lack of ability or brains or even
courage,

but simply because they have never organized their energies around a
goal.}

Because I want to have the but on the second line, with the rest of the
text. But this gives:
Runaway argument?
{ Many people fail in life, not for lack of ability or brains or even\ETC.
! Paragraph ended before \epigraph was complete.
<to be read again>
                   \par

I managed to get what I want with:
\epigraph{Elbert Hubbard}{
  Many people fail in life, not for lack of ability or brains or even
  courage,
  \blank[disable]
  but simply because they have never organized their energies around a
  goal.
}

But I was wondering if there is a better solution?

-- 
Cecil Westerhof

[-- Attachment #1.2: Type: text/html, Size: 1542 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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
___________________________________________________________________________________

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

* Re: Putting citations in an e-book
  2011-03-08 18:57         ` Cecil Westerhof
@ 2011-03-08 19:39           ` Wolfgang Schuster
  2011-03-08 19:44             ` Cecil Westerhof
  2011-03-14 10:43             ` Cecil Westerhof
  0 siblings, 2 replies; 11+ messages in thread
From: Wolfgang Schuster @ 2011-03-08 19:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 904 bytes --]


Am 08.03.2011 um 19:57 schrieb Cecil Westerhof:

> 2011/3/8 Wolfgang Schuster <schuster.wolfgang@googlemail.com>
> \define[2]\epigraph
>   {\blank
>    \startframedtext[middle][frame=off,offset=none,width=fit,align=middle]%
>    \color[darkgreen]{#2}\endgraf
>    \rightaligned{\it #1}%
>    \stopframedtext
>    \blank}
> 
> I want to do something like:
> \epigraph{Elbert Hubbard}{
> Many people fail in life, not for lack of ability or brains or even
> courage,
> 
> but simply because they have never organized their energies around a
> goal.}
> 
> Because I want to have the but on the second line, with the rest of the text. But this gives:
> Runaway argument?

With the definition of \define in MkII the argument of the command can’t contain a paragraph, a workaround is to define the \epigraph macro with

\long\def\epigraph#1#2{...}

or to use MkIV.

Wolfgang



[-- Attachment #1.2: Type: text/html, Size: 1636 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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
___________________________________________________________________________________

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

* Re: Putting citations in an e-book
  2011-03-08 19:39           ` Wolfgang Schuster
@ 2011-03-08 19:44             ` Cecil Westerhof
  2011-03-14 10:43             ` Cecil Westerhof
  1 sibling, 0 replies; 11+ messages in thread
From: Cecil Westerhof @ 2011-03-08 19:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1088 bytes --]

2011/3/8 Wolfgang Schuster <schuster.wolfgang@googlemail.com>

> \define[2]\epigraph
>
>   {\blank
>>    \startframedtext[middle][frame=off,offset=none,width=fit,align=middle]%
>>    \color[darkgreen]{#2}\endgraf
>>    \rightaligned{\it #1}%
>>    \stopframedtext
>>    \blank}
>>
>
> I want to do something like:
> \epigraph{Elbert Hubbard}{
> Many people fail in life, not for lack of ability or brains or even
> courage,
>
> but simply because they have never organized their energies around a
> goal.}
>
> Because I want to have the but on the second line, with the rest of the
> text. But this gives:
> Runaway argument?
>
>
> With the definition of \define in MkII the argument of the command can’t
> contain a paragraph, a workaround is to define the \epigraph macro with
>
> \long\def\epigraph#1#2{...}
>
> or to use MkIV.
>

My workaround works, but I should upgrade to MkIV, then I would have more
clear code. I have looked at the upgrade to MkIV, but it seemed much work.
I'll try to make time for it in the weekend.

-- 
Cecil Westerhof

[-- Attachment #1.2: Type: text/html, Size: 1782 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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
___________________________________________________________________________________

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

* Re: Putting citations in an e-book
  2011-03-08 19:39           ` Wolfgang Schuster
  2011-03-08 19:44             ` Cecil Westerhof
@ 2011-03-14 10:43             ` Cecil Westerhof
  1 sibling, 0 replies; 11+ messages in thread
From: Cecil Westerhof @ 2011-03-14 10:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1004 bytes --]

2011/3/8 Wolfgang Schuster <schuster.wolfgang@googlemail.com>

> 2011/3/8 Wolfgang Schuster <schuster.wolfgang@googlemail.com>
>
> \define[2]\epigraph
>>   {\blank
>>    \startframedtext[middle][frame=off,offset=none,width=fit,align=middle]%
>>    \color[darkgreen]{#2}\endgraf
>>    \rightaligned{\it #1}%
>>    \stopframedtext
>>    \blank}
>>
>
> I want to do something like:
> \epigraph{Elbert Hubbard}{
> Many people fail in life, not for lack of ability or brains or even
> courage,
>
> but simply because they have never organized their energies around a
> goal.}
>
> Because I want to have the but on the second line, with the rest of the
> text. But this gives:
> Runaway argument?
>
>
> With the definition of \define in MkII the argument of the command can’t
> contain a paragraph, a workaround is to define the \epigraph macro with
>
> \long\def\epigraph#1#2{...}
>
> or to use MkIV.
>

I am now using MKIV and the problemis solved.

-- 
Cecil Westerhof

[-- Attachment #1.2: Type: text/html, Size: 1760 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 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
___________________________________________________________________________________

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

end of thread, other threads:[~2011-03-14 10:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-08 14:36 Putting citations in an e-book Cecil Westerhof
2011-03-08 15:36 ` Wolfgang Schuster
2011-03-08 16:08   ` Cecil Westerhof
2011-03-08 17:02     ` Cecil Westerhof
2011-03-08 17:25       ` Wolfgang Schuster
2011-03-08 17:41         ` Cecil Westerhof
2011-03-08 18:57         ` Cecil Westerhof
2011-03-08 19:39           ` Wolfgang Schuster
2011-03-08 19:44             ` Cecil Westerhof
2011-03-14 10:43             ` Cecil Westerhof
2011-03-08 15:37 ` Cecil Westerhof

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