I'm writing a LyX document in Hebrew and I want to inset some inline code snippet but the code is reversed when rendered.
The minimal lyx example is here.
And it look like this:
LyX source:
#LyX 2.1 created this file. For more info see http://www.lyx.org/
\lyxformat 474
\begin_document
\begin_header
\textclass heb-article
\begin_preamble
\usepackage{fullpage}
\usepackage{adjustbox}
\usepackage{minted}
\end_preamble
\use_default_options true
\maintain_unincluded_children false
\language hebrew
\language_package default
\inputencoding auto
\fontencoding global
\font_roman default
\font_sans default
\font_typewriter default
\font_math auto
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\float_placement H
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry false
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 1
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 0
\index אינדקס
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header
\begin_body
\begin_layout Standard
\size largest
הרעיון הבסיסי של
\family roman
\series medium
\shape up
\emph off
\bar no
\strikeout off
\uuline off
\uwave off
\noun off
\color none
\family default
\series default
\shape default
\emph default
\bar default
\strikeout default
\uuline default
\uwave default
\noun default
\color inherit
\lang english
LyX
\lang hebrew
הוא שאין צורך לטפל בעיצוב.
ישנה רשימה של עיצובים קיימים וניתן לבחור מתוכה את אופי הטקסט (כותרת ראשית,
כותרת משנית, הערת שוליים וכו').
כך, התוצאה הסופית אמורה להיות עקבית ובעלת מראה מקצועי.
\begin_inset Newline newline
\end_inset
\size default
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
begin{minted}{python}
\end_layout
\begin_layout Plain Layout
def boring(args = None): pass
\end_layout
\begin_layout Plain Layout
\backslash
end{minted}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\size largest
בנוסף, מאפשר
\lang english
LyX
\lang hebrew
כתיבה נוחה של משוואות מתמטיות ולכן נפוץ בקרב קהילת האקדמאים העוסקים במדעים
מדויקים.
\end_layout
\end_body
\end_document
Exported TeX file:
%% LyX 2.1.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}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\providecommand{\LyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\usepackage{theorem}
\theorembodyfont{\upshape}
\newtheorem{theorem}{\R{משפט}}[section]
\AtBeginDocument{\make@lr\thetheorem}
% The following chunk fixes export with XeTeX.
% It is needed because polyglossia is used by default
% and \make@lr is only defined by babel.
\@ifundefined{make@lr}
{\def\make@lr#1{\begingroup
\toks@=\expandafter{#1}%
\edef\x{\endgroup
\def\noexpand#1{\noexpand\@number{\the\toks@}}}%
\x}}{\relax}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{fullpage}
\usepackage{adjustbox}
\usepackage{minted}
\makeatother
\usepackage{babel}
\begin{document}
{\LARGE{}הרעיון הבסיסי של }\inputencoding{latin9}\L{{\LARGE{}\LyX{}}}\inputencoding{cp1255}{\LARGE{}
הוא שאין צורך לטפל בעיצוב. ישנה רשימה של עיצובים קיימים וניתן לבחור
מתוכה את אופי הטקסט (כותרת ראשית, כותרת משנית, הערת שוליים וכו').
כך, התוצאה הסופית אמורה להיות עקבית ובעלת מראה מקצועי. }\\
\begin{minted}{python}
def boring(args = None): pass
\end{minted}
{\LARGE{}בנוסף, מאפשר }\inputencoding{latin9}\L{{\LARGE{}\LyX{}}}\inputencoding{cp1255}{\LARGE{}
כתיבה נוחה של משוואות מתמטיות ולכן נפוץ בקרב קהילת האקדמאים העוסקים
במדעים מדויקים.}
\end{document}
.tex
file for your minimal example. As explained there, the big advantage is that more people will be able to answer. (For example, I can't answer your question as it stands or even reproduce the issue as I know nothing about LyX.) But there are people around here who will try to answer as they do know LyX - just it may take a little longer.