ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Typesetting an interview
@ 2018-02-07 16:16 Henning Hraban Ramm
  2018-02-11 13:00 ` Henning Hraban Ramm
  2018-02-11 23:44 ` Wolfgang Schuster
  0 siblings, 2 replies; 3+ messages in thread
From: Henning Hraban Ramm @ 2018-02-07 16:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Ahoi,
I’m trying to typeset an interview and thought, a "description" might be the best setup. But I can’t find the right parameters for the layout I want...
Every contribution should look like:

"""
HHR
   Here’s the text, question or answer.

OTR
   And here’s the next one.
   Might have several lines.
"""

Working example:


\definedescription[Interview][
  headstyle=italic,
  style=normal,
  align=flushleft,
  alternative=hanging,
]

\def\dostartInterview[#1][#2]%
  {\doifsomethingelse{#2}%
    {\startInterview[reference={#1},title={#2}]}%
    {\startInterview[title={#1}]}%
}
\def\startInt{\dodoubleempty\dostartInterview}
\def\stopInt{\stopInterview}


\starttext

\chapter{An Interview}

\startInt[{Hennning Hraban Ramm (HR)}]
This might be a short question or a long response.
Name or initials of the person should stand in their own line (without breaking), while the answer should be indented, without additional paragraph indent.
\stopInt

\startInt[{Hans Hagen (HH)}]
And I’m sure the author has something to say.
\input tufte
\stopInt

\startInt[HR]
\input knuth
\stopInt

\startInt[HH]
\input zapf
\stopInt

\startInt[thankyou][HR]
This might also have a reference.
\stopInt

\stoptext



Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Typesetting an interview
  2018-02-07 16:16 Typesetting an interview Henning Hraban Ramm
@ 2018-02-11 13:00 ` Henning Hraban Ramm
  2018-02-11 23:44 ` Wolfgang Schuster
  1 sibling, 0 replies; 3+ messages in thread
From: Henning Hraban Ramm @ 2018-02-11 13:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

I’d loved to use some clean code, but since I didn’t manage on my own, I resolved to this somewhat ugly setup:

\def\doStartInt[#1]{\testpage[2]%
\noindent\emph{#1}\par\gobblespacetokens%
\startnarrower[left]\noindent\gobblespacetokens}
\def\startInt{\dosingleempty\doStartInt}
\def\stopInt{\stopnarrower\blank[big]}


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

Am 2018-02-07 um 17:16 schrieb Henning Hraban Ramm <texml@fiee.net>:

> Ahoi,
> I’m trying to typeset an interview and thought, a "description" might be the best setup. But I can’t find the right parameters for the layout I want...
> Every contribution should look like:
> 
> """
> HHR
>   Here’s the text, question or answer.
> 
> OTR
>   And here’s the next one.
>   Might have several lines.
> """
> 
> Working example:
> 
> 
> \definedescription[Interview][
>  headstyle=italic,
>  style=normal,
>  align=flushleft,
>  alternative=hanging,
> ]
> 
> \def\dostartInterview[#1][#2]%
>  {\doifsomethingelse{#2}%
>    {\startInterview[reference={#1},title={#2}]}%
>    {\startInterview[title={#1}]}%
> }
> \def\startInt{\dodoubleempty\dostartInterview}
> \def\stopInt{\stopInterview}
> 
> 
> \starttext
> 
> \chapter{An Interview}
> 
> \startInt[{Hennning Hraban Ramm (HR)}]
> This might be a short question or a long response.
> Name or initials of the person should stand in their own line (without breaking), while the answer should be indented, without additional paragraph indent.
> \stopInt
> 
> \startInt[{Hans Hagen (HH)}]
> And I’m sure the author has something to say.
> \input tufte
> \stopInt
> 
> \startInt[HR]
> \input knuth
> \stopInt
> 
> \startInt[HH]
> \input zapf
> \stopInt
> 
> \startInt[thankyou][HR]
> This might also have a reference.
> \stopInt
> 
> \stoptext
> 
> 
> 
> Greetlings, Hraban
> ---
> http://www.fiee.net
> http://wiki.contextgarden.net
> GPG Key ID 1C9B22FD
> 
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Typesetting an interview
  2018-02-07 16:16 Typesetting an interview Henning Hraban Ramm
  2018-02-11 13:00 ` Henning Hraban Ramm
@ 2018-02-11 23:44 ` Wolfgang Schuster
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Schuster @ 2018-02-11 23:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

\definemeasure[interview][3em]

\define[1]\InterviewHeadCommand
   {\offset[x=-\measure{interview}]{#1}}

\definedescription
   [interview]
   [alternative=top,
    headcommand=\InterviewHeadCommand,
    margin=\measure{interview}]

\showframe[text][text]

\starttext

\startinterview{Weisman}
\input weisman
\stopinterview

\startinterview{Ward}
\input ward
\stopinterview

\stoptext

Wolfgang
> Henning Hraban Ramm <mailto:texml@fiee.net>
> 7. Februar 2018 um 17:16
> Ahoi,
> I’m trying to typeset an interview and thought, a "description" might 
> be the best setup. But I can’t find the right parameters for the 
> layout I want...
> Every contribution should look like:
>
> """
> HHR
> Here’s the text, question or answer.
>
> OTR
> And here’s the next one.
> Might have several lines.
> """
>
> Working example:
>
>
> \definedescription[Interview][
> headstyle=italic,
> style=normal,
> align=flushleft,
> alternative=hanging,
> ]
>
> \def\dostartInterview[#1][#2]%
> {\doifsomethingelse{#2}%
> {\startInterview[reference={#1},title={#2}]}%
> {\startInterview[title={#1}]}%
> }
> \def\startInt{\dodoubleempty\dostartInterview}
> \def\stopInt{\stopInterview}
>
>
> \starttext
>
> \chapter{An Interview}
>
> \startInt[{Hennning Hraban Ramm (HR)}]
> This might be a short question or a long response.
> Name or initials of the person should stand in their own line (without 
> breaking), while the answer should be indented, without additional 
> paragraph indent.
> \stopInt
>
> \startInt[{Hans Hagen (HH)}]
> And I’m sure the author has something to say.
> \input tufte
> \stopInt
>
> \startInt[HR]
> \input knuth
> \stopInt
>
> \startInt[HH]
> \input zapf
> \stopInt
>
> \startInt[thankyou][HR]
> This might also have a reference.
> \stopInt
>
> \stoptext
>
>
>
> Greetlings, Hraban
> ---
> http://www.fiee.net
> http://wiki.contextgarden.net
> GPG Key ID 1C9B22FD
>
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________


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

[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2018-02-11 23:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-07 16:16 Typesetting an interview Henning Hraban Ramm
2018-02-11 13:00 ` Henning Hraban Ramm
2018-02-11 23:44 ` 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).