Re: program listing of child documents with accents

2012-06-04 Thread Leandro Mattioli
Worked like a charm with LyX / TeXLive 2011.

Thanks!






Re: program listing of child documents with accents

2012-06-04 Thread Leandro Mattioli
Worked like a charm with LyX / TeXLive 2011.

Thanks!






Re: program listing of child documents with accents

2012-06-04 Thread Leandro Mattioli
Worked like a charm with LyX / TeXLive 2011.

Thanks!






Re: program listing of child documents with accents

2012-03-14 Thread Helge Hafting

On 13. feb. 2012 20:33, Ricardo wrote:

Following Richard advice, below posted source code of a small document.
With the current lyx configuration I can insert a child document with
the program listing input. The document is saved utf8. I can see accents
on the pdf output, but the breaklines of the listings package does not
seem to work and I do not why. A long line does not break at any place,
despite breaklines=true param is set.
Any help welcomed


I can use utf8 source code files and have breaklines work too. Of 
course, breaklines only works for real text. A line with no spaces will 
not break up.


To make utf8 content survive, put \usepackage{listingsutf8} in the 
document preamble. In the parameters for the included child document, 
set the Include Type to Program Listing, and in Listing 
parameters, set:

breaklines=true
inputencoding={utf8/latin1}

Or possibly utf8/latin9, if you use euro symbols in your program.

With this approach, it is not necessary to change the document encoding 
away from default.


Document:
http://www.aitel.hist.no/~helgehaf/sw/lyxdemo/listing.lyx
Included program code:
http://www.aitel.hist.no/~helgehaf/sw/lyxdemo/listing.c

Helge Hafting


Re: program listing of child documents with accents

2012-03-14 Thread Helge Hafting

On 13. feb. 2012 20:33, Ricardo wrote:

Following Richard advice, below posted source code of a small document.
With the current lyx configuration I can insert a child document with
the program listing input. The document is saved utf8. I can see accents
on the pdf output, but the breaklines of the listings package does not
seem to work and I do not why. A long line does not break at any place,
despite breaklines=true param is set.
Any help welcomed


I can use utf8 source code files and have breaklines work too. Of 
course, breaklines only works for real text. A line with no spaces will 
not break up.


To make utf8 content survive, put \usepackage{listingsutf8} in the 
document preamble. In the parameters for the included child document, 
set the Include Type to Program Listing, and in Listing 
parameters, set:

breaklines=true
inputencoding={utf8/latin1}

Or possibly utf8/latin9, if you use euro symbols in your program.

With this approach, it is not necessary to change the document encoding 
away from default.


Document:
http://www.aitel.hist.no/~helgehaf/sw/lyxdemo/listing.lyx
Included program code:
http://www.aitel.hist.no/~helgehaf/sw/lyxdemo/listing.c

Helge Hafting


Re: program listing of child documents with accents

2012-03-14 Thread Helge Hafting

On 13. feb. 2012 20:33, Ricardo wrote:

Following Richard advice, below posted source code of a small document.
With the current lyx configuration I can insert a child document with
the program listing input. The document is saved utf8. I can see accents
on the pdf output, but the breaklines of the listings package does not
seem to work and I do not why. A long line does not break at any place,
despite breaklines=true param is set.
Any help welcomed


I can use utf8 source code files and have breaklines work too. Of 
course, breaklines only works for real text. A line with no spaces will 
not break up.


To make utf8 content survive, put \usepackage{listingsutf8} in the 
document preamble. In the parameters for the included child document, 
set the "Include Type" to "Program Listing", and in "Listing 
parameters", set:

breaklines=true
inputencoding={utf8/latin1}

Or possibly utf8/latin9, if you use euro symbols in your program.

With this approach, it is not necessary to change the document encoding 
away from default.


Document:
http://www.aitel.hist.no/~helgehaf/sw/lyxdemo/listing.lyx
Included program code:
http://www.aitel.hist.no/~helgehaf/sw/lyxdemo/listing.c

Helge Hafting


Re: program listing of child documents with accents

2012-02-13 Thread Ricardo
Following Richard advice, below posted source code of a small document.
With the current lyx configuration I can insert a child document with the
program listing input. The document is saved utf8. I can see accents on the
pdf output, but the breaklines of the listings package does not seem to
work and I do not why. A long line does not break at any place, despite
breaklines=true param is set.
Any help welcomed
Thanks again.

lyx source code

 % Preview source code

%% LyX 1.6.7 created this file. For more info, see http://www.lyx.org/.

%% Do not edit unless you really know what you are doing.

\documentclass[11pt,catalan]{report}

\usepackage[T1]{fontenc}

\usepackage[utf8x]{inputenc}

\usepackage{listings}

\usepackage[a4paper]{geometry}

\geometry{verbose,tmargin=3cm,bmargin=2cm,lmargin=3.5cm,rmargin=2.5cm,headheight=2cm,headsep=1cm,footskip=1.5cm}

\setlength{\parskip}{\bigskipamount}

\setlength{\parindent}{0pt}

\usepackage{calc}

\usepackage{amsthm}

\usepackage{amsmath}

\usepackage{amssymb}

\usepackage{esint}

\makeatletter

%% Textclass specific LaTeX commands.

\numberwithin{equation}{section}

\numberwithin{figure}{section}

%% User specified LaTeX commands.

\usepackage{verbatim}

\usepackage{varioref}

\usepackage{ucs}

\usepackage{framed}

\usepackage[T1]{fontenc}

\usepackage{ucs}

\usepackage[utf8x]{inputenc}

\makeatother

\usepackage{babel}

\begin{document}

Document d'exemple.

document;settings;language;català

document;settings;language;other utf8x

No problem with accents on main document: áéíóú

%

\framebox{\begin{minipage}[t]{1\columnwidth}%

Inserted child document with accents stored utf-8. Program listing

input selected

\scriptsize

\lstinputlisting[breaklines=true,extendedchars=false]{childdoc-utf8}

\scriptsize%

\end{minipage}}

\nocite{*}

\end{document}



utf8 saved file content:  
Child document. Stored UTF8.
Áéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèá
éíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéí


Re: program listing of child documents with accents

2012-02-13 Thread Ricardo
Following Richard advice, below posted source code of a small document.
With the current lyx configuration I can insert a child document with the
program listing input. The document is saved utf8. I can see accents on the
pdf output, but the breaklines of the listings package does not seem to
work and I do not why. A long line does not break at any place, despite
breaklines=true param is set.
Any help welcomed
Thanks again.

lyx source code

 % Preview source code

%% LyX 1.6.7 created this file. For more info, see http://www.lyx.org/.

%% Do not edit unless you really know what you are doing.

\documentclass[11pt,catalan]{report}

\usepackage[T1]{fontenc}

\usepackage[utf8x]{inputenc}

\usepackage{listings}

\usepackage[a4paper]{geometry}

\geometry{verbose,tmargin=3cm,bmargin=2cm,lmargin=3.5cm,rmargin=2.5cm,headheight=2cm,headsep=1cm,footskip=1.5cm}

\setlength{\parskip}{\bigskipamount}

\setlength{\parindent}{0pt}

\usepackage{calc}

\usepackage{amsthm}

\usepackage{amsmath}

\usepackage{amssymb}

\usepackage{esint}

\makeatletter

%% Textclass specific LaTeX commands.

\numberwithin{equation}{section}

\numberwithin{figure}{section}

%% User specified LaTeX commands.

\usepackage{verbatim}

\usepackage{varioref}

\usepackage{ucs}

\usepackage{framed}

\usepackage[T1]{fontenc}

\usepackage{ucs}

\usepackage[utf8x]{inputenc}

\makeatother

\usepackage{babel}

\begin{document}

Document d'exemple.

document;settings;language;català

document;settings;language;other utf8x

No problem with accents on main document: áéíóú

%

\framebox{\begin{minipage}[t]{1\columnwidth}%

Inserted child document with accents stored utf-8. Program listing

input selected

\scriptsize

\lstinputlisting[breaklines=true,extendedchars=false]{childdoc-utf8}

\scriptsize%

\end{minipage}}

\nocite{*}

\end{document}



utf8 saved file content:  
Child document. Stored UTF8.
Áéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèá
éíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéí


Re: program listing of child documents with accents

2012-02-13 Thread Ricardo
Following Richard advice, below posted source code of a small document.
With the current lyx configuration I can insert a child document with the
program listing input. The document is saved utf8. I can see accents on the
pdf output, but the breaklines of the listings package does not seem to
work and I do not why. A long line does not break at any place, despite
breaklines=true param is set.
Any help welcomed
Thanks again.

>>

 % Preview source code

%% LyX 1.6.7 created this file. For more info, see http://www.lyx.org/.

%% Do not edit unless you really know what you are doing.

\documentclass[11pt,catalan]{report}

\usepackage[T1]{fontenc}

\usepackage[utf8x]{inputenc}

\usepackage{listings}

\usepackage[a4paper]{geometry}

\geometry{verbose,tmargin=3cm,bmargin=2cm,lmargin=3.5cm,rmargin=2.5cm,headheight=2cm,headsep=1cm,footskip=1.5cm}

\setlength{\parskip}{\bigskipamount}

\setlength{\parindent}{0pt}

\usepackage{calc}

\usepackage{amsthm}

\usepackage{amsmath}

\usepackage{amssymb}

\usepackage{esint}

\makeatletter

%% Textclass specific LaTeX commands.

\numberwithin{equation}{section}

\numberwithin{figure}{section}

%% User specified LaTeX commands.

\usepackage{verbatim}

\usepackage{varioref}

\usepackage{ucs}

\usepackage{framed}

\usepackage[T1]{fontenc}

\usepackage{ucs}

\usepackage[utf8x]{inputenc}

\makeatother

\usepackage{babel}

\begin{document}

Document d'exemple.

document;settings;language;català

document;settings;language;other utf8x

No problem with accents on main document: áéíóú

%

\framebox{\begin{minipage}[t]{1\columnwidth}%

Inserted child document with accents stored utf-8. Program listing

input selected

\scriptsize

\lstinputlisting[breaklines=true,extendedchars=false]{childdoc-utf8}

\scriptsize%

\end{minipage}}

\nocite{*}

\end{document}



<
Child document. Stored UTF8.
Áéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèá
éíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéíóúàèáéí


program listing of child documents with accents

2012-02-12 Thread Ricardo
Hello.
I use lyx 1.6.7 and Debian GNU/Linux 6.0

Sorry if it's a stupid question, I'm not a lyx advanced user too.

I have no problem with the main document in lyx. I can use accents and see
them in the output. I have problems with insert;file;child documents and
some of the program listing options. Seems that accents and other symbols
are a problem when try to get the pdf output.The child documents are saved
UTF-8. Despite I browsed the web, and checked the listings package doc,
tested some options like extendedchars=true,  I can not get what I want. I
would like to see the child document as it's saved, the same way if I edit
it with a plain text editor, but I did not find the way to do it.
For example: I can not insert one word child document  àéèíòóú

I have defined Catalan as language in Lyx and unicode UTF-8 as
codification. With this options, and the *verbatim listing* for child
document,  I can export to pdf the main document with child documents. OK,
there are  no complaints, I get àéèíòóú inside a box on the main
document.  But I would like to use the *program listing* option, because I
need to breaklines for example. I have not found the way to do it. Lyx
complains when generate the pdf file if I change form verbatim listing, to
program listing (same stupid one word child document), despite any option I
tested with listing parameters.

Thanks in advance and sorry about my bad English.


Re: program listing of child documents with accents

2012-02-12 Thread Richard Heck

On 02/12/2012 11:20 AM, Ricardo wrote:

Hello.
I use lyx 1.6.7 and Debian GNU/Linux 6.0

Sorry if it's a stupid question, I'm not a lyx advanced user too.

I have no problem with the main document in lyx. I can use accents and 
see them in the output. I have problems with insert;file;child 
documents and some of the program listing options. Seems that accents 
and other symbols are a problem when try to get the pdf output.The 
child documents are saved UTF-8. Despite I browsed the web, and 
checked the listings package doc, tested some options like 
extendedchars=true,  I can not get what I want. I would like to see 
the child document as it's saved, the same way if I edit it with a 
plain text editor, but I did not find the way to do it.

For example: I can not insert one word child document  àéèíòóú

I have defined Catalan as language in Lyx and unicode UTF-8 as 
codification. With this options, and the *verbatim listing* for child 
document,  I can export to pdf the main document with child documents. 
OK, there are  no complaints, I get àéèíòóú inside a box on the main 
document.  But I would like to use the *program listing* option, 
because I need to breaklines for example. I have not found the way to 
do it. Lyx complains when generate the pdf file if I change form 
verbatim listing, to program listing (same stupid one word child 
document), despite any option I tested with listing parameters.


It's possible that LaTeX package doing the listings does not like UTF-8. 
I don't know. I'd suggest you look into the documentation for that 
package. It will help others to help you, too, if you could post a small 
set of example files that exhibit the problem.


Richard



program listing of child documents with accents

2012-02-12 Thread Ricardo
Hello.
I use lyx 1.6.7 and Debian GNU/Linux 6.0

Sorry if it's a stupid question, I'm not a lyx advanced user too.

I have no problem with the main document in lyx. I can use accents and see
them in the output. I have problems with insert;file;child documents and
some of the program listing options. Seems that accents and other symbols
are a problem when try to get the pdf output.The child documents are saved
UTF-8. Despite I browsed the web, and checked the listings package doc,
tested some options like extendedchars=true,  I can not get what I want. I
would like to see the child document as it's saved, the same way if I edit
it with a plain text editor, but I did not find the way to do it.
For example: I can not insert one word child document  àéèíòóú

I have defined Catalan as language in Lyx and unicode UTF-8 as
codification. With this options, and the *verbatim listing* for child
document,  I can export to pdf the main document with child documents. OK,
there are  no complaints, I get àéèíòóú inside a box on the main
document.  But I would like to use the *program listing* option, because I
need to breaklines for example. I have not found the way to do it. Lyx
complains when generate the pdf file if I change form verbatim listing, to
program listing (same stupid one word child document), despite any option I
tested with listing parameters.

Thanks in advance and sorry about my bad English.


Re: program listing of child documents with accents

2012-02-12 Thread Richard Heck

On 02/12/2012 11:20 AM, Ricardo wrote:

Hello.
I use lyx 1.6.7 and Debian GNU/Linux 6.0

Sorry if it's a stupid question, I'm not a lyx advanced user too.

I have no problem with the main document in lyx. I can use accents and 
see them in the output. I have problems with insert;file;child 
documents and some of the program listing options. Seems that accents 
and other symbols are a problem when try to get the pdf output.The 
child documents are saved UTF-8. Despite I browsed the web, and 
checked the listings package doc, tested some options like 
extendedchars=true,  I can not get what I want. I would like to see 
the child document as it's saved, the same way if I edit it with a 
plain text editor, but I did not find the way to do it.

For example: I can not insert one word child document  àéèíòóú

I have defined Catalan as language in Lyx and unicode UTF-8 as 
codification. With this options, and the *verbatim listing* for child 
document,  I can export to pdf the main document with child documents. 
OK, there are  no complaints, I get àéèíòóú inside a box on the main 
document.  But I would like to use the *program listing* option, 
because I need to breaklines for example. I have not found the way to 
do it. Lyx complains when generate the pdf file if I change form 
verbatim listing, to program listing (same stupid one word child 
document), despite any option I tested with listing parameters.


It's possible that LaTeX package doing the listings does not like UTF-8. 
I don't know. I'd suggest you look into the documentation for that 
package. It will help others to help you, too, if you could post a small 
set of example files that exhibit the problem.


Richard



program listing of child documents with accents

2012-02-12 Thread Ricardo
Hello.
I use lyx 1.6.7 and Debian GNU/Linux 6.0

Sorry if it's a stupid question, I'm not a lyx advanced user too.

I have no problem with the main document in lyx. I can use accents and see
them in the output. I have problems with insert;file;child documents and
some of the program listing options. Seems that accents and other symbols
are a problem when try to get the pdf output.The child documents are saved
UTF-8. Despite I browsed the web, and checked the listings package doc,
tested some options like extendedchars=true,  I can not get what I want. I
would like to see the child document as it's saved, the same way if I edit
it with a plain text editor, but I did not find the way to do it.
For example: I can not insert one word child document  "àéèíòóú"

I have defined Catalan as language in Lyx and unicode UTF-8 as
codification. With this options, and the *verbatim listing* for child
document,  I can export to pdf the main document with child documents. OK,
there are  no complaints, I get "àéèíòóú" inside a box on the main
document.  But I would like to use the *program listing* option, because I
need to breaklines for example. I have not found the way to do it. Lyx
complains when generate the pdf file if I change form verbatim listing, to
program listing (same stupid one word child document), despite any option I
tested with listing parameters.

Thanks in advance and sorry about my bad English.


Re: program listing of child documents with accents

2012-02-12 Thread Richard Heck

On 02/12/2012 11:20 AM, Ricardo wrote:

Hello.
I use lyx 1.6.7 and Debian GNU/Linux 6.0

Sorry if it's a stupid question, I'm not a lyx advanced user too.

I have no problem with the main document in lyx. I can use accents and 
see them in the output. I have problems with insert;file;child 
documents and some of the program listing options. Seems that accents 
and other symbols are a problem when try to get the pdf output.The 
child documents are saved UTF-8. Despite I browsed the web, and 
checked the listings package doc, tested some options like 
extendedchars=true,  I can not get what I want. I would like to see 
the child document as it's saved, the same way if I edit it with a 
plain text editor, but I did not find the way to do it.

For example: I can not insert one word child document  "àéèíòóú"

I have defined Catalan as language in Lyx and unicode UTF-8 as 
codification. With this options, and the *verbatim listing* for child 
document,  I can export to pdf the main document with child documents. 
OK, there are  no complaints, I get "àéèíòóú" inside a box on the main 
document.  But I would like to use the *program listing* option, 
because I need to breaklines for example. I have not found the way to 
do it. Lyx complains when generate the pdf file if I change form 
verbatim listing, to program listing (same stupid one word child 
document), despite any option I tested with listing parameters.


It's possible that LaTeX package doing the listings does not like UTF-8. 
I don't know. I'd suggest you look into the documentation for that 
package. It will help others to help you, too, if you could post a small 
set of example files that exhibit the problem.


Richard