搜尋音樂四分音符符號以插入文字中

搜尋音樂四分音符符號以插入文字中

我想簡單地在文本中寫一個音樂四分音符。但我知道有\textmusicalnode可用的。但這並沒有給我四分音符。

使用例如harmonyorwasysym包會給我\Vieror\quarternote作為四分音符,但與amssymb包結合會產生錯誤。我該怎麼做才能解決這個問題?

編輯

這就是我在序言中包含的內容。

\RequirePackage{fix-cm}
\documentclass[a4paper,12pt,bibtotoc,liststotoc,BCOR=16mm,headinclude,numbers=noendperiod]{scrreprt}

\usepackage[ngerman,english]{babel}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{fontspec}
\usepackage{verbatim}
\usepackage[onehalfspacing]{setspace}
\usepackage{chngcntr}
\usepackage{enumerate}
\usepackage[style=alphabetic-verb,bibstyle=alphabetic,hyperref=true]{biblatex}
\usepackage[hang,small]{caption} % small and hanging captions
\usepackage{lmodern}    %% Type1 font for non english language
\usepackage{graphicx}   %% graphics
\usepackage{subfig}     %% to place graphics beside each other
\usepackage{listings}   %% to include code listings
\usepackage{xcolor}     %% syntax highlight in code listings
\usepackage{amsfonts}   %% number-symbols in formulas
\usepackage{mathrsfs}
\usepackage{xfrac}      %% slanted fractions with font fixtures
\usepackage[plainpages=false]{hyperref}
\usepackage{fancyhdr}   %% fancy headings and footers

\usepackage{harmony}    %% musical symbols

harmony如果我使用該包,我會收到以下錯誤:

Latex Error: /usr/local/texlive/2011/texmf-dist/tex/latex/amsfonts/amssymb.sty:231
LaTeX Error: Command `\Finv' already defined. 

Latex Error: /usr/local/texlive/2011/texmf-dist/tex/latex/amsfonts/amssymb.sty:232
LaTeX Error: Command `\Game' already defined.

Latex Error: /usr/local/texlive/2011/texmf-dist/tex/latex/amsfonts/amssymb.sty:237
LaTeX Error: Command `\beth' already defined.

Latex Error: /usr/local/texlive/2011/texmf-dist/tex/latex/amsfonts/amssymb.sty:238
LaTeX Error: Command `\gimel' already defined.

Latex Error: /usr/local/texlive/2011/texmf-dist/tex/latex/amsfonts/amssymb.sty:239
LaTeX Error: Command `\daleth' already defined.

答案1

wasysym可以在不加載包的情況下使用包中的四分音符符號:

\documentclass{article}

\providecommand*{\quarternote}{%
  \begingroup
    \fontencoding{U}%
    \fontfamily{wasy}%
    \selectfont
    \symbol{12}%
  \endgroup
}

\begin{document}
  \tiny \quarternote
  \scriptsize \quarternote
  \small \quarternote
  \normalsize \quarternote
  \large \quarternote
  \Large \quarternote
  \LARGE \quarternote
  \huge \quarternote
  \Huge \quarternote
\end{document}

wasysym 的不同大小的四分音符

我不推薦\Vierpackage harmony,因為它是一個固定字體大小的建構符號。

wasy以下檔案比較了和中的四分音符符號,arev 並從符號中刪除了替換警告(wasy如果\bfseries使用)(只有小於 10pt 的尺寸不可用作粗體)。

\documentclass{article}

% wasy
\newcommand*{\quarternotewasy}{%
  \begingroup
    \fontencoding{U}%
    \fontfamily{wasy}%
    \fontshape{n}%
    \ssubSeriesBXtoB
    \selectfont
    \symbol{12}%
  \endgroup
}
\makeatletter
\newcommand*{\ssubSeriesBXtoB}{%
  \if b\expandafter\@car\f@series{}\@nil
    \fontseries{b}%
  \fi
}
\makeatother

% arev
\newcommand*{\quarternotearev}{%
  \begingroup
    \usefont{U}{zavm}{m}{n}%
    \symbol{90}%
  \endgroup
}

\newcommand*{\test}[2]{%
  #2%
  \tiny #1%
  \scriptsize #1%
  \small #1%
  \normalsize #1%
  \large #1%
  \Large #1%
  \LARGE #1%
  \huge #1%
  \Huge #1%
}

\begin{document}
\begin{tabular}{ll}
  wasy: & \test{\quarternotewasy}{} \\
  wasy-bold: & \test{\quarternotewasy}{\bfseries} \\
  arev: & \test{\quarternotearev}{} \\
\end{tabular}
\end{document}

wasy 和 arev 的比較

相關內容