Thanks Daniel (and sorry for being late with the answer), the fixes in
/usr/bin/latex2html you proposed really fix the issue with subequation
numbering.
One more rather general issue - if I understood well, all environments
"not known" to latex2html are processed with (pdf)latex and a picture of
the corresponding part is included in the HTML instead, right?
Nevertheless, I have a picture environment (example is attached). When
processing this simple example, the first picture appears in the web
page. The 2nd one does not. Well, it requires the axohelp command to be
run at some point and I don't know how to achieve that. Any idea, please?
Then I have a more complex case with exactly the same simple LaTeX
picture (figure 1 in the above example). This one is not processed and
does not appear in the Web page. Hmm, I checked the generated images.pdf
file and it is not there, but I cannot see any error message in the
images.log file.... It is not even in the images.tex file.... So,
somehow the filter did not dump it to the images.tex.... Where should I
look to figure out what happened?
Thanks a lot for any hint.
Best regards, Tomas
On 1/8/21 5:45 PM, Daniel Gildea wrote:
Hi,
I wonder if you could try commenting out the lines
shown in the attached patch in the latex2html script.
This seems to make the numbering work better for me.
I don't know why the character encoding wouldn't match
the charset tag. Can you send an example file and tell
me what command line options you are using?
Dan
On Fri, January 8, 2021 at 3:55PM, Tomas Davidek wrote:
Hi Dan,
thanks for the mail. Well, I tried to prepare a short example (attached),
but this one works perfectly. I have a much larger project that I would like
to convert to HTML. I can't send it as a whole tarball right now, but just
to give you a flavour what wrong I attach a snapshot of one page (pdf is
attached). As you can see, the subequations are numbered as 2.7a - 2.7c (but
they should in fact be 2.8a - 2.8c). Moreover, the last sentence refers to
one of the subequations (p_{\parallel}), but here the "correct" number
appears (2.8b).
It is very strange, I should experiment more with that. I double-checked
that I processed both the simple example and the complex case in the same
way. First I thought the complex case needs one more run of latex to produce
the references correctly, but I ran latex/pdflatex before I launched
latex2html.... Looking into aux-file, the equation numbers are correct (i.e.
2.8a - 2.8c), so I really don't understand why the picture of the three
subequations is produced with incorrect number. Can you suggest another test
I can perform?
One more item that worries me - latex2html systematically puts
charset=iso-8859-2 into the corresponding meta tag, even if the text is
encoded in UTF-8. Is there a way to force latex2html to enter the specified
charset in every html page?
Thanks a lot,
cheers,
Tomas
On 1/8/21 2:57 PM, Daniel Gildea wrote:
Hi,
Could you send a small example file for each of these problems?
Dan
\documentclass[11pt]{article}
\usepackage[czech]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\begin{document}
Pro popis interakcí částic se často používají i~tzv.~Mandelstamovy
invarianty\index{Mandelstamovy invarianty} $s, t,
u$. Představme si interakci dvou částic (1,\,2) za vzniku obecně jiných
částic (3,\,4)
\begin{equation}
\label{eq:interaction}
1 + 2 \rightarrow 3 + 4
\end{equation}
Mandelstamovy invarianty jsou pak definovány vztahy
\begin{subequations}
\begin{align}
\label{eq:mandelstam_s}
s & \equiv (P_1 + P_2)^2 \\
\label{eq:mandelstam_t}
t & \equiv (P_1 - P_3)^2 \\
\label{eq:mandelstam_u}
u & \equiv (P_1 - P_4)^2
\end{align}
\end{subequations}
Invariant $s$ zjevně představuje kvadrát celkové energie soustavy v~jejím
těžišťovém systému (CMS), invarianty $t, u$ lze vyjádřit pomocí $s$ a úhlu
vylétajících částic v~CMS.
The velocity $\beta$ is defined as
\begin{equation}
\label{eq:beta_def}
\vec{\beta} \equiv \vec{v}/c
\end{equation}
This is the reference to sub-equations
(\ref{eq:mandelstam_s})--(\ref{eq:mandelstam_u}).
\end{document}
\documentclass[11pt]{report}
\usepackage[czech]{babel}
\usepackage{a4}
\usepackage{axodraw2}
\newcommand{\gev}{\ifmmode \mathrm{GeV}\else GeV\fi}
\newcommand{\mev}{\ifmmode \mathrm{MeV}\else MeV\fi}
\newcommand{\kev}{\ifmmode \mathrm{keV}\else keV\fi}
\newcommand{\ele}{\ensuremath{\mathrm{e}^{-}}}
\newcommand{\pozitron}{\ensuremath{\mathrm{e}^{+}}}
\newcommand{\photon}{\ensuremath{\mathrm{\gamma}}}
\begin{document}
\chapter{Jednotky}
\label{sec:Jednotky}
\index{jednotky|(}
Ve fyzice částic se z~praktických důvodů veličiny energie ($E$),
hybnost ($p$) a hmota\footnote{Pro elementární částice používáme
termín hmota, nikoli hmotnost. Termínem hmota vždy rozumíme
hmotu částice v~jejím klidovém systému, což je ekvivalentní její
klidové energii.} ($m$) udávají ve
stejných jednotkách, a~to v~jednotkách
energie, tedy v~násobcích eV (eV, MeV, GeV, \dots).
Pracujeme tedy ve skutečnosti s~veličinami $E$, $pc$, $mc^2$,
které ovšem zapisujeme jako $E$, $p$ a $m$.
Tím se výrazně zjednodušují vztahy mezi jednotlivými kinematickými
proměnnými, např.\ pro celkovou energii částice pak platí
relativistický vztah
\begin{equation}
\label{eq:total_energy}
E = \sqrt{p^2 + m^2},
\end{equation}
kde $p$ je hybnost a $m$ klidová hmota částice.
Při výpočtech budeme často používat součin rychlosti světla $c$ a
Planckovy konstanty, proto je velmi užitečné si zapamatovat výslednou
hodnotu:
\begin{equation}
\label{eq:hc}
\hbar c \doteq 0{,}197~\mathrm{fm}\cdot\gev
\end{equation}
Poznamenejme, že v~některé literatuře %(především v~teoretických pracích)
se používá soustava jednotek
\begin{displaymath}
c = \hbar = 1,
\end{displaymath}
tj.~tyto konstanty ve výrazech jednoduše nevystupují. Při číselných
výpočtech však musíme \uv{doplnit} příslušné mocniny $c$ a $\hbar$ tak, aby
výsledná jednotka odpovídala SI\@. Hodnota $\hbar c$ ze
vztahu~(\ref{eq:hc}) pak představuje převodní
faktor mezi veličinami s~rozměrem délky a energie.
V~této knize budeme pro lepší orientaci čtenářů používat obě zmíněné
konstanty $\hbar$ i $c$. Jedinou výjimkou je vyjádření hybnosti a hmoty částic
v~energetických jednotkách, jak je uvedeno výše.
\index{jednotky|)}
\begin{figure}
\centering
\setlength{\unitlength}{0.5mm}
\begin{picture}(60,100)
% \put(0,0){\framebox(60,100){}}
\put(5,5){\makebox(0,0)[c]{a)}}
\put(20,50){\vector(0,1){50}}
\put(20,50){\vector(0,-1){50}}
%
\put(45,50){\makebox(0,0)[c]{$\vec{P}=\vec{0}, M$}}
\put(35,75){\makebox(0,0)[c]{$\vec{p}_1, m_1$}}
\put(35,25){\makebox(0,0)[c]{$\vec{p}_2, m_2$}}
\thinlines
\put(20,50){\circle*{15}}
\end{picture}\hfill%
\begin{picture}(180,100)
% \put(0,0){\framebox(180,100){}}
\put(5,5){\makebox(0,0)[c]{b)}}
\put(20,50){\vector(0,1){50}}
\put(20,50){\vector(0,-1){50}}
%
\put(45,50){\makebox(0,0)[c]{$\vec{P}=\vec{0}, M$}}
\put(35,75){\makebox(0,0)[c]{$\vec{p}_{12}, m_{12}$}}
\put(35,25){\makebox(0,0)[c]{$\vec{p}_3, m_3$}}
\thinlines
\put(20,50){\circle*{15}}
\thicklines
\put(85,50){\makebox(0,0)[c]{\LARGE $\oplus$}}
\put(130,50){\vector(1,1){40}}
\put(130,50){\vector(-1,-1){40}}
\put(160,50){\makebox(0,0)[c]{$\vec{p}^{\,*}_{12} = \vec{0}, m_{12}$}}
\put(135,75){\makebox(0,0)[c]{$\vec{p}^{\,*}_1, m_1$}}
\put(125,25){\makebox(0,0)[c]{$\vec{p}^{\,*}_2, m_2$}}
\thinlines
\put(130,50){\circle*{15}}
\end{picture}
\caption{Schéma dvoučásticového rozpadu (a) a
tříčásticový rozpad (b) nahlížený jako dva po sobě jdoucí
dvoučásticové rozpady, každý ve svém těžišťovém systému.}
\label{fig:rozpad_1_2_3}
\end{figure}
\begin{figure}
\centering
\setlength{\unitlength}{0.5mm}
\begin{picture}(140,100)
\SetScale{1.42} % default to 1 => 1pt (1/72 inch). Now scaled
% to 0.5mm (72/25.4)
\ArrowLine(0,50)(50,50) \put(10,44){\makebox(0,0)[c]{\ele}}
\ArrowLine(50,50)(90,80) \put(75,60){\makebox(0,0)[c]{\ele}}
\Photon(50,50)(90,20){2}{5.5} \put(75,40){\makebox(0,0)[c]{\photon}}
\Vertex(50,50){2}
\ArrowLine(90,80)(136,100) \put(115,85){\makebox(0,0)[c]{\ele}}
\Photon(90,80)(130,50){2}{5.5} \put(110,55){\makebox(0,0)[c]{\photon}}
\Vertex(90,80){2}
\ArrowLine(90,20)(135,40) \put(115,37){\makebox(0,0)[c]{\ele}}
\ArrowLine(90,20)(135,0) \put(115,2){\makebox(0,0)[c]{\pozitron}}
\Vertex(90,20){2}
\end{picture}
\caption{Schéma elektromagnetické spršky vytvořené vysokoenergetickým
elektronem.}
\label{fig:ele_shower}
\end{figure}
\end{document}
_______________________________________________
latex2html mailing list
latex2html@tug.org
https://tug.org/mailman/listinfo/latex2html