[OS X TeX] [External] alignment of subfigures
Nitecki, Zbigniew H.
Zbigniew.Nitecki at tufts.edu
Tue Jun 10 16:18:57 EDT 2025
Two different hacks, one suggested by Herbert Voss and the other by Martin Costabel, both
fix the alignment—thank you both.
But I am still confused about how this works (and haven’t been able to figure it out from either Latex Companion III or Herbert’s PSTricks book).
In the sequence of commands
\subfloat[Level ]{
\psset{unit=\alpha}
\begin{pspicture}[unit=\beta](\gamma.\gamma)(\delta,\delta)
\psgrid[subgriddiv=m, gridlabels=0](0,0)(n,n)
\end{pspicture}
}\\
What exactly do the units \alpha and \beta control? I had assumed that having both was redundant (that they were automatically equal, and gave the units for the space alotted to the subfigure. But then what is the role
of \gamma and \delta? My best guess is that alpha is the a priori unit for coordinatizing the space for the subfigure, and withing that, gamma and delta tell us where the lower left and upper right corners of the
pspicture are in the alpha-controlled coordinates. If the space allotted to the subfigure is fixed, where is its origin? Then what is beta? It seems to control the size of the spaces
between the lines dividing the grid (or…the sides of the grid are always at (successive) integer values of the
coordinates inside the pspicture, for which the unit is beta). Clearly n controls the major division lines in the
grid, and m specifies how many subdivision lines are in each cell of the major division. But then I would expect
that if alpha and gamma are the same for two successive subfigures (and the first set of coordinates in \psgrid
is (0,0) ) then the actual grids should line up at least on the left. Maybe someone can point me to the appropriate pages of LC III or PSTricks where this is explained.
On Jun 10, 2025, at 05:53, Herbert Voss <Herbert.Voss at fu-berlin.de> wrote:
Am 10.06.25 um 03:31 schrieb Nitecki, Zbigniew H.:
I’m clearly misunderstanding some of the parameters for floats,
pspicture, and \psgrid.
The code below yields two grids of the same size (with different
subdivisions).
Should I have set the two pspicture parameters differently?
From what I understand,
the two pspictures are both 9cm x 9cm boxes, so why are they aligned
differently?
% !TEX TS-program = latex
\documentclass{article}
\usepackage{pstricks}
\usepackage{subfig}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}
\begin{center}
%
\subfloat[Level $2$]{
\begin{pspicture}[unit=3cm](0,0)(3,3)
That setting is too late for (3,3). Use
\subfloat[Level $2$]{%
\psset{unit=3cm}
\begin{pspicture}(0,0)(3,3)
\psgrid[subgriddiv=3, gridlabels=0](0,0)(3,3)
\end{pspicture}
}
You can also run the document with lualatex, then you'll get directly
the PDF.
Herbert
----------- Please Consult the Following Before Posting -----------
TeX FAQ: https://www.tug.org/mactex/faq/index.html
List Reminders and Etiquette: https://sites.esm.psu.edu/~gray/TeX/
List Archives: http://dir.gmane.org/gmane.comp.tex.macosx
https://email.esm.psu.edu/pipermail/macosx-tex/
TeX on Mac OS X Website: https://www.tug.org/mactex/index.html
List Info: https://email.esm.psu.edu/mailman/listinfo/macosx-tex
Caution: This message originated from outside of the Tufts University organization. Please exercise caution when clicking links or opening attachments. When in doubt, email the TTS Service Desk at it at tufts.edu<mailto:it at tufts.edu> or call them directly at 617-627-3376.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://email.esm.psu.edu/pipermail/macosx-tex/attachments/20250610/5aa143b3/attachment.htm>
More information about the MacOSX-TeX
mailing list