[NTG-context] SVG ViewBox figure battle

2023-05-19 Thread Thangalin via ntg-context
Hi there!

The following document contains SVG. Save the SVG as "problem.svg" and
run the document through LMTX version 2023.05.08 17:39:

% SOF
\startbuffer[csvg]

  
  

\stopbuffer

\starttext
  % honours viewbox
  \placefigure[none]{}{\includesvgbuffer[csvg]}
  \page
  % dishonours viewbox
  \externalfigure[problem.svg]
\stoptext
% EOF

The ViewBox is ignored when run through Inkscape. Is this because the
--export-area-page option is not being passed when invoked?

Given identical inputs, would it make sense for placefigure and
externalfigure to produce identical results?

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

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


Re: [NTG-context] Inline framed verbatim text

2023-05-19 Thread Aditya Mahajan via ntg-context
On Fri, 19 May 2023, Jeroen via ntg-context wrote:

> Many thanks. Is there a proper way to add some space (a couple of pt or em)
> to the left and the right of the text itself so the frame does not get so
> close to the text?

\framed[loffset=0.2ex, roffset=0.2ex]{...}

Also see: https://wiki.contextgarden.net/Command/setupframed

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

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


Re: [NTG-context] Inline framed verbatim text

2023-05-19 Thread Jeroen via ntg-context
Many thanks. Is there a proper way to add some space (a couple of pt or em)
to the left and the right of the text itself so the frame does not get so
close to the text?

Op vr 19 mei 2023 om 14:10 schreef Wolfgang Schuster via ntg-context <
ntg-context@ntg.nl>:

> Jeroen via ntg-context schrieb am 19.05.2023 um 14:22:
> > In order to get some inline framed verbatim text, I have in the past
> > always used the following:
> >
> > \starttext
> >
> > This is an
> > \inframed
> >   [frame=on,
> >   corner=00,
> > radius=2mm,offset=-1.5pt]
> >   {\ttx \bf example}
> >
> > \stoptext
> >
> > Since this has come-up more and more often, I created the following:
> >
> > \define[1]\infr{
> > \inframed
> > [frame=on,
> >   corner=00,
> >   radius=2mm,offset=-1.5pt]{#1}}
> >
> > \starttext
> >
> > This is an \infr{example}
> >
> > \stoptext
> >
> > This works fine except that I cannot get the text in
> > verbatim/teletype. I have tried style=mono and style={\ttx \bf} but
> > nothing seems to work.
>
> \framed has no style key, you have to use the foregroundstyle to change
> font style, size etc.
>
> To create your own \framed (or \inframed when you add location=low) you
> can use the \defineframed command:
>
> \defineframed
>[infr]
>[location=low,
> frame=on,
> corner=00,
> radius=2mm,
> %offset=-1.5pt,
> foregroundstyle=\tt\bfx]
>
> \starttext
>
> This is an \infr{example}
>
> \stoptext
>
> Wolfgang
>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Inline framed verbatim text

2023-05-19 Thread Wolfgang Schuster via ntg-context

Jeroen via ntg-context schrieb am 19.05.2023 um 14:22:
In order to get some inline framed verbatim text, I have in the past 
always used the following:


\starttext

This is an
\inframed
  [frame=on,
  corner=00,
radius=2mm,offset=-1.5pt]
  {\ttx \bf example}

\stoptext

Since this has come-up more and more often, I created the following:

\define[1]\infr{
\inframed
[frame=on,
  corner=00,
  radius=2mm,offset=-1.5pt]{#1}}

\starttext

This is an \infr{example}

\stoptext

This works fine except that I cannot get the text in 
verbatim/teletype. I have tried style=mono and style={\ttx \bf} but 
nothing seems to work.


\framed has no style key, you have to use the foregroundstyle to change 
font style, size etc.


To create your own \framed (or \inframed when you add location=low) you 
can use the \defineframed command:


\defineframed
  [infr]
  [location=low,
   frame=on,
   corner=00,
   radius=2mm,
   %offset=-1.5pt,
   foregroundstyle=\tt\bfx]

\starttext

This is an \infr{example}

\stoptext

Wolfgang

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

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


[NTG-context] Inline framed verbatim text

2023-05-19 Thread Jeroen via ntg-context
In order to get some inline framed verbatim text, I have in the past always
used the following:

\starttext

This is an
\inframed
  [frame=on,
  corner=00,
  radius=2mm,offset=-1.5pt]
  {\ttx \bf example}

\stoptext

Since this has come-up more and more often, I created the following:

\define[1]\infr{
\inframed
  [frame=on,
  corner=00,
  radius=2mm,offset=-1.5pt]{#1}}

\starttext

This is an \infr{example}

\stoptext

This works fine except that I cannot get the text in verbatim/teletype. I
have tried style=mono and style={\ttx \bf} but nothing seems to work.

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

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


Re: [NTG-context] Probably simple: using a variable for \switchtobodyfont size

2023-05-19 Thread Hans van der Meer via ntg-context
\def\relationsFontSize{8pt}\starttextHello World!\crlf\switchtobodyfont[\relationsFontSize]Hello, world!\stoptext

Untitled.pdf
Description: Adobe PDF document
dr. Hans van der MeerOn 19 May 2023, at 11:43, Gerben Wierda via ntg-context  wrote:I want to use a variable for a font size so I can set it based on language (as some translated texts have widely different sizes)This fails:%===\newdimen\relationsFontSize\relationsFontSize=8pt\starttext\switchtobodyfont[\relationsFontSize]Hello, world!\stoptext%===How can I use a variable to steer \switchtobodyfont size?
Gerben Wierda (LinkedIn, Mastodon)R IT Strategy (main site)Book: Chess and the Art of Enterprise ArchitectureBook: Mastering ArchiMate


___If your question is of interest to others as well, please add an entry to the Wiki!maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-contextwebpage  : https://www.pragma-ade.nl / http://context.aanhet.netarchive  : https://bitbucket.org/phg/context-mirror/commits/wiki : https://contextgarden.net__
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Probably simple: using a variable for \switchtobodyfont size

2023-05-19 Thread Wolfgang Schuster via ntg-context

Gerben Wierda via ntg-context schrieb am 19.05.2023 um 11:43:
I want to use a variable for a font size so I can set it based on 
language (as some translated texts have widely different sizes)


This fails:

%===
\newdimen\relationsFontSize
\relationsFontSize=8pt
\starttext
\switchtobodyfont[\relationsFontSize]
Hello, world!
\stoptext
%===

How can I use a variable to steer \switchtobodyfont size?


You need \the\, i.e.

\switchtobodyfont[\the\relationsFontSize]

but I would use the measure command, e.g.

\definemeasure[relationsFontSize][8pt]
\starttext
\switchtobodyfont[\measure{relationsFontSize}]
Hello, world!
\stoptext

Wolfgang

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

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


[NTG-context] Probably simple: using a variable for \switchtobodyfont size

2023-05-19 Thread Gerben Wierda via ntg-context
I want to use a variable for a font size so I can set it based on language (as 
some translated texts have widely different sizes)

This fails:

%===
\newdimen\relationsFontSize
\relationsFontSize=8pt
\starttext
\switchtobodyfont[\relationsFontSize]
Hello, world!
\stoptext
%===

How can I use a variable to steer \switchtobodyfont size?

Gerben Wierda (LinkedIn , Mastodon 
)
R IT Strategy  (main site)
Book: Chess and the Art of Enterprise Architecture 
Book: Mastering ArchiMate 

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

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