[XeTeX] bidi-problem --> problems with lines not starting in position 1 (even comments)
Herbert Schulz
herbs at wideopenwest.com
Fri Nov 18 23:22:10 CET 2016
> On Nov 18, 2016, at 3:57 PM, Christian Boitet <Christian.Boitet at imag.fr> wrote:
>
> Hi Johann, 18/11/16
>
> I tried with the latest XeLaTeX, using the latest TeXShop and MacTeX distribution under Mac OS El Capitan.
> I put some comments in a file called "[XeTeX] bibi-problem.tex" derived from your e-mail.
>
>
> At the beginning, I could not compile, event when replacing the font "Linux Libertine O" (unknown on Mac) by "Times Roman"
>
> Then I got strange error messages saying "Missing \begin{document}"
>
> I then put a "%" at the beginning of each white line (before the line "\begin{document}")
> TeX still complained: "Missing \begin{document}"
> on the \ DeclareGraphicsExtensions lines below:
>
> \ifpdf
> \DeclareGraphicsExtensions{.png,.pdf,.jpeg,.jpg,.mps}
> \else
> \DeclareGraphicsExtensions{.eps,.ps}
> \fi
>
> until I pushed each of the \DeclareGraphicsExtensions lines to the 1st position:
>
> \ifpdf
> % \DeclareGraphicsExtensions{.png,.pdf,.jpeg,.jpg,.mps}
> \DeclareGraphicsExtensions{.png,.pdf,.jpeg,.jpg,.mps}
> \else
> % \DeclareGraphicsExtensions{.eps,.ps}
> \DeclareGraphicsExtensions{.eps,.ps}
> \fi
>
> Then it compiled, and produced (I hope) what you expected.
>
> Note that I still get an error (but not the same as you) if I enable the bidi package, hence I left the line commented:
>
> %\usepackage{bidi} %% with XeLaTeX,
>
>
> All in an attached archive.
>
> Maybe you are using some "fragile" constructs (see the problems with white lines), or maybe the packages you use are not all compatible or not all in their last version.
> I can't say anything more as this "bidi" package is new to me.
> Dick Koch is a specialist and might give some light on this mystery.
>
> Best,
>
> Xan
>
> <[XeTeX] bidi-problem.zip>
>
>> Le 18 nov. 2016 à 10:49, Johann Spies <johann.spies at alterit.co.za> a écrit :
>>
>> I am working on a document in which I keep notes of my readings. It is a
>> long standing document on which I have been working for the past 20
>> years.
>
>
> ========================================================================
> %!TEX encoding = UTF-8 Unicode
> % Ch.Boitet (Grenoble)
> % Some trials to debug Johann Spies file
> % This file is: [XeTeX] bibi-problem.tex
> % I had to download hevea.sty.
> %
>
>
> %De: Johann Spies <johann.spies at alterit.co.za>
> %Objet: [XeTeX] bidi-problem
> %Date: 18 novembre 2016 à 10:49:08 UTC+1
> %À: <xetex at tug.org>
> %Répondre à: johann.spies at alterit.co.za, "XeTeX \(Unicode-based TeX\) discussion." <xetex at tug.org>
> %
> %I am working on a document in which I keep notes of my readings. It is a
> %long standing document on which I have been working for the past 20
> %years.
> %
> %Some recent update caused this problem:
> %
> %
> %Location on CTAN: /macros/xetex/latex/bidi
> %*
> %* Issue tracker: https://github.com/vafa/bidi/issues
> %*
> %* Support: persian-tex at tug.org
> %****************************************************
> %(/usr/share/texlive/texmf-dist/tex/generic/iftex/iftex.sty)
> %(/usr/share/texlive/texmf-dist/tex/xelatex/bidi/biditools.sty)
> %(/usr/share/texlive/texmf-dist/tex/xelatex/bidi/latex-xetex-bidi.def
> %
> %! LaTeX Error: Command \XeTeX already defined.
> % Or name \end... illegal, see p.192 of the manual.
> %
> %See the LaTeX manual or LaTeX Companion for explanation.
> %Type H <return> for immediate help.
> %
> %
> %I have removed all the includes and some other stuff to be able to show
> %the file to you.
> %
> %When I remove the useage of the bidi package, the compilation ends with:
> %--------------------------------
> %(/usr/share/texmf/tex/latex/tipa/t3cmr.fd)
> %! Missing number, treated as zero.
> %<to be read again>
> % \protect
> %l.104 \begin{document}
> %-------------------------
> %
> %Last time (a few weeks ago) it compiled the more than 500 pages without
> %a problem.
> %
> %I need the bidi package because the document include some Hebrew texts
> %also.
> %
> %What is going on here?
> %
> %Is there a new problem with /usr/share/texmf/tex/latex/tipa/t3cmr.fd
> %also?
> %
> %
> %
> %The file:
>
> \documentclass[12pt,a4paper]{book}
> \usepackage{fontspec} % Gebruik met xelatex
> \usepackage{xltxtra,graphicx} % Gebruik met xelatex
> \usepackage[hyperindex=true,colorlinks=true,bookmarks]{hyperref}
> \usepackage{version}
> \usepackage{amsmath}
> \usepackage{paralist}
> \usepackage{wrapfig}
> \usepackage{caption}
>
> %\setmainfont[Ligatures=TeX]{Linux Libertine O} % TeX complains about white spaces (font not available under Mac OS)
> %\setmainfont[Ligatures=TeX]{"Linux Libertine O"} % TeX said here "Missing \begin{document}"
> \setmainfont[Ligatures=TeX]{Times Roman} % TeX did not complain here with this font
>
> \usepackage[afrikaans,polutonikogreek,german,dutch,english]{babel}
> \usepackage{setspace}
> \usepackage{enumitem}
> \usepackage{graphicx}
> \usepackage{pst-node}
> \usepackage{booktabs}
> \usepackage{natbib}
> \usepackage{imakeidx}
> \usepackage{tikz}
> \usepackage{float}
> \usepackage[framemethod=tikz]{mdframed}
> %
> %\begin{document} % tried here because TeX said here "Missing \begin{document} -- failed"
> %
> \mdfdefinestyle{myFigureBoxStyle}{backgroundcolor=yellow!10,, roundcorner=25pt,tikzsetting={draw=blue, line width=1pt}}%
> \makeatletter
> \newcommand\fs at myRoundBox{\def\@fs at cfont{\bfseries}\let\@fs at capt\floatc at plain
> \def\@fs at pre{\begin{mdframed}[style=myFigureBoxStyle]}%
> \def\@fs at mid{\vspace{\abovecaptionskip}}%
> \def\@fs at post{\end{mdframed}}\let\@fs at iftopcapt\iffalse}
> \makeatother
> %
> \floatstyle{myRoundBox}
> \restylefloat{figure}
> %
> \makeindex[intoc] %
> \bibpunct[:]{(}{)}{;}{a}{}{,}
> \usepackage{multicol}
> \usepackage{longtable,tabularx}
> \usepackage{hevea}
> \renewcommand{\contentsname}{Inhoudsopgawe}
> \renewcommand{\indexname}{Indeks}
> \newcommand{\se}{\selectlanguage{english}}
> \newcommand{\sg}{\selectlanguage{greek}}
> \newcommand{\sa}{\selectlanguage{afrikaans}}
> \newcommand{\sd}{\selectlanguage{german}}
> \newcommand{\sh}{\selectlanguage{dutch}}
> %
> \newcommand{\eng}{\selectlanguage{english}}
> \newcommand{\grieks}{\selectlanguage{greek}}
> \newcommand{\afr}{\selectlanguage{afrikaans}}
> \newcommand{\duits}{\selectlanguage{german}}
> \newcommand{\ned}{\selectlanguage{dutch}}
> \newcommand{\en}{\selectlanguage{english}}
> \newcommand{\gr}{\selectlanguage{greek}}
> \newcommand{\af}{\selectlanguage{afrikaans}}
> \newcommand{\de}{\selectlanguage{german}}
> \newcommand{\nl}{\selectlanguage{dutch}}
> \setlength{\parindent}{0pt} %Maak dat die paragrawe links begin
> \setlength{\parskip}{1ex plus 0.5ex minus 0.2ex} %bepaal oop lyn tussen
> % %paragrawe
> \setlength{\parfillskip}{30pt plus 1 fil}
> \setlength{\columnsep}{1cm}
> \setlength{\columnseprule}{.4pt}
> \setlength{\headheight}{14pt}
> %
> \title{Aanhalings en verwysings}% Declares the document's title.
> %
> \author{J.H. Spies}% Declares the author's name.
> %
> \date{}% Deleting this command produces today's date.
> \selectlanguage{afrikaans}
> \listfiles % lys al die lêers wat gebruik word in die .log-ler.
> \usepackage{fancyhdr}
> \pagestyle{fancyplain}
> \lfoot{\tiny \jobname}
> \lhead{}
> \rhead{}
> \renewcommand{\headrulewidth} {0pt}
> \makeatletter
> \renewcommand{\theenumii}{\arabic{enumii}}
> \renewcommand{\labelenumii}{\theenumi.\theenumii.}
> \renewcommand{\theenumiii}{\arabic{enumiii}}
> \renewcommand{\labelenumiii}{\theenumi.\theenumii.\theenumiii.}
> \renewcommand{\theenumiv}{\arabic{enumiv}}
> \renewcommand{\labelenumiv}{\theenumi.\theenumii.\theenumiii.\theenumiv.}
> \renewcommand{\p at enumii}{\theenumi.} %Companion bladsy 56,57
> \renewcommand{\p at enumiii}{\theenumi.\theenumii.}
> \renewcommand{\p at enumiv}{\theenumi.\theenumii.\theenumiii.}
> \makeatother
> \usepackage{ifpdf}
> \ifpdf
> % \DeclareGraphicsExtensions{.png,.pdf,.jpeg,.jpg,.mps}
> \DeclareGraphicsExtensions{.png,.pdf,.jpeg,.jpg,.mps}
> \else
> % \DeclareGraphicsExtensions{.eps,.ps}
> \DeclareGraphicsExtensions{.eps,.ps}
> \fi
> %\usepackage{bidi} %% with XeLaTeX,
> %
> \newcommand{\lk}[3]{\hspace{0.#1\linewidth}\parbox{0.#2\linewidth}{\raggedright #3}}
> \renewcommand{\blue}[1]{\textcolor{blue}{#1}}
> \newcommand{\grn}[1]{\textcolor{green}{#1}}
> \newcommand{\oranje}[1]{\textcolor{orange}{#1}}
> \newcommand{\brwn}[1]{\textcolor{brown}{#1}}
> \newcommand{\rd}[1]{\textcolor{red}{#1}}
> \newcommand{\purp}[1]{\textcolor{purple}{#1}}
> \newcommand{\yel}[1]{\textcolor{yellow}{#1}}
> \renewcommand{\mag}[1]{\textcolor{magenta}{#1}}
> %
> %
> %
> \begin{document}
> \af
> \maketitle
> \thispagestyle{fancyplain}
> \tableofcontents
> \lfoot{\tiny \jobname}
> \chapter{Algemene wyshede}
>
> ``Alleen 'n teologie wat uit die openbaring\index{openbaring} vertrek,
> kan bevrydend wees. Elke vorm van subjektivisme\index{subjektivisme}
> voer terug na 'n vorm van bedompigheid, omdat dit die mens werp op
> homself en sy eie ervaring, in plaas daarvan dat dit hom op Christus
> werp'' \cite[167,168]{jonker_gees_1981}.
>
> \renewcommand{\labelenumi}{\theenumi.}
> \selectlanguage{afrikaans}
> \newpage
> \end{document}
>
> %%% Local Variables:
> %%% coding: utf-8
> %%% mode: latex
> %%% TeX-engine: xelatex
> %%% TeX-master: t
> %%% End:
>
> %Regards
> %Johann
> %--
> %J.H. Spies - Tel. 021-982 2694 / 082 782 0336 / 021-808 4699(w)
> % Posbus 4668, Tygervallei 7536
> %
> % "For by grace are ye saved through faith; and that not
> % of yourselves: it is the gift of God: Not of works,
> % lest any man should boast." Ephesians 2:8,9
> %
> %
> %--------------------------------------------------
Howdy,
I don't know if it applies here but I thought most folks use polyglossia rather than bidi with xelatex.
Good Luck,
Herb Schulz
(herbs at wideopenwest dot com)
More information about the XeTeX
mailing list