eddy_em: (Костерок)
eddy_em ([personal profile] eddy_em) wrote2017-01-23 07:31 pm

Тебе скучно? Обнови генту!

После обновления генты отчет обсерватории (он на скриншоте в предыдущей заметке) перестал компилироваться. Латех ругался на непонятные ошибки (знак =, например) до \begin{document}. Методом постепенного включения \endinput был обнаружен проблемный участок:
%
% Degrees, minutes and seconds above the decimal point
%
\def\@rmpt#1.{#1}
\def\put@pt#1#2.#3{\ifx#3\empty\@rmpt#2#1\else #2.\kern-.25em\relax#1\@rmpt#3\fi}
% magnitude
\def\mag#1{\ensuremath{\put@pt{^m}#1.\empty}}
% degrees
\def\arcdeg#1{\ensuremath{\put@pt{^\circ}#1.\empty}}
% arc minutes
\def\arcmin#1{\ensuremath{\put@pt{'}#1.\empty}}
% arc seconds
\def\arcsec#1{\ensuremath{\put@pt{''}#1.\empty}}

Сразу подумал, что что-то новенькое сделали на макрос \mag, и действительно: он уже давно был, только в предыдущих версиях texlive не вылезало никаких проблем. В общем, заменил его на \Mag и sed'ом переделал все файлы:
find . -name '*.tex' -exec sed -i 's/\\mag/\\Mag/g' {} \;

Вот хоть бери и меняй все \def на \newcommand!

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org