PDA

View Full Version : Typography query



Tanathka
10th August 2010, 11:55 PM
Hi everyone, I would like to find out a way to take the contents of this post (just this paragraph would do) and turn it into an eps or pdf in a font of my choice. With a specific width. The length based upon how many lines are used. Justified and hypenation on. Further more the first line to the comma in bold and the remain paragraph in a hanging indent. And with say 20 points top and bottom and 5 points left and right blank space.

Any suggestions? I was looking at latex but it looks complicated.

sidebrnz
11th August 2010, 05:51 AM
Use Scribus and export as either .eps or .pdf.

RupertPupkin
11th August 2010, 06:01 AM
LaTeX isn't that hard. Just create a file, say myfile.tex, with these contents:



\documentclass[11pt]{article}
\usepackage{helvet}
\usepackage[hmargin=5pt,vmargin=20pt]{geometry}
\begin{document}
\textbf{Hi everyone}, I would like to find out a way to take the contents of this post
(just this paragraph would do) and turn it into an eps or pdf in a font of my choice.
With a specific width. The length based upon how many lines are used. Justified and
hyphenation on. Furthermore the first line to the comma in bold and the remainder of
the paragraph in a hanging indent. And with say 20 points top and bottom and 5 points
left and right blank space.
\end{document}


Then run 'pdflatex myfile.tex' in a terminal window. That will create a myfile.pdf file (using an 11pt Helvetica font) which you can open in any PDF viewer.

assen
11th August 2010, 08:24 PM
Hi,

I'd second Scribus. It is a layout management tool (like, say, Aldus/Adobe PageMaker) and can export to EPS or PDF (which is nearly the same).

WWell,

William Haller
11th August 2010, 08:26 PM
kile is another good development environment for LaTeX.

Tanathka
11th August 2010, 09:00 PM
The catch here is that there will hopefully be 200+ text files needing batch processed in a matter of minutes.
Manual intervention to do this is a non starter. Opening 200+ files in scribus is also a no go.

Attached are examples of what I want to end up with.

William Haller
11th August 2010, 09:08 PM
Write a perl script (or other of your choice) to generate the LaTeX encapsulating each document (and marking up the bold portion), write it to a file, and process it into a pdf as described. I suspect that's going to be your best bet.

Perl makes it easy to do search and replace (useful for matching everything up to the first comma) and adding the proper LaTeX around it for bold. You'll probably have to experiment with page sizes and the like. There are also multicolumn packages that work well. If someone wants to add a picture, then it gets messier. LaTeX can insert graphics, but it can be a pain to get the text to flow around it properly. Thus the scribus comments as an option.

Tanathka
11th August 2010, 09:11 PM
LaTeX isn't that hard. Just create a file, say myfile.tex, with these contents:



\documentclass[11pt]{article}
\usepackage{helvet}
\usepackage[hmargin=5pt,vmargin=20pt]{geometry}
\begin{document}
\textbf{Hi everyone}, I would like to find out a way to take the contents of this post
(just this paragraph would do) and turn it into an eps or pdf in a font of my choice.
With a specific width. The length based upon how many lines are used. Justified and
hyphenation on. Furthermore the first line to the comma in bold and the remainder of
the paragraph in a hanging indent. And with say 20 points top and bottom and 5 points
left and right blank space.
\end{document}


Then run 'pdflatex myfile.tex' in a terminal window. That will create a myfile.pdf file (using an 11pt Helvetica font) which you can open in any PDF viewer.

This is pretty close idea to what I'm after. Is it easy to customize the size, kerning, justification, leading and fonts?

---------- Post added at 09:11 PM CDT ---------- Previous post was at 09:08 PM CDT ----------


Write a perl script (or other of your choice) to generate the LaTeX encapsulating each document (and marking up the bold portion), write it to a file, and process it into a pdf as described. I suspect that's going to be your best bet.

Perl makes it easy to do search and replace (useful for matching everything up to the first comma) and adding the proper LaTeX around it for bold. You'll probably have to experiment with page sizes and the like. There are also multicolumn packages that work well. If someone wants to add a picture, then it gets messier. LaTeX can insert graphics, but it can be a pain to get the text to flow around it properly. Thus the scribus comments as an option.

Generating the files won't be much of an issue. What code to use for a LaTeX newb however is a more what I'm aiming at now.

MitraMai
11th August 2010, 09:38 PM
Well, to be honest, it's not that easy. I have used LaTex for a few years now, and I still have to look things up, for example how to change the justification. But it's worth all the struggle. I guess I'll never go back to OOO or Word when writing a longer text than one A4...

But take a look at this tutorial, it helped me alot in the beginning:http://www.google.se/url?sa=t&source=web&cd=1&ved=0CBUQFjAA&url=http%3A%2F%2Fwww.ctan.org%2Ftex-archive%2Finfo%2Flshort%2Fenglish%2Flshort.pdf&rct=j&q=the%20not%20very%20short%20introduction&ei=DwljTO3uBNSMOK2MwMIK&usg=AFQjCNGlIFiqkZqWlimc_td_2FA38ZkhMQ

William Haller
11th August 2010, 10:18 PM
In addition to what MitraMai said, you should note that LaTeX is designed for writing big things - books, manuals, papers, and the like. It does very well with this and by default generates documents that look splendid especially for normal page sizes and the normal content.

It has very specific ideas about what looks good (first line of paragraphs not indented for example) and you'll have to be aware of all of its special characters so you can escape them in the text. You can make the output look bad (which the narrow column format you have may require) but it takes more work to override what it considers to be the "correct" typographical standards and it will tend to complain much about overfull horizontal boxes and the like for narrow columns and big words that it can't make look pretty enough. You may have to do some digging to find the correct commands to include.

I recommend "The Not So Short Introduction to LaTeX 2e" by Tobias Oetiker, Hubert Partl, Irene Hyna and Elisabeth Schlegl. "A LaTeX survival guide for Unix systems" edited by Sebastian Rahtz, "Essential LaTeX++" by Jon Warbrick, and "LaTeX 2e" by Leslie Lamport et. al. If you use graphics a lot, then "Using Imported Graphics in LaTeX 2e" by Keith Reckdahl is also good. The first is the one to start with.

sidebrnz
11th August 2010, 11:52 PM
It might actually be easier to use groff for this instead of LaTex. Check it out at http://www.gnu.org/software/groff/ Remember, all of the man pages are done that way.

aadithya18
24th August 2010, 08:06 AM
Hi,
It would be better if some one tells me how to work with kile effectively?

William Haller
24th August 2010, 02:23 PM
Kile is a LaTeX editing environment. Hit New, select the type of project you want to create (book, article, story, report, letter) and it will create a base file that you can write text in. It will have a very rudimentary framework of commands associated with it. Add commands and text as needed. Save it out under some name. Then hit the PDFLaTeX button to create a PDF. When your document produces no command errors, you'll have a PDF. View the PDF with Okular or another PDF viewer. Lather, rinse, repeat.

Consult the documents I referenced for what commands to use where. Kile will help you a lot as the commands are laid out in sane groupings in the LaTeX menu. You can also get lists of specific commands in the left sidebar and the special characters to do math or other special symbols.

In kile's help menu are links to various LaTeX manuals and other resources.

The command syntax is pretty easy and really there won't be any issues. You can reference floating objects just fine. You can generate tables of contents and indexes. The only real tricky thing I have found is wrapping text around pictures or figures easily and consistently.

aadithya18
24th August 2010, 06:05 PM
Is there any alternative for Kile ?

William Haller
24th August 2010, 06:36 PM
I used micro-emacs for years to do my LaTeX documents and still use it for most programming I do. Plain old text editors are almost always more efficient than most GUI options in my opinion.

But when my kids needed to start writing reports in elementary school, I showed them how to use Kile rather than emacs. They got some good looking reports out of it, with a bit of training. I'm sure there are other options as well, but Kile does a pretty good job. The biggest obstacle for them to overcome was letting the commands do the work for them and not trying to do the formatting themselves.