悠闲数学娱乐论坛(第2版)'s Archiver

aaa 发表于 2018-11-15 20:12

两个小问题,请教一下如何解决

[i=s] 本帖最后由 aaa 于 2018-11-15 20:23 编辑 [/i]

1、\hat{j} 那个符号不在字母的正上方

2、如何给框框的线条加颜色  ,比如红色[code]\[\boxed{\bm{a}=\dfrac{\mathrm{d}\bm{v}}{\mathrm{d}t}=\dfrac{\mathrm{d}^2\bm{r}}{\mathrm{d}\,t^2}}\][/code]

kuing 发表于 2018-11-15 20:29

2、线条加颜色,里面的公式加不加?

青青子衿 发表于 2018-11-15 21:10

[b]回复 [url=http://kuing.orzweb.net/redirect.php?goto=findpost&pid=28805&ptid=5737]1#[/url] [i]aaa[/i] [/b]
\[\color{red}{\boxed{\color{black}{\bm{a}=\dfrac{\mathrm{d}\bm{v}}{\mathrm{d}t}=\dfrac{\mathrm{d}^2\bm{r}}{\mathrm{d}\,t^2}}\,}}\]

aaa 发表于 2018-11-17 12:40

[b]回复 [url=http://kuing.orzweb.net/redirect.php?goto=findpost&pid=28806&ptid=5737]2#[/url] [i]kuing[/i] [/b]
不加,那个hat 有啥好的解决方法吗?谢谢k 神

aaa 发表于 2018-11-17 12:46

[b]回复 [url=http://kuing.orzweb.net/redirect.php?goto=findpost&pid=28807&ptid=5737]3#[/url] [i]青青子衿[/i] [/b]

谢谢

kuing 发表于 2018-11-17 15:24

[b]回复 [url=http://kuing.orzweb.net/redirect.php?goto=findpost&pid=28811&ptid=5737]4#[/url] [i]aaa[/i] [/b]

里面的公式不加那就用 3# 的方法即可,即在整个外面用 \color{red} 里面再用 \color{black} 切换回黑色。

至于 hat 的问题我也没什么好办法,对一个字母加 hat, bar, tilde 这类东西,所放的位置应该是根据字母自身的属性决定的,一个字母它的“正上方”在哪,是字体设计者在设计时所定下来的,每个字母都不同:
[attach]6734[/attach]
既然 i, j 的 hat 放在那里,说明该字体的设计者认为那里作为正上方比较好。
如果你觉得这并不好,要改变的话,最理想的办法就是更改 i, j 的这个属性,然而这些很底层的东西我也不懂,看来只能另寻他法,但是要想一个全无副作用的方法恐怕不容易。

kuing 发表于 2018-11-17 15:59

想了一个方法,还不知道有没有副作用,顺便把 bar, tilde 也做了:[code]\documentclass{article}
\usepackage{amsmath}

\newcommand\sftz[3]{\rlap{$#1{\phantom{#3}\mkern#2mu}$}#3}
\newcommand\ihat{\sftz{\hat}{2.5}{i}}
\newcommand\jhat{\sftz{\hat}{4.5}{j}}
\newcommand\ibar{\sftz{\bar}{2.5}{i}}
\newcommand\jbar{\sftz{\bar}{4.5}{j}}
\newcommand\itilde{\sftz{\tilde}{2.5}{i}}
\newcommand\jtilde{\sftz{\tilde}{4.5}{j}}

\begin{document}

\fboxsep=0.4pt
$\boxed\ihat
\,\boxed\jhat
\,\boxed\ibar
\,\boxed\jbar
\,\boxed\itilde
\,\boxed\jtilde$

\end{document}[/code][attach]6735[/attach]

isee 发表于 2018-11-17 16:31

[b]回复 [url=http://kuing.orzweb.net/redirect.php?goto=findpost&pid=28814&ptid=5737]7#[/url] [i]kuing[/i] [/b]

相当的看不习惯。

色k 发表于 2018-11-17 18:26

[b]回复 [url=http://kuing.orzweb.net/redirect.php?goto=findpost&pid=28815&ptid=5737]8#[/url] [i]isee[/i] [/b]

实际用的时候没有框框住可能好点吧

[attach]6742[/attach][code]I = \int F_xdt\ihat+\int F_ydt\jhat = 10tm\jhat\Big|_2^4 = 20m\jhat[/code]

aaa 发表于 2018-11-17 22:40

[b]回复 [url=http://kuing.orzweb.net/redirect.php?goto=findpost&pid=28814&ptid=5737]7#[/url] [i]kuing[/i] [/b]


    非常感谢!

kuing 发表于 2018-11-18 17:41

[b]回复 [url=http://kuing.orzweb.net/redirect.php?goto=findpost&pid=28822&ptid=5737]10#[/url] [i]aaa[/i] [/b]

如果发现有什么副作用记得回来说一下喔

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.