ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Elspeth McGullicuddy <elspethmcgullicuddy@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Difficulties with \startformula
Date: Tue, 14 Jan 2014 00:13:03 +0100	[thread overview]
Message-ID: <CAGMMSTBR9_J0Jxv=UGy8Kr23wrAPcd7R-2hGLVPQN17zeDR=xQ@mail.gmail.com> (raw)

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
___________________________________________________________________________________


             reply	other threads:[~2014-01-13 23:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-13 23:13 Elspeth McGullicuddy [this message]
2014-01-14 17:36 ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGMMSTBR9_J0Jxv=UGy8Kr23wrAPcd7R-2hGLVPQN17zeDR=xQ@mail.gmail.com' \
    --to=elspethmcgullicuddy@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).