[XeTeX] Beginner questions

Peter Dyballa Peter_Dyballa at Web.DE
Sat Oct 30 11:55:06 CEST 2010


Am 29.10.2010 um 23:51 schrieb André Bellaïche:

> I have looked into changebar.sty, and it does not seems to be easy  
> to replace the Postscript commands by a simple command drawing an  
> hrule or a vrule.


André,

if you need to compare two XeLaTeX files, then you don't need the  
fancy XeLaTeX or, better, system fonts to show these differences or  
changes. If you make that XeLaTeX source bi-lang, add to it a preamble  
for pdfLaTeX in UTF-8 encoding, then you should be able to use  
changebar.sty with, for example, Times or Helvetica or Latin Modern.


Vafa Khalighi's iftex package might be helpful to activate either this  
or that preamble. An UTF-8 enabled LaTeX preamble could be:

	\else
		\immediate\write16{==We're without XeTeX==}
	  \usepackage{cmap}
	  \usepackage[T1]{fontenc}
	%%%%\renewcommand{\sfdefault}{pag}
	%%%%\renewcommand{\rmdefault}{ppl}
	%%%%\renewcommand{\ttdefault}{pcr}
	  \usepackage[utf8]{inputenc}
	  \usepackage{fixltx2e}
	  \usepackage{lm}	%times,helve,
	  \usepackage[unicode]{hyperref}
	%  \DeclareGraphicsExtensions{.pdf,.png,.jpeg}		% allowed graphics  
formats
	 \ifPDFTeX
		\immediate\write16{==\jobname: Bonjour, PDF!==}
	    \usepackage[activate={true,nocompatibility},verbose=true] 
{microtype}
	%    \usepackage[protrusion=true,expansion=true]{microtype}
	 \else
		\immediate\write16{==¡Hola \jobname: DVI!==}
	%  \DeclareGraphicsExtensions{.ps,.eps}			% allowed graphics formats
	  \usepackage[protrusion=true,expansion=false]{microtype}
	  \fi
	  \makeatletter
	  \newcommand*\TeX at logo@spacing[6]{		% Provide outside XeTeX its logos
	    \def\xxt at kern@Te{#1}%
	    \def\xxt at kern@eX{#2}%
	    \def\xxt at lower@e{#3}%
	    \def\xxt at kern@La{#4}%
	    \def\xxt at kern@aT{#5}%
	    \def\xxt at kern@eL{#6}%
	  }
	  \DeclareRobustCommand\XeTeX{%
	    \leavevmode
	    \smash{%
	      X\lower\xxt at lower@e
	      \hbox{\kern\xxt at kern@eX
	        \setbox0=\hbox{E}\dimen0=\ht0\advance\dimen0by\dp0%
	        \reflectbox{E}%
	     }\kern\xxt at kern@Te\TeX}}%
	  \DeclareRobustCommand\XeLaTeX{%
	    \leavevmode
	    \smash{%
	      X\lower\xxt at lower@e
	      \hbox{\kern\xxt at kern@eX
	        \setbox0=\hbox{E}\dimen0=\ht0\advance\dimen0by\dp0\relax
	        \reflectbox{E}%
	    }\kern\xxt at kern@eL\LaTeX}}
	  \TeX at logo@spacing{-0.15em}{-0.125em}{0.5ex}{-0.36em}{-0.12em} 
{-0.13em}
	  \makeatother
	\fi
	
	\newcommand*{\Titel}[2]{%
	  \begingroup
	    #1
	    \ifXeTeX
	      \fontspec[LetterSpace=25,WordSpace=1.875]{Lucida Bright}
	      \textcolor{Maroon}{#2}%
	    \else
	      \ifPDFTeX
	        \textcolor{Maroon}{\textls[250]{#2}}%
	      \else
	        \textcolor{Maroon}{\so{#2}}%
	      \fi
	    \fi
	  \endgroup
	}


--
Greetings

   Pete
You can never know too little of what is not worth knowing at all.
			– Anon.




More information about the XeTeX mailing list