Git Product home page Git Product logo

Comments (13)

Intelligent2013 avatar Intelligent2013 commented on September 24, 2024
page comment to fix
61 side note: "IAU Trans." in italics adoc
61 last side note: wrong reference, should be Page 61 (the same page) adoc
63 Resolutions 8 and 9: replace "remarque" par "note" xslt
63 Resolutio 10: change "remarque" to a side note adoc
63 Resolution 3: no text in bold adoc
63 Resolution 3: side notes (1)and (2) no line break between value and unit. adoc
67 2nd line: isolated » at beginning of line adoc
70 change "remarque" following table into side note adoc
71 Resolution 12, second bullet point: μ not in italics adoc
72 bullet point (a): l in italics adoc
73 list following "recommade": μ not in italics adoc
73 1st side note: Metrologia in italics adoc
73 2nd side note: J. Radiol. Prot. In italics adoc
73 last bullet point: isolated » at beginning of line adoc
74 3rd line below equation: "decide" in bold adoc
74 CIPM 2003: Metrologia in italics adoc
74 CIPM 2003: 2nd bullet point from end: μ not in italics adoc
75 CIPM 2005: list needs to be split in two, following "considérand" and "décide" adoc
75 CIPM 2005: group numbes following the decimal separator in groups of three adoc
76 1st bullet point : group numbes following the decimal separator in groups of three adoc
76 REcommandation3: μ not in italics adoc
77 2nd bullet point following "recommande": change to 5s 2S1/2– 4d 2D5/2 adoc
77 3rd bullet point: change to 5d10 6s 2S1/2(F = 0) – 5d9 6s2 2D5/2(F = 2) adoc
77 3rd bullet point: Hg not in italics adoc
77 4th bullet point: change to 6s 2S1/2(F = 0) – 5d 2D3/2(F = 2) adoc
77 4rd bullet point: Yb not in italics adoc
77 5th bullet point: change to 5s2 1S0 – 5s 5p 3P0 adoc
77 Recommandation 1: μ not in italics adoc
78 Resolutio 10:group numbes following the decimal separator in groups of three adoc
80 CIPM 2009: isolated » at beginning of line adoc
80 1st bullet point following "recommande": change to 5s2 1S0 – 5s 5p 3P0 adoc
80 2nd bullet point: change to 5s2 1S0 – 5s 5p 3P0 adoc
80 3rd bullet point: 4s 2S1/2– 3d 2D5/2 adoc
80 4th bullet point: 2S1/2 (F = 0) – 2F7/2(F = 3, mF = 0) adoc
80 5th bullet point: 6s2 1S0 (F = 1/2) – 6s 6p 3P0 (F = 1/2) adoc

from bipm-si-brochure.

manuelfuenmayor avatar manuelfuenmayor commented on September 24, 2024

61 | side note: "IAU Trans." in italics | adoc

63 | Resolution 3: no text in bold | adoc

63 | Resolution 3: side notes (1)and (2) no line break between value and unit. | adoc

67 | 2nd line: isolated » at beginning of line | adoc

72 | bullet point (a): l in italics | adoc

73 | 1st side note: Metrologia in italics | adoc

73 | 2nd side note: J. Radiol. Prot. In italics | adoc

73 | last bullet point: isolated » at beginning of line | adoc

74 | 3rd line below equation: "decide" in bold | adoc

74 | CIPM 2003: Metrologia in italics | adoc

75 | CIPM 2005: list needs to be split in two, following "considérand" and "décide" | adoc

77 | 3rd bullet point: Hg not in italics | adoc

77 | 4rd bullet point: Yb not in italics | adoc

80 | CIPM 2009: isolated » at beginning of line | adoc

All fixed.

63 | Resolutio 10: change "remarque" to a side note | adoc

I have moved the note to a footnote inside the table:

[cols="<,<,<",options="unnumbered"]
|===
| Facteur par lequel l’unité est multipliée | Préfixe | Symbole
| stem:[10^(15)] | peta footnote:[En français, il est d’usage courant de mettre un accent à péta.] | stem:["P"]
| stem:[10^(18)] | exa | stem:["E"]
|===

70 | change "remarque" following table into side note | adoc

Same as above.
Relocate note block position to a footnote inside the table. Fixed.

75 | CIPM 2005: group numbes following the decimal separator in groups of three | adoc

76 | 1st bullet point : group numbes following the decimal separator in groups of three | adoc

78 | Resolutio 10:group numbes following the decimal separator in groups of three | adoc

Suposed to be handled automatically.

71 | Resolution 12, second bullet point: μ not in italics | adoc

73 | list following "recommade": μ not in italics | adoc

74 | CIPM 2003: 2nd bullet point from end: μ not in italics | adoc

76 | REcommandation3: μ not in italics | adoc

77 | Recommandation 1: μ not in italics | adoc

Not fixable by markup.

61 | last side note: wrong reference, should be Page 61 (the same page) | adoc

@Intelligent2013, I believe this is a problem of cross-reference definition.

...
. de donner une définition du Temps atomique international;
footnote:[La définition du TAI a été donnée par le CCDS en 1970 (maintenant renommé CCTF), _voir_ <<ccds-tai-definition>>]
...

I've redifined <<ccds-tai-definition>> as <<ccds-tai-definition_s2,Recommandation S 2>> which points directly to ==== Recommandation S 2 instead of === Définition du TAI (PV, 38, 110-111 et _Metrologia_, 1971, 7, 43). Would that be enough to display the correct page number?

77 | 2nd bullet point following "recommande": change to 5s 2S1/2– 4d 2D5/2 | adoc

77 | 3rd bullet point: change to 5d10 6s 2S1/2(F = 0) – 5d9 6s2 2D5/2(F = 2) | adoc

77 | 4th bullet point: change to 6s 2S1/2(F = 0) – 5d 2D3/2(F = 2) | adoc

77 | 5th bullet point: change to 5s2 1S0 – 5s 5p 3P0 | adoc

80 | 1st bullet point following "recommande": change to 5s2 1S0 – 5s 5p 3P0 | adoc

80 | 2nd bullet point: change to 5s2 1S0 – 5s 5p 3P0 | adoc

80 | 3rd bullet point: 4s 2S1/2– 3d 2D5/2 | adoc

80 | 4th bullet point: 2S1/2 (F = 0) – 2F7/2(F = 3, mF = 0) | adoc

80 | 5th bullet point: 6s2 1S0 (F = 1/2) – 6s 6p 3P0 (F = 1/2) | adoc

@opoudjis, maybe this has to do with your concern of using Chemistry symbols in math expressions. These equations are rendering fine in HTML but not in PDF. For example in the first case,

eq-original

the markup used is:

stem:[5"s" " "^2"S"_(1//2) – 4"d" " "^2"D"_(5//2)]

which renders in HTML like:

eq-html

and, in PDF:

eq-pdf

Now, a workaround (that @ronaldtse doesn't like) is to profane the semantics and write 5s ^2^S~1/2~ - 4d ^2^D~5/2~, or, I think I could make a mixture between inline stems and normal text, but it would look really messy.

from bipm-si-brochure.

opoudjis avatar opoudjis commented on September 24, 2024

This is doing my head in. :-)

If the same input looks ok in HTML and not PDF, that indicates that jEuclid is having trouble with the existing MathML. So I will need input from @Intelligent2013. But although all our lives would be easier avoiding AsciiMath/MathML for these expressions, that is not the direction we are going. So waiting for feedback from Alex on this.

from bipm-si-brochure.

Intelligent2013 avatar Intelligent2013 commented on September 24, 2024

Regarding the first case:

77 | 2nd bullet point following "recommande": change to 5s 2S1/2– 4d 2D5/2 | adoc

In resulted PDF I see:

изображение

Specified location:
изображение

Source xml:

<math xmlns="http://www.w3.org/1998/Math/MathML">
	<mn>5</mn>
	<mtext>s</mtext>
	<msup>
		<mrow>
			<mtext> </mtext>
		</mrow>
		<mrow>
			<mn>2</mn>
		</mrow>
	</msup>
	<msub>
		<mrow>
			<mi>S</mi>
		</mrow>
		<mrow>
			<mrow>
				<mn>1</mn>
				<mtext>/</mtext>
				<mn>2</mn>
			</mrow>
		</mrow>
	</msub>
	<mi>–</mi>
	<mn>4</mn>
	<mtext>d</mtext>
	<msup>
		<mrow>
			<mtext/>
		</mrow>
		<mrow>
			<mn>2</mn>
		</mrow>
	</msup>
	<msub>
		<mrow>
			<mtext>D</mtext>
		</mrow>
		<mrow>
			<mrow>
				<mn>5</mn>
				<mtext>/</mtext>
				<mn>2</mn>
			</mrow>
		</mrow>
	</msub>
</math>

As I undestood, jEuclid can't display superscripted 2 if previous char is non-break space or empty:

	<msup>
		<mrow>
			<mtext> </mtext>
		</mrow>
		<mrow>
			<mn>2</mn>
		</mrow>
	<msup>
		<mrow>
			<mtext> </mtext>
		</mrow>
		<mrow>
			<mn>2</mn>
		</mrow>
	</msup></msup>

Can we move preceding <mtext>s</mtext> and <mtext>d</mtext> inside msup/mrow via stem markup?
I.e. change stem for resulted XML:

<math xmlns="http://www.w3.org/1998/Math/MathML">
	<mn>5</mn>	
	<msup>
		<mrow>
			<mtext>s </mtext>
		</mrow>
		<mrow>
			<mn>2</mn>
		</mrow>
	</msup>
	<msub>
		<mrow>
			<mi>S</mi>
		</mrow>
		<mrow>
			<mrow>
				<mn>1</mn>
				<mtext>/</mtext>
				<mn>2</mn>
			</mrow>
		</mrow>
	</msub>
	<mi>–</mi>
	<mn>4</mn>	
	<msup>
		<mrow>
			<mtext>d</mtext>
		</mrow>
		<mrow>
			<mn>2</mn>
		</mrow>
	</msup>
	<msub>
		<mrow>
			<mtext>D</mtext>
		</mrow>
		<mrow>
			<mrow>
				<mn>5</mn>
				<mtext>/</mtext>
				<mn>2</mn>
			</mrow>
		</mrow>
	</msub>
</math>

I so, then in resulted PDF will be:
изображение

Second proposal - use MathJax instead of jEuclid in mn2pdf. But I need to check how it's possible at all or not...

from bipm-si-brochure.

opoudjis avatar opoudjis commented on September 24, 2024

Again, semantics is preventing this: (2S1/2) is a single thing.

Our problem is that we're abusing MathML to encode chemical symbols, and while I'm getting away with it in MathJax, you're not in jEuclid.

Manipulating the MathML in the general case looks tricky: presumably, it's going to be something like:

... sorry, @Intelligent2013, I'm writing this in Nokogiri, because XSLT is something I never got comfortable with in the past 20 years:

doc.xpath('//msup[*[1][normalize-space() = ""]').each do |x|
  if p = x.previous_element
    x.elements.first.replace(p.remove)
  else
    # the <sup>y</sup>x is the first thing in the MathML
    .... ??
  end
end

A MathML expression starting with yx is certainly possible if we're doing chemistry in MathML, and moving preceding elements around is not going to deal with it. If there is any blank character that jEuclid will allow to take a superscript, we need it...

from bipm-si-brochure.

Intelligent2013 avatar Intelligent2013 commented on September 24, 2024

I've tried all kind of spaces in <mtext> and no success. jEuclid can't evaluate the height of preceding space and therefore put superscripted text on the baseline. BUT I've found a workaround solution - replace mtext to mspace like this:

  • <mtext> </mtext> -> <mspace width="0.5ex" height="1ex"/>
  • <mtext/> -> <mspace height="1ex"/>

In this case the resulted PDF is:
изображение

I'll try to do it via xslt.
And may be it is possible to fix alignment issue with exponent with using <mspace height="1ex"/> also...

from bipm-si-brochure.

Intelligent2013 avatar Intelligent2013 commented on September 24, 2024

Issue with the preceding superscripted text fixed in metanorma/mn-native-pdf@8bcd034.

Updated equations looks ok:
si-brochure-fr.presentation.mtext.pdf

from bipm-si-brochure.

opoudjis avatar opoudjis commented on September 24, 2024

@Intelligent2013 The proper solution in MathML, I have found, is to use <mphantom/> instead of <mtext/>, and I may end up replacing <mtext/> or <mtext> </mtext> with <mphantom/> in postprocessing. In case I do, could you ensure that mphantom is also processed like mspace in the PDF?

from bipm-si-brochure.

Intelligent2013 avatar Intelligent2013 commented on September 24, 2024

@opoudjis Empty mphantom doesn't processing at all in jEuclid.
This xml:

<math xmlns="http://www.w3.org/1998/Math/MathML">
	<mn>5</mn>
	<mtext>s</mtext>
	<msup>
		<mrow>
			<mphantom/>
		</mrow>
		<mrow>
			<mn>2</mn>
		</mrow>
	</msup>
	<msub>
		<mrow>
			<mi>S</mi>
		</mrow>
		<mrow>
			<mrow>
				<mn>1</mn>
				<mtext>/</mtext>
				<mn>2</mn>
			</mrow>
		</mrow>
	</msub>
	<mi>–</mi>
	<mn>4</mn>
	<mtext>d</mtext>
	<msup>
		<mrow>
			<mphantom/>
		</mrow>
		<mrow>
			<mn>2</mn>
		</mrow>
	</msup>
	<msub>
		<mrow>
			<mtext>D</mtext>
		</mrow>
		<mrow>
			<mrow>
				<mn>5</mn>
				<mtext>/</mtext>
				<mn>2</mn>
			</mrow>
		</mrow>
	</msub>
</math>

shows as:
изображение

In this case I have to change <mphantom/> via xslt on-fly to <mspace height="1ex"/>.

from bipm-si-brochure.

opoudjis avatar opoudjis commented on September 24, 2024

Ouch. OK. I will not use mphantom. In fact, it sounds like I will need to universally do that change in PresentationXML, if I do use mphantom in the source XML.

from bipm-si-brochure.

manuelfuenmayor avatar manuelfuenmayor commented on September 24, 2024

Based on the latest PDF provided by @opoudjis: si-brochure-fr(12-01).pdf

All the issues listed above are fixed.
However, there is an additional issue that wasn't before:

capture3

In page 73, Greek letters are used to number list items (as reported in #47).

from bipm-si-brochure.

Intelligent2013 avatar Intelligent2013 commented on September 24, 2024

In page 73, Greek letters are used to number list items (like reported in #47).

This issue was fixed in metanorma/mn-native-pdf#288.

from bipm-si-brochure.

anermina avatar anermina commented on September 24, 2024

Having this issue fixed, it seems everything is solved. Closing.

from bipm-si-brochure.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.