Hi again,

The output shows a closing red opening quotation mark, which is the
opposite of what I'd like to achieve. Using \quotation won't work in my
situation because the text mixes and matches numerous types of quotation
marks and the user is writing in Markdown. Matching against “ would work
for most cases; however, the quotation marks could include:

" -- straight quote
“ -- opening curly double quote
‘ -- opening curly single quote (or apostrophe)
« -- opening double quote (French, Spanish, etc.)
‹ -- opening single quote
「 -- opening Japanese quote

% SOT
\protected\def\typo_initial_handle_indeed#1#2%
   {\dontleavehmode
    \begingroup
    \cdef\currentinitial{#1}%
    \setupcurrentinitial[#2]%
    \resetfontfeature % might be needed in more places
    \ifempty{\initialparameter\c!style}%
      \definedfont[\initialparameter\c!font]%
    \else
      \useinitialstyleparameter\c!style
    \fi
    \ifempty{\initialparameter\c!color}%
      \c_attr_color       \attributeunsetvalue
      \c_attr_transparency\attributeunsetvalue
    \else
      \useinitialcolorparameter\c!color
    \fi}

\starttext
  \setupbodyfont[dejavu,9pt]
  \defineinitial[two][m=1,method=auto]

  \setupquotation[symcolor=red]

  \setinitial[two]             Knuth   :\ignorespaces\input knuth \par
  \setinitial[two] \symbol[leftquotation]Knuth\symbol[rightquotation]
:\ignorespaces\input knuth \par
\stoptext
% EOT

This produces:

https://i.ibb.co/P5hDLH5/opening-quote.png

What I'm looking to produce is:

https://i.ibb.co/6PPGxxY/opening-quote-small.png

Using \quotation instead of \symbol[leftquotation] or “ produces a red
closing quote:

https://i.ibb.co/VY1wqZ1/closing-quote-red.png

Any other ideas?

Thank you!
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to