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

Issues with new latex style #43

Open
timj opened this issue Dec 7, 2014 · 46 comments
Open

Issues with new latex style #43

timj opened this issue Dec 7, 2014 · 46 comments
Assignees
Labels

Comments

@timj
Copy link
Member

timj commented Dec 7, 2014

In 289b69d SUN/209 was converted to use the new latex style but there are two outstanding problems:

  1. The document comes with private SST-like commands that need to be updated to the new SST look and feel (currently they are squashed together)
  2. There are many unresolved label references that will cause "??" to appear in the HTML version.
@timj timj added the bug label Dec 7, 2014
@timj
Copy link
Member Author

timj commented Dec 8, 2014

SSN/4 has trouble with Figure 2 as well (a latex diagram).

@timj
Copy link
Member Author

timj commented Dec 8, 2014

I should rename this issue to track latex class file issues. SUN/92 has its Figure 1 messed up with the new class (also a latex diagram). Worked fine before I updated it.

@timj timj changed the title SUN/209 (CNF) has issues with new latex style Issues with new latex style Dec 8, 2014
@timj
Copy link
Member Author

timj commented Dec 8, 2014

Many latex documents use a \noteroutine macro for printing out summaries of the API. Would be nice to unify these, maybe creating a \sstnoteroutine and then migrating the documents over.

@MalcolmCurrie
Copy link
Contributor

The subsections of the classified commands in SUN/95 are hard to see.

The size of the SST parameter headings look too small in html. They are
smaller than the description that follows.

@timj
Copy link
Member Author

timj commented Dec 8, 2014

Are they the things that use \noteroutine?

@MalcolmCurrie
Copy link
Contributor

No. I was going by the title.

@timj
Copy link
Member Author

timj commented Dec 9, 2014

SUN/261(IRQ) is okay but @dsberry IRQ_ADDQN talks about IRQ_SETQC which is a subroutine that does not seem to exist (it triggers a latex warning).

@sfgraves
Copy link
Member

sfgraves commented Dec 9, 2014

SUN/92: I think I've fixed the picture issue in commit eabdb70
It just required the unitlength to be set before creating the picture -- this was in one of the sections that starlink_fixup_perl removes.
The appearance in the html output could probably be improved, it looks a bit low-res.

@timj
Copy link
Member Author

timj commented Dec 9, 2014

Also @dsberry, Appendix P is not being created when make_sun238.csh executes in kaplibs.

@sfgraves
Copy link
Member

sfgraves commented Dec 9, 2014

SSN/4 is also fixed I believe (same fix as for SUN/92)

@timj
Copy link
Member Author

timj commented Dec 9, 2014

PS @dsberry I'm explicitly not upgrading the AST documents. I'm leaving those ones to you.

@dsberry
Copy link
Member

dsberry commented Dec 9, 2014

OK - I'll do AST. Do you have a list of standard changes that need to be made to each doc, or do I work it out by looking at the commits you've been making? A cursory glance suggests it's a fairly involved process. BTW - I've made the IRQ and KAPLIBS changes you pointed out.

@sfgraves
Copy link
Member

sfgraves commented Dec 9, 2014

There's a perl script in latexsupport that attempts to remove the most common bits of the prologue and put the correct class and various fix ups in.

I usually run that and then try to run pdflatex and see if it breaks anywhere. Most standard latex should be reasonable. The class file still needs some improvements though.

@timj
Copy link
Member Author

timj commented Dec 9, 2014

regarding the script, you always have to clean up the prologue a bit when you are done and remove the abstract and stuff after scfrontmatter. Not hard though. Then you have to go and sort out any verbatim paragraphs and use small environments rather than \small. Then take a look at the PDF and tweak it a bit.

@timj
Copy link
Member Author

timj commented Dec 9, 2014

@sfgraves we need to address the optional nature of \stardocversion and \stardocmanual. System Notes won't have a \stardocversion because they aren't generally talking about a library or application so it makes no sense. Abstracts are going to get a bit limited as well so we need to make these three items optional.

@MalcolmCurrie
Copy link
Contributor

This terminalv environment has turned each of my multi-line Fortran
code extracts into a single long lines in Redman/Redmond style. Please
@sfgraves can it respect line feeds and indentation.

@timj
Copy link
Member Author

timj commented Dec 10, 2014

@MalcolmCurrie it does act exactly like a verbatim environment so I'm a bit confused. Can you send me an example of something that is not working. I've converted many documents by now and they all use terminalv.

@timj
Copy link
Member Author

timj commented Dec 10, 2014

I've got the PCS docs ready to go pending resolution of the stardocversion and stardocmanual issue. SUN/61 (TRN) is also ported but the conversion to HTML doesn't work properly with the heavy math usage and latex diagrams. I can push what I have of TRN if people want to take a look (it does do the conversion, just not very well).

@sfgraves
Copy link
Member

I've added in a 'noabs' class option, and set stardocversion and stardocmanual to default to a space.
We may want to tweak the title formatting a bit at some point, but this seems to look okay.

If a lot of documents really shouldn't have an abstract, we could also do something more clever and detect if the content of \stardocabstract is blank. Not sure its worth it though.

@sfgraves
Copy link
Member

@timj
I'd be interested in knowing where SUN/61 is breaking, particularly with the maths.

@MalcolmCurrie
Copy link
Contributor

@timj http://www.starlink.ac.uk/devdocs/sun114.htx/node13.html,
but something else has gone wrong with that build in that the
navigation controls are late2xhtml style.

@timj
Copy link
Member Author

timj commented Dec 10, 2014

Note that the old latex2html files are not deleted when you rerun with the new style. node13.html is a latex2html output file isn't it? tex4ht does not use that naming scheme.

@timj
Copy link
Member Author

timj commented Dec 10, 2014

You want this URL: http://www.starlink.ac.uk/devdocs/sun114.htx/sun114se5.html#x6-140007 for that page.

@sfgraves
Copy link
Member

Yup -- if you are in an existing install, there's no process to clean out the old html pages. It looks odd because when you view them you pick up the css from the new version, but the html from the old version.

@MalcolmCurrie
Copy link
Contributor

Yes I hadn't noticed the old style last night, but it was obvious today but got
to the correct version starting from the top (sun114.html).

We need the make world and make install to clean up previous versions.

@timj
Copy link
Member Author

timj commented Dec 11, 2014

@sfgraves for SC/3 487eaf0 I had to use negative \vspace in the title picture element to compensate for the extra space taken up by the lack of software version and manual type.

@timj
Copy link
Member Author

timj commented Dec 12, 2014

@sfgraves I'm looking at SUN/259 (in SMURF) and pdflatex refuses to deal with underscores in equations:

\begin{equation}
MAP\_WDTH \,=\, NO\_Y\_MAP\_PNTS \times CELL\_Y
\end{equation}

The command just hangs there until I ctrl-C:

) [1]^C
! Interruption.
l.335 NSCAN \times NO\_
                       SCAN\_PNTS
? 

If I remove the \_ everything works. Obviously this all worked before I switched to the starlink class. Any thoughts? I'm using:

This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode

@sfgraves
Copy link
Member

Damn, yes, I know what this is.

Previously, we didn't use any hyperrefs inside the latex document, and
the sst routine didn't turn the title of the routine into a label when
running latex. Now of course we are providing hyperlinks inside the pdf,
so I set a label and an xlabel with the name of the title of the routine
(as was always done in html), and all the references link to that

Unfortunately, our routine titles have lots of escaped underscores in
them, and (pdf?)latex can't handle escaped underscores in labels/refs.

I got around this by putting in a line in starstyle.sty to force _ to
be a \string_ , and I think this is now what's breaking _ in math mode.

I think I can fix this in this case easily by adding an 'ifmath' check
to that renewcommand -- I'll commit that now if it works.

I'm a bit worried we'll come up against other issues based on this
though. I'm not sure this method of handling it is really ideal...

@timj
Copy link
Member Author

timj commented Dec 12, 2014

SUN/259 now works for me.

@nxg
Copy link
Contributor

nxg commented Dec 12, 2014

I haven't looked at the style file, to see what's happening where, but if you set \catcode```\_=11 at a suitable place, then underscore will become just a plain character, as opposed to an subscript indicator. However that character won't appear as an actual underscore in a roman font, so there are other games necessary.

If you can prepare a minimal test case, I might be able to work something out.

@timj
Copy link
Member Author

timj commented Dec 30, 2014

As noted in commit 8b70ea0 the description lists and equations on pages 7/8 don't convert to HTML correctly.

@timj
Copy link
Member Author

timj commented Dec 31, 2014

Also, tex4ht seems to ignore angle modifiers to \includegraphics.

@timj
Copy link
Member Author

timj commented Dec 31, 2014

In datacube SUN/237 the enumerated list at the start doesn't come out right in HTML.

@timj
Copy link
Member Author

timj commented Jan 1, 2015

I'm not convinced that calling the standard Starlink figure display command \myfig is a good idea. SC/16 had its own version and that took me a while to work out.

Also, SC/16 has problems in section 5.2 with a terminalv environment suddenly changing itself into math mode when it sees a \[.

@timj
Copy link
Member Author

timj commented Jan 2, 2015

  • I am wondering why terminalv doesn't include a small environment. I end up having to add one for a lot of the output (and SUN/139 CCDPACK needs it) and I'm thinking that a latexonly small would be an appropriate default (although I've now mostly obviated the need for it by adding it manually).
  • Why isn't polka.tex (POLPACK) a SUN?

@timj
Copy link
Member Author

timj commented Jan 4, 2015

SC/9 has an issue with the figures and an issue with the first Display example.

@dsberry
Copy link
Member

dsberry commented Jan 5, 2015

polka.tex is not a sun because it's not a note for users (as in sUN) - it's the source for the polka help system.

@timj
Copy link
Member Author

timj commented Jan 6, 2015

@sfgraves did you change \htmladdnormallink to always write a footnote? That was what \htmladdnormallinkfoot was for. SC/15 is full of footnotes because of this.

@timj
Copy link
Member Author

timj commented Jan 8, 2015

SUN/1 has raised a couple of issues with index creation and labeling of items. Regarding the labeling, it may well be easiest to replace the description lists with normal subsections.

See 65bd8c8

@timj
Copy link
Member Author

timj commented Jan 14, 2015

Remaining documents are AST, TSP and SLALIB. The latter two have their own variants of SST.

@dsberry
Copy link
Member

dsberry commented Jan 14, 2015

I'll add converting the AST docs to my list of things to do in the long
Hilo evenings....

David

On 14 January 2015 at 16:26, Tim Jenness notifications@github.com wrote:

Remaining documents are AST, TSP and SLALIB. The latter two have their own
variants of SST.


Reply to this email directly or view it on GitHub
#43 (comment).

@timj
Copy link
Member Author

timj commented Jan 14, 2015

@dsberry I'm happy to make the attempt if it lets you focus on the AST A&C paper... 😄

@timj
Copy link
Member Author

timj commented Jan 16, 2015

The AST docs were done in 1759d0a but there are issues with the labels (essentially when the name includes parens since \sstlabel can't be used as SST already creates a label).

@sfgraves
Copy link
Member

I was having a bit of trouble identifying all the issues I still need to fix up, so I think I've summarised below everything from this long issue. Please add if I've missed anything that hasn't been fixed already.

Still To Do

  • commit doc on using new style file.
  • Unify \noteroutine, \classitem and \menuitem so there is only command for these & then fix up existing documents and add to latexsupport doc.
  • subsections of the classified commands in SUN/95 are hard to see.
  • The size of the SST parameter headings look too small in html. They are smaller than the description that follows. (They don't look smaller to me -- I'll need some examples of this before I can fix it)
  • optional nature of \stardocversion and \stardocmanual ( SC/3 487eaf0 )
  • SSN/72 in new latex: The description lists with equations on pages 7/8 don't convert properly to HTML. Fixed in 0d55fa9
  • tex4ht seems to ignore angle modifiers to \includegraphics. Instead: update instances of angle modifiers to includegraphics with correctly rotated images...
  • add small environment to terminalv in latex
  • SC/9 has an issue with the figures and an issue with the first Display example. I believe this is fixed in e1149ee
  • SUN/1 has raised a couple of issues with index creation and labeling of items. Regarding the labeling, it may well be easiest to replace the description lists with normal subsections. See 65bd8c8
  • \htmladdnormallink vs \htmladdnormallinkfoot
  • \myfig and \myfigduo are problematic (confugins name, and also breaks star2html's attempt to copy the images)
  • SC/16 has problems in section 5.2 with a terminalv environment suddenly changing itself into math mode when it sees a [. Fixed in 1ba87e8
  • Labels in AST docs (see 1759d0a)
  • Change \sstmacro and \sstmacronolabel to \sstroutine and \sstroutinenolabel (see 64688b9 and associated comments)
  • SUN/61 (in libraries/trn) doesn't work.

@sfgraves
Copy link
Member

Re support of angle modifiers to includegraphics in html output:

I could try and do it using CSS, but from a quick attempt I think it might make the amount of space allocated for the image in html a bit weird. It would be a lot easier if people could rotate the images themselves rather than doing it in tex. There's only about 9 instances of it in our codebase I think, so my plan is to change those rather than support this with tex4ht.

@timj
Copy link
Member Author

timj commented Jan 27, 2015

Noting it in the SUN is fine. I've been de-rotating them as I find them. Just needs a warning so that people don't look at the PDF and assume it's all going to be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants