Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #190707 > unrolled thread

How to create a PDF-Printer from the command line

Started byJason <electron@emypeople.net>
First post2018-01-06 04:20 +0100
Last post2018-01-09 04:20 +0100
Articles 20 on this page of 76 — 15 participants

Back to article view | Back to linux.debian.user


Contents

  How to create a PDF-Printer from the command line Jason <electron@emypeople.net> - 2018-01-06 04:20 +0100
    Re: How to create a PDF-Printer from the command line Gene Heskett <gheskett@shentel.net> - 2018-01-06 05:50 +0100
    Re: How to create a PDF-Printer from the command line john doe <johndoe65534@mail.com> - 2018-01-06 06:00 +0100
      Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-06 21:20 +0100
        Re: How to create a PDF-Printer from the command line john doe <johndoe65534@mail.com> - 2018-01-06 22:00 +0100
          Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-07 21:10 +0100
            Re: How to create a PDF-Printer from the command line john doe <johndoe65534@mail.com> - 2018-01-07 21:50 +0100
              Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-07 22:00 +0100
                Re: How to create a PDF-Printer from the command line john doe <johndoe65534@mail.com> - 2018-01-08 11:50 +0100
                  Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-08 12:30 +0100
        Re: How to create a PDF-Printer from the command line Curt <curty@free.fr> - 2018-01-06 22:10 +0100
          Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-07 01:20 +0100
            Re: How to create a PDF-Printer from the command line Erik Christiansen <dvalin@internode.on.net> - 2018-01-07 03:30 +0100
              Re: How to create a PDF-Printer from the command line Erik Christiansen <dvalin@internode.on.net> - 2018-01-07 03:50 +0100
            Re: How to create a PDF-Printer from the command line Curt <curty@free.fr> - 2018-01-07 12:10 +0100
              Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-07 13:40 +0100
              Re: How to create a PDF-Printer from the command line David Wright <deblis@lionunicorn.co.uk> - 2018-01-07 17:10 +0100
        Re: How to create a PDF-Printer from the command line davidson <davidson@freevolt.org> - 2018-01-09 07:30 +0100
          Re: How to create a PDF-Printer from the command line Ionel Mugurel Ciobîcă <I.M.Ciobica@upcmail.nl> - 2018-01-09 10:30 +0100
            Re: How to create a PDF-Printer from the command line <tomas@tuxteam.de> - 2018-01-09 10:40 +0100
            Re: How to create a PDF-Printer from the command line Curt <curty@free.fr> - 2018-01-09 11:30 +0100
              Re: How to create a PDF-Printer from the command line Curt <curty@free.fr> - 2018-01-09 14:10 +0100
                Re: How to create a PDF-Printer from the command line David Wright <deblis@lionunicorn.co.uk> - 2018-01-09 14:40 +0100
                  Re: How to create a PDF-Printer from the command line Ionel Mugurel Ciobîcă <I.M.Ciobica@upcmail.nl> - 2018-01-09 16:10 +0100
                  Re: How to create a PDF-Printer from the command line Curt <curty@free.fr> - 2018-01-09 16:40 +0100
                    Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-09 20:20 +0100
                      Re: How to create a PDF-Printer from the command line Curt <curty@free.fr> - 2018-01-09 20:50 +0100
                        Re: How to create a PDF-Printer from the command line David Wright <deblis@lionunicorn.co.uk> - 2018-01-09 21:10 +0100
                          Re: How to create a PDF-Printer from the command line <tomas@tuxteam.de> - 2018-01-09 23:30 +0100
                            Re: How to create a PDF-Printer from the command line David Wright <deblis@lionunicorn.co.uk> - 2018-01-10 00:10 +0100
                              Re: How to create a PDF-Printer from the command line <tomas@tuxteam.de> - 2018-01-10 00:50 +0100
                        Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-09 21:40 +0100
                          Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-09 21:50 +0100
                          Re: How to create a PDF-Printer from the command line Curt <curty@free.fr> - 2018-01-09 22:00 +0100
                            Re: How to create a PDF-Printer from the command line David Wright <deblis@lionunicorn.co.uk> - 2018-01-09 23:40 +0100
                              Re: How to create a PDF-Printer from the command line Curt <curty@free.fr> - 2018-01-10 10:10 +0100
                                Re: How to create a PDF-Printer from the command line <tomas@tuxteam.de> - 2018-01-10 10:50 +0100
                                  Re: How to create a PDF-Printer from the command line Ionel Mugurel Ciobîcă <I.M.Ciobica@upcmail.nl> - 2018-01-10 14:20 +0100
                                  Re: How to create a PDF-Printer from the command line David Wright <deblis@lionunicorn.co.uk> - 2018-01-10 16:40 +0100
                                    Re: How to create a PDF-Printer from the command line <tomas@tuxteam.de> - 2018-01-10 17:20 +0100
                                      Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-10 20:20 +0100
                                        Re: How to create a PDF-Printer from the command line <tomas@tuxteam.de> - 2018-01-10 21:10 +0100
                                          Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-17 19:30 +0100
                                            Re: How to create a PDF-Printer from the command line <tomas@tuxteam.de> - 2018-01-17 21:10 +0100
                                              Re: How to create a PDF-Printer from the command line Joel Wirāmu Pauling <joel@aenertia.net> - 2018-01-17 22:20 +0100
                                                Re: How to create a PDF-Printer from the command line Joel Wirāmu Pauling <joel@aenertia.net> - 2018-01-17 22:40 +0100
                                                  Re: How to create a PDF-Printer from the command line Chris Ramsden <chris.ramsden@gmail.com> - 2018-01-17 22:50 +0100
                                                    Re: How to create a PDF-Printer from the command line Dan Ritter <dsr@randomstring.org> - 2018-01-17 23:10 +0100
                                                      Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-18 00:00 +0100
                                                    Re: How to create a PDF-Printer from the command line Curt <curty@free.fr> - 2018-01-18 10:50 +0100
                                                      Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-18 13:50 +0100
                                                        Re: How to create a PDF-Printer from the command line David Wright <deblis@lionunicorn.co.uk> - 2018-01-18 17:00 +0100
                                                          Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-18 20:20 +0100
                                                  Re: How to create a PDF-Printer from the command line Ben Caradoc-Davies <ben@transient.nz> - 2018-01-17 22:50 +0100
                                                Re: How to create a PDF-Printer from the command line Ben Caradoc-Davies <ben@transient.nz> - 2018-01-17 22:40 +0100
                                                Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-18 00:00 +0100
                                              Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-17 23:50 +0100
                                Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-10 11:40 +0100
                                  Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-10 20:30 +0100
                Re: How to create a PDF-Printer from the command line Ionel Mugurel Ciobîcă <I.M.Ciobica@upcmail.nl> - 2018-01-09 15:00 +0100
    Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-06 16:30 +0100
      Re: How to create a PDF-Printer from the command line Jason <electron@emypeople.net> - 2018-01-07 03:50 +0100
        Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-07 11:20 +0100
          Re: How to create a PDF-Printer from the command line rhkramer@gmail.com - 2018-01-07 13:50 +0100
            Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-07 19:20 +0100
              Re: How to create a PDF-Printer from the command line rhkramer@gmail.com - 2018-01-07 21:30 +0100
                Re: How to create a PDF-Printer from the command line rhkramer@gmail.com - 2018-01-08 13:30 +0100
                  Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-08 20:00 +0100
                    Re: How to create a PDF-Printer from the command line rhkramer@gmail.com - 2018-01-08 20:20 +0100
              Re: How to create a PDF-Printer from the command line David Wright <deblis@lionunicorn.co.uk> - 2018-01-08 04:20 +0100
                Re: How to create a PDF-Printer from the command line Curt <curty@free.fr> - 2018-01-08 10:40 +0100
                  Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-08 19:20 +0100
                    Re: How to create a PDF-Printer from the command line David Wright <deblis@lionunicorn.co.uk> - 2018-01-09 02:30 +0100
                      Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-10 01:40 +0100
                Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-08 20:20 +0100
          [SOLVED]Re: How to create a PDF-Printer from the command line Jason <electron@emypeople.net> - 2018-01-09 04:20 +0100

Page 2 of 4 — ← Prev page 1 [2] 3 4  Next page →


#190836

FromCurt <curty@free.fr>
Date2018-01-09 11:30 +0100
Message-ID<v5Zkl-2IA-3@gated-at.bofh.it>
In reply to#190832
On 2018-01-09, Ionel Mugurel Ciobîcă <I.M.Ciobica@upcmail.nl> wrote:
> On  9-01-2018, at 06h 52'16", davidson wrote about "Re: How to create a PDF-Printer from the command line"
>> >
>> >How does one convert a text file to a PDF using the command line?
>> 
>> Step 1. Make sure the text file is also a latex document.
>> Step 2. Use latex.
>
> Assuming step 1 is reached, step 2 will make a dvi file. That was not
> what the OP asked for...

pdftex (your one step road to a pdf)?

 DESCRIPTION
       Run  the  pdfTeX  typesetter  on  file,  usually creating
       file.pdf.  

Of course, B. will inform us that this amounts to eradicating a microbe with a
gorilla (or vice-versa?).

>
> Ionel
>
>


-- 
"Ruling a large nation is like cooking a small fish" - Lao Tzu

[toc] | [prev] | [next] | [standalone]


#190840

FromCurt <curty@free.fr>
Date2018-01-09 14:10 +0100
Message-ID<v61Pc-4sF-29@gated-at.bofh.it>
In reply to#190836
On 2018-01-09, Curt <curty@free.fr> wrote:
> On 2018-01-09, Ionel Mugurel Ciobîcă <I.M.Ciobica@upcmail.nl> wrote:
>> On  9-01-2018, at 06h 52'16", davidson wrote about "Re: How to create a PDF-Printer from the command line"
>>> >
>>> >How does one convert a text file to a PDF using the command line?
>>> 
>>> Step 1. Make sure the text file is also a latex document.
>>> Step 2. Use latex.
>>
>> Assuming step 1 is reached, step 2 will make a dvi file. That was not
>> what the OP asked for...
>
> pdftex (your one step road to a pdf)?
>
>  DESCRIPTION
>        Run  the  pdfTeX  typesetter  on  file,  usually creating
>        file.pdf.  
>
> Of course, B. will inform us that this amounts to eradicating a microbe with a
> gorilla (or vice-versa?).
>
>>
>> Ionel
>>

If you're dealing with latex files, as I have taken some minutes to
discover (cough), you need 'pdflatex', not pdftex, which will barf
immediately upon encountering latex commands.

-- 
"Ruling a large nation is like cooking a small fish" - Lao Tzu

[toc] | [prev] | [next] | [standalone]


#190841

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2018-01-09 14:40 +0100
Message-ID<v62ie-4Ch-13@gated-at.bofh.it>
In reply to#190840
On Tue 09 Jan 2018 at 13:06:44 (+0000), Curt wrote:
> On 2018-01-09, Curt <curty@free.fr> wrote:
> > On 2018-01-09, Ionel Mugurel Ciobîcă <I.M.Ciobica@upcmail.nl> wrote:
> >> On  9-01-2018, at 06h 52'16", davidson wrote about "Re: How to create a PDF-Printer from the command line"
> >>> >
> >>> >How does one convert a text file to a PDF using the command line?
> >>> 
> >>> Step 1. Make sure the text file is also a latex document.
> >>> Step 2. Use latex.
> >>
> >> Assuming step 1 is reached, step 2 will make a dvi file. That was not
> >> what the OP asked for...
> >
> > pdftex (your one step road to a pdf)?
> >
> >  DESCRIPTION
> >        Run  the  pdfTeX  typesetter  on  file,  usually creating
> >        file.pdf.  
> >
> > Of course, B. will inform us that this amounts to eradicating a microbe with a
> > gorilla (or vice-versa?).
> >
> >>
> >> Ionel
> >>
> 
> If you're dealing with latex files, as I have taken some minutes to
> discover (cough), you need 'pdflatex', not pdftex, which will barf
> immediately upon encountering latex commands.

So could you now elaborate on step 1 of this "one-step" process?

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#190844

FromIonel Mugurel Ciobîcă <I.M.Ciobica@upcmail.nl>
Date2018-01-09 16:10 +0100
Message-ID<v63Hk-5D6-13@gated-at.bofh.it>
In reply to#190841
On  9-01-2018, at 07h 35'28", David Wright wrote about "Re: How to create a PDF-Printer from the command line"
> On Tue 09 Jan 2018 at 13:06:44 (+0000), Curt wrote:
> > On 2018-01-09, Curt <curty@free.fr> wrote:
> > > On 2018-01-09, Ionel Mugurel Ciobîcă <I.M.Ciobica@upcmail.nl> wrote:
> > >> On  9-01-2018, at 06h 52'16", davidson wrote about "Re: How to create a PDF-Printer from the command line"
> > >>> >
> > >>> >How does one convert a text file to a PDF using the command line?
> > >>> 
> > >>> Step 1. Make sure the text file is also a latex document.
> > >>> Step 2. Use latex.
> > >>
> > >> Assuming step 1 is reached, step 2 will make a dvi file. That was not
> > >> what the OP asked for...
> > >
> > > pdftex (your one step road to a pdf)?
> > >
> > >  DESCRIPTION
> > >        Run  the  pdfTeX  typesetter  on  file,  usually creating
> > >        file.pdf.  
> > >
> > > Of course, B. will inform us that this amounts to eradicating a microbe with a
> > > gorilla (or vice-versa?).
> > >
> > >>
> > >> Ionel
> > >>
> > 
> > If you're dealing with latex files, as I have taken some minutes to
> > discover (cough), you need 'pdflatex', not pdftex, which will barf
> > immediately upon encountering latex commands.
> 
> So could you now elaborate on step 1 of this "one-step" process?
> 
> Cheers,
> David.


For the non-LaTeX people, the easiest is to create a tex file (or ltx,
if you wish) that contains this lines before the text:

  \documentclass[a4paper,12pt]{article}
  \pagenumbering{arabic}
  \begin{document}

and this line after the text:

  \end{document}

LaTeX will ignore spaces and newlines. So if you wish a newline
somewhere you need to add it with \newline. If the text is UTF-8, add
also \usepackage[utf8x]{inputenc} before \begin{document}. 
You can make a title with:
  \title{Title}
  \author{Me}
  \date{\today}
  \maketitle
after \begin{document}

``%'' is a comment in LaTeX, so you need to escaped it with \. The
same goes for few other characters (&, etc.) $ and [ are for
equations. < and > will not work, use $<$ and $>$ instead.

Good luck.

Ionel

P.S. I am not the one that suggested to go via LaTeX!

[toc] | [prev] | [next] | [standalone]


#190847

FromCurt <curty@free.fr>
Date2018-01-09 16:40 +0100
Message-ID<v64am-5Qy-19@gated-at.bofh.it>
In reply to#190841
On 2018-01-09, David Wright <deblis@lionunicorn.co.uk> wrote:
>> 
>> If you're dealing with latex files, as I have taken some minutes to
>> discover (cough), you need 'pdflatex', not pdftex, which will barf
>> immediately upon encountering latex commands.
>
> So could you now elaborate on step 1 of this "one-step" process?
>
> Cheers,
> David.
>
>

Like the other, more knowledgeable guy said.

pdftex will actually create a pdf out of a text file without complaint
if you put '\end' on a newline at the end of the text file (I wouldn't
recommend such a bare-bones approach, though, in my extremely limited
experience, for formatting reasons). Or you can just type '\end' in the
little interactive mode that comes up in the terminal when errors or
omissions are encountered.

All roads lead to Rome, I reckon.

-- 
"Ruling a large nation is like cooking a small fish" - Lao Tzu

[toc] | [prev] | [next] | [standalone]


#190852

FromBrian <ad44@cityscape.co.uk>
Date2018-01-09 20:20 +0100
Message-ID<v67Bf-872-3@gated-at.bofh.it>
In reply to#190847
On Tue 09 Jan 2018 at 15:29:08 +0000, Curt wrote:

> On 2018-01-09, David Wright <deblis@lionunicorn.co.uk> wrote:
> >> 
> >> If you're dealing with latex files, as I have taken some minutes to
> >> discover (cough), you need 'pdflatex', not pdftex, which will barf
> >> immediately upon encountering latex commands.
> >
> > So could you now elaborate on step 1 of this "one-step" process?
> >
> > Cheers,
> > David.
> >
> >
> 
> Like the other, more knowledgeable guy said.

There are quite a few in this thread. Clue us in?

> pdftex will actually create a pdf out of a text file without complaint
> if you put '\end' on a newline at the end of the text file (I wouldn't
> recommend such a bare-bones approach, though, in my extremely limited
> experience, for formatting reasons). Or you can just type '\end' in the
> little interactive mode that comes up in the terminal when errors or
> omissions are encountered.

My pdftex complained madly about this and eventually threw the towel in.
 
> All roads lead to Rome, I reckon.

You always learn something new on this list. I thought it was Grimsby.

-- 
Brian.

[toc] | [prev] | [next] | [standalone]


#190853

FromCurt <curty@free.fr>
Date2018-01-09 20:50 +0100
Message-ID<v684h-8gx-1@gated-at.bofh.it>
In reply to#190852
On 2018-01-09, Brian <ad44@cityscape.co.uk> wrote:
>> >> 
>> >> If you're dealing with latex files, as I have taken some minutes to
>> >> discover (cough), you need 'pdflatex', not pdftex, which will barf
>> >> immediately upon encountering latex commands.
>> >
>> > So could you now elaborate on step 1 of this "one-step" process?
>> >
>> > Cheers,
>> > David.
>> 
>> Like the other, more knowledgeable guy said.
>
> There are quite a few in this thread. Clue us in?

The person who responded directly to David's question quoted above,
whose name, exotic in the regions from which I hail, escapes my
remembrance.

>> pdftex will actually create a pdf out of a text file without complaint
>> if you put '\end' on a newline at the end of the text file (I wouldn't
>> recommend such a bare-bones approach, though, in my extremely limited
>> experience, for formatting reasons). Or you can just type '\end' in the
>> little interactive mode that comes up in the terminal when errors or
>> omissions are encountered.
>
> My pdftex complained madly about this and eventually threw the towel
> in.

I can't account for it. If I feed pdftex a latex file, it whines for
every latex command it encounters, but if I press enter on each
encountered command error in the interactive console (if that is indeed
the term for it) it eventually exits completely (maybe it wants me to
'\end') , producing a pdf file (the text of which comprises both the
unknown latex commands as plain old text as well as the text as, well,
pdf-style text, if you catch my drift).

>> All roads lead to Rome, I reckon.
>
> You always learn something new on this list. I thought it was Grimsby.
>


-- 
"Ruling a large nation is like cooking a small fish" - Lao Tzu

[toc] | [prev] | [next] | [standalone]


#190854

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2018-01-09 21:10 +0100
Message-ID<v68nD-aI-1@gated-at.bofh.it>
In reply to#190853
On Tue 09 Jan 2018 at 19:41:35 (+0000), Curt wrote:
> On 2018-01-09, Brian <ad44@cityscape.co.uk> wrote:
> >> >> 
> >> >> If you're dealing with latex files, as I have taken some minutes to
> >> >> discover (cough), you need 'pdflatex', not pdftex, which will barf
> >> >> immediately upon encountering latex commands.
> >> >
> >> > So could you now elaborate on step 1 of this "one-step" process?
> >> >
> >> > Cheers,
> >> > David.
> >> 
> >> Like the other, more knowledgeable guy said.
> >
> > There are quite a few in this thread. Clue us in?
> 
> The person who responded directly to David's question quoted above,
> whose name, exotic in the regions from which I hail, escapes my
> remembrance.
> 
> >> pdftex will actually create a pdf out of a text file without complaint
> >> if you put '\end' on a newline at the end of the text file (I wouldn't
> >> recommend such a bare-bones approach, though, in my extremely limited
> >> experience, for formatting reasons). Or you can just type '\end' in the
> >> little interactive mode that comes up in the terminal when errors or
> >> omissions are encountered.
> >
> > My pdftex complained madly about this and eventually threw the towel
> > in.
> 
> I can't account for it. If I feed pdftex a latex file, it whines for
> every latex command it encounters, but if I press enter on each
> encountered command error in the interactive console (if that is indeed
> the term for it) it eventually exits completely (maybe it wants me to
> '\end') , producing a pdf file (the text of which comprises both the
> unknown latex commands as plain old text as well as the text as, well,
> pdf-style text, if you catch my drift).

For me, this is a new take on document conversion methods.

FWIW my test file produced 30819 "Missing character" errors which
is hardly surprising as TeX was released 40 years ago in the days
of 7 bit ASCII. The PDF had a single line of characters running
off the right hand side of the page.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#190861

From<tomas@tuxteam.de>
Date2018-01-09 23:30 +0100
Message-ID<v6az7-1vD-1@gated-at.bofh.it>
In reply to#190854
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Jan 09, 2018 at 02:09:22PM -0600, David Wright wrote:

[...]

> For me, this is a new take on document conversion methods.
> 
> FWIW my test file produced 30819 "Missing character" errors which
> is hardly surprising as TeX was released 40 years ago in the days
> of 7 bit ASCII. The PDF had a single line of characters running
> off the right hand side of the page.

Modern (La)TeX implementations should be able to cope with UTF-8
input: \usepackage[utf8]{inputenc} is one of the recommended magic
incantations (that said, reportedly Lua(La)TeX and Xe(La)TeX are
said to cope even better; they are part of your TeX live distribution
anyway).

Of course you have to make sure that your font supports the glyphs
you actually use.

Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlpVQEcACgkQBcgs9XrR2kZ8cwCfXZs1xEtELlztcEcAQ0Qxyk6q
Q+sAniPTYAwwYqfB8M1BZMIZjYOUlbBN
=Dtm9
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#190863

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2018-01-10 00:10 +0100
Message-ID<v6bbP-1XK-3@gated-at.bofh.it>
In reply to#190861
On Tue 09 Jan 2018 at 23:20:55 (+0100), tomas@tuxteam.de wrote:
> On Tue, Jan 09, 2018 at 02:09:22PM -0600, David Wright wrote:
> 
> [...]
> 
> > For me, this is a new take on document conversion methods.
> > 
> > FWIW my test file produced 30819 "Missing character" errors which
> > is hardly surprising as TeX was released 40 years ago in the days
> > of 7 bit ASCII. The PDF had a single line of characters running
> > off the right hand side of the page.
> 
> Modern (La)TeX implementations should be able to cope with UTF-8
> input: \usepackage[utf8]{inputenc} is one of the recommended magic
> incantations (that said, reportedly Lua(La)TeX and Xe(La)TeX are
> said to cope even better; they are part of your TeX live distribution
> anyway).
> 
> Of course you have to make sure that your font supports the glyphs
> you actually use.

Thanks. I feel ashamed that I'm wasting your time, and that of
Ionel Mugurel Ciobîcă. I'm only testing the methods being suggested
here for conversion. It's proved valuable (for me) as I hadn't come
across txt2pdf before, which is already wrapped up in my .bashrc,
but one does see poor suggestions as well as good ones.

I've been a LaTeX user for over 30 years, so I've stripped out more
Unicode workarounds than I care to mention over the years. Remember
this sort of stuff?

\catcode`Æ=13 \defÆ{\AE}% handle Æ
\catcode`æ=13 \defæ{\ae}% handle æ
\catcode`ß=13 \defß{\ss}% handle ß
\catcode`è=13 \defè{\`e}% handle è
\catcode`Î=13 \defÎ{\^I}% handle Î
\catcode`Œ=13 \defŒ{\OE}% handle Œ
\catcode`œ=13 \defœ{\oe}% handle œ
\catcode`Ř=13 \defŘ{\v R}% handle Ř
\catcode`ř=13 \defř{\v r}% handle ř

I do remember \usepackage[utf8]{inputenc}, but even that has been
superceded by \RequirePackage{fontspec} (yes, I moved on from
using .sty files to .cls files about 5 years ago).

Apologies again.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#190865

From<tomas@tuxteam.de>
Date2018-01-10 00:50 +0100
Message-ID<v6bOx-2gf-1@gated-at.bofh.it>
In reply to#190863
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, Jan 09, 2018 at 05:01:50PM -0600, David Wright wrote:
> On Tue 09 Jan 2018 at 23:20:55 (+0100), tomas@tuxteam.de wrote:

[...]

> > Modern (La)TeX implementations should be able to cope with UTF-8

[...]

> Thanks. I feel ashamed that I'm wasting your time, and that of
> Ionel Mugurel Ciobîcă.

No worries: people here are not forced to answer :-)

>                        I'm only testing the methods being suggested
> here for conversion. It's proved valuable (for me) as I hadn't come
> across txt2pdf before, which is already wrapped up in my .bashrc,
> but one does see poor suggestions as well as good ones.
> 
> I've been a LaTeX user for over 30 years, so I've stripped out more
> Unicode workarounds than I care to mention over the years. Remember
> this sort of stuff?
> 
> \catcode`Æ=13 \defÆ{\AE}% handle Æ
> \catcode`æ=13 \defæ{\ae}% handle æ

[...]

You bet. My first TeX was on an Atari ST ($DEITY knows when: Wikipedia
says between 1985 and 1993). LaTeX wasn't around. UTF-8 much less.
Heck, even Latin-1 wasn't quite there, German tended to cannibalize
several ASCII codes for its special characters (you had to decide
whether you wanted '{' or 'ä' or something). The "upper half" tended
to be some weird graphical chars.

Oh, yes, I do remember. Dimly, though.

> I do remember \usepackage[utf8]{inputenc}, but even that has been
> superceded by \RequirePackage{fontspec} (yes, I moved on from
> using .sty files to .cls files about 5 years ago).

OK.

> Apologies again.

Again, no worries.

Cheers
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlpVUt8ACgkQBcgs9XrR2kaydQCaAlFVPsFZPn6AnEoXAWR+wkkx
mqMAn0HKgmqMjjMgPrH0reTz/SKIlC9m
=EFrm
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#190855

FromBrian <ad44@cityscape.co.uk>
Date2018-01-09 21:40 +0100
Message-ID<v68QF-nR-3@gated-at.bofh.it>
In reply to#190853
On Tue 09 Jan 2018 at 19:41:35 +0000, Curt wrote:

> On 2018-01-09, Brian <ad44@cityscape.co.uk> wrote:
> >
> > There are quite a few in this thread. Clue us in?
> 
> The person who responded directly to David's question quoted above,
> whose name, exotic in the regions from which I hail, escapes my
> remembrance.

I am not playing your games. Exotica is outside my field of interest.
Your private life is your own.
 
> >> pdftex will actually create a pdf out of a text file without complaint
> >> if you put '\end' on a newline at the end of the text file (I wouldn't
> >> recommend such a bare-bones approach, though, in my extremely limited
> >> experience, for formatting reasons). Or you can just type '\end' in the
> >> little interactive mode that comes up in the terminal when errors or
> >> omissions are encountered.
> >
> > My pdftex complained madly about this and eventually threw the towel
> > in.
> 
> I can't account for it. If I feed pdftex a latex file, it whines for
> every latex command it encounters, but if I press enter on each
> encountered command error in the interactive console (if that is indeed
> the term for it) it eventually exits completely (maybe it wants me to
> '\end') , producing a pdf file (the text of which comprises both the
> unknown latex commands as plain old text as well as the text as, well,
> pdf-style text, if you catch my drift).

Oh. pdftex is now being fed a latex file, not a plain text file.
Previously:

 > pdftex will actually create a pdf out of a *text file*....

(The "*"s are mine. Just in case you fail to notice we are talking
about different things).

Boats. Midstrem.

> >> All roads lead to Rome, I reckon.
> >
> > You always learn something new on this list. I thought it was Grimsby.

On second thoughts (everyone can have them), maybe it was Scunthorpe.

-- 
Brian.

[toc] | [prev] | [next] | [standalone]


#190856

FromBrian <ad44@cityscape.co.uk>
Date2018-01-09 21:50 +0100
Message-ID<v690m-rj-5@gated-at.bofh.it>
In reply to#190855
On Tue 09 Jan 2018 at 20:36:23 +0000, Brian wrote:

> I am not playing your games. Exotica is outside my field of interest.
                                       ^ 
                                       ^are

Just in case there is a nitpick.

-- 
Brian.

[toc] | [prev] | [next] | [standalone]


#190857

FromCurt <curty@free.fr>
Date2018-01-09 22:00 +0100
Message-ID<v69a1-uv-1@gated-at.bofh.it>
In reply to#190855
On 2018-01-09, Brian <ad44@cityscape.co.uk> wrote:
>
> Oh. pdftex is now being fed a latex file, not a plain text file.
> Previously:
>
> > pdftex will actually create a pdf out of a *text file*....

That's right. No contradiction. I just added a data point.


-- 
"Ruling a large nation is like cooking a small fish" - Lao Tzu

[toc] | [prev] | [next] | [standalone]


#190862

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2018-01-09 23:40 +0100
Message-ID<v6aIN-1yJ-1@gated-at.bofh.it>
In reply to#190857
On Tue 09 Jan 2018 at 20:47:44 (+0000), Curt wrote:
> On 2018-01-09, Brian <ad44@cityscape.co.uk> wrote:
> >
> > Oh. pdftex is now being fed a latex file, not a plain text file.
> > Previously:
> >
> > > pdftex will actually create a pdf out of a *text file*....
> 
> That's right. No contradiction. I just added a data point.

Perhaps before this protracted, tangential and niggling subthread
becomes acrimonious or invidious, it might be easier to just state
than TeX/LaTeX is a useless way to turn a *text* file into a PDF.
And that's without discussing whether having to install a TeX system
is any better than installing LibreOffice.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#190874

FromCurt <curty@free.fr>
Date2018-01-10 10:10 +0100
Message-ID<v6kyt-80d-3@gated-at.bofh.it>
In reply to#190862
On 2018-01-09, David Wright <deblis@lionunicorn.co.uk> wrote:
>
> Perhaps before this protracted, tangential and niggling subthread
> becomes acrimonious or invidious, it might be easier to just state

Well, it did, through no fault of mine own, I must say, turn both
acrimonious and invidious. I have been neither (up till now).

 Someone: use latex (to produce a pdf).
 Someone else: That will produce a dvi-not what the OP wanted--two-step
 rather than one-step operation.
 Me: not so, use pdftex--one step operation (from *latex* to pdf).
 Me correcting me: actually, you need pdflatex for *latex*.
 You (a thirty-year veteran latex user we learn elsewhere): Please explain the
 first step (which is how to create a latex file).

> than TeX/LaTeX is a useless way to turn a *text* file into a PDF.

Sure. However no one suggested that, did they? Did you think *I* was
suggesting that as a viable method or approach? I wasn't; I'm sorry for
your confusion; I was merely surprised to get legible pdf output from a
text file with pdftex (I think I did have to type '\end' in the
interactive console, though, maybe). YMV (Your Mileage Varied). That
particular tangent I meant only as an aside, for the pure scientific
interest of the thing. I mean in the interest of experimentation. (I
only went down that experimental road because when I wrong-headedly ran
pdftex on a latex file I had on hand and cycled through all the errors,
it did spit out a readable pdf file).

> And that's without discussing whether having to install a TeX system
> is any better than installing LibreOffice.

Yes, I know, you're all flying to the moon in 1969 and must fit
everything into a kilobyte or two.

But I did foresee this objection with my Gorilla-microbe metaphor,
although I needn't have done so as I was not the one to make the original
suggestion of latex for the production of pdfs in the first place.

> Cheers,
> David.
>
>


-- 
"Ruling a large nation is like cooking a small fish" - Lao Tzu

[toc] | [prev] | [next] | [standalone]


#190875

From<tomas@tuxteam.de>
Date2018-01-10 10:50 +0100
Message-ID<v6lbb-8eQ-5@gated-at.bofh.it>
In reply to#190874
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Jan 10, 2018 at 09:02:08AM +0000, Curt wrote:

[...]

>  You (a thirty-year veteran latex user we learn elsewhere): Please explain the
>  first step (which is how to create a latex file).
> 
> > than TeX/LaTeX is a useless way to turn a *text* file into a PDF.

Perhaps the conflict can be tackled better by making something
explicit what has been implicit all along: is (La)TeX text, or
is it not? Both standpoints exist, and this dichotomy can even
be seen in the mime types database y'all have received as a
present with your distribution; but note some peculiarity:

  tomas@trotzki:~$ egrep '\<(la)?tex\>' /etc/mime.types 
  application/x-latex                             latex
  application/x-tex-gf                            gf
  application/x-tex-pk                            pk
  text/vnd.latex-z
  text/x-tex                                      tex ltx sty cls

Note something? (I'm ignoring for the moment .gf and .pk, which
arguably can be seen as binary for now). LaTeX goes under the
umbrella "application" (ain't text) and tex (with its LaTeX
sibling sty and LaTeX-3 sibling .cls) under "text". What is
going on here?

A couple of years ago, XML seemed like the promise from the
future, I was looking how to serve XML files over HTTP. For me
(coming from a more Unix-y and free background) it was clearly
"text": everything I can grab at with my vi(m) or Emacs is text,
and XML, though slightly disgusting at times, fell squarely into
that category. So "text/xml" shall it be.

My surprise was not small when I realized that clients from the
Microsoft camp nearly freaked out at that proposal. They wanted
"application/xml".

To me, this was a clear culture clash between a DIY, think-for-
yourself culture (hey, it's text: just throw an editor at it
and hack at it) versus an authoritarian one ("only use
with vendor-approved software; warranty void, and if we ever
find out how (DMCA?), we'll send the black helicopters"[1])

Yeah. Both standpoints exist, and I think we should respect
each other and just acknowledge the difference.

But for me, (La)TeX *are* text :-)

Cheers

[1] Here you notice I've some bias in that: but then, I hope
   you noticed a while ago :)

- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlpV4QMACgkQBcgs9XrR2kZDSQCdHvediP09+YSOT8UNBbaFrDwh
RuUAn3YrNZYQuEcEk08miQnZ1CB4Puiy
=qM+v
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#190892

FromIonel Mugurel Ciobîcă <I.M.Ciobica@upcmail.nl>
Date2018-01-10 14:20 +0100
Message-ID<v6osp-2rd-7@gated-at.bofh.it>
In reply to#190875
On 10-01-2018, at 10h 46'43", tomas@tuxteam.de wrote about "Re: How to create a PDF-Printer from the command line"
> 
> But for me, (La)TeX *are* text :-)
> 

+1


Ionel

[toc] | [prev] | [next] | [standalone]


#190901

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2018-01-10 16:40 +0100
Message-ID<v6qDU-3UD-21@gated-at.bofh.it>
In reply to#190875
On Wed 10 Jan 2018 at 10:46:43 (+0100), tomas@tuxteam.de wrote:
> On Wed, Jan 10, 2018 at 09:02:08AM +0000, Curt wrote:
> 
> [...]
> 
> >  You (a thirty-year veteran latex user we learn elsewhere): Please explain the
> >  first step (which is how to create a latex file).
> > 
> > > than TeX/LaTeX is a useless way to turn a *text* file into a PDF.
> 
> Perhaps the conflict can be tackled better by making something
> explicit what has been implicit all along: is (La)TeX text, or
> is it not? Both standpoints exist, and this dichotomy can even
> be seen in the mime types database y'all have received as a
> present with your distribution; but note some peculiarity:
> 
>   tomas@trotzki:~$ egrep '\<(la)?tex\>' /etc/mime.types 
>   application/x-latex                             latex
>   application/x-tex-gf                            gf
>   application/x-tex-pk                            pk
>   text/vnd.latex-z
>   text/x-tex                                      tex ltx sty cls
> 
> Note something? (I'm ignoring for the moment .gf and .pk, which
> arguably can be seen as binary for now). LaTeX goes under the
> umbrella "application" (ain't text) and tex (with its LaTeX
> sibling sty and LaTeX-3 sibling .cls) under "text". What is
> going on here?
> 
> A couple of years ago, XML seemed like the promise from the
> future, I was looking how to serve XML files over HTTP. For me
> (coming from a more Unix-y and free background) it was clearly
> "text": everything I can grab at with my vi(m) or Emacs is text,
> and XML, though slightly disgusting at times, fell squarely into
> that category. So "text/xml" shall it be.
> 
> My surprise was not small when I realized that clients from the
> Microsoft camp nearly freaked out at that proposal. They wanted
> "application/xml".
> 
> To me, this was a clear culture clash between a DIY, think-for-
> yourself culture (hey, it's text: just throw an editor at it
> and hack at it) versus an authoritarian one ("only use
> with vendor-approved software; warranty void, and if we ever
> find out how (DMCA?), we'll send the black helicopters"[1])
> 
> Yeah. Both standpoints exist, and I think we should respect
> each other and just acknowledge the difference.
> 
> But for me, (La)TeX *are* text :-)

Yes, you can put me in the text camp, and a little further over
than you, I believe. I have several extensions in my ~/.mime-types
which are set to "text/plain" which means (in mutt, anyway) that
such attachments are displayed just as if they were email text.
latex wasn't in that list only because I'm not in the habit of
attaching LaTeX files—I would attach the generated PDF. But thanks
for the heads-up.

>From the point of view of the OP and this thread, it's self-evident
that the output PDF was required to contain a listing of the text
file itself, *not* the results of its interpretation by software
that just happens to produce PDF-formatted files amongst its output.

A possibly sensible method involving LaTeX (if that happened to be
installed on the target system) might be to post some boilerplate
code that could be used to top and tail the original file; this
would likely involve \verbatim directives and suchlike. Not having
used it like that, I have no idea how generalised that could be made.

But that's very different from suggesting feeding the raw file to
fooLaTeX and seeing what comes out of the other end. Different, too,
from saying that if it happens to be valid LaTeX code, process it
and print the output instead. The latter might produce

2. PROGRAM SUMMARY

in 30 point bold Palatino, whereas a listing should contain a line like

\mychapter{Program summary}

I might just mention that many of us will have experience of
pretty-printing (IIRC a2ps can do that) which is a halfway house:
suitable text files are constrained in their contents (typically
they are source code to some programming language) but processed
by the printing system to improve its readability. It's certainly
*not* processed by the target interpreter/compiler.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#190902

From<tomas@tuxteam.de>
Date2018-01-10 17:20 +0100
Message-ID<v6rgB-4oC-3@gated-at.bofh.it>
In reply to#190901
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Jan 10, 2018 at 09:38:47AM -0600, David Wright wrote:
> On Wed 10 Jan 2018 at 10:46:43 (+0100), tomas@tuxteam.de wrote:

[text, yeah!]

> > But for me, (La)TeX *are* text :-)
> 
> Yes, you can put me in the text camp, and a little further over
> than you, I believe [...]

Phew! I'm not alone, it seems :)

[...]

> But that's very different from suggesting feeding the raw file to
> fooLaTeX and seeing what comes out of the other end. Different, too,
> from saying that if it happens to be valid LaTeX code, process it
> and print the output instead. The latter might produce

And to be fair, results can be pretty exciting, depending on the
actual file content...

I would go with a2ps, too, btw.

Downside is that it does the panoramic tour via PS and thus generates
fairly hefty PDFs.

Cheers
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlpWO5UACgkQBcgs9XrR2kYkdACffVJuo+aQoDqLeQ0Y9ZsNYuwU
Ph8An2SrNW/ovzzbDsKoLfnGBfy2rBFh
=Juy8
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


Page 2 of 4 — ← Prev page 1 [2] 3 4  Next page →

Back to top | Article view | linux.debian.user


csiph-web