CYBERTEC PostgreSQL Logo

Producing LaTeX output

12.2015 / Category: / Tags: |

I think I first touched PostgreSQL in 1998 or 1999. It has been a long time, but PostgreSQL keeps inspiring me. I still keep finding cool features which have most likely been around for 15 years or more. Recently, I noticed by coincidence that psql can produce perfect LaTeX code. How cool is that? It's so cool that I decided to share my happiness with people reading my blog.

Let's start...

Here's some test data:

Making psql produce LaTeX is really simple:

From now on the output will be returned in LaTeX format:

This is even true for backslash commands:

PostgreSQL can also produce a variety of other formats, which might be useful to some people: aligned, asciidoc, html, latex, latex-longtable, troff-ms, unaligned, and wrapped.

Find out more about cool psql tricks - read Julian Markwort's blog about using psql to automate repeated tasks: gexec in psql for poweruser practice.


In order to receive regular updates on important changes in PostgreSQL, subscribe to our newsletter, or follow us on Facebook or LinkedIn.

2 responses to “Producing LaTeX output”

Leave a Reply

Your email address will not be published. Required fields are marked *

CYBERTEC Logo white
Get the newest PostgreSQL Info & Tools


    This site is protected by reCAPTCHA and the Google Privacy Policy & Terms of Service apply.

    ©
    2024
    CYBERTEC PostgreSQL International GmbH
    phone-handsetmagnifiercrosscross-circle
    linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram