Hello. I'm a veritable noob to both TeX and ConTeXT, so please bear with my ignorance. I request your kind guidance. (BTW as I use Indic scripts a lot, my typesetting engine is XeTeX.) I want to produce small caps like those I can get in LibreOffice by doing Right Click > Character > Font Effects > Effects > Small Capitals. Basically the capital letters would be shown in their regular size and the small letters would be shown as small size capital letters. Using \sc seems to select a particular font and ignore my current font selection. (I am using DejaVu Sans Condensed font.) \kap or \cap seems to produce all small caps which is not what I want -- only the small letters in the text should be shown as small caps and the capital letters in the text should be left alone. Can anyone please advise me what to do to get small caps in my current font like in LibO and other popular GUI word-processing systems? Thanks! -- Shriramana Sharma
Am 24.07.2012 um 21:11 schrieb Shriramana Sharma:
Hello. I'm a veritable noob to both TeX and ConTeXT, so please bear with my ignorance. I request your kind guidance. (BTW as I use Indic scripts a lot, my typesetting engine is XeTeX.)
I want to produce small caps like those I can get in LibreOffice by doing Right Click > Character > Font Effects > Effects > Small Capitals. Basically the capital letters would be shown in their regular size and the small letters would be shown as small size capital letters.
Using \sc seems to select a particular font and ignore my current font selection. (I am using DejaVu Sans Condensed font.) \kap or \cap seems to produce all small caps which is not what I want -- only the small letters in the text should be shown as small caps and the capital letters in the text should be left alone.
Can anyone please advise me what to do to get small caps in my current font like in LibO and other popular GUI word-processing systems?
\definehighlight[smallcaps][style=\setff{smallcaps}] \setupbodyfont[pagella] \starttext upright {\it italic} {\sc smallcaps} upright {\it italic} {\it\setff{smallcaps}smallcaps} upright {\it italic} {\it\smallcaps{smallcaps}} \stoptext Wolfgang
On Wed, Jul 25, 2012 at 12:55 AM, Wolfgang Schuster
\definehighlight[smallcaps][style=\setff{smallcaps}]
Hello and thanks for your help but even if I copy-paste your example into TeXWorks and typeset it (remember, I'm using ConTeXT with XeTeX) I get the error: Undefined control sequence. l.1 \definehighlight [smallcaps][style=\setff{smallcaps}] -- Shriramana Sharma
On 24-7-2012 21:29, Shriramana Sharma wrote:
On Wed, Jul 25, 2012 at 12:55 AM, Wolfgang Schuster
wrote: \definehighlight[smallcaps][style=\setff{smallcaps}]
Hello and thanks for your help but even if I copy-paste your example into TeXWorks and typeset it (remember, I'm using ConTeXT with XeTeX) I get the error:
Undefined control sequence. l.1 \definehighlight [smallcaps][style=\setff{smallcaps}]
you probably run an ancient mkiv .. this command has been around for a while Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Tue, Jul 24, 2012 at 11:21:22PM +0200, Hans Hagen wrote:
On 24-7-2012 21:29, Shriramana Sharma wrote:
On Wed, Jul 25, 2012 at 12:55 AM, Wolfgang Schuster
wrote: \definehighlight[smallcaps][style=\setff{smallcaps}]
Hello and thanks for your help but even if I copy-paste your example into TeXWorks and typeset it (remember, I'm using ConTeXT with XeTeX) I get the error:
Undefined control sequence. l.1 \definehighlight [smallcaps][style=\setff{smallcaps}]
you probably run an ancient mkiv .. this command has been around for a while
He is using XeTeX, no MkIV for him. Regards, Khaled
On 2012-07-25 Shriramana Sharma
Can anyone please advise me what to do to get small caps in my current font like in LibO and other popular GUI word-processing systems?
My guess is that DejaVu Sans Condensed has no small caps. That's why you get the unexpected result. LibO might fake the small caps, which should usually be avoided, since it often leads to typographically bad results. If you need caps, select a font which provides them. Marco
Thanks to all who replied.
On Wed, Jul 25, 2012 at 1:04 AM, Marco
My guess is that DejaVu Sans Condensed has no small caps. That's why you get the unexpected result. LibO might fake the small caps, which should usually be avoided, since it often leads to typographically bad results. If you need caps, select a font which provides them.
Hi -- is there absolutely no way for obtaining these "fake small caps" in ConTeXT? The thread http://www.tug.org/pipermail/xetex/2008-July/010325.html seems to contain some hints but they are fotr for LaTeX. I don't want to switch to LaTeX just for this. Basically I'm trying to move away from wordprocessors, and while I'm not looking for meaningless effects like "walking ants" (from MS Word) to be provided by TeX macro packages, faux smallcaps (and oblique and bold) is not an unreasonable thing to expect IMO. Not everyone is a typographer to produce the appropriate fine-typography glyphs for their favourite font to cater to a particular style. Why should the system impose "super-duper" typography on users when they are willing to settle for less? -- Shriramana Sharma
On Wed, 25 Jul 2012, Shriramana Sharma wrote:
On Wed, Jul 25, 2012 at 1:04 AM, Marco
wrote: My guess is that DejaVu Sans Condensed has no small caps. That's why you get the unexpected result. LibO might fake the small caps, which should usually be avoided, since it often leads to typographically bad results. If you need caps, select a font which provides them.
Hi -- is there absolutely no way for obtaining these "fake small caps" in ConTeXT? The thread http://www.tug.org/pipermail/xetex/2008-July/010325.html seems to contain some hints but they are fotr for LaTeX. I don't want to switch to LaTeX just for this.
See http://archive.contextgarden.net/message/20060818.041218.86ea7e08.en.html
Basically I'm trying to move away from wordprocessors, and while I'm not looking for meaningless effects like "walking ants" (from MS Word) to be provided by TeX macro packages, faux smallcaps (and oblique and bold) is not an unreasonable thing to expect IMO. Not everyone is a typographer to produce the appropriate fine-typography glyphs for their favourite font to cater to a particular style. Why should the system impose "super-duper" typography on users when they are willing to settle for less?
Slightly modified version of the above macro: \def\fakesmallcaps{\let\processword\dofakesmallcapped\processwords} \def\dofakesmallcapped#1{\dostartfakesmallcapped#1\dostopfakesmallcapped} \def\dostartfakesmallcapped#1#2\dostopfakesmallcapped{\cap{#1\cap{#2}}} \starttext \fakesmallcaps{Introduction Again} \stoptext (Stictly speaking, this is not faking small caps rather it is forcing the first letter of each work to be captial) Aditya
Hello Aditya and thanks for your help. However, the following file still does not my particular selected font to be shown in faux small caps: \def\fakesmallcaps{\let\processword\dofakesmallcapped\processwords} \def\dofakesmallcapped#1{\dostartfakesmallcapped#1\dostopfakesmallcapped} \def\dostartfakesmallcapped#1#2\dostopfakesmallcapped{\cap{#1\cap{#2}}} \font\fontlatin = "Gentium Basic" at 12 pt \font\fontlatintwo = "DejaVu Sans Condensed" at 16 pt \starttext \fontlatin \fakesmallcaps{Testing This} \fontlatintwo \fakesmallcaps{Testing This} \stoptext -- Shriramana Sharma
On Jul 24, 2012, at 10:33 PM, Shriramana Sharma wrote:
Hi -- is there absolutely no way for obtaining these "fake small caps" in ConTeXT?
Here's a hack, which sort of works, definitely doesn't handle <return> -- there must be a better way. I hope you don't mind my using your text as text. :-) \usemodule[simplefonts] \setmainfont[DejaVuSansCondensed] \def\smallcaps{\begingroup\obeyspaces\let\myspace=\space\dosmallcaps} \def\dosmallcaps#1{\dosc#1\end\endgroup} \def\dosc#1{% \ifx#1\end \let\next=\relax \else\if#1\space \myspace\let\myspace=\relax% skip repeated spaces \else\ifnum\lccode`#1=`#1{\tfx \uppercase{#1}}% change \tfx to your desired size \else #1\fi \let\myspace=\space \fi \let\next=\dosc \fi\next} \starttext Not everyone is a typographer to produce the appropriate fine-typography glyphs for their favourite font to cater to a particular style. Why should the system impose \smallcaps{"super-duper" Typography} on users when they are willing to settle for less? \smallcaps{Watch out for returns.} \stoptext Alternatively, you could settle for a font that has small caps. ________________________________ This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail message and destroy all copies of the original message (including attachments).
On Wed, Jul 25, 2012 at 10:29 AM, Rogers, Michael K
Here's a hack, which sort of works, definitely doesn't handle <return> -- there must be a better way. I hope you don't mind my using your text as text. :-)
Hi thanks for your help. Sorry to keep returning with errors (but as I said I'm a noob): loading : ConTeXt User Module / Simplefonts ! Undefined control sequence. l.144 \ctxloadluafile {t-simplefonts}{} I checked and the package context-modules is installed on my system. -- Shriramana Sharma
On 2012-07-25 Shriramana Sharma
Hi thanks for your help. Sorry to keep returning with errors (but as I said I'm a noob):
loading : ConTeXt User Module / Simplefonts ! Undefined control sequence. l.144 \ctxloadluafile {t-simplefonts}{}
simplefonts is a MkIV module, you are using MkII. If you don't have a particular reason to use MkII with XeTeX I would recommend to switch to MkIV and LuaTeX. The difference is basically compiling with “context file.tex” instead of “texexec --xetex file.tex”. And it is also recommended to use an up-to-date context installation (since apparently your version is quite old). You'll find more info about installing an up-to-date MkIV on the wiki: http://wiki.contextgarden.net/ConTeXt_Standalone Marco
On Wed, Jul 25, 2012 at 9:04 AM, Marco wrote:
On 2012-07-25 Shriramana Sharma wrote:
Hi Shriramana,
Hi thanks for your help. Sorry to keep returning with errors (but as I said I'm a noob):
loading : ConTeXt User Module / Simplefonts ! Undefined control sequence. l.144 \ctxloadluafile {t-simplefonts}{}
simplefonts is a MkIV module, you are using MkII. If you don't have a particular reason to use MkII with XeTeX
He does. He just explained that he wants to use Indic scripts and unless someone writes support for them ... However this means that t-simplefonts are not an option either. Btw: shouldn't the module check that it's running MKIV and complain if it doesn't (with a clear error message as opposed to "undefined command")? Mojca
Am 25.07.2012 um 09:43 schrieb Mojca Miklavec:
On Wed, Jul 25, 2012 at 9:04 AM, Marco wrote:
On 2012-07-25 Shriramana Sharma wrote:
Hi Shriramana,
Hi thanks for your help. Sorry to keep returning with errors (but as I said I'm a noob):
loading : ConTeXt User Module / Simplefonts ! Undefined control sequence. l.144 \ctxloadluafile {t-simplefonts}{}
simplefonts is a MkIV module, you are using MkII. If you don't have a particular reason to use MkII with XeTeX
He does. He just explained that he wants to use Indic scripts and unless someone writes support for them ...
However this means that t-simplefonts are not an option either. Btw: shouldn't the module check that it's running MKIV and complain if it doesn't (with a clear error message as opposed to "undefined command")?
This doesn’t happen anymore with the new version where I include a XeTeX version of the module which I has lying on my system. Wolfgang
On Jul 25, 2012, at 1:06 AM, Shriramana Sharma wrote:
On Wed, Jul 25, 2012 at 10:29 AM, Rogers, Michael K
wrote: Here's a hack, which sort of works, definitely doesn't handle <return> -- there must be a better way. I hope you don't mind my using your text as text. :-)
Hi thanks for your help. Sorry to keep returning with errors (but as I said I'm a noob):
loading : ConTeXt User Module / Simplefonts ! Undefined control sequence. l.144 \ctxloadluafile {t-simplefonts}{}
I checked and the package context-modules is installed on my system.
Sorry about that. You should load your font in your usual way. As has been pointed out, this is not a robust solution. % load your favorite font here \def\smallcaps{\begingroup\let\par=\space\obeylines\obeyspaces\let\myspace=\space\dosmallcaps} \def\dosmallcaps#1{\dosc#1\end\endgroup} \def\dosc#1{% assumes #1 is a sequence of characters \ifx#1\end \let\next=\relax \else\if#1\space \myspace\let\myspace=\relax% skip repeated spaces \else\ifnum\lccode`#1=`#1{\tfx \uppercase{#1}}% change \tfx to your desired size \else #1\fi \let\myspace=\space \fi \let\next=\dosc \fi\next} \starttext Basically I'm trying to move away from wordprocessors, and while I'm not looking for meaningless effects like "walking ants" \smallcaps{(from MS Word)} to be provided by \TeX\ macro packages, faux smallcaps (and oblique and bold) is not an unreasonable thing to expect IMO. Not everyone is a typographer to produce the appropriate fine-typography glyphs for their favourite font to cater to a particular style. Why should the system impose \smallcaps{"super-duper" Typography} on users when they are willing to settle for less? \smallcaps{Look, returns now work} %\smallcaps{but \TeX\ and other control sequences do not.} \stoptext ________________________________ This e-mail message (including any attachments) is for the sole use of the intended recipient(s) and may contain confidential and privileged information. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message (including any attachments) is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail message and destroy all copies of the original message (including attachments).
On 25-7-2012 04:33, Shriramana Sharma wrote:
Basically I'm trying to move away from wordprocessors, and while I'm not looking for meaningless effects like "walking ants" (from MS Word) to be provided by TeX macro packages, faux smallcaps (and oblique and bold) is not an unreasonable thing to expect IMO. Not everyone is a typographer to produce the appropriate fine-typography glyphs for their favourite font to cater to a particular style. Why should the system impose "super-duper" typography on users when they are willing to settle for less?
Sure, but one problem with a mkii fake approach is that it is fragile when something else than 8 bit characters shows up in the content stream. In mkiv that's less an issues as there completely different solutions are used. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Wed, Jul 25, 2012 at 9:35 AM, Hans Hagen wrote:
On 25-7-2012 04:33, Shriramana Sharma wrote:
Basically I'm trying to move away from wordprocessors, and while I'm not looking for meaningless effects like "walking ants" (from MS Word) to be provided by TeX macro packages, faux smallcaps (and oblique and bold) is not an unreasonable thing to expect IMO. Not everyone is a typographer to produce the appropriate fine-typography glyphs for their favourite font to cater to a particular style. Why should the system impose "super-duper" typography on users when they are willing to settle for less?
Sure, but one problem with a mkii fake approach is that it is fragile when something else than 8 bit characters shows up in the content stream.
Is that also true for XeTeX? (What is an 8-bit character when talking of XeTeX?) As far as I remember converting uppercase into lowercase or vice versa should work out of the box in XeTeX (all the lccodes and uccodes are properly set already). [But I have no idea how that black magic with \Words & \Caps and their zillions of variants works.]
In mkiv that's less an issues as there completely different solutions are used.
But it lacks Indic scripts, so it's not an option for him, at least not yet. Mojca
On 25-7-2012 09:41, Mojca Miklavec wrote:
On Wed, Jul 25, 2012 at 9:35 AM, Hans Hagen wrote:
On 25-7-2012 04:33, Shriramana Sharma wrote:
Basically I'm trying to move away from wordprocessors, and while I'm not looking for meaningless effects like "walking ants" (from MS Word) to be provided by TeX macro packages, faux smallcaps (and oblique and bold) is not an unreasonable thing to expect IMO. Not everyone is a typographer to produce the appropriate fine-typography glyphs for their favourite font to cater to a particular style. Why should the system impose "super-duper" typography on users when they are willing to settle for less?
Sure, but one problem with a mkii fake approach is that it is fragile when something else than 8 bit characters shows up in the content stream.
Is that also true for XeTeX? (What is an 8-bit character when talking of XeTeX?)
On the one hand less, as a token can be an utf character, but fo rother bits and pieces of the input it is still tricky. Given the earlier posted code: \smallcaps{àáâãäå Watch out for returns.} That works, but the next doesn't: \smallcaps{àáâãäå Watch out for \TEX\ returns.} So, a parser would have to deal with things like this: \TEX {\bold test} \hbox{test} There are some token processors in mkii that deal with some of these aspects.
But it lacks Indic scripts, so it's not an option for him, at least not yet.
Indic scripts will be supported in mkiv some day soon (at the ntg meeting there has been a presentation about devanagari etc using the context font machinery and that will be integrated once it's stable). Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hi thanks everyone for their responses.
On Wed, Jul 25, 2012 at 1:23 PM, Hans Hagen
But it lacks Indic scripts, so it's not an option for him, at least not yet.
Indic scripts will be supported in mkiv some day soon (at the ntg meeting there has been a presentation about devanagari etc using the context font machinery and that will be integrated once it's stable).
Hi -- I'm curious to know about your future plans for Indic. Are you going to use HarfBuzz? Even in Indic, I have specific minority orthography requirements due to which I'm using Graphite-enabled fonts. HarfBuzz (new one, not old one) supports Graphite and so my requirements would be met if that is used, but if you are going to develop yet another rendering system (please don't tell me it's so) it would be quite difficult... -- Shriramana Sharma
On Wed, Jul 25, 2012 at 10:16 AM, Shriramana Sharma
Hi thanks everyone for their responses.
On Wed, Jul 25, 2012 at 1:23 PM, Hans Hagen
wrote: But it lacks Indic scripts, so it's not an option for him, at least not yet.
Indic scripts will be supported in mkiv some day soon (at the ntg meeting there has been a presentation about devanagari etc using the context font machinery and that will be integrated once it's stable).
Hi -- I'm curious to know about your future plans for Indic. Are you going to use HarfBuzz? Even in Indic, I have specific minority orthography requirements due to which I'm using Graphite-enabled fonts. HarfBuzz (new one, not old one) supports Graphite and so my requirements would be met if that is used, but if you are going to develop yet another rendering system (please don't tell me it's so) it would be quite difficult...
ok, we don't tell it to you. -- luigi
On 25-7-2012 10:16, Shriramana Sharma wrote:
Hi thanks everyone for their responses.
On Wed, Jul 25, 2012 at 1:23 PM, Hans Hagen
wrote: But it lacks Indic scripts, so it's not an option for him, at least not yet.
Indic scripts will be supported in mkiv some day soon (at the ntg meeting there has been a presentation about devanagari etc using the context font machinery and that will be integrated once it's stable).
Hi -- I'm curious to know about your future plans for Indic. Are you going to use HarfBuzz? Even in Indic, I have specific minority orthography requirements due to which I'm using Graphite-enabled fonts. HarfBuzz (new one, not old one) supports Graphite and so my requirements would be met if that is used, but if you are going to develop yet another rendering system (please don't tell me it's so) it would be quite difficult...
luatex does not use specific libraries but assumes all to be done in lua .. the otf machinery in mkiv is lua based (independent, extensible) and support for indic runs on top of that (the additional code is written by some dutchies who need it for high end academic publishing) ... I don't know about specific monorities but demos of several variants were shown Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (9)
-
Aditya Mahajan
-
Hans Hagen
-
Khaled Hosny
-
luigi scarso
-
Marco
-
Mojca Miklavec
-
Rogers, Michael K
-
Shriramana Sharma
-
Wolfgang Schuster