코드

코드

나는 \newglossaryentry 설명의 일부에 여러 줄 방정식을 원합니다(이미 [ 및 ] 또는 $$ $$를 사용하여 사용한 한 줄 방정식이 중앙에 있지 않기 때문에 적절한 열을 중심으로 하는 것이 좋습니다).

그래서 기본적으로 저는 용어집 열의 중앙에 한 줄 및 여러 줄 방정식을 원합니다.

감사해요!

추신: 나는 이것으로부터 뭔가를 얻을 수 있다고 생각했습니다.여기에 링크 설명을 입력하세요 하지만 난 할 수 없었어...

\documentclass[twoside]{amsbook}

\usepackage[colorlinks]{hyperref}

    \usepackage[xindy,counter=section,sanitize={name=false},style=index]{glossaries} %[toc]% %\glstoctrue
    \usepackage{nomencl}
        \makeglossaries %has to be after \usepackage{hyperref}              
        %
                \glossarystyle{long3col}            
                %\glossarystyle{super3col}

                \setlength{\glsdescwidth}{0.6\textwidth}
                \setlength{\glspagelistwidth}{0.15\textwidth}
            \newglossaryentry{AffineVariety}
                {
                    name=Affine Variety,
                    description={Affine varieties are defined to be anything that looks like the set of common zeros of a collection of polynomials. E.g., $A = \mathbb{C}[X]$ is the ring of polynomials in $X$ with complex coefficients. Let $f=X-1 \in A$ and its set of zeros, $Z(\{f\})=\{1\}$ is an example of an affine variety.}
                }
            \newglossaryentry{RemovableSingularity}
                {
                    name=Removable Singularity,
                    description={Formally, if $U \subset \mathbb{C}$ is an open subset of the complex plane $\mathbb{C}$, and $a \in U$, and $f: U\backslash\{a\} \to \mathbb{C}$ a holmorphic function, then $a$ is a removable singularity for $f$ if there exists a holomorphic function $g: U \to \mathbb{C}$, coinciding with $f$ on $U\backslash\{a\}$. It is said that $f$ is holomorphically extended over $U$ if such a $g$ exists.  A simple example is the function $$f(z) = \frac{\sin(z)}{z}$$ at $z=0$ (even this: \[f(z) = \frac{\sin(z)}{z}\] doesn't center.). The singularity, due to the indeterminate form, can be removed by defining $f(0)=1$, which is the limit of $f$ as $z$ approaches zero.}
                }
            \newglossaryentry{TetrahedralCoordinates}
                {
                    name=Tetrahedral Coordinates,
                    description={Coordinates useful in plotting projective three-dimensional curves of the form $f(x_0,x_1,x_2,x_3)=0$, which are defined by  
    %               \begin{minipage}[t][5cm][b]{0,5\textwidth}
    %               \ensuremath{
    %               $$ {\setlength\arraycolsep{0.2em} \begin{eqnarray} x_0 = 1-z-\sqrt{2}\,x \\  x_1 = 1 - z + \sqrt{2}\,x \\ x_2 = 1+ z+ \sqrt{2}\,y \\ x_3 = 1 + z - \sqrt{2}\,y \end{eqnarray} } $$ 
    %               \end{minipage}
    %               }
                    }
                }


\makeglossaries




\begin{document}

Consider the equation
\begin{equation}
e = m * c^2
\end{equation}
in which \gls{AffineVariety} is here, but not here \gls{TetrahedralCoordinates} oh and this \gls{RemovableSingularity}.


\printglossary

\end{document} 

답변1

환경 의 내용을 래핑하면 minipage표시된 수학이 환경의 중앙에 배치될 수 있습니다 longtable. 하지만 매번 그렇게 하는 것은 지루하고 융통성이 없으며 오류가 발생하기 쉽습니다.

\newcolumntype더 나은 옵션은 패키지 명령을 사용하여 array테이블 형식 환경에 대한 새 열 유형을 설정한 다음 새 용어집 스타일을 정의하는 데 사용할 수 있는 것입니다 my3col. 이 스타일은 long3col설명에 대한 변경된 열 유형을 기반으로 합니다 .

새 열 유형이 정의될 때 사용할 수 glossaries있도록 이전에 로드했습니다 . \glsdescwidth이는 이를 활용할 새로운 용어집 스타일을 설정하기 전에 정의됩니다. 마지막으로 새 스타일이 활성화됩니다.

코드

\documentclass[twoside]{amsbook}

\usepackage[colorlinks]{hyperref}
\usepackage[xindy,counter=section,sanitize={name=false},style=index]{glossaries} %[toc]% %\glstoctrue
\usepackage{nomencl}
    \setlength{\glsdescwidth}{0.6\textwidth}
    \setlength{\glspagelistwidth}{0.15\textwidth}
\usepackage{array}
  \newcolumntype{G}{% This is defining a new column type for tabulars which we will use to define the longtable environment in the new glossary style
    >{\begin{minipage}[t]{\glsdescwidth}}{c}<{\end{minipage}}%
    }
\newglossarystyle{my3col}{% call that style my3col
\setglossarystyle{long3col}% base it on long3col so we don't need to define the everything from scratch
\renewenvironment{theglossary}% here's the bit we want to alter
    {\begin{longtable}{lGp{\glspagelistwidth}}}% just change the central column to our new column type, G
    {\end{longtable}}}

\glossarystyle{my3col}% we want to use the new style!
\makeglossaries %has to be after \usepackage{hyperref}

    \newglossaryentry{AffineVariety}
        {
            name=Affine Variety,
            description={Affine varieties are defined to be anything that looks like the set of common zeros of a collection of polynomials. E.g., $A = \mathbb{C}[X]$ is the ring of polynomials in $X$ with complex coefficients. Let $f=X-1 \in A$ and its set of zeros, $Z(\{f\})=\{1\}$ is an example of an affine variety.}
        }
    \newglossaryentry{RemovableSingularity}
        {
            name=Removable Singularity,
            description={Formally, if $U \subset \mathbb{C}$ is an open subset of the complex plane $\mathbb{C}$, and $a \in U$, and $f: U\backslash\{a\} \to \mathbb{C}$ a holmorphic function, then $a$ is a removable singularity for $f$ if there exists a holomorphic function $g: U \to \mathbb{C}$, coinciding with $f$ on $U\backslash\{a\}$. It is said that $f$ is holomorphically extended over $U$ if such a $g$ exists.  A simple example is the function
              \[f(z) = \frac{\sin(z)}{z}\]
            at $z=0$ (even this:
              \[f(z) = \frac{\sin(z)}{z}\]
            doesn't center.). The singularity, due to the indeterminate form, can be removed by defining $f(0)=1$, which is the limit of $f$ as $z$ approaches zero.}
        }
    \newglossaryentry{TetrahedralCoordinates}
        {
            name=Tetrahedral Coordinates,
            description={Coordinates useful in plotting projective three-dimensional curves of the form $f(x_0,x_1,x_2,x_3)=0$, which are defined by
             \begin{gather*}
               X_0 = 1-Z-\sqrt{2}\,X \\
               X_1 = 1 - Z + \sqrt{2}\,X \\
               X_2 = 1+ Z+ \sqrt{2}\,Y \\
               X_3 = 1 + Z - \sqrt{2}\,Y
              \end{gather*}
            }
        }

\begin{document}

Consider the equation
\begin{equation}
e = m * c^2
\end{equation}
in which \gls{AffineVariety} is here, but not here \gls{TetrahedralCoordinates} oh and this \gls{RemovableSingularity}.


\printglossary

\end{document}

출력

새로운 스타일의 용어집

노트

  • \makeglossaries서문에서 두 번 필요하지 않습니다 .
  • $$...$$더 이상 사용되지 않으므로 사용하면 안 됩니다. 예를 들어 대신 을 사용하세요 \[...\].

관련 정보