Re: Hulp gevraagd m.b.t. mathematische formule in font Myriad Pro

Wybo Dekker <wybodekker-qWit8jRvyhVmR6Xm/[email protected]>
Newsgroups gmane.comp.tex.dutch
Message-ID <[email protected]>
On 2010-12-13 13:19, Wilfred van Rooijen wrote:
> Het kan nog veel simpeler met het mhchem-pakket. Ff wachten:

Nou, simpel... En mijn bezwaar is dat het grotendeels in math staat, dus 
als je van font wisselt krijg je cm. En de teksten bij de pijlen vind ik 
te groot.

Hier is mijn  versie, in xelatex, met het juiste font, en zonder amsmath 
of mhchem, pdf attached:

%!xelatex
\documentclass[11pt,a4paper]{article}
\usepackage{subscript,marvosym}
\usepackage{fontspec}
\defaultfontfeatures{Scale=MatchLowercase,Numbers=OldStyle,Mapping=tex-text}

% print isotope with \isotope{235}{92}{U}
\newlength{\wnum}
\newcommand{\isotope}[3]{%
   \settowidth{\wnum}{#1}
   \begin{minipage}{\wnum}\raggedleft
     \textsuperscript{#1}\\[-\baselineskip]
     \textsubscript{#2}
   \end{minipage}#3
}

% print reaction arrow with \reactionarrow{toptext}{bottomtext}
\newcommand{\reactionarrow}[2]{\quad
   \begin{minipage}{3em}\footnotesize\centering
      \mbox{#1\strut}\\[-1.5ex]
      \raisebox{1.5pt}{\rule{\textwidth}{.5pt}}{\tiny\Forward}\\[-1.5ex]
      \mbox{#2\strut}
   \end{minipage}\quad
}
\newcommand{\Beta}{\footnotesize\ss\textsuperscript{-}}
\begin{document}
\fontspec{MyriadPro-Regular}
\isotope{232}{90}{Th} + n
   \reactionarrow{}{}
\isotope{233}{91}{Pa}
   \reactionarrow{\Beta}{2,3 min}
\isotope{233}{91}{Pa}
   \reactionarrow{\Beta}{27d}
\isotope{233}{92}{U}
\end{document}




> \documentclass[]{article}
> \usepackage[version=3]{mhchem}
>
> \begin{document}
>
> \ce{^{232}_{90}Th + n -> ^{233}_{90}Th ->[\beta^-][\text{22.3 min}]
> ^{233}_{91} Pa ->[\beta^-][\text{27 d}] ^{233}_{92}U}
>
> \ce{^{232}_{90}Th + ^1_0n -> ^{233}_{90}Th ->[\beta^-][\text{22.3 min}]
> ^{233}_{91} Pa ->[\beta^-][\text{27 d}] ^{233}_{92}U}
> \end{document}
>
> Klaar! Naar keuze kan je de fonts instellen, zie de mhchem manual. In
> het tweede voorbeeld heb ik het massagetal van het neutron ook even
> toegevoegd, dat maakt de vergelijking kloppend.
>
> Overigens heeft de kernreactorfysicus in mij wel het een en ander aan te
> merken op de tekst :-))
>

-- 
Wybo

_______________________________________________
TeX-NL mailing list
[email protected]
http://www.ntg.nl/cgi-bin/mailman/listinfo/tex-nl
isotope.pdf (application/pdf, 5.4 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.