LaTeXの複雑な生活

LaTeXでの論文のレイアウトにより、ステージは少なくともいくつかの受け入れられた標準に準拠してその外観をもたらすようになりました。 したがって、標準的な手段の使用を含む、つまりグーグルによる、発生した問題の解決策の検索が開始されました。



まだらなフォーラムで見つかった解決策を見た後に最初に考えられたのは、「私は眠らない」というものでした。 Baldin、Syutkin、Lvovskyのよく知られているマニュアルを少し反省し、すばやくスクロールして、反省の結果を確認したことで、問題をよりコンパクトで、便利で、認識された方法で扱うことができました。



そして、私がやらない方が良い方法の2つの例を挙げます。 正直なところ、彼らはとても喜んでいました、なぜなら 創作者の創造性とエネルギーについて証言する。



タスク :ワードラップなしで見出しを取得し、完全に左揃えにします。

ソース :dxdy.ruのmix_mix



%      . \newcommand{\MTKPsectAlignLeft}{% \let\\\@centercr\@rightskip\@flushglue \rightskip\@rightskip% \leftskip\z@skip} %    \newcommand{\MTKPsectAlignCenter}{% \let\\\@centercr \rightskip\@flushglue\leftskip\@flushglue \parindent\z@\parfillskip\z@skip} %    \newcommand{\MTKPsectionAlign}{\MTKPsectAlignLeft} \newcommand{\MTKPsubsectionAlign}{\MTKPsectAlignLeft} \newcommand{\MTKPsubsubsectionAlign}{\MTKPsectAlignLeft} %        \newcommand{\MTKPsectAlign}[2]{% \expandafter\renewcommand\csname\string MTKP#1Align\endcsname{% \@nameuse{MTKPsectAlign#2}}} %   \newcommand{\MTKPsectionStyle}{\normalfont\MTKPfontXXVIsize\it\MakeUppercase} % , luitzen \renewcommand\section{\clearpage\@startsection {section}{1}{.em}% {-15mm \@plus -3mm \@minus -2mm}% {15mm \@plus 1mm \@minus 2mm}% {\let\@hangfrom\@empty \MTKPsectionAlign\MTKPsectionStyle}} %    . %  \chapter{--}      \newcommand\chapter{ \begingroup\clearpage\MTKPsectAlign{subsection}{Center}% \subsection*{#1}% \addcontentsline{toc}{section}{#1}\endgroup}
      
      







ソリューションはローカルです:

 \section[  ]{\raggedright  \\  }
      
      







タスク :テキストに大文字を使用し、コンテンツに大文字を使用せずに、ハイフネーションなしで見出しを取得します。

ソース :alex __、 gentoo.ruから



 \makeatletter \renewcommand{\l@section}{\@dottedtocline{1}{0.4cm}{0.4cm}} \renewcommand{\thesection}{\arabic{section}} \renewcommand{\section}{\@startsection{section}{1}{1.25cm}{-3.5ex plus -1ex minus -.2ex}{2.3ex plus.2ex}{\raggedright\normalfont\bfseries}} \makeatother %  \makeatletter \renewcommand{\l@subsection}{\@dottedtocline{2}{0.8cm}{0.8cm}} \renewcommand{\thesubsection}{\arabic{section}.\arabic{subsection}} \renewcommand{\subsection}{\@startsection{subsection}{2}{1.25cm}{-3.5ex plus -1ex minus -.2ex}{2.3ex plus.2ex}{\raggedright\normalfont\bfseries}} \makeatother % - \makeatletter \renewcommand{\thesubsubsection}{\arabic{section}.\arabic{subsection}.\arabic{subsubsection}} \renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{1.25cm}{-3.5ex plus -1ex minus -.2ex}{2.3ex plus.2ex}{\raggedright\normalfont}} \makeatother \makeatletter \newcommand{\Section}[1]{ \refstepcounter{section} \section*{\MakeTextUppercase{\arabic{section} #1}} \addcontentsline{toc}{section}{\arabic{section} #1} } \makeatother
      
      







ソリューションはローカルです:

 \section[  ]{  \\  }
      
      







もちろん、両方のソリューションは、必要に応じてグローバルマクロに変換できます。これは、ドキュメントのプリアンブルに一度含めるだけで十分ですが、これも不必要な手間と時間になります。 さらに、ギリシャ文字や忘れられない数式などの形でトリッキーな瞬間が存在するため、マクロが見出しを正しく処理できないということはありません。



今まで、私は事実上TeXマクロを理解していません(そして、上記のコードの山は完全に暗い森です)、そして私は常に標準のコマンドとクラス以上でうまく管理しています。 私のmiktexおよびtexlive構成で唯一のサードパーティは同じPsCyrフォントであり、それが常に必要なわけではありません。



問題の類似物として、アルゴリズムの独自の実装を書くことと既製のライブラリを使用することの間の永遠のバランスが思い浮かびます。 研究者が彼のタスクでどのようなニュアンスを形成できるか、したがって、彼のコードがそれらを考慮に入れるかをよく知っているという議論でさえ、常に正しいとはほど遠い。 多くの図書館では、ほとんどすべてがすでに考慮されています。 最も標準的なアルゴリズムは非常によくテストされているため、使用の制限は実装エラーではなく数学に制限されます。



だから、質問。 修辞的。 真に初歩的なツールを使用してデバッグするツールがある場合、なぜ車輪を再発明するのですか? 日常の問題を解決するために、既存の表現された可能性を費やし、本当に必要な場所にそれを残す機会を逃していませんか?



All Articles