New user registration is currently disabled due to spam abuse / Регистрация новых пользователей в настоящее время приостановлена из-за злоупотреблений спаммерами

Control font size in dsl entry display

General discussion

Control font size in dsl entry display

Postby det » Fri Jun 10, 2011 10:59 am

Is there any way to control the text size within a dsl-formatted entry -- by dsl tags or other? It would be nice to have certain elements larger or smaller than the rest of the entry. (e.g. a small-font footer with misc. notes at the end of the entry.)
det
 
Posts: 37
Joined: Fri Jul 23, 2010 7:22 am

Re: Control font size in dsl entry display

Postby Tvangeste » Fri Jun 10, 2011 11:09 am

Yes, to some extent, it can be done via CSS styling.

You need to edit article-style.css file (create it if you don't have such a file), in the same directory where config file exists. That will be either ~/.goldendict on Linux or C:\Users\YOU_NAME\.... somewhere there on Windows :). Or, if you have a portable install, just create that file in portable subdirectory.

Here's what I have in mine (examples are steelblue, and stress is darkblue):
Code: Select all
.dsl_ex
{
  color: steelblue;
}

.dsl_stress
{
  color: darkblue;
}


P.S. One hint to figure out which tags to use is to save any card to HTML, and then look at the generated HTML file and see which tags are used where.
Tvangeste
 
Posts: 893
Joined: Thu Jun 02, 2011 11:42 am

Re: Control font size in dsl entry display

Postby det » Fri Jun 10, 2011 12:14 pm

Thanks - it's not a pretty solution, but it does work. I don't have any comments using the [com] tag, so I used that for the text I wanted in smaller font. But I'm now using the tags for something they weren't intended for, and I only have a few tags to work with. I noticed that creating my own tag (e.g. [small]) doesn't work.
det
 
Posts: 37
Joined: Fri Jul 23, 2010 7:22 am

Re: Control font size in dsl entry display

Postby Tvangeste » Fri Jun 10, 2011 12:39 pm

Yeah, that's the limitation of DSL format that we live with many years now. Basically, no control over sizes, no proper tables.

I was hoping that with the new Lingvo x5 release Abbyy, the authors of DSL format, could update it and improve a bit, but it seems that we'll have to wait a little bit longer for that...

On the other hand, DSL in its current form is very simple and straightforward and good enough for 99% of cases.
Tvangeste
 
Posts: 893
Joined: Thu Jun 02, 2011 11:42 am

Re: Control font size in dsl entry display

Postby det » Fri Jun 10, 2011 12:45 pm

Yes, well it will work for now.

BTW, thanks for the tip about saving an entry to html -- I had not seen that before, and it is a helpful list for display questions.
det
 
Posts: 37
Joined: Fri Jul 23, 2010 7:22 am


Return to General

Who is online

Users browsing this forum: No registered users and 47 guests