Graphics, Figures & Tables ⇒ Periodic Table inserted one \landscape page
Periodic Table inserted one \landscape page
I have to insert the periodic table of elements in an horizontal page in my \documentclass{book}.
I've find this link https://latex-cookbook.net/periodic-table/ where is it available a prety periodic table but alone in a document. This is the code provided:
\documentclass[border=10pt]{standalone}
\usepackage{pgf-PeriodicTable}
\begin{document}
\pgfPT
\end{document}
Does anyone knows how to use this resource to insert the table in my book?
Thank you
Finn
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Periodic Table inserted one \landscape page
I'm the author of the LaTeX Cookbook and maintain that website.
By horizontal page, do you mean it's a landscape layout? It would make sense since the table is pretty wide. You could use \resizebox of course, but you can also specify the cell size like this:
Code: Select all
\documentclass[landscape]{book}\usepackage{geometry}\usepackage{pgf-PeriodicTable}\begin{document}\pgfPT[cell size=30pt]\end{document}
Periodic Table inserted one \landscape page
Thank you very much for your quick answer! And congratulations for the LaTex Cookbook!
Yes, when I say horizontal page I mean landscape layout. But, don't want all the pages with landscape layout, just the periodic table one.
When I run this code:
\documentclass{book}
\usepackage{geometry}
\usepackage{pgf-PeriodicTable}
\usepackage{lscape}
\begin{document}
Hola como estás
\begin{landscape}
\pgfPT[cell size=32pt]
\end{landscape}
Y hola como estás
\end{document}
It's ok, and have one landscape page and the rest pages are vertical, but whe I insert this lines:
\begin{landscape}
\pgfPT[cell size=32pt]
\end{landscape}
in my large document with many pages doesn't work. I have this error message:
! Missing \endcsname inserted.
<to be read again>
\protect
l.147 \pgfPT[cell size=32pt]
Can you help me, please?
And 2. Is it possible to customize the periodic table in black and white?
Thank you
Finn
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Periodic Table inserted one \landscape page
I cannot know what else is in your large document. Can you post aFinn wrote:but whe I insert this lines .. in my large document with many pages doesn't work

And use the "Code" button to format code in a post, so it can easily be tested (and fixed) by every reader here in the forum, by clicking "Run LaTeX here" and editing and running again etc.
Stefan
Periodic Table inserted one \landscape page
Thank yoy again for your quick answer and sorry for my unknowingness about the use of this forum, (I'm learning).
I read the minimal working example and make some test, following the suggestions. Took my large document and found where it crash. It's because the use of: \usepackage[spanish,activeacute, es-tabla]{babel} (line #8).
Here you find the code that runs ok. Don't worry about the amount of lines because almost them are "%". When I activate \usepackage[spanish,activeacute, es-tabla]{babel} (line #8) have the error message and crash.
As far as I know, this package is necesary in order to change the page header, from "Chapter" to "Tema", using this command in line#65: %\addto\captionsspanish{\renewcommand{\chaptername}{Tema}}
Thanks,
Finn
Code: Select all
\documentclass{book}%XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX%XXXXXXXXXXX PAQUETES USADOS%XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX%\usepackage{lmodern}%\usepackage[T1]{fontenc}%\usepackage[spanish,activeacute, es-tabla]{babel}%\usepackage{mathtools}%\usepackage{mathrsfs}%\usepackage{amsfonts}%\usepackage{amssymb, amsmath, amsbsy} %Símbolos matemáticos y de flechas\usepackage{geometry} % Dimensiones del papel y configuración de la página.\usepackage[nouppercase]{scrlayer-scrpage} % Configuración de la página, encabezados y eso. Creo\usepackage{lscape} % Permite poner una página en horizontal\usepackage{pgf-PeriodicTable} % Tabla periódica%\usepackage{marvosym} % Marcado CE\usepackage{graphicx} % Importación de figuras\usepackage{epstopdf} % Importación de figuras%\usepackage{subfigure} % Creacion de subfiguras con a) y b)%\usepackage{psfrag} % Permite modificar el texto de las imágenes%\usepackage{float} % Permite ubicar una figura con [H] de "here"%\usepackage{pgfplots} % Gráficos%\usepackage{tikz} % Gráficos%\usepackage{chngcntr} % Notas al pie de página. \counterwithout{footnote}{chapter} y \counterwithin{footnote} {chapter} configuran si se renumeran las notas cada capítulo.%\usepackage{multirow, array} % para trabajar con tablas y matrices%\usepackage{enumerate}%\usepackage{enumitem, changepage} % modifica la separación en vertical de una lista%\usepackage{ulem} % para formato de letra, por ejemplo tachar%\usepackage{makeidx}%\usepackage{wasysym} % para centavo y pormil. No tiene \micro%\usepackage{upgreek}%\usepackage{xfrac} % para poner fracciones 1/2 pequeñas%\usepackage{longtable} % para hacer una tabla que pase varias páginas, para el índice de acrónimos%\usepackage{multicol} % permite hacer secciones a varias columnas dentro del texto
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Periodic Table inserted one \landscape page
that's a very good example that can be tested and shows the LaTeX error. So I suggest a quick fix: adding the babel option
es-lcroman
fixes the error:Code: Select all
\usepackage[spanish,activeacute, es-tabla, es-lcroman]{babel}
Stefan
Periodic Table inserted one \landscape page
