Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I realize this is a very specific question about a certain package: texshade, but I also realize that some of the users here also use this package and might be able to help me out

I have made a multiple sequence alignment, and show only the sequence logo:

\documentclass{article}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage{texshade}

\begin{document}
\begin{texshade}{sample.aln}
\setfamily{numbering}{sf}
\setfamily{names}{sf}
\setfamily{residues}{sf}
\setfamily{features}{sf}
\setfamily{featurestyles}{sf}
\setfamily{hideblock}{sf}
\setfamily{legend}{sf}
\hideconsensus
\hidenumbering
\hideseqs
\showsequencelogo{bottom}
\end{texshade}
\end{document}

As you can see in this example I have tried to set every possible font feature to the sans serif font. However the sequence logo itself is still depicted as a rm font. The labels in the logo (such as the word "logo") are correctly changed to the SF font.

I suspect currently loaded mathfont is used to render the sequencelogo?

NOTE:actual fontspec fontselection not shown.

sample ALN file can be downloaded here

share|improve this question
    
Can you turn this into a minimal compilable document (including \documentclass{}, the fontspec code you are using to define fonts, and any other pieces that might be necessary)? Also, if there's code in the example that isn't necessary to show the problem (like the figure environment) it can be removed too. –  Alan Munn May 1 '11 at 16:01
    
done :) It's not a true MWE example however since you dont have the ALN file, but ofcourse every ALN can be used for testing. –  Timtico May 1 '11 at 16:16
    
Since there are more people here who know about XeLaTeX than know about sequencing, where would we find an ALN file as a sample? Can you post a link? –  Alan Munn May 1 '11 at 16:20
    
done, link for sample ALN file is provided –  Timtico May 1 '11 at 16:38
    
Does this file actually compile for you, as is? When I compile it I get a bunch of "command already defined" errors. It only works if I load texshade before fontspec. Also, the logo isn't being set in the \rmdefault font, it's being set in \ttdefault font. –  Alan Munn May 1 '11 at 17:40
show 1 more comment

1 Answer 1

up vote 8 down vote accepted

Wow. 14666 lines of almost undocumented code makes for a debugging headache. The source of your problem is two lines in texshade.sty in which the fontfamily cmss is explicitly called, instead of the \sfdefault. This causes the font to be substituted when used with XeLaTeX. Since these lines are in very large macro definitions, it's not practical to just give you a couple of extra lines to add to your preamble. Instead, make a copy of texshade.sty and place it in your local texmf folder. Then make the following changes:

Line 12833

\fontfamily{\sfdefault}\fontseries{m}\fontshape{n}\selectfont% changed cmss to \sfdefault

Line 14049

\fontfamily{\sfdefault}\fontseries{m}\fontshape{n} % changed cmss to \sfdefault

This should solve the problem. (If for some reason these line numbers don't correspond, you need to change any instances of cmss to \sfdefault in the file.)

Be aware that by using a local copy, any updates to the package will not be reflected in your copy, so if the package changes, you'll need to reapply the fix. (Or better yet, report it to the author, and ask him to make a change.)

share|improve this answer
    
thanks, I will report it to the author, as I think something that is overlooked. It seems you spent some effort in your answer, thanks alot! –  Timtico May 1 '11 at 20:21
    
@Timtico while you're at it, you should also report line 12055: \fontfamily{cmr}. I suspect that this should also be changed to \fontfamily{\rmdefault} for XeLaTeX compatibility too. –  Alan Munn May 1 '11 at 20:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.