SWP 6.0.29 Bold cross-references

jm's picture

I have been unable to get SWP 6.0.29 to put cross references in boldface type. See the attached document for an example.

Is this a bug? Or is there some way of putting cross-references in bold that I have not discovered?

SWP6029BoldCrossRefs.sci121.58 KB
pviton's picture

See also

See also


(which tend to advise against this, typographically speaking).

Still, from this, a quick-and-dirty solution, which doesn't have you futzing around in SourceView would be to put into the preamble (or into a package which you then load via \usepackage, but remember that unlike SWP5, you need to refresh the database before that becomes usable)


Of course, this is only useful if you want all your cross-refs to have this form.

From what I see, Version 6

From what I see, Version 6 does not allow applying bold (and probably other text tags) to cross references or citations (and probably other similar objects).  There are two work arounds.

The first would be to switch to Source view and edit the xhtml tags.  Highlight the bolded text in the body of the document and then click the Source tab.  This will then highlight the corresponding text in the source view, along with the xhtml tags.  In your example, the source view would show:
<bold>refer to Definition </bold><xref key="Definition"
href="Definition" reftype="obj"/><bold> in bold</bold>

Notice that around the cross reference (<xref> tag) the bold tag is closed and then again opened.  Deleting the close and open would add the cross reference to the bolded text.  That is, change the above to:
<bold>refer to Definition <xref key="Definition"
href="Definition" reftype="obj"/> in bold</bold>

The second work around would be to insert the cross reference in a TeX field where the bold text tag would be applied.  For your example, the contents of the TeX field would be: \textbf{\ref{Definition}}

Attached is a modified version of your sample document that shows both solutions.

I will report not being able to tab these objects to the development team.


The issue reported in the

The issue reported in the thread was corrected with the release of Version 6.0.30.

jm's picture

I noticed that the release

I noticed that the release notes for the update to SWP 6.0.30 said that the issue in this thread had been corrected. But that doesn't seem to be the case with my setup running macOS Mojave 10.14.5.

To check this out, I created the attached document starting with a new Blank LaTeX Article shell (so no legacy effects from old documents), inserted a display, added a cross reference to it, and then added a bold tag. No matter how I try to add the bold tag (to the cross-reference only or to the text surrounding it as well), the cross-reference 1 doesn't come out bold in the PDF.

Or have I missed some way to make the cross-reference bold?

Try deleting the file

Try deleting the file comp-latex.xsl in your profile directory (see https://www.mackichan.com/techtalk/v60/profiles.htm to locate the profile directory) and then try previewing again.  Deleting the file is enough for it to get rebuilt, so exiting SWP is not necessary.

I think this will be sufficient, but please report on your results.

jm's picture

I did as you suggest but it

I did as you suggest but it made no difference on my system running macOS Mojave 10.14.5.

I had not expected simply previewing again to work because the cross-reference does not appear in bold on the Normal view screen. So I tried changing the cross-reference to bold again on the Normal view screen but it doesn't appear bold there or in the PDF.

I then tried adding the bold tag to the cross-reference in the XHTML file directly in Source view. The cross-reference then appears in bold both on the SWP screens and in the PDF. So the bug seems to be that SWP does not allow me to apply a bold tag to the cross-reference by using either the B button or the drop down list of formatting tags. But if I add the bold tag in Source view, SWP recognises it.

I attach two .sci files, the original one I used to report the problem SWP6030BoldCrossRef.sci and a second one SWP6030BoldCrossRef2.sci in which I have edited the XHTML in Source view to include the cross reference in the bold tag. The former I created by highlighting the sentence "Refer to equation Cross ref: Eq 1." and bolding it using the B button. In the XHTML file this results in a /bold tag before the cross reference and a new bold tag after it. In the latter, I simply took out the /bold tag before the cross-reference and the bold tag after it.

Can you reproduce this?

The file I had asked you to

The file I had asked you to delete has to do with the LaTeX that is generated from the xhtml.  However, it's really that the xhtml isn't being created properly.  I think the easiest route is to delete your current profile directory and allow it to be recreated.

The profile directory typically holds the licesne file, so you will have to save the license file and restore it, or activate again after deleting the profile directory, or move the license file to the executable directory.  See http://support.mackichan.com/support/solutions/articles/6000052154-activ... if you want to move your license file to the executable directory.

Exit SW, delete the profile directory, then restart SW (and deal with licensing).  You should then be able to tag cross references as bold.

jm's picture

Many thanks for the

Many thanks for the suggestion. That has sorted the problem.

See if that also solved some

See if that also solved some of the screen oriented issues such as integral or brackets display.  The find/replace and sectioning issues would not have changed (as far as I know).

jm's picture

Thanks for the suggestion.

Thanks for the suggestion. The issue I reported in topic SWP 6.0.29 Integral Bug does not now arise when I start a new document and recreate the expression from scratch. The issue still arises though when I edit the document attached to that topic even though the screen appearance is identical, so there must be something document dependent, not just screen dependent, about it. But at least it should not occur with new files I create.

I will check out other issues as I work with SWP 6.0.30.

A general point: should I be deleting the profile each time I install an update for SWP 6?