Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade user's guide #2867

Merged
merged 22 commits into from
Jul 16, 2019
Merged

Upgrade user's guide #2867

merged 22 commits into from
Jul 16, 2019

Conversation

tobolar
Copy link
Contributor

@tobolar tobolar commented Mar 28, 2019

For both Rotational and Translational libraries from Modelica.Mechanics.
This concerns the documentation text itself as well as proper html format (e.g. " instead of ", etc.)

close #2813

@beutlich beutlich added L: Mechanics.Translational Issue addresses Modelica.Mechanics.Translational documentation Issue addresses the documentation labels Mar 29, 2019
@beutlich beutlich added this to the MSL4.0.0 milestone Mar 29, 2019
@beutlich beutlich self-assigned this Mar 29, 2019
@beutlich beutlich added the L: Mechanics.Rotational Issue addresses Modelica.Mechanics.Rotational label Mar 29, 2019
@christiankral
Copy link
Contributor

Unifying the documentation of the MSL is a very extensive task. We still have a lot of very different formats applied to variables in the documentation of the MSL models (and User's Guides). However, I think it does make sense to step by step unify the appearance. In Modelica.UsersGuide.Conventions.Documentation.Format.Equations it is stated that variables shall be typeset in italic (emphasized) font. The following changes are thus not in line: c134d73

Everything else looks good.

@christiankral
Copy link
Contributor

Note the following different formatting examples I found in a quick survey of the different packages:

  • Modelica.Blocks.Continuous.Integrator uses bold and italic for variables
    image
  • Modelica.ComplexBlocks.ComplexMath.Gain used <code> for all variables
    image
  • Modelica.Electrical.Analog.Basic.Resistor is implemented in italic only according to the specification
    image
  • Modelica.Electrical.Machines.BasicMachines.AsynchronousInductionMachines.AIM_SquirrelCage upright font
    image
  • Modelica.Mechanics.Rotational.UsersGuide.ModelingOfFriction uses (now) &quot;
    image
  • Modelica.Mechanics.Rotational.Interfaces.PartialElementaryTwoFlangesAndSupport2 Code segments are written in italic instead of using <code> and only one = is used instead of == as shown in Modelica.UsersGuide.Conventions.Documentation.Format.Cases
    image

@tobolar
Copy link
Contributor Author

tobolar commented Apr 8, 2019

@christiankral Modelica.UsersGuide.Conventions.Documentation.Format.Equations says variables shall be in "italic fonts". This can be achieved either by:

  • <em> - but this is actually an accentuation of the text,
  • <i> - shall be ok, but w3c recommends for HTML5 to use another elements, if possible,
  • <var> - according to w3c this defines a variable.

So I would follow the recommendation and simply use <var> for variables.

@christiankral
Copy link
Contributor

Using <var> sounds very reasonable to me. We could even update the MSL User's Guide stating that <var> is recommended and <em> (which is widely used) is accepted, as <var> definitely refers to variables and <em> is intended to emphasize.

Two more comments here:

  1. So far, many equations have been put under the <em> tag, such as <em>i*R = v</em> in Modelica.Electrical.Analog.Basic.Resistor. The correct way of implementing equations is shown in https://developer.mozilla.org/en-US/docs/Web/HTML/Element/var, so Ohm's law shall be typeset as <var>i</var> * <var>R</var> = <var>v</var>
  2. I am very much in favor of having the documentation of the MSL as uniform as possible, as this makes it look professional and much easier to read. This somehow implies to have more rules being applied to the formatting guidelines of the MSL. Consequently, every new hard rule makes a lot of HTML code of the MSL being "wrong", as may different authors created their documentation in many different ways long time ago. I do not like this either, but it may be the way to go if we stick with HTML. Possibly a markdown language could simplify the text and equation formatting issues, but the conversion effort were tremendous, even if done semi-automatically.

@tobolar
Copy link
Contributor Author

tobolar commented Apr 12, 2019

@christiankral

it is stated that variables shall be typeset in italic (emphasized) font

Shall be done now.

@beutlich
Copy link
Member

I resolved the merge conflicts and clean-up the commit history. @christiankral @AHaumer Please review (again)!

@tobolar Is it intentional that Modelica.Mechanics.Translational.UsersGuide.StateSelection speaks about angles as state variables?

Copy link
Contributor

@christiankral christiankral left a comment

Choose a reason for hiding this comment

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

OK, looks all good.

Copy link
Member

@beutlich beutlich left a comment

Choose a reason for hiding this comment

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

Is it intentional that Modelica.Mechanics.Translational.UsersGuide.StateSelection speaks about angles as state variables?

@beutlich beutlich changed the title Upgrade Users' guide Upgrade User's guide Jun 16, 2019
@beutlich beutlich changed the title Upgrade User's guide Upgrade user's guide Jun 16, 2019
@AHaumer
Copy link
Contributor

AHaumer commented Jun 30, 2019

Well in many components the following is used: SI.AngularVelocity w=der(phi)
Depens on the state selection, but in many cases angles are states (but not the only ones).

@beutlich
Copy link
Member

beutlich commented Jul 6, 2019

Is it intentional that Modelica.Mechanics.Translational.UsersGuide.StateSelection speaks about angles as state variables?

@tobolar Can you please reply on this open comment?

@beutlich
Copy link
Member

Is it intentional that Modelica.Mechanics.Translational.UsersGuide.StateSelection speaks about angles as state variables?

@tobolar Can you please reply on this open comment?

Friendly reminder @tobolar

@tobolar
Copy link
Contributor Author

tobolar commented Jul 16, 2019

@beutlich Fixed now. Thanks!

@beutlich
Copy link
Member

OK, going to merge.

The real issue still is mentioned in #2946 and I'd like to see @tobolar's and @MartinOtter's input there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issue addresses the documentation L: Mechanics.Rotational Issue addresses Modelica.Mechanics.Rotational L: Mechanics.Translational Issue addresses Modelica.Mechanics.Translational
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix documentation of Translational User's Guide
4 participants