[cstex] Symboly horního a dolního integrálu

petr zemánek petr.zemanek at gmail.com
Wed Apr 6 18:08:52 CEST 2011


Dobrý den,
ten třetí návrh vypadá dobře - dá se nějak hýbat s umístěním mezí u
integrálu (myslím především vertikálně)?
S pozdravem Petr Zemánek.

On 6 dub, 14:26, "Pavel Striz" <st... at fame.utb.cz> wrote:
> Posílám jisté nečisté vzorky, ten třetí by se dal ponastavovat, jak by bylo třeba.
> PS
>
> -----
> \documentclass{article}
> \usepackage[intlimits]{amsmath}
> \usepackage{calc}
> \begin{document}
>
> \begin{equation}
> \underline{\overline{\int}}_{\overline{a}}^{\underline{b}} f
> \end{equation}
>
> \begin{equation}
> \int_{\overline{a}}^{\underline{b}} f
> \end{equation}
>
> \setbox0=\hbox{$\int$}
> \begin{equation}
> \raisebox{-\ht0-\dp0+1.0pt}{\makebox[0pt][l]{\kern0.25\wd0\rule{0.75\wd0}{0 .5pt}}}
> \raisebox{\ht0+\dp0+3.5pt}{\makebox[0pt][l]{\kern1\wd0\rule{0.75\wd0}{0.5pt }}}
> \int\nolimits_{\hspace{0.5pt}a}^{\hspace{1.5pt}b} f(x)
> \end{equation}
> \end{document}
> -----
>
> -----Původní zpráva-----
> Od: cstex-bounces+striz=fame.utb... at cs.felk.cvut.cz [mailto:cstex-bounces+striz=fame.utb... at cs.felk.cvut.cz] za uživatele petr zemánek
> Odesláno: 6. dubna 2011 11:46
> Komu: cs... at cs.felk.cvut.cz
> Předmět: [cstex] Symboly horního a dolního integrálu
>
> Dobrý den,
> potřebuji vytvořit příkaz pro symboly dolního a horní integrálu.
> Našel
> jsem tento návod
>
> ====================================================
> \documentclass{report}
> \usepackage{localloc}
> % Ignore whitespace and make @ a letter
> %
> \endlinechar=-1
> \catcode`\ =9
> \makeatletter
> % Saves the current math style in \everymath, then expands its
> argument. The result is that
> % the math style is "saved", e.g., for use inside box commands.
> %
> % Ideally, this should append rather than assign.
> %
> \newcommand{\mathstyle}[1]{
> \mathchoice{\everymath={\displaystyle} #1}
> {#1}
> {\everymath={\scriptstyle} #1}
> {\everymath={\scriptscriptstyle} #1}
>
> }
>
> % upper integral symbol.
> %
> % Everything happens inside a group, so assignments and allocations
> are local.
> %
> \newcommand{\uint}{{
>         \mathstyle{
>             \lnewbox\intbox
>             \lnewdimen\intwd
> % obtain the width of \int. Since the typical integral symbol looks
> % roughly like a 45 degree line, we'll need to a line about half this
> width.
> %
> \setbox\intbox=\hbox{\m at th$\int$}
> \intwd=\wd\intbox
> \divide \intwd by 2\relax
> % Setting \baselineskip to 1pt gives us 1pt of space between the line
> and \int.
> %
> % We need to use \moveright, to get the line in the right place
> (hence
> the
> % \hrule must be inside a \vbox).
> %
> \vbox{
> \baselineskip=1pt
> \moveright \intwd \vbox{\hrule width \intwd}
> \hbox{\m at th$\int$}}
>
> }}}
>
> % lower integral symbol.
> %
> \newcommand{\lint}{{
>         \mathstyle{
>             \lnewbox\intbox
>             \lnewdimen\intwd
>             \setbox\intbox=\hbox{\m at th$\int$}
>             \intwd=\wd\intbox
>             \divide \intwd by 2\relax
>            % This is a bit simpler, since we don't need \moveright.
>             \vtop{
>               \hbox{\m at th$\int$}
>               \vskip 1pt
>               \hrule width \intwd}
>
> }}}
>
> % Restore whitespace and @
> %
> \catcode`\ =10
> \endlinechar=`^^M
> \makeatother
> \begin{document}
>         $\int_a^b f$ $\uint_a^b f$ $\lint_a^b f$ $\int_a^b f$
>         $$\int_a^b f \uint_a^b f \lint_a^b f \int_a^b f$$
> \end{document}
> ==========================================================
>
> jenže ten výstup není příliš pohledný. Meze, u kterých není pruh,
> jsou
> příliš daleko od symbolu integrálu, a naopak u druhé meze je ten pruh
> příliš blízko symbolu meze. Můžete mi, prosím, pomoci s vytvořením
> kvalitnìjšího výstupu.
> S pozdravem Petr Zemánek.
> _______________________________________________
> csTeX mailing list
> cs... at cs.felk.cvut.czhttp://lists.felk.cvut.cz/mailman/listinfo/cstex




More information about the csTeX mailing list