LyXhow to export pdf that is sized to fit formula?

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
fms95032
Posts: 1
Joined: Tue Mar 17, 2020 7:05 pm

how to export pdf that is sized to fit formula?

Post by fms95032 »

Hi

When I export to pdf - it works just fine yet is the export of the full page - or what ever page size is set.

Is it possible to export just a selection of the page out to pdf? Or to set the page size to just a tad larger than the content on the page when exporting?

For example, if creating a mathematical formula - and I want to export just that formula, nothing else on that page - the intent is to use the equation editor feature within LyX and LaTeX to create equations that I can import or embed in other packages, such as InDesign or Word.

I'm by no means a LaTeX expert, just familiar enough to know I don't know what I'm doing.

Cheers,

Fred

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

how to export pdf that is sized to fit formula?

Post by kaiserkarl13 »

You can use the standalone class:

Code: Select all

\documentclass[12pt]{standalone}
\begin{document}
  \(\displaystyle ax^2 + bx + c = 0 \)
\end{document}
Note that "display" math (\[...\] or the {displaymath} environment) doesn't work with this class, hence the \displaymath command above.
Post Reply