ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Difficulties with \startformula
@ 2014-01-13 23:13 Elspeth McGullicuddy
  2014-01-14 17:36 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Elspeth McGullicuddy @ 2014-01-13 23:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

1- I put here a far too long example to show difficulties that I have
with formulas in conjunction with framed:
I haven't find a way to insert a formula (displaystyle, vertical
mode), at the beginning of a \framed.

2- It might be related with this other thing:
The last examples are about mouse text selection with Okular (haven't
tried with another viewer):

When I "mouse text select" elements of the formula, when the
\startformula \stopformula in embeded in a \hbox, what is highlighted
looks alright. Instead, when it's in "vertical mode", what is
highlighted is very very large.

It's probably not the purpose of pdf documents, but this select (and
copy) feature is very convenient. This feature is rather impinged with
this not so nice looking behavior. Also in these conditions Okular
can't select the text precisely, but instead select a much wider area
of text (one example here does this).

3- When embedded in \hbox (not vertical mode then), the height of
"mouse text section" is alright is formula is 'x+y', but there is an
error if the formula in instead '\int_a^b'.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\starttext

\setupformulas[spacebefore=-1ex]


\framed[width=5cm,align=yes]{%
Hello
}


\framed[width=5cm,align=yes]{%
Hello
\startformula
x+y
\stopformula
}

\framed[width=5cm,align=yes]{%
%Hello
\startformula
x+y
\stopformula
}

\framed[width=5cm,align=yes]{%
\vskip-1.3\baselineskip
\startformula
x+y
\stopformula
}

\framed[width=5cm,align=yes]{%
\hairline
\startformula
x+y
\stopformula
\hairline
}


\hairline
\startformula
x+y
\stopformula
\hairline

\framed[align=yes]{%
\type{\vrule \hrule \vbox $$}\\
\hbox{\vrule{\hsize=7cm\vbox{\hrule
$$
x+y
$$
\input{knuth}
\hrule}}\vrule}}



\framed[align=yes]{%
trying to select the ``x'' in the next formula, select text [\type{he
``xhe \vbox x+ syste conyer and}]\\
\type{\vrule \hrule \vbox \startformula}\\
\hbox{\vrule{\hsize=7cm\vbox{\hrule
\startformula
x+y
\stopformula
\input{knuth}
\hrule}}\vrule}}

\framed[align=yes]{%
\type{\framed \vbox \startformula}\\
\framed{%
{\hsize=5cm\vbox{%
\startformula
x+y
\stopformula
\input{knuth}
}}}}

\framed[align=yes]{%
\type{\framed $$}\\
\framed[align=yes,width=5cm]{%
$$
x+y
$$
\input{knuth}
}}

\startbuffer
\hbox{\vrule\startformula \int_a^b x+y \stopformula}
\stopbuffer

\framed[align=yes]{%
This line generates an error\\
\typebuffer}

\framed[align=yes]{%
When one ``text select'' with mouse with Okular, height of selection
is correct.\\
\hbox{\vrule\startformula x+y \stopformula}}

\framed[align=yes]{%
When one ``text select'' with mouse with Okular, height of selection
is much larger than expected.\\
\startformula x+y \stopformula}



\stoptext

%%%%%%%%%%%%%%%%%%%%

Regards,
Chris
___________________________________________________________________________________
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] 2+ messages in thread

end of thread, other threads:[~2014-01-14 17:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-13 23:13 Difficulties with \startformula Elspeth McGullicuddy
2014-01-14 17:36 ` Hans Hagen

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