我一直在反复试验地添加新行,否则有些句子会太长,文本看起来很荒谬。
我没有故意添加新行,你会看到有些地方插入了新行。我的目的不是将这段文字全部放在一个段落中,而是想得到答案,而不是在文本中添加新行,这样每行的长度都相等,
使用换行符,我可以通过反复试验保持句子的长度不变,这感觉像是在浪费时间,而且一定有一个解决方案,我真的不喜欢这些行变得这么长。
期望的行为:
在特定数量的字符后自动换行,默认行长度对我来说太长了,我想保持所有行的长度相同。
示例和代码:
\def\pl{\ +\ }
\def\eq{\ =\ }
\def\cd{\ \cdot\ }
\def\pr#1{\begin{flushleft}#1\end{flushleft}}
\def\hed#1{\textbf{\pr{#1}}}
% Coming from a coding background,
% I'm used to having a space before and after operators.
% the normal operator spacing annoys me.
% l just think it looks better
\begin{document}
\hed{
Notes on moles and molar mass:
}
\pr{
Molar mass is different for each atom/compound/molecule etc, it can be calculated can calculate it given you know the calculate the weight of 1 atom then (add up all protons, neytrons and electrons) then multiply it by $N_A[Avogadro's\ number] \eq 6.022 \cd 10^{23}$.
There's no reason to calculate this, The vast majority will look at some kind of data book m.
1 molar mass contains $6.022 \cd 10^{23}$ particles.
The molar mass of each element, compound, molecule etc varies as they have less or more neutrons protons and electrons.
Molar mass ensures that when you react different things the same number of particles will react. 1 mole is 1 molar mass.
}
\end{document}
答案1
我想你想要类似的东西
\documentclass{article}
\usepackage{parskip,amsmath}
% spacy math
%\thinmuskip=3mu
%\medmuskip=4mu plus 2mu minus 4mu
%\thickmuskip=5mu plus 5mu
\thinmuskip=5mu
\medmuskip=9mu plus 2mu minus 6mu
\thickmuskip=12mu plus 5mu minus 5mu
\begin{document}
\subsection*{Notes on moles and molar mass:}
Molar mass is different for each atom/compound/molecule etc, it can be
calculated can calculate it given you know the calculate the weight of
1 atom then (add up all protons, neytrons and electrons) then multiply
it by \[N_A \textit{[Avogadro's number]} - 6.022 \cdot 10^{23}.\] There's no
reason to calculate this, The vast majority will look at some kind of
data book m. 1 molar mass contains $6.022 \cdot 10^{23}$ particles.
The molar mass of each element, compound, molecule etc varies as they
have less or more neutrons protons and electrons. Molar mass ensures
that when you react different things the same number of particles will
react. 1 mole is 1 molar mass.
\end{document}
对于线宽,不清楚你是否指的是整个文档,例如
\documentclass[twocolumn]{article}
\usepackage{parskip,amsmath}
% spacy math
%\thinmuskip=3mu
%\medmuskip=4mu plus 2mu minus 4mu
%\thickmuskip=5mu plus 5mu
\thinmuskip=5mu
\medmuskip=9mu plus 2mu minus 6mu
\thickmuskip=12mu plus 5mu minus 5mu
\begin{document}
\subsection*{Notes on moles and molar mass:}
Molar mass is different for each atom\slash compound\slash molecule etc, it can be
calculated can calculate it given you know the calculate the weight of
1 atom then (add up all protons, neytrons and electrons) then multiply
it by \[N_A \textit{[Avogadro's number]} - 6.022 \cdot 10^{23}.\] There's no
reason to calculate this, The vast majority will look at some kind of
data book m. 1 molar mass contains $6.022 \cdot 10^{23}$ particles.
The molar mass of each element, compound, molecule etc varies as they
have less or more neutrons protons and electrons. Molar mass ensures
that when you react different things the same number of particles will
react. 1 mole is 1 molar mass.
\end{document}
或者只是一个地区:
\documentclass{article}
\usepackage{parskip,amsmath}
% spacy math
%\thinmuskip=3mu
%\medmuskip=4mu plus 2mu minus 4mu
%\thickmuskip=5mu plus 5mu
\thinmuskip=5mu
\medmuskip=9mu plus 2mu minus 6mu
\thickmuskip=12mu plus 5mu minus 5mu
\begin{document}
\subsection*{Notes on moles and molar mass:}
Molar mass is different for each atom\slash compound\slash molecule etc, it can be
calculated can calculate it given you know the calculate the weight of
1 atom then (add up all protons, neytrons and electrons) then multiply
it by \[N_A \textit{[Avogadro's number]} - 6.022 \cdot 10^{23}.\] There's no
reason to calculate this, The vast majority will look at some kind of
data book m. 1 molar mass contains $6.022 \cdot 10^{23}$ particles.
The molar mass of each element, compound, molecule etc varies as they
have less or more neutrons protons and electrons. Molar mass ensures
that when you react different things the same number of particles will
react. 1 mole is 1 molar mass.
\begin{minipage}{0.75\linewidth}
\subsection*{Notes on moles and molar mass:}
Molar mass is different for each atom\slash compound\slash molecule etc, it can be
calculated can calculate it given you know the calculate the weight of
1 atom then (add up all protons, neytrons and electrons) then multiply
it by \[N_A \textit{[Avogadro's number]} - 6.022 \cdot 10^{23}.\] There's no
reason to calculate this, The vast majority will look at some kind of
data book m. 1 molar mass contains $6.022 \cdot 10^{23}$ particles.
The molar mass of each element, compound, molecule etc varies as they
have less or more neutrons protons and electrons. Molar mass ensures
that when you react different things the same number of particles will
react. 1 mole is 1 molar mass.
\end{minipage}
\begin{minipage}{0.5\linewidth}
\subsection*{Notes on moles and molar mass:}
Molar mass is different for each atom\slash compound\slash molecule etc, it can be
calculated can calculate it given you know the calculate the weight of
1 atom then (add up all protons, neytrons and electrons) then multiply
it by \[N_A \textit{[Avogadro's number]} - 6.022 \cdot 10^{23}.\] There's no
reason to calculate this, The vast majority will look at some kind of
data book m. 1 molar mass contains $6.022 \cdot 10^{23}$ particles.
The molar mass of each element, compound, molecule etc varies as they
have less or more neutrons protons and electrons. Molar mass ensures
that when you react different things the same number of particles will
react. 1 mole is 1 molar mass.
\end{minipage}
\end{document}