smiths / caseStudies

Case studies of (manual) documentation for scientific computing software
3 stars 2 forks source link

SSP : .tex file for SRS is broken #36

Closed niazim3 closed 6 years ago

niazim3 commented 6 years ago

(Issue #27)

6 errors come up from the line ranges of 1702 to 2564 (https://github.com/smiths/caseStudies/blob/f1a7a499e34775b89265c3f804645ee5a56248c0/CaseStudies/ssp/Documentation%20Files/SRS_SSP.tex#L1705-L2564).

niazim3 commented 6 years ago

This needed to be closed so that work in #84 can be checked. Still do not completely understand use of . in some cases of the equations in latex, but followed this online source.

smiths commented 6 years ago

I can confirm that the tex file also compiles for me. I was not aware that we were using \right without a delimiter. It makes sense though when a conditional situation is introduced with a bracket on the left, but nothing on the right. Out of curiosity, you might want to look at the generated code for the tex for ssp from Drasil. I wonder if the generated code also uses right .?

In LaTeX brackets (like (), [], {}) are put around parts of an equation using \left [ and \right ]. The [ and ] are the delimiters in this particular example. LaTeX will grow the size of the brackets so that they look nice. The commands don't make any sense without a delimiter. I didn't know until you pointed it out, but if you don't have a delimiter you can use . to fill this syntax requirement, but not generate a symbol. \left and \right are also syntactically required to come in pairs. If you have a \left , you need a \right .

niazim3 commented 6 years ago

The generator code (see here) does not use right ., but running the lualatex build commands does not result in errors relating to this either (as seen in the following screenshot). image

smiths commented 6 years ago

The code you pointed to is for equations surrounded by brackets. The case you were highlighting is for when there is only one bracket, like for conditional cases.

I'm not sure about your screenshot. It should error messages in the compilation for GlassBR, but I thought we were talking about SSP? Also, your screen shot shows error messages, but you said that the build command does not result in errors?

niazim3 commented 6 years ago

Apologies, I mixed them up. Unfortunately, I am unable to successfully build SSP's SRS on my local machine. I asked @elwazana to run it on his machine and the error that is output is the same one as GlassBR's (the one about tableofcontents).

smiths commented 6 years ago

You might have a problem because one of the required tex packages is not installed on your computer? You could try googling the error message to see what the problem might be. You could also post the message here, in case any of your colleagues has run into the same problem.

smiths commented 6 years ago

If the situation comes up where you have a LaTeX equation that has multiple cases, rather than use \right ., I suggest using the cases statement. I noticed that it is used in the SWHS example at:

https://github.com/smiths/swhs/blob/cd1df82410fa66f6eb090e52d00dfdd6823c1fbc/docs/SRS/PCM_SRS.tex#L697-L703