2

I am using the following packages for my simple document:

\usepackage{newtxtext}
\usepackage{newtxmath} 
\usepackage[T1]{fontenc}
\usepackage[polish]{babel}
\usepackage{xunicode}
\usepackage{xltxtra} 
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}

and to compile I use XeLaTeX. Two questions:

(1) Why I can't use commands like \textbf etc.? What should I modify, load etc.? I need to use Polish characters for my text.

(2) What is the best way to insert pieces of long text, which will be justified and with exuations, within boxes and a colourful backgroud? For that I used \usepackage{tabularx} and the following code, but perhaps there is a better solution:

\begin{flushleft}
\begin{tabularx}{\textwidth}{|X|}
\hline
\cellcolor[rgb]{1,0.5,0}
\noindent Long long line dfs s fs dfs f sf sf sf sf s fsd fsd fsd fsd fsd fds fsd fs fsd fsd fsd fs fs of blah blah that df d fd fd fd f df df dfhjdhjhfjhjdhf d jhd fhd \\
\hline
\end{tabularx}
\end{flushleft}

I searched the forum and the Internet, but no simple answers were found...

Many thanks, Radek

rk85
  • 151

1 Answers1

4

You're using contradicting packages. Here's a correct preamble. Notice that xunicode and xltxtra should not be loaded any more.

\documentclass{article}
\usepackage[polish]{babel}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}

\usepackage{newtxmath} 
\usepackage[no-math]{fontspec}
\setmainfont{TeX Gyre Termes}

\begin{document}

This has \textbf{boldface} and also Polish
characters Ąą Ęę Łł Ńń Óó Śś Źź Żż

Math is in Times $a+b=c$
\end{document}

enter image description here

egreg
  • 1,121,712