[Tex/LaTex] Problem using \begin{titlepage}

lyxtitles

I want to make a front-page to something I've been writing in LyX but everytime I use \begin{titlepage}\text {This is a sample title}\end{titlepage}, I get in the first page this line only instead of real title:

enter image description here

How can I solve it?

Best Answer

Here is an example LyX file with a title page in Hebrew. (Just copy the following to a file and then open that file in LyX 2.0.x).

#LyX 2.1 created this file. For more info see http://www.lyx.org/
\lyxformat 413
\begin_document
\begin_header
\textclass book
\begin_preamble
\frenchspacing
\end_preamble
\use_default_options false
\maintain_unincluded_children false
\language hebrew
\language_package default
\inputencoding auto
\fontencoding global
\font_roman default
\font_sans default
\font_typewriter default
\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
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 1
\use_mathdots 1
\use_mhchem 1
\cite_engine basic
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\use_refstyle 0
\index ××× ×קס
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language polish
\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 Title
×ר×××× ××××× ×- 
\lang english
LyX
\end_layout

\begin_layout Section*
××× × ×§×××ת ש×ש×× ××עת ×¢× ×©×××ש ×- 
\lang english
LyX
\end_layout

\begin_layout Standard
\begin_inset Note Note
status collapsed

\begin_layout Plain Layout
×¢×ר×ת
\end_layout

\end_inset


\lang english
LyX
\lang hebrew
 ××××¢ ×¢× ×ס××× ×ª××¢×× ××¢××¨× ×צ×××× ×× 
\lang english
â
\lang hebrew
 ×××××¥ ××שת×ש ×××.
 ×××× ××ת××× ×קר××ת ×ק×××¥ 
\family sans
×¢×ר×
\begin_inset Formula $\vartriangleleft$
\end_inset

××××
\family default
, ×××××× ×ק××× ×§×¦×¨× ×ת××¢××.
 ×××ר ×××, × ××ª× ×××ש×× ×קר××ת 
\family sans
×¢×ר×
\begin_inset Formula $\vartriangleleft$
\end_inset

×ש××¢×ר
\begin_inset space ~
\end_inset

××××ר×
\family default
 ×¢× ×נת ××××× ××× ××שת×ש ×- 
\lang english
LyX
\lang hebrew
.
\end_layout

\end_body
\end_document

And here is the resulting PDF on my system:

page 1:

page 1

page 2:

page 2

Finally, here is the LaTeX that is produced from that .lyx file:

%% LyX 2.0.7dev created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[oneside,english,hebrew]{book}
\usepackage[T1]{fontenc}
\usepackage[latin9,cp1255]{inputenc}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{amssymb}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\providecommand{\LyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\frenchspacing

\makeatother

\usepackage{babel}
\begin{document}

\title{áøåëéí äáàéí ì- \inputencoding{latin9}\L{\LyX{}}}

\maketitle

\section*{ëîä ð÷åãåú ùçùåá ìãòú òì ùéîåù á- \L{\protect\LyX{}}}

\inputencoding{latin9}\L{\LyX{}}\inputencoding{cp1255} îâéò òí îñîëé
úéòåã åòæøä îöåééðéí \inputencoding{latin9}\L{\textemdash{}}\inputencoding{cp1255}
îåîìõ ìäùúîù áäí. ëãàé ìäúçéì á÷øéàú ä÷åáõ \textsf{òæøä\L{$\vartriangleleft$}îáåà},
äîäååä ä÷ãîä ÷öøä ìúéòåã. ìàçø îëï, ðéúï ìäîùéê á÷øéàú \textsf{òæøä\L{$\vartriangleleft$}äùéòåø~äîåãøê}
òì îðú ììîåã àéê ìäùúîù á- \inputencoding{latin9}\L{\LyX{}}\inputencoding{cp1255}.
\end{document}