Putting citations in an e-book
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
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
2011/3/8 Wolfgang Schuster
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
2011/3/8 Cecil Westerhof
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
Am 08.03.2011 um 18:02 schrieb Cecil Westerhof:
2011/3/8 Cecil Westerhof
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
2011/3/8 Wolfgang Schuster
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
2011/3/8 Wolfgang Schuster
\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
Am 08.03.2011 um 19:57 schrieb Cecil Westerhof:
2011/3/8 Wolfgang Schuster
\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
2011/3/8 Wolfgang Schuster
\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
2011/3/8 Wolfgang Schuster
2011/3/8 Wolfgang Schuster
\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
2011/3/8 Cecil Westerhof
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
participants (2)
-
Cecil Westerhof
-
Wolfgang Schuster