Skip to content

Conversation

@ocampana-videotec
Copy link
Collaborator

As we are all aware, the PTZ Service specs cannot be generated with the same tools as for the other documents, but we have to rely on an external editor.

To allow generating the documents with Github actions, while preserving the possibility to edit the equations without a graphic editor, in this PR I propose to use intermediate .svg files generated form MathML, so that the pdf for the PTZ service can be generated.

Workflow

  1. The user creates a .xml file under doc/equations, like this one
  2. The user commits and pushes the file, so that Github actions can generated the correspondent .svg file
  3. The user pull the file from the repo and uses it normaly, as any other image.

@willysagefalk
Copy link
Member

Looks good 👍
The SVG renders fine for me, and the GitHub Actions approach feels like a practical way to handle PTZ equations

@venki5685
Copy link
Contributor

when I open in ptz spec document from ""tc/compile_ptz_service"in browser. It appears like below.

image

@ocampana-videotec
Copy link
Collaborator Author

when I open in ptz spec document from ""tc/compile_ptz_service"in browser. It appears like below.

That has not been touched yet. The first commit only changed 5.7.1.4 Zoom position space in millimeters to show the proposed workflow.

@kieran242
Copy link
Contributor

5.7.1.4

image

if these are the formulas that you are referring to then it renders well. I have seen what @venki5685 reported and was concerned until I read your response.

@ocampana-videotec
Copy link
Collaborator Author

I am observing the rendered content at this URL.

None of the formulas seem to render correctly, neither if the SVG or with embedded MathML

image

The equation surrounded with the red box is the one I changed, that should show this svg image

But the equation in the green box is broken as well, and this has not being touched by my proposal.

@kieran242
Copy link
Contributor

I am observing the rendered content at this URL.

None of the formulas seem to render correctly, neither if the SVG or with embedded MathML

image The equation surrounded with the red box is the one I changed, that should show this [svg image](https://github.com/onvif/specs/blob/tc/compile_ptz_service/doc/equations/PTZ/zoom_magnification_from_focal_length.svg)

But the equation in the green box is broken as well, and this has not being touched by my proposal.

still a bit to look into then :)

@ocampana-videotec
Copy link
Collaborator Author

Small update. the online preview still has the the old code with embedded MathML. I am trying to understand why it did not update. (I rebased to squash branch to have just one commit, this may be the reason why it is not updating any more)

@mfournier-genetec
Copy link
Contributor

With the laterst PR it looks good on my side

@ocampana-videotec
Copy link
Collaborator Author

So, sync was broken and xml needed enhancement as well.

Here is it how it looks like now online, where the equations with the red frame are those fixed by me and the green one is untouched and still broken because of MathML embedded in the xml spec file:

image

And this is how it looks like when exporting the PDF from author

image

I think that with this proposal we get better readability online when developing new specs. The size of the images has still to be twicked.

@@ -0,0 +1,7 @@
# Equation images

This foder holds all the equations used in the specification documents. This is necessary because Apache Fop has issue rendering MathML, which is used the PTZ Service specifications.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo --> folder

@kieran242
Copy link
Contributor

@ocampana-videotec I am seeing no page separation , document contents and the Formulas not rendering. I was comparing the 25.06 PTZ Spec with the Generated on on the Dev Rendering.

image

Should I be looking at a different doc?

@ocampana-videotec
Copy link
Collaborator Author

@ocampana-videotec I am seeing no page separation , document contents and the Formulas not rendering. I was comparing the 25.06 PTZ Spec with the Generated on on the Dev Rendering.

Should I be looking at a different doc?

The formulas should be a bit lower than that image, try to scroll down to §5.7.1.4.

About the page breaks: they are never present when you look at the branches on developer.onvif.org . They are added when generating the PDF file.

@kieran242
Copy link
Contributor

kieran242 commented Dec 19, 2025

@ocampana-videotec I am seeing no page separation , document contents and the Formulas not rendering. I was comparing the 25.06 PTZ Spec with the Generated on on the Dev Rendering.
Should I be looking at a different doc?

The formulas should be a bit lower than that image, try to scroll down to §5.7.1.4.

About the page breaks: they are never present when you look at the branches on developer.onvif.org . They are added when generating the PDF file.

Sorry @ocampana-videotec this is a screen shot from 25.06 containing formulas on that page and on the 25.12 version has them also (I take it that version was generated in the old way.)

image r-attachments/assets/28a7cd6b-02bc-47a6-a0b9-7eed262fea19" /> t; />

@ocampana-videotec
Copy link
Collaborator Author

I completed updating all the equations in the document. There is still pending the choice of the size of the equations. which is purely cosmetical and I think we can defer this to our next F2F meeting.

Please, review both the online preview on developer.onvif.org and the attached generated file (it does not have the draft watermark, to avoid rendering issues)

ONVIF-PTZ-Service-Spec-PR700.pdf

Beyond the cosmetical issue, for me it is ready for inclusion in 26.06

@ocampana-videotec ocampana-videotec marked this pull request as ready for review December 23, 2025 09:36
@HansBusch
Copy link
Member

Propose to defer the change to 26.06 and generate the 25.12 document using oxygen. The formula rendering looks nice but the large size and position issues make most very hard to read.

@ocampana-videotec
Copy link
Collaborator Author

Propose to defer the change to 26.06 and generate the 25.12 document using oxygen. The formula rendering looks nice but the large size and position issues make most very hard to read.

I fully agree, in fact this PR is tagged 26.06 , to have the time to agree on the appearance of the formulas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants