Date: Mon, 15 Oct 2007 22:57:34 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: "Aryeh M. Friedman" <aryeh.friedman@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: coonverting text to tex Message-ID: <20071015195734.GA3473@kobe.laptop> In-Reply-To: <471337C2.4020708@gmail.com> References: <471337C2.4020708@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2007-10-15 09:49, "Aryeh M. Friedman" <aryeh.friedman@gmail.com> wrote: > Are there any utils that will convert plain text to TeX? It depends on how much you can "compromise" about the quality and typesetting beauty of the output. A naive approach would be something like: \documentclass{article} \begin{document} \begin{verbatim} insert your text file here \end{verbatim} \end{document} But this may not result in a typeset document that is as aesthetically pleasing and beautiful as one which has been formatted by carefully picking the typesetting commands you can use. As an example, try typesetting the two documents which are listed below, and see which one you prefer: % -------------------------------------------------------------- % document1.tex \documentclass{article} \begin{document} \begin{verbatim} Happy families are all alike; every unhappy family is unhappy in its own way. Everything was in confusion in the Oblonskys' house. The wife had discovered that the husband was carrying on an intrigue with a French girl, who had been a governess in their family, and she had announced to her husband that she could not go on living in the same house with him. This position of affairs had now lasted three days, and not only the husband and wife themselves, but all the members of their family and household, were painfully conscious of it. Every person in the house felt that there was no sense in their living together, and that the stray people brought together by chance in any inn had more in common with one another than they, the members of the family and household of the Oblonskys. The wife did not leave her own room, the husband had not been at home for three days. The children ran wild all over the house; the English governess quarreled with the housekeeper, and wrote to a friend asking her to look out for a new situation for her; the man-cook had walked off the day before just at dinner time; the kitchen-maid, and the coachman had given warning. \end{verbatim} \end{document} % -------------------------------------------------------------- % document2.tex \documentclass{article} \usepackage{palatino} \title{Anna Karenina} \author{Leo Tolstoy} \date{18xx} \begin{document} \maketitle Happy families are all alike; every unhappy family is unhappy in its own way. Everything was in confusion in the Oblonskys' house. The wife had discovered that the husband was carrying on an intrigue with a French girl, who had been a governess in their family, and she had announced to her husband that she could not go on living in the same house with him. This position of affairs had now lasted three days, and not only the husband and wife themselves, but all the members of their family and household, were painfully conscious of it. Every person in the house felt that there was no sense in their living together, and that the stray people brought together by chance in any inn had more in common with one another than they, the members of the family and household of the Oblonskys. The wife did not leave her own room, the husband had not been at home for three days. The children ran wild all over the house; the English governess quarreled with the housekeeper, and wrote to a friend asking her to look out for a new situation for her; the man-cook had walked off the day before just at dinner time; the kitchen-maid, and the coachman had given warning. \end{document} % -------------------------------------------------------------- The second version includes more macros/commands which I manually typed, but it probably looks better when typeset. - Giorgos
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071015195734.GA3473>