Fractions (was \placefigure[location=here...] problem)
anton.chigurh@mail.com schrieb am 09.12.2023 um 14:15:
I worked, ;-), thanks. Let me ask you another thing, how can I avoid messing up the line spacing by using \sqrt and \frac, the line that follows these has increased line spacing in the pdf output
code: Find the normal and shearing stresses on an oblique plane defined by $l=\sqrt{\frac{3}{13}}$, $m=\sqrt{\frac{1}{13}}$, and $n=\sqrt{\frac{9}{13}}$.
Complete working minimal examples are preferred over code snippets. To avoid single lines with different spacing you can either increase the line spacing for all lines with \setupinterlinespace or you use a different fraction command which uses smaller numbers or creates inline fractions. \starttext \startlines \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\xfrac{1}{3}}: \m{\xfrac{1}{3}} \type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}} \type{\tfrac{1}{3}}: \m{\tfrac{1}{3}} \type{\sfrac{1}{3}}: \m{\sfrac{1}{3}} \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\dfrac{1}{3}}: \m{\dfrac{1}{3}} \type{\cfrac{1}{3}}: \m{\cfrac{1}{3}} \type{\vfrac{1}{3}}: \m{\vfrac{1}{3}} \type{\hfrac{1}{3}}: \m{\hfrac{1}{3}} \stoplines \stoptext Wolfgang
Am 09.12.23 um 14:43 schrieb Wolfgang Schuster:
anton.chigurh@mail.com schrieb am 09.12.2023 um 14:15: \startlines \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\xfrac{1}{3}}: \m{\xfrac{1}{3}} \type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}} \type{\tfrac{1}{3}}: \m{\tfrac{1}{3}} \type{\sfrac{1}{3}}: \m{\sfrac{1}{3}} \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\dfrac{1}{3}}: \m{\dfrac{1}{3}} \type{\cfrac{1}{3}}: \m{\cfrac{1}{3}} \type{\vfrac{1}{3}}: \m{\vfrac{1}{3}} \type{\hfrac{1}{3}}: \m{\hfrac{1}{3}} \stoplines
There’s also \vulgarfraction{1}{3} (but probably not suitable for your application). Hraban
Hi Wolfgang,
I'm reading this thread and I'm interested because I type a lot of text
with mathematical formulas.
In fact, I find that \dfrac{} creates unsightly leading space and that
\frac{} is too small. What is the difference between \frac{} and \tfrac{} ?
Fabrice
Le sam. 9 déc. 2023 à 14:00, Henning Hraban Ramm
Am 09.12.23 um 14:43 schrieb Wolfgang Schuster:
anton.chigurh@mail.com schrieb am 09.12.2023 um 14:15: \startlines \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\xfrac{1}{3}}: \m{\xfrac{1}{3}} \type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}} \type{\tfrac{1}{3}}: \m{\tfrac{1}{3}} \type{\sfrac{1}{3}}: \m{\sfrac{1}{3}} \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\dfrac{1}{3}}: \m{\dfrac{1}{3}} \type{\cfrac{1}{3}}: \m{\cfrac{1}{3}} \type{\vfrac{1}{3}}: \m{\vfrac{1}{3}} \type{\hfrac{1}{3}}: \m{\hfrac{1}{3}} \stoplines
There’s also \vulgarfraction{1}{3} (but probably not suitable for your application).
Hraban
___________________________________________________________________________________ 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
___________________________________________________________________________________
Fabrice Couvreur schrieb am 09.12.2023 um 16:13:
Hi Wolfgang, I'm reading this thread and I'm interested because I type a lot of text with mathematical formulas. In fact, I find that \dfrac{} creates unsightly leading space and that \frac{} is too small. What is the difference between \frac{} and \tfrac{} ?
\frac switches the math style while \tfrac (textstyle), \dfrac (displaystyle) and \sfrac (scriptstyle) enforce a certain style. %%%% begin example \startbuffer[frac] \frac{1}{2} + \dfrac{1}{2} - \tfrac{1}{2} + \sfrac{1}{2} \stopbuffer \starttext \startformula \getbuffer[frac] \stopformula \m{\getbuffer[frac]} \startformula \frac {\getbuffer[frac]} {\getbuffer[frac]} \stopformula \m{\frac {\getbuffer[frac]} {\getbuffer[frac]}} \stoptext %%%% end example Wolfgang
On Sat, 9 Dec 2023, Wolfgang Schuster wrote:
\starttext
\startlines \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\xfrac{1}{3}}: \m{\xfrac{1}{3}} \type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}} \type{\tfrac{1}{3}}: \m{\tfrac{1}{3}} \type{\sfrac{1}{3}}: \m{\sfrac{1}{3}} \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\dfrac{1}{3}}: \m{\dfrac{1}{3}} \type{\cfrac{1}{3}}: \m{\cfrac{1}{3}} \type{\vfrac{1}{3}}: \m{\vfrac{1}{3}} \type{\hfrac{1}{3}}: \m{\hfrac{1}{3}} \stoplines
\stoptext
Or, for inline math, $\sqrt{1/3}$. Aditya
On 12/9/2023 4:33 PM, Aditya Mahajan wrote:
On Sat, 9 Dec 2023, Wolfgang Schuster wrote:
\starttext
\startlines \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\xfrac{1}{3}}: \m{\xfrac{1}{3}} \type{\xxfrac{1}{3}}: \m{\xxfrac{1}{3}} \type{\tfrac{1}{3}}: \m{\tfrac{1}{3}} \type{\sfrac{1}{3}}: \m{\sfrac{1}{3}} \type{\frac{1}{3}}: \m{\frac{1}{3}} \type{\dfrac{1}{3}}: \m{\dfrac{1}{3}} \type{\cfrac{1}{3}}: \m{\cfrac{1}{3}} \type{\vfrac{1}{3}}: \m{\vfrac{1}{3}} \type{\hfrac{1}{3}}: \m{\hfrac{1}{3}} \stoplines
\stoptext
Or, for inline math, $\sqrt{1/3}$. radicals are somewhat special to deal with:
- multidimensional delimiter - vertical spacing inside - horizontal spacing oustside - anchoring degrees - left and right radicals - more consistent rules (char based) - size dependent additional spacing (avoid clash) - normalize size across formula - lack of granularity in variants sizes by now we have dealt with all of that (some not in the current release), think of additional control in the engine, compensation for insufficient opentype math features, companion fonts with more sizes there will always be suboptimal cases but the average is ok (we put radical - character kerning on hold because it is a lot of definitions) and we don't want to add hard to fight heuristics so to inline: in most cases the solution that Adirya suggests will work out okay with respect toline spacing Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (6)
-
Aditya Mahajan
-
anton.chigurh@mail.com
-
Fabrice Couvreur
-
Hans Hagen
-
Henning Hraban Ramm
-
Wolfgang Schuster