Hello,

I'm using txt2tags 2.3 for windows, and LyX 1.5 on a WinXP

txt2tags (http://txt2tags.sourceforge.net/) is a python script that
can output .tex files. I would like to produce files with the txt2tags
markup and further refine them on LyX.

However I have a problem importing the .tex files produced by txt2tags
into LyX. The title and author field are missing in the .lyx file,
replaced by a "clear page" mention. The final .dvi lacks those fields
entirely.

Here follows a txt2tags xp1.tex file:

##################################
\documentclass[11pt,a4paper]{article}
\usepackage{amsfonts,graphicx}
\usepackage[pdfstartview=FitH,urlcolor=blue,colorlinks=true,bookmarks=true]{hyperref}
\pagestyle{plain}   % do page numbering ('empty' turns off)
\frenchspacing      % no aditional spaces after periods
\setlength{\parskip}{8pt}\parindent=0pt  % no paragraph indentation

\title{This is a title}
\author{I'm the author}
\begin{document}
\maketitle
\clearpage

This is standard text


\section*{this is a section*}
This is more text


% LaTeX2e code generated by txt2tags 2.3 (http://txt2tags.sf.net)
% cmdline: txt2tags -t tex G:/MPI/xp1.t2t
\end{document}
##################################

And here is the corresponding xp1.lyx file:

##################################
#LyX file created by  tex2lyx 0.1.2
\lyxformat 245
\begin_document
\begin_header
\textclass article
\begin_preamble

\usepackage{amsfonts}

\usepackage[pdfstartview=FitH,urlcolor=blue,colorlinks=true,bookmarks=true]{hyperref}

   % do page numbering ('empty' turns off)
\frenchspacing      % no aditional spaces after periods
\setlength{\parskip}{8pt}\parindent=0pt  % no paragraph indentation

\title{This is a title}
\author{I'm the author}

\end_preamble
\options a4paper
\language english
\inputencoding latin1
\fontscheme default
\graphics default
\paperfontsize 11
\spacing single
\papersize default
\use_geometry false
\use_amsmath 0
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle plain
\tracking_changes false
\output_changes false
\end_header

\begin_body

\begin_layout Standard


\clearpage

\end_layout

\begin_layout Standard

This is standard text
\end_layout

\begin_layout Section*

this is a section*
\end_layout

\begin_layout Standard

This is more text
\end_layout

\begin_layout Standard


\begin_inset ERT
status collapsed

\begin_layout Standard

% LaTeX2e code generated by txt2tags 2.3 (http://txt2tags.sf.net)
\end_layout

\begin_layout Standard


\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Standard

% cmdline: txt2tags -t tex G:/MPI/xp1.t2t
\end_layout

\begin_layout Standard


\end_layout

\end_inset


\end_layout

\end_body
\end_document

##################################

Now, if I insert a date in the txt2tags file, the resulting LyX file
still does not display title and author, but shows the date followed
by the "clear page" mention. But the .dvi document shows indeed the
title, author and date, in a preceding page. Here are the files:

xp2.tex
##################################
\documentclass[11pt,a4paper]{article}
\usepackage{amsfonts,graphicx}
\usepackage[pdfstartview=FitH,urlcolor=blue,colorlinks=true,bookmarks=true]{hyperref}
\pagestyle{plain}   % do page numbering ('empty' turns off)
\frenchspacing      % no aditional spaces after periods
\setlength{\parskip}{8pt}\parindent=0pt  % no paragraph indentation

\title{This is a title}
\author{I'm the author}
\begin{document}
\date{23.08.2007}
\maketitle
\clearpage

This is standard text


\section*{this is a section*}
This is more text


% LaTeX2e code generated by txt2tags 2.3 (http://txt2tags.sf.net)
% cmdline: txt2tags -t tex G:/MPI/xp2.t2t
\end{document}
##################################
and resulting xp2.lyx
##################################
#LyX 1.5.1 created this file. For more info see http://www.lyx.org/
\lyxformat 276
\begin_document
\begin_header
\textclass article
\begin_preamble

\usepackage{amsfonts}

\usepackage[pdfstartview=FitH,urlcolor=blue,colorlinks=true,bookmarks=true]{hyperref}

   % do page numbering ('empty' turns off)
\frenchspacing      % no aditional spaces after periods
\setlength{\parskip}{8pt}\parindent=0pt  % no paragraph indentation

\title{This is a title}
\author{I'm the author}
\end_preamble
\options a4paper
\language english
\inputencoding latin1
\font_roman default
\font_sans default
\font_typewriter default
\font_default_family default
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\paperfontsize 11
\spacing single
\papersize default
\use_geometry false
\use_amsmath 0
\use_esint 0
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle plain
\tracking_changes false
\output_changes false
\author ""
\end_header

\begin_body

\begin_layout Date
23.08.2007
\end_layout

\begin_layout Standard

\clearpage

\end_layout

\begin_layout Standard
This is standard text
\end_layout

\begin_layout Section*
this is a section*
\end_layout

\begin_layout Standard
This is more text
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Standard

% LaTeX2e code generated by txt2tags 2.3 (http://txt2tags.sf.net)
\end_layout

\begin_layout Standard

\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Standard

% cmdline: txt2tags -t tex G:/MPI/xp2.t2t
\end_layout

\begin_layout Standard

\end_layout

\end_inset


\end_layout

\end_body
\end_document

##################################


Can anyone tell me what's going on, and maybe how I could avoid this?
Perhaps if the problem is with the txt2tags output, you can indicate
me what should I mention in the txt2tags mailing list, to correct the
problem?

Cheers,
Alex

Reply via email to