我如何重新定义\mathbb
以使其具有与 相同的效果\mathds
?我一直尝试使用命令行\renewcommand{\mathbb}[1]{\mathds{#1},
,但这个没有任何效果。
这是我的序言!
\documentclass[a4paper,12pt,twoside,openright,final]{memoir}%
\usepackage{fouriernc}
\usepackage[T1]{fontenc}
\usepackage{calc}
\usepackage{soul}
\usepackage{fourier}
\usepackage{import}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{stmaryrd}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{newlfont}
\usepackage{graphicx}
\usepackage{lastpage}
\usepackage{longtable,rotating}
\usepackage{indentfirst}
\usepackage{colortbl}
\usepackage{wasysym}
\usepackage{mathrsfs}
\usepackage{float}
\usepackage{verbatim}
\usepackage{upgreek}
\usepackage{latexsym}
\usepackage[backend=biber,style=numeric-comp,sorting=none,backref=true,date=year]%
{biblatex}
\usepackage{url}
\usepackage[english,brazilian]{babel}
\usepackage{csquotes}
\usepackage{xcolor}
\usepackage[colorlinks=true,allcolors=black]{hyperref}
\usepackage{bookmark}
\usepackage{memhfixc}
\usepackage{enumerate}
\usepackage{footnote}
\usepackage{microtype}
\usepackage{rotfloat}
\usepackage{alltt}
\usepackage{multicol}
\usepackage[version=0.96]{pgf}
\usepackage{tikz}
\usepackage{lettrine}
\usepackage{geometry}
\usepackage[toc=true,acronym]{glossaries}
\usepackage{dsfont}%
\setcounter{MaxMatrixCols}{30}
%TCIDATA{OutputFilter=latex2.dll}
%TCIDATA{Version=5.50.0.2960}
%TCIDATA{Codepage=65001}
%TCIDATA{LastRevised=Wednesday, February 13, 2019 09:15:52}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="PrintOptions" CONTENT="8256">}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%TCIDATA{Description=Documento tipo livro construido a partir da classe memoir.}
%BeginMSIPreambleData
\providecommand{\U}[1]{\protect\rule{.1in}{.1in}}
%EndMSIPreambleData
\newsubfloat{figure}
\newsubfloat{table}
\settrimmedsize{297mm}{210mm}{*}
\setlength{\trimtop}{0pt}
\setlength{\trimedge}{\stockwidth}
\addtolength{\trimedge}{-\paperwidth}
\settypeblocksize{634pt}{448.13pt}{*}
\setulmargins{4cm}{*}{*}
\setlrmargins{*}{*}{1.5}
\setmarginnotes{17pt}{51pt}{\onelineskip}
\setheadfoot{\onelineskip}{2\onelineskip}
\setheaderspaces{*}{2\onelineskip}{*}
\checkandfixthelayout
\geometry{
left=3cm,
right=2cm,
top=3cm,
bottom=2cm
}
\frenchspacing
\setsecnumdepth{subsection}
\maxsecnumdepth{subsubsection}
\input{subdoc/preambulo/new_chapter_style.tex}
\chapterstyle{daleif2modif}
\newcommand{\clearemptydoublepage}{\newpage{\thispagestyle{empty}\cleardoublepage}}
\addbibresource{subdoc/elementos_pos_textuais/bibliografia/tese_baby_skyrme.bib}
\addbibresource{subdoc/elementos_pos_textuais/bibliografia/tese_livros.bib}
\addbibresource{subdoc/elementos_pos_textuais/bibliografia/tese_others.bib}
\addbibresource{subdoc/elementos_pos_textuais/bibliografia/tese_sigma_model_O3.bib}
\addbibresource{subdoc/elementos_pos_textuais/bibliografia/tese_Skyrme_model.bib}
\addbibresource{subdoc/elementos_pos_textuais/bibliografia/tese_teses.bib}
\addbibresource{subdoc/elementos_pos_textuais/bibliografia/tese_tqc_history.bib}
\makeatletter
\hypersetup{
pdftitle={\@title},
pdfauthor={\@author},
colorlinks=true,
linkcolor=blue,
citecolor=blue,
filecolor=magenta,
urlcolor=blue,
bookmarksopen=false,
bookmarkstype=toc,
CJKbookmarks=true,
bookmarksdepth=4,
pdfstartview={FitB},
bookmarksnumbered=true
}
\makeatother
\usetikzlibrary{
arrows,
shapes,
automata,
backgrounds,
petri,
topaths
}
\newcommand{\keywords}[1]{\par\noindent{\small{\bfseries Keywords:} #1}}
\newcommand{\palavrachave}[1]{\par\noindent{\small{\bfseries Palavras Chave:} #1}}
\newcommand{\mycaption}[2][\@empty]{
\captionnamefont{\scshape}
\changecaptionwidth
\captionwidth{0.9\linewidth}
\captiondelim{.\:}
\indentcaption{0.75cm}
\captionstyle[\centering]{}
\setlength{\belowcaptionskip}{10pt}
\ifx \@empty#1 \caption{#2}\else \caption[#1]{#2}
}
\newcommand{\mysubcaption}[2][\@empty]{
\subcaptionsize{\small}
\hangsubcaption
\subcaptionlabelfont{\rmfamily}
\sidecapstyle{\raggedright}
\setlength{\belowcaptionskip}{10pt}
\ifx \@empty#1 \subcaption{#2}\else \subcaption[#1]{#2}
}
\newcommand{\initial}[1]{\lettrine[lines=3,lhang=0.33,nindent=0em]{\color{black}{\textsc{#1}}}{}}
\let\mathbb\mathds
\theoremstyle{plain}
\newtheorem{theo}{Theorem}[chapter]
\theoremstyle{plain}
\newtheorem{prop}{Proposition}[chapter]
\theoremstyle{plain}
\theoremstyle{definition}
\newtheorem{dfn}{Definition}[chapter]
\theoremstyle{plain}
\newtheorem{lema}{Lemma}[chapter]
\theoremstyle{plain}
\newtheorem{cor}{Corollary}[chapter]
\theoremstyle{plain}
\newtheorem{resu}{Result}[chapter]
\renewcommand{\baselinestretch}{1.5}
\loadglsentries{subdoc/elementos_pre_textuais/Siglas/Siglas.tex}
\makeglossaries
\makeindex
\renewcommand{\mathbb}[1]{\mathds{#1}}
\begin{document}
$\mathbb{R}$ and $mathds{R}$
\end{document}
答案1
该fourier
软件包将其设置延迟到前导码的末尾。因此,添加\renewcommand\mathbb
前导码将被此延迟代码覆盖。
尝试使用
\AtBeginDocument{
\renewcommand{\mathbb}[1]{\mathds{#1}}
}
这会将重新定义添加到延迟机制中,并且(希望)在已添加的内容之后执行它。
顺便说一句:清理一下你的序言,你确定你的文档需要所有这些代码吗?最好在每个已加载的包或代码片段上方添加注释,解释它的作用或加载的原因。这样,你就更容易看到你需要什么,什么实际上只是你不再需要的遗留内容。
答案2
答案3
它可以毫无问题地运行。
\documentclass{article}
\usepackage{amsmath,amssymb,dsfont}
\renewcommand{\mathbb}[1]{\mathds{#1}}
\begin{document}
$\mathbb{X}+\mathbb{Y}$
\end{document}
如果您不加载amssymb
或amsfonts
(或不确定其他包是否加载),则提供命令\mathbb
然后重新定义它。
\documentclass{article}
\usepackage{amsmath,dsfont}
\providecommand{\mathbb}{} % ensure \mathbb is defined
\renewcommand{\mathbb}[1]{\mathds{#1}}
\begin{document}
$\mathbb{X}+\mathbb{Y}$
\end{document}
一些数学字体包会延迟某些命令的定义;这就是 的情况fourier
。为此,您需要稍后重新定义;以下内容也可以在没有 的情况下使用fourier
。
\documentclass{article}
\usepackage{amsmath,fourier,dsfont}
\AtBeginDocument{%
\providecommand{\mathbb}{}% ensure \mathbb is defined
\renewcommand{\mathbb}[1]{\mathds{#1}}%
}
\begin{document}
$\mathbb{X}+\mathbb{Y}$
\end{document}