Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
agsh
Posts: 5 Joined: Mon Jun 26, 2023 2:05 pm
Post
by agsh » Mon Jun 26, 2023 2:35 pm
Hello all!
I typed the following equations:
Code: Select all
\documentclass{article}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath, eqnarray}
\usepackage[colorlinks=true]{hyperref}
\begin{document}
\vspace*{30\baselineskip}
\bgroup\arraycolsep 0.1em
\begin{equationarray}{*{9}{c}}
M \ddot x & + & D_s \dot x & + & K x & = &
F \cos(\omega t + \delta) & + & P \cos(\gamma) \label{eq1} \\[6pt]
\underset{\substack{\text{сила} \\ \text{инерции}}}{M \ddot y} & + &
\underset{\substack{\text{сила} \\ \text{вязкого} \\ \text{трения}}}{D_s \dot y} & + &
\underset{\substack{\text{сила} \\ \text{упругости}}}{K y} & = &
\underset{\substack{\text{внешняя} \\ \text{вращающаяся} \\ \text{возбуждающая} \\ \text{сила}}}{F \sin(\omega t + \delta)} & + &
\underset{\substack{\text{постоянная} \\ \text{радиальная} \\ \text{сила} \\ \text{нагружения}}}{P \sin(\gamma)} \label{eq2}
\end{equationarray}
\egroup
Уравнения \ref{eq1} и \ref{eq2} имеют типичную форму дифференциальных уравнений\ldots
\end{document}
I see generated links to equations 1 and 2 and all looks like fine. But when I click them pdf page don't scroll to equation, but to the top of the page. How can I solve this problem?
agsh
Posts: 5 Joined: Mon Jun 26, 2023 2:05 pm
Post
by agsh » Mon Jun 26, 2023 9:43 pm
Just tried this solution:
https://tex.stackexchange.com/a/102845
Code: Select all
\documentclass{article}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage[colorlinks=true]{hyperref}
\newcommand*\centermathcell[1]{\omit\hfil$\displaystyle#1$\hfil\ignorespaces}
%\usepackage[showframe=true]{geometry}
\begin{document}
\begin{alignat}{9}
\centermathcell{M \ddot x} & + &
\centermathcell{D_s \dot x} & + &
\centermathcell{K x} & = &
\centermathcell{F \cos(\omega t + \delta)} & + &
\centermathcell{P \cos(\gamma)} \label{eq1} \\[6pt]
\underset{\substack{\text{сила} \\ \text{инерции}}}{M \ddot y} & + &
\underset{\substack{\text{сила} \\ \text{вязкого} \\ \text{трения}}}{D_s \dot y} & + &
\underset{\substack{\text{сила} \\ \text{упругости}}}{K y} & = &
\underset{\substack{\text{внешняя} \\ \text{вращающаяся} \\ \text{возбуждающая} \\ \text{сила}}}{F \sin(\omega t + \delta)} & + &
\underset{\substack{\text{постоянная} \\ \text{радиальная} \\ \text{сила} \\ \text{нагружения}}}{P \sin(\gamma)} \label{eq2}
\end{alignat}
\end{document}
Unfortunatelly, not so good, as I expected...
agsh
Posts: 5 Joined: Mon Jun 26, 2023 2:05 pm
Post
by agsh » Tue Jun 27, 2023 8:00 am
Tried this:
https://www.latex4technics.com/?note=2IYU
Code: Select all
\documentclass{article}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage[colorlinks=true]{hyperref}
\newcommand*\centermathcell[1]{\omit\hfil$\displaystyle#1$\hfil\ignorespaces}
\usepackage[showframe=true]{geometry}
\newcommand{\ccol}[1]{\omit\ensuremath{\hfill #1\hfill}}
\begin{document}
\begin{align}
\ccol{M \ddot x}
& + &
\ccol{D_s \dot x}
& + &
\ccol{K x}
& = &
\ccol{F \cos(\omega t + \delta)}
& + &
\ccol{P \cos(\gamma) \label{eq1}} \\[6pt]
%
\ccol{\underset{\substack{\text{сила} \\ \text{инерции}}}{M \ddot y}} & + &
\ccol{\underset{\substack{\text{сила} \\ \text{вязкого} \\ \text{трения}}}{D_s \dot y}} & + &
\ccol{\underset{\substack{\text{сила} \\ \text{упругости}}}{K y}} & = &
\ccol{\underset{\substack{\text{внешняя} \\ \text{вращающаяся} \\ \text{возбуждающая} \\ \text{сила}}}{F \sin(\omega t + \delta)}} & + &
\underset{\substack{\text{постоянная} \\ \text{радиальная} \\ \text{сила} \\ \text{нагружения}}}{P \sin(\gamma)} \label{eq2}
\end{align}
\end{document}
Even worse result...
Stefan Kottwitz
Site Admin
Posts: 10290 Joined: Mon Mar 10, 2008 9:44 pm
Post
by Stefan Kottwitz » Tue Jun 27, 2023 11:24 am
Welcome to the forum!
You could use
alignat
, for example:
Code: Select all
\documentclass{article}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage[colorlinks=true]{hyperref}
\newcommand*\centermathcell[1]{\omit\hfil$\displaystyle#1$\hfil\ignorespaces}
\usepackage[showframe=true]{geometry}
\newcommand{\ccol}[1]{\omit\ensuremath{\hfill #1\hfill}}
\begin{document}
\begin{alignat}{5}
&\ccol{M \ddot x}
&& + &
\ccol{D_s \dot x}
&& + &
\ccol{K x}
&& = &
\ccol{F \cos(\omega t + \delta)}
&& + &
\ccol{P \cos(\gamma) \label{eq1}} \\[6pt]
%
&\ccol{\underset{\substack{\text{сила} \\ \text{инерции}}}{M \ddot y}} && + &
\ccol{\underset{\substack{\text{сила} \\ \text{вязкого} \\ \text{трения}}}{D_s \dot y}} && + &
\ccol{\underset{\substack{\text{сила} \\ \text{упругости}}}{K y}} && = &
\ccol{\underset{\substack{\text{внешняя} \\ \text{вращающаяся} \\ \text{возбуждающая} \\ \text{сила}}}{F \sin(\omega t + \delta)}} && + &
\underset{\substack{\text{постоянная} \\ \text{радиальная} \\ \text{сила} \\ \text{нагружения}}}{P \sin(\gamma)} \label{eq2}
\end{alignat}
\end{document}
Stefan
LaTeX.org admin
agsh
Posts: 5 Joined: Mon Jun 26, 2023 2:05 pm
Post
by agsh » Tue Jun 27, 2023 12:08 pm
Stefan Kottwitz wrote: Welcome to the forum!
You could use
alignat
, for example:
Code: Select all
\documentclass{article}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage[colorlinks=true]{hyperref}
\newcommand*\centermathcell[1]{\omit\hfil$\displaystyle#1$\hfil\ignorespaces}
\usepackage[showframe=true]{geometry}
\newcommand{\ccol}[1]{\omit\ensuremath{\hfill #1\hfill}}
\begin{document}
\begin{alignat}{5}
&\ccol{M \ddot x}
&& + &
\ccol{D_s \dot x}
&& + &
\ccol{K x}
&& = &
\ccol{F \cos(\omega t + \delta)}
&& + &
\ccol{P \cos(\gamma) \label{eq1}} \\[6pt]
%
&\ccol{\underset{\substack{\text{сила} \\ \text{инерции}}}{M \ddot y}} && + &
\ccol{\underset{\substack{\text{сила} \\ \text{вязкого} \\ \text{трения}}}{D_s \dot y}} && + &
\ccol{\underset{\substack{\text{сила} \\ \text{упругости}}}{K y}} && = &
\ccol{\underset{\substack{\text{внешняя} \\ \text{вращающаяся} \\ \text{возбуждающая} \\ \text{сила}}}{F \sin(\omega t + \delta)}} && + &
\underset{\substack{\text{постоянная} \\ \text{радиальная} \\ \text{сила} \\ \text{нагружения}}}{P \sin(\gamma)} \label{eq2}
\end{alignat}
\end{document}
Stefan
Surprisingly, I was so close to correct answer!
Many thanks, Stefan!
I'd like to clarify post header. How can I do it?
Stefan Kottwitz
Site Admin
Posts: 10290 Joined: Mon Mar 10, 2008 9:44 pm
Post
by Stefan Kottwitz » Tue Jun 27, 2023 12:41 pm
You can edit your first post, that has the header. Otherwise, if it's restricted/protected and cannot be edited after some time, you can just let me know and I edit it for you, I can edit the post headers.
Stefan
LaTeX.org admin