Text FormattingSmall caps

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
BoudewijnD
Posts: 60
Joined: Wed Nov 18, 2009 4:18 pm

Small caps

Post by BoudewijnD »

Can any body help me with this peace of code:

Code: Select all

\textbf{2-Acetamido-2-deoxy-4-\textit{O}-}\textbf{(}\textbf{2-acetamido-2-deoxy-4-\textit{O}-meth\-yl-$\beta 
$-}\textbf{d}\textbf{-glu\-co\-pyr\-anosyl}\textbf{)}\textbf{-1-\textit{O}-4-methyl\-umbelli\-feryl-$\beta$-}\textsc{d}\textbf{-glu\-co\-pyr\-ano\-side (x).}
\\
The first small caps is oke. But the last one is normal.

I don't get it!

\BoudewijnD

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Small caps

Post by gmedina »

Hi,
BoudewijnD wrote:...

Code: Select all

\textbf{2-Acetamido-2-deoxy-4-\textit{O}-}\textbf{(}\textbf{2-acetamido-2-deoxy-4-\textit{O}-meth\-yl-$\beta 
$-}\textbf{d}\textbf{-glu\-co\-pyr\-anosyl}\textbf{)}\textbf{-1-\textit{O}-4-methyl\-umbelli\-feryl-$\beta$-}\textsc{d}\textbf{-glu\-co\-pyr\-ano\-side (x).}
\\
Please provide complete, minimal and compilabe code, not just snippets.
BoudewijnD wrote:...
The first small caps is oke. But the last one is normal...
I don't know what you mean; I only see a \textsc command in the code you posted.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
BoudewijnD
Posts: 60
Joined: Wed Nov 18, 2009 4:18 pm

Small caps

Post by BoudewijnD »

The part commes from a really big project so this is a peace of the file in a basic latex file

Code: Select all

\textbf{2-Acetamido-2-deoxy-4-\textit{O}-}\textbf{(}\textbf{2-acetamido-2-deoxy-4-\textit{O}-meth\-yl-$\beta 
$-}\textbf{d}\textbf{-glu\-co\-pyr\-anosyl}\textbf{)}\textbf{-1-\textit{O}-4-methyl\-umbelli\-feryl-$\beta$-}\textsc{d}\textbf{-glu\-co\-pyr\-ano\-side (x).}
\\
To a suspension of \textbf{x} (12mg, 15.70 $\mu$mol) in MeOH (1 ml) was added 
NaOMe (173 $\mu $l, 30wt{\%} in MeOH, 0.4 $\mu$mol). The reaction was 
stirred under exclusion of light. When LCMS (gradient 0 to 50{\%} MeOH) 
showed complete conversion to product the mixture was quenched with AcOH (5 
$\mu$L, 80 $\mu$mol). The reaction was diluted with \ce{H2O} (2 ml) the 
MeOH was evaporated \textit{in vacuo} and the remaining \ce{H2O} was lyophilized. Purification 
by HPLC (gradient \ce{H2O}-MeOH + 0.1{\%} TFA 80-20 to 60-40) 
evaporation of MeOH and lyophilizing \ce{H2O} yielded x (3.5 mg, 37{\%}) as 
white fluffy solid.\textbf{$^{1}$H NMR (400 MHz, (D$_{6}$) DMSO)} $\delta $ 7.90 (d, \textit{J} = 9.0 
Hz, 1H, NH), 7.75 (d, \textit{J} = 9.1 Hz, 1H, NH), 7.69 (d, \textit{J} = 8.8 Hz, 1H, CH, 
4-methyl\-umbelli\-feryl), 7.03 (d, \textit{J} = 2.2 Hz, 1H, CH, 4-methyl\-umbelli\-feryl), 
6.95 (dd, \textit{J} = 8.8, 2.3 Hz, 1H, CH, 4-methyl\-umbelli\-feryl), 6.26 (s, 1H, CH, 
4-methyl\-umbelli\-feryl), 5.16 (dd, \textit{J} = 10.8, 7.4 Hz, 2H, H$_{1}$, OH), 4.83 
(t, \textit{J} = 5.3 Hz, 1H, OH), 4.74 (d, \textit{J} = 2.1 Hz, 1H, OH), 4.68 (t, \textit{J} = 5.9 Hz, 
1H, OH), 4.36 (d, \textit{J} = 8.5 Hz, 1H, H$_{\mbox{1'}\beta}$), 3.77 (d, \textit{J} = 9.6 Hz, 1H), 3.70 - 3.13 (m, 14H), 2.94 (t, \textit{J} = 9.2 Hz, 
1H), 2.40 (s, 3H, CH$_{3}$, 4-methyl\-umbelli\-feryl), 1.84 (s, 3H, CH$_{3}$, 
Ac), 1.80 (s, 3H, CH$_{3}$, Ac); \textbf{$^{13}$C NMR (151 MHz, (D6) DMSO)} $\delta $ 
169.19, 160.05, 159.90, 154.41, 153.27, 126.54, 114.31, 113.44, 103.14, 
101.89, 98.20, 80.66, 79.96, 75.61, 75.06, 73.78, 72.24, 59.77, 55.65, 
54.41, 22.97, 18.13.

The problem is that there should be 2 small caps d in the title of my compound but only the second one is correct. The first one is just a normal letter. And i think it is because a can not put one bracket "(" bold. See code.

Thanx for looking into it.

\BoudewijnD
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Small caps

Post by frabjous »

BoudewijnD wrote:The part commes from a really big project so this is a peace of the file in a basic latex file
By a compiliable example, they want to know what document class and packages you're using, not the rest of the file that has nothing to do with the problem.

In any case, the problem should be obvious. Only one of the d's is inside a \textsc{....} command (which is the command for small caps). The other is inside a \textbf{...} command (the command for bold). Just change it to the right command.

It should read:

Code: Select all

\textbf{2-Acetamido-2-deoxy-4-\textit{O}-}\textbf{(}\textbf{2-acetamido-2-deoxy-4-\textit{O}-meth\-yl-$\beta
$-}\textsc{d}\textbf{-glu\-co\-pyr\-anosyl}\textbf{)}\textbf{-1-\textit{O}-4-methyl\-umbelli\-feryl-$\beta$-}\textsc{d}\textbf{-glu\-co\-pyr\-ano\-side (x).}
The code is weird in a lot of other ways though, such as \textbf{...} commands right next to each other, split apart for no apparent reason. Was this generated by some kind of converter from a WYSIWYG word processor or something? Or the evils of WYSIWYG!

I suggest

Code: Select all

\textbf{2-Acetamido-2-deoxy-4-\textit{O}-(2-acetamido-2-deoxy-4-\textit{O}-meth\-yl-$\beta
$-}\textsc{d}\textbf{-glu\-co\-pyr\-anosyl)-1-\textit{O}-4-methyl\-umbelli\-feryl-$\beta$-}\textsc{d}\textbf{-glu\-co\-pyr\-ano\-side (x).}
BoudewijnD
Posts: 60
Joined: Wed Nov 18, 2009 4:18 pm

Re: Small caps

Post by BoudewijnD »

Stupid Stupid me!

I feel really guilty asking you guys all of these questions, when the answer is so obvious.

Thanks again for the help.

And indeed this is compiled from a word document using word2latex. And the code is really messy and a lot of work to make it normal. so that probaly why I didn't see this stupid mistake.

thanx again,

\BoudewijnD
Post Reply