LyX не может скомпилировать список программ - PullRequest
0 голосов
/ 16 сентября 2018

Я использую LyX, чтобы составить резюме моих лекций.Когда я пытаюсь вставить -> Список программ, он не может скомпилировать файл в PDF, что вызывает следующие ошибки (извините, что я не опубликовал само изображение в посте, он не позволил мне, потому что у меня низкая репутация): введите описание изображения здесь

И я получаю следующий журнал (надеюсь, часть, которую я скопировал, поможет):

! Package Listings Error: direction textdirection unknown.

See the Listings package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.43 ...ror{Listings}{direction #1 unknown}\@ehc}}

Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

Missing character: There is no 
 in font David/OT:mapping=tex-text;!
Missing character: There is no 
 in font David/OT:mapping=tex-text;!
)) (c:/texlive/2018/texmf-dist/tex/xelatex/bidi/loadingorder-xetex-bidi.def
File: loadingorder-xetex-bidi.def 2017/12/29 v0.97 making sure that bidi is the
 last package loaded
Missing character: There is no 
 in font David/OT:mapping=tex-text;!
)
Overfull \hbox (51.3916pt too wide) in paragraph at lines 38--230
[]\TU/David(0)/m/n/10 quit.\bidi@isloadedamsmath \bidi@isloadedamstext \bidi@is
loadedamsthm \bidi@isloadedanimate[]
 []


Overfull \hbox (72.31934pt too wide) in paragraph at lines 38--230
[]\TU/David(0)/m/n/10 \bidi@isloadedbreqn \bidi@isloadedcals \bidi@isloadedcapt
ion \bidi@isloadedcrop \bidi@isloadedcuted[]
 []


Overfull \hbox (16.12793pt too wide) in paragraph at lines 38--230
[]\TU/David(0)/m/n/10 \bidi@isloadedcutwin \bidi@isloadedcolor \bidi@isloadeddb
lfnote \bidi@isloadeddiagbox[]
 []


Overfull \hbox (11.6748pt too wide) in paragraph at lines 38--230
[]\TU/David(0)/m/n/10 \bidi@isloadedxcolor \bidi@isloadedcolortbl \bidi@isloade
dfloat \bidi@isloadedfloatrow[]
 []


Overfull \hbox (24.44336pt too wide) in paragraph at lines 38--230
[]\TU/David(0)/m/n/10 \bidi@isloadedflowfram \bidi@isloadedframed \bidi@isloade
dftnright \bidi@isloadedxltxtra[]
 []


Overfull \hbox (43.3252pt too wide) in paragraph at lines 38--230
[]\TU/David(0)/m/n/10 \bidi@isloadedxunicode \bidi@isloadedwrapfig \bidi@isload
edgraphicx \bidi@isloadedgeometry[]
 []


Overfull \hbox (43.88672pt too wide) in paragraph at lines 38--230
[]\TU/David(0)/m/n/10 \bidi@isloadedhvfloat \bidi@isloadedmdframed \bidi@isload
edmidfloat \bidi@isloadedntheorem[]
 []


Overfull \hbox (73.28613pt too wide) in paragraph at lines 38--230
[]\TU/David(0)/m/n/10 \bidi@isloadedntheorem-hyper \bidi@isloadedhyperref \bidi
@isloadedfancybox \bidi@isloadedfancyhdr[]
 []


Overfull \hbox (53.84766pt too wide) in paragraph at lines 38--230
[]\TU/David(0)/m/n/10 \bidi@isloadedfix2col \bidi@isloadeddraftwatermark \bidi@
isloadedempheq \bidi@isloadedoverpic[]
 []


Overfull \hbox (21.13281pt too wide) in paragraph at lines 38--230
[]\TU/David(0)/m/n/10 \bidi@isloadedpdfpages \bidi@isloadedlistings \bidi@isloa
dedlettrine \bidi@isloadedlineno[]
 []


Overfull \hbox (8.88672pt too wide) in paragraph at lines 38--230
[]\TU/David(0)/m/n/10 \bidi@isloadedmedia9 \bidi@isloadedpstricks \bidi@isloade
dpgf \bidi@isloadedpicinpar[]
 []


Overfull \hbox (10.56152pt too wide) in paragraph at lines 38--230
[]\TU/David(0)/m/n/10 \bidi@isloadedquotchap \bidi@isloadedtikz \bidi@isloadedt
itlesec \bidi@isloadedtitletoc[]
 []


Overfull \hbox (44.44336pt too wide) in paragraph at lines 38--230
[]\TU/David(0)/m/n/10 \bidi@isloadedsubfigure \bidi@isloadedsupertabular \bidi@
isloadedxtab \bidi@isloadedlongtable[]
 []


Overfull \hbox (44.47266pt too wide) in paragraph at lines 38--230
[]\TU/David(0)/m/n/10 \bidi@isloadedarydshln \bidi@isloadedmulticol \bidi@isloa
dedmultienum \bidi@isloadedminitoc[]
 []


Overfull \hbox (29.98047pt too wide) in paragraph at lines 38--230
[]\TU/David(0)/m/n/10 \bidi@isloadednatbib \bidi@isloadednewfloat \bidi@isloade
dragged2e \bidi@isloadedrotating[]
 []


Overfull \hbox (18.33984pt too wide) in paragraph at lines 38--230
[]\TU/David(0)/m/n/10 \bidi@isloadedtabls \bidi@isloadedtabulary \bidi@isloaded
tocbasic \bidi@isloadedtocstyle[]
 []


Overfull \hbox (58.8916pt too wide) in paragraph at lines 38--230
[]\TU/David(0)/m/n/10 \bidi@isloadedtocbibind \bidi@isloadedfontspec \bidi@islo
adedarabxetex \bidi@isloadedpolyglossia[]
 []

\bidi@digits=\count198
\bidi@digits@charclass=\XeTeXcharclass2
\bidi@sepmark@charclass=\XeTeXcharclass3
) (c:/texlive/2018/texmf-dist/tex/latex/polyglossia/cal-util.def
\c@tmpA=\count266
\c@tmpB=\count267
\c@tmpC=\count268
\c@tmpD=\count269
\c@tmpE=\count270
\c@tmpF=\count271
)
\hebrewday=\count272
\hebrewmonth=\count273
\hebrewyear=\count274
\@common=\count275
)
Missing character: There is no 
 in font David/OT:mapping=tex-text;!
Missing character: There is no 
 in font David/OT:mapping=tex-text;!
\l@hebrew = a dialect from \language\l@nohyphenation 
(c:/texlive/2018/texmf-dist/tex/latex/polyglossia/babel-hebrewalph.def
File: babel-hebrewalph.def 2010/03/02 Babel definitions for Hebrew numerals
 Adapted from hebrew.ldf (2005/03/30 v2.3h)
))
Missing character: There is no 
 in font David/OT:mapping=tex-text;!
! Argument of \@gobble has an extra }.
<inserted text> 
                \par 
l.33 \setdefaultlanguage{hebrew}

I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.

Runaway argument?
! Paragraph ended before \@gobble was complete.
<to be read again> 
                   \par 
l.33 \setdefaultlanguage{hebrew}

I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

Missing character: There is no 
 in font David/OT:mapping=tex-text;!
Missing character: There is no 
 in font David/OT:mapping=tex-text;!
! Argument of \lst@MakeCaption has an extra }.
<inserted text> 
                \par 
l.39 \begin{document}

I've run across a `}' that doesn't seem to match anything.
For example, `\def\a#1{...}' and `\a}' would produce
this error. If you simply proceed now, the `\par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.

Runaway argument?
! Paragraph ended before \lst@MakeCaption was complete.
<to be read again> 
                   \par 
l.39 \begin{document}

I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

)
! Incomplete \ifx; all text was ignored after line 39.
<inserted text> 
                \fi 
<*> newfile3.tex

The file ended while I was skipping conditional text.
This kind of error happens when you say `\if...' and forget
the matching `\fi'. I've inserted a `\fi'; this might work.

! Emergency stop.
<*> newfile3.tex

*** (job aborted, no legal \end found)


Here is how much of TeX's memory you used:
 14763 strings out of 492962
 304912 string characters out of 6136967
 428752 words of memory out of 5000000
 18666 multiletter control sequences out of 15000+600000
 532450 words of font info for 38 fonts, out of 8000000 for 9000
 1348 hyphenation exceptions out of 8191
 64i,0n,67p,1030b,443s stack positions out of 5000i,500n,10000p,200000b,80000s
No pages of output.

Я попробовал то, что они сказали: Вставьте программный код в документ Lyx , но это не помогло.

РЕДАКТИРОВАТЬ: Минимальный пример файла, как было сказано в комментариях, создается путем экспорта вывода LaTeX изLyX:

%% LyX 2.3.1 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[english,hebrew]{article}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Times New Roman}
\setsansfont[Mapping=tex-text]{Arial}
\setmonofont{Courier New}
\setlength{\parindent}{0bp}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\newenvironment{lyxcode}
    {\par\begin{list}{}{
        \setlength{\rightmargin}{\leftmargin}
        \setlength{\listparindent}{0pt}% needed for AMS classes
        \raggedright
        \setlength{\itemsep}{0pt}
        \setlength{\parsep}{0pt}
        \normalfont\ttfamily}%
     \item[]}
    {\end{list}}

\makeatother

\usepackage{listings}
\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\setotherlanguage{english}
\addto\captionsenglish{\renewcommand{\lstlistingname}{Listing}}
\addto\captionshebrew{\renewcommand{\lstlistingname}{רישום קוד}}
\renewcommand{\lstlistingname}{רישום קוד}

\begin{document}
\begin{english}%
\begin{lyxcode}
\begin{lstlisting}
x
\end{lstlisting}

\begin{hebrew}%
\end{hebrew}%
\end{lyxcode}
\end{english}

\end{document}

Спасибо за помощь и извините за длинный пост.

...