来自另一篇帖子
左右两侧都有边注吗?
我在同一个文档中同时使用 MnSymbol 和 amssymb 时遇到了问题。它显示! LaTeX Error: Command
\centerdot' 已定义。
没有它我就无法工作amssymb
,但如果我删除它,MnSymbol
我又会得到另一个错误
! Undefined control sequence. \pointer ->\filledmedtriangleleft
我知道如何解决这个问题吗?
如果我移除amssymb
我得到! Missing $ inserted. $ l.2
\item M
ix 所有成分在一起。?
我正在尝试使用 Christian Hupfer 提出的以下代码
\documentclass{article}
\usepackage{amssymb}
\usepackage{xcolor}
\usepackage{stackengine}
\usepackage{lipsum}
\usepackage{MnSymbol}
\usepackage{graphicx}
\newcommand*\mnote[3][0pt]{%
\if l#2\reversemarginpar\def\pointer{\filledmedtriangleright}%
\def\stackalignment{r}\fi%
\if r#2\normalmarginpar\def\pointer{\filledmedtriangleleft}%
\def\stackalignment{l}\fi%
\marginpar{%
\topinset{%
\scalebox{1.5}{\textcolor{blue}{$\pointer$}}}{%
\belowbaseline[-1.5\baselineskip-#1]{%
\stackengine%
{-5pt}%
{\fcolorbox{blue}{white}{\parbox{1.8cm}%
{\vspace{3pt}\raggedright#3}}}%
{~\colorbox{white}{\sffamily Note}}%
{O}%
{l}%
{F}%
{F}%
{S}%
}%
}{%
3ex+#1}{%
-2ex}%
}%
}
\begin{document}
\lipsum[1-2]
this is a\mnote[2ex]{l}{some text for the mnote box} test%
\par\vspace{-\parskip}\mnote[1ex]{r}{both right and left}
\lipsum[3]
This is another test\mnote{r}{another mnote box test testing the
right side}
\lipsum[4]
Loads and loads of text that need amssymb to work
\end{document}
答案1
根据我的评论...仅导入MnSymbol
所需的内容。您可以取消注释这两fonttable
行,以查看所需的字形是否位于MnSymbolC
字体系列的 202 号插槽中。
如果你有很多符号需要导入MnSymbol
,我的回答是条件独立性有标准符号吗?提供了一些宏来简化该过程。
\documentclass{article}
\usepackage{amssymb}
% =============================================
%Import symbols from font MnSymbol without importing the whole package
% =============================================
\DeclareFontFamily{U} {MnSymbolC}{}
\DeclareFontShape{U}{MnSymbolC}{m}{n}{
<-6> MnSymbolC5
<6-7> MnSymbolC6
<7-8> MnSymbolC7
<8-9> MnSymbolC8
<9-10> MnSymbolC9
<10-12> MnSymbolC10
<12-> MnSymbolC12}{}
\DeclareFontShape{U}{MnSymbolC}{b}{n}{
<-6> MnSymbolC-Bold5
<6-7> MnSymbolC-Bold6
<7-8> MnSymbolC-Bold7
<8-9> MnSymbolC-Bold8
<9-10> MnSymbolC-Bold9
<10-12> MnSymbolC-Bold10
<12-> MnSymbolC-Bold12}{}
\DeclareSymbolFont{MnSyC} {U} {MnSymbolC}{m}{n}
\DeclareMathSymbol{\filledmedtriangleleft}{\mathbin}{MnSyC}{202}
% =============================================
%\usepackage{fonttable}
\begin{document}
\centering
$\mathbb{X}\filledmedtriangleleft\mathbb{Y}$
%\fonttable{MnSymbolC10}
\end{document}