2

I'm trying to create a wrap-float but even if there's nothing in the text it won't work. I'm using LyX 2.0.5.1. This is my MWE:

% Preview source code

%% LyX 2.0.5.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[T1]{fontenc}
\usepackage[latin9,cp1255]{inputenc}
\usepackage{float}
\usepackage{wrapfig}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\usepackage{theorem}
\theorembodyfont{\upshape}
\newtheorem{theorem}{\R{משפט}}[section]
\AtBeginDocument{\make@lr\thetheorem}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{fullpage}
\usepackage{adjustbox}

\makeatother

\usepackage{babel}
\begin{document}
\begin{wrapfigure}{o}{0.5\columnwidth}%
\caption{}
\end{wrapfigure}%

שלום שלום

שלום שלום 

\end{document}

So even without any text it says

\end{wrapfigure} % 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 type2' and it will go away.

2

you need some text in a following paragraph of wrapfigure otherwise it won't work:

\begin{wrapfigure}{o}{0.5\columnwidth}%
\caption{}
\end{wrapfigure}%
Here we need some text so that this will be wrap around the image ...

My working example, needs xelatex:

\documentclass{article}
\usepackage{fontspec}
\usepackage{libertine}
\usepackage{wrapfig}
\usepackage{polyglossia}
\setmainlanguage{hebrew}
\usepackage{theorem}
\theorembodyfont{\upshape}
\newtheorem{theorem}{\R{משפט}}[section]
\usepackage{adjustbox}

\begin{document}

\begin{wrapfigure}{o}{0.5\columnwidth}%
\caption{}
\end{wrapfigure}
הבסיס לכל הצורות המתקדמות יותר של פיתוח עברית הוא השפה של ספרי הקודש של היהודים, התנ"ך עברית, שמקורו בכתבי העת הראשונה אלף לפנה"ס נוצרו ונערך ברציפות והתרחב ולבסוף עוגן על ידי זמנו של ישו. (הישנה) עברית ולכן לעתים קרובות מזוהה עם המונח "עברית מקראית", אפילו אם זה מוצדק בלשנות פחות היסטורית, כמו היסטוריה של ספרות: עברית העתיקה כמו השפה התנ"ך. בתנ"ך, השפה שְׂפַת כְּנַעַן הוא השפת כנען ("שפת כנען, ישעיהו 19:18") נקראת. לאחר חורבן בית המקדש בירושלים על ידי נבוכדנצר השני ב586 לפנה"ס והגלות בבל שלאחר מכן, השפה הרשמית המקומית של ארמי הגיעה למחזור בקרב היהודים, ולכן מעתה ואילך עברית להתחרות על עמדה ארמי ונרשמה הרבה השפעות של זה.

\end{document}

enter image description here

  • I've updated my example this still doesn't work. I get the same error :\ – SadStudent Dec 28 '13 at 17:26
  • The text must follow without an empty line and must be of a paragraph which can flow around the figure. The reason why some words are not enough. – user2478 Dec 28 '13 at 17:28
  • even when I add multiply lines before and after I get the same error. – SadStudent Dec 28 '13 at 17:41
  • 1
    @SadStudent your .lyx file compiled successfully for me without any modification. Note that your .lyx file was not a minimal example. It was very long and included pictures. I had to replace the pictures (which I'm sure now don't scale properly). As for why it compiles for me and not for you I think it could be the LyX version (I am using LyX 2.1 beta2 and 2.0.7 development) or the TeX distribution (I am on Ubuntu and installed with install-tl-ubuntu --hebrew. – scottkosty Dec 28 '13 at 22:13
  • 1
    @SadStudent I took the link to the PDF down and deleted the files I downloaded (it sound like you might have left a private .lyx hanging around) – scottkosty Dec 28 '13 at 22:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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