Re: [NTG-context] Spellchecking for ConTeXt user on a Windows platform

2022-04-02 Thread Tomáš V via ntg-context

Hey Amine,

LibreOffice (along with loads of other software) uses Hunspell 
dictionaries for spell-checking. You can get them here [1].


Hunspell [2] is a spell checker similar to Aspell. (A Windows port is 
available in the EZWinPorts [3].) Unlike Aspell, it can’t parse TeX 
files. One way around this is to convert the TeX files into plain text 
(maybe using Pandoc or DeTeX?) and spell-checking just the text. I tried 
this, but I found it quite cumbersome and since switched to the build-in 
spell-checker in my editor.


PDF files could probably be spell-checked in a similar way.

Tomáš

[1]: https://github.com/LibreOffice/dictionaries
[2]: http://hunspell.github.io/
[3]: 
https://www.gnu.org/software/emacs/manual/html_node/efaq-w32/EZWinPorts.html


On 02/04/2022 15:19, A A via ntg-context wrote:

Hi Alain,

Yes that's what I mean, spellchecking any content which is not a control 
sequence. That should include things like section titles and footnotes. 
Though I'm afraid that might be asking for too much.


I'd rather not make it part of my editor (I use vim) and have it as an 
extra step which I can add to something like a Makefile.


Do I need to install all of Libreoffice to gain access to the files you 
mention or is there an easier way?


Amine

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Changing the style of author’s surname in a custom bibliographical style

2021-09-15 Thread Tomáš V via ntg-context
I’ve found an answer to my first problem. The functions, that print out 
the names in the list, are defined in publ-imp-author.mkvi. I copied the 
responsible function to publ-imp-iso690.mkiv, edited one line (see code 
below) and everything works as intended.


Tomáš

% publ-imp-iso690.mkiv
\startbtxrenderingdefinitions[iso690]
\definebtx
     [iso690]
     [
     default=default,
     specification=iso690,
     ]
\definebtxrendering
     [iso690]
     [
     specification=iso690,
     numbering=yes,
     ]
\setupbtx[default:list]
     [
     authorconversion=inverted,
     ]
% field definitions
\starttexdefinition btx:iso690:author
     \btxdoif {author} {
     \btxflush{author}
     \btxperiod
     }
\stoptexdefinition
% book definition
\startsetups btx:iso690:list:book
     \texdefinition{btx:iso690:author}
     \removeunwantedspaces
\stopsetups

% surname to small caps in list
\startsetups \s!btx:\s!list:\s!author:inverted
    \fastsetup{\s!btx:\s!list:\s!author:concat}
    \ifx\currentbtxvons\empty \else
        \texdefinition{\s!btx:\s!cite:\s!author:\s!de}
        \doifnotmode {\s!btx:\s!de} {
            \currentbtxvons
            \btxparameter{\c!separator:vons}
        }
    \fi
    \ifx\currentbtxsurnames\empty \else
        \WORDS{\currentbtxsurnames}        % <-- changed line
        \ifx\currentbtxjuniors\empty \else
            \btxparameter{\c!separator:juniors}
            \currentbtxjuniors
        \fi
    \fi
    \ifx\currentbtxfirstnames\empty
        % firstnames are optional
    \else
        \btxparameter{\c!separator:invertedfirstnames}
        \currentbtxfirstnames
    \fi
    \ifx\currentbtxvons\empty \else
        \doifmode {\s!btx:\s!de} {
            \btxparameter{\c!separator:vons}
            \currentbtxvons
        }
    \fi
    \fastsetup{\s!btx:\s!list:\s!author:others}
\stopsetups
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Changing the style of author’s surname in a custom bibliographical style

2021-09-11 Thread Tomáš V via ntg-context

Greetings,

I am trying to make a bibliographical style that would comply to the ISO 
690 standard and I have a few questions:


1) The name of the author need to be written in the inverted format 
(e.g. Knuth, Donald). It is also customary to write the surname either 
in uppercase or in small caps (e.g. KNUTH, Donald). If I wanted to 
change the whole name to small caps I’d do something like this:


\btxdoif {author} {
    {\sc \btxflush{author}}
    \btxperiod
}

How do I change the “font” of the surname only? Can this be done by 
redefining a TeX macro (like in BibLaTeX’s \mkbibnamefamily) or is this 
done by changing some Lua code?


2) As I have said, the name has to be inverted. This is done by setting 
authorconversion to inverted. I’ve tried doing this like this:


\setupbtx[iso690:list][authorconversion=inverted,]

and this:

\setupbtxlist[iso690][authorconversion=inverted,]

Neither of these options work, but this works:

\setupbtx[default:list][authorconversion=inverted,]

I’m confused—why does changing the default option work and changing the 
option for my style doesn’t?


Here's a MWE for both of my problems:

% publ-imp-iso690.mkiv
\startbtxrenderingdefinitions[iso690]
\definebtx
    [iso690]
    [
    default=default,
    specification=iso690,
    ]
\definebtxrendering
    [iso690]
    [
    specification=iso690,
    numbering=yes,
    ]
\setupbtx[default:list]
    [
    authorconversion=inverted,
    ]
% field definitions
\starttexdefinition btx:iso690:author
    \btxdoif {author} {
    \btxflush{author}
    \btxperiod
    }
\stoptexdefinition
% book definition
\startsetups btx:iso690:list:book
    \texdefinition{btx:iso690:author}
    \removeunwantedspaces
\stopsetups

% publ-imp-iso690.lua
local specification = {
    name  = "iso690",
    categories = { },
}
local categories = specification.categories
categories.book = {
    required = { "title" },
    optional = {"author"},
}
return specification

Thanks for your help,
Tomáš
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___