ilius / pyglossary

A tool for converting dictionary files aka glossaries. Mainly to help use our offline glossaries in any Open Source dictionary we like on any modern operating system / device.
GNU General Public License v3.0
2.22k stars 237 forks source link

DSL: formatting issues #466

Closed soshial closed 1 year ago

soshial commented 1 year ago

There problems with:

GoldenDict renders DSL files like this: Aard renders slob (DSL converted with pyglossary into slob) like this:
soshial commented 1 year ago

I found some examples of how code should be translated into formatting in the official ABBYY documentation:

abandon

   [b]1.[/b] [p]гл.[/p]
   [m1]1) [p][trn]общ.[/p] отказываться [com]([i]от чего-л.[/i])[/com], прекращать [com]([i]что-л., делать что-л.[/i])[/com]; оставлять [com]([i]что-л.[/i])[/com][/trn][/m]
   [m2][*][ex][lang id=1033]to abandon a Bill[/lang] — отказаться от продвижения законопроекта[/ex][/*][/m]
   [m2][*][ex][lang id=1033]to abandon a claim \[a right, an action\][/lang] — отказаться от претензий \[от права, от иска\][/ex][/*][/m]
   [m2][*][ex][lang id=1033]to abandon (all) hope[/lang] — оставить (всякую) надежду[/ex][/*][/m]
   [m2][*][b]See:[/b][/*][/m]
   [m2][*][com][lang id=1033]abandoned property[/lang][/com][/*][/m]
   [m1]2) [p][trn]эк.[/p] закрывать; консервировать [com]([i]напр., транспортную линию, производство и т. п.[/i])[/com][/trn][/m]
   [m2][*][ex][lang id=1033]to abandon the transportation services[/lang] — заморозить транспортное обслуживание[/ex][/*][/m]
   [m1]3) [p][trn]общ.[/p] оставлять, уходить [com]([i]с поста и т. д.[/i])[/com]; покидать, оставлять [com]([i]что-л. или кого-л.[/i])[/com][/trn][/m]
   [m2][*][ex][lang id=1033]to be forced to abandon a position[/lang] — быть вынужденным оставить должность[/ex][/*][/m]
   [m2][*][ex][lang id=1033]He abandoned his family and went abroad.[/lang] — Он оставил свою семью и поехал за границу.[/ex][/*][/m]
   [m2][*][ex][lang id=1033]He abandoned his car and tried to escape on foot.[/lang] — Он бросил машину и попытался ускользнуть пешком.[/ex][/*][/m]
   [m2][*][b]See:[/b][/*][/m]
   [m2][*][ref dict="Marketing (En-Ru)"]abandonment[/ref][/*][/m]
   [b]2.[/b] [p]сущ.[/p]
   [m1][p][trn]общ.[/p] импульсивность; развязанность, несдержанность[/trn][/m]
   [m2][*][ex][lang id=1033]to do smth. with in complete abandon[/lang] — делать что-л., совершенно забыв обо всем[/ex][/*][/m]

image

ilius commented 1 year ago

Is there any coomplete documentation for DSL formatting? Links are generally specified with [ref], but I'm looking at a dictionary that uses both [ref] and <<.

soshial commented 1 year ago

Here's the documentation for article links. Here's sample DSL file from Goldendict developer.

soshial commented 1 year ago

Also, indent tags ([m9][m9]) are not supported yet. This makes glossaries much more readable (see screenshot comparison for indents).

ilius commented 1 year ago

We are using <div style="margin-left:9em">...</div> for [m9]...[m9] for example (or any other number). Maybe GoldenDict doesn't support margin-left.

ilius commented 1 year ago

I created a branch named dsl-margin. Please try.

soshial commented 1 year ago

The file that I have omits the closing [/m] tag. Also, I think that [m0] should be regarded as <hr/>.

soshial commented 1 year ago

Here's the source of such file:

mind
    [m0][c darkgray] [/c][b][c red]mind[/c][/b] {{id=000027752}} [c rosybrown]\[[/c][c darkslategray][b]mind[/b][/c] [c darkslategray][b]minds[/b][/c] [c darkslategray][b]minded[/b][/c] [c darkslategray][b]minding[/b][/c][c rosybrown]\][/c] [c darkgray] [/c][c orange]noun,[/c] [c darkgray] [/c][c orange]verb[/c] [p]BrE[/p] [c darkgray] [/c][c darkcyan]\[maɪnd\][/c] [s]z_mind__gb_1.wav[/s] [p]NAmE[/p] [c darkgray] [/c][c darkcyan]\[maɪnd\][/c] [s]z_mind__us_1.wav[/s]
    [m0][c orange] noun[/c] [c darkgray] [/c] [m0] 
    [m0][c darkmagenta][b]ABILITY TO THINK[/b][/c]
    [m1][c red][b]1.[/b][/c] [c orangered]countable[/c][c darkgray], [/c][c orangered]uncountable[/c] [c darkgray] [/c]{{d}}the part of a person that makes them able to be aware of things, to think and to feel{{/d}}
    [m2][ex][*]• [/*][/ex][ex][*]{{x}}the {{/x}} [/*][/ex][b][c darkslategray]{{cl}}conscious/subconscious mind{{/cl}} [/c][/b]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}} There were all kinds of thoughts running through my mind.{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}} There was no doubt in his mind that he'd get the job.{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}‘Drugs’ are associated in most people's minds with drug abuse.{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}She was in a disturbed {{/x}} [/*][/ex][b][c darkslategray]{{cl}}state of mind{{/cl}}[/c][/b][ex][*]{{x}}.{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}I could not have complete {{/x}} [/*][/ex][b][c darkslategray]{{cl}}peace of mind{{/cl}} [/c][/b][ex][*]{{x}} before they returned.{{/x}} [/*][/ex]
    [m2][c darkcyan][b] see also [/b][/c] ↑<<frame of mind>>[c darkgray], [/c]↑<<presence of mind>>
    [m1][c red][b]2.[/b][/c] [c orangered]countable[/c] [c darkgray] [/c]{{d}}your ability to think and reason; your intelligence; the particular way that sb thinks{{/d}}
    [m2][c darkcyan][b]Syn:[/b][/c] [c darkcyan][b] [/b][/c] ↑<<intellect>>
    [m2][ex][*]• [/*][/ex][ex][*]{{x}}to have a {{/x}} [/*][/ex][b][c darkslategray]{{cl}}brilliant/good/keen mind{{/cl}} [/c][/b]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}a {{/x}} [/*][/ex][b][c darkslategray]{{cl}}creative/evil/suspicious mind{{/cl}} [/c][/b]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}} She had a lively and enquiring mind.{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}} His mind is as sharp as ever.{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}I've no idea how her mind works!{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}He had the body of a man and the mind of a child.{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}insights into the criminal mind{{/x}} [/*][/ex]
    [m2][c darkcyan][b] see also [/b][/c] ↑<<one-track mind>> [c darkgray] [/c] [m0] 
    [m0][c darkmagenta][b]INTELLIGENT PERSON[/b][/c]
    [m1][c darkmagenta][b]3.[/b][/c] [c orangered]countable[/c] [c darkgray] [/c]{{d}}a person who is very intelligent{{/d}}
    [m2][c darkcyan][b]Syn:[/b][/c] [c darkcyan][b] [/b][/c] ↑<<brain>> {{n-g}} {{/n-g}}
    [m2][c darkcyan][b] see also [/b][/c] ↑<<mastermind>>
    [m2][ex][*]• [/*][/ex][ex][*]{{x}} She was one of the greatest minds of her generation.{{/x}} [/*][/ex][c darkgray] [/c] [m0] 
    [m0][c darkmagenta][b]THOUGHTS[/b][/c]
    [m1][c red][b]4.[/b][/c] [c orangered]countable[/c] [c darkgray] [/c]{{d}}your thoughts, interest, etc{{/d}}
    [m2][ex][*]• [/*][/ex][b][c darkslategray]{{cl}}Keep your mind on{{/cl}} [/c][/b][ex][*]{{x}} your work!{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}} Her mind is completely occupied by the new baby.{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}The lecture dragged on and my mind wandered.{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Your mind's not on the job.{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}He {{/x}} [/*][/ex][b][c darkslategray]{{cl}}gave his mind to{{/cl}} [/c][/b][ex][*]{{x}} the arrangements for the next day.{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}As for avoiding you, {{/x}} [/*][/ex][b][c darkslategray]{{cl}}nothing could be further from my mind{{/cl}} [/c][/b][c darkgray] [/c][c darkslategray]{{gl}}(= I was not thinking of it at all){{/gl}}[/c][ex][*]{{x}}.{{/x}} [/*][/ex][c darkgray] [/c] [m0] 
    [m0][c darkmagenta][b]MEMORY[/b][/c]
    [m1][c red][b]5.[/b][/c] [c orangered]countable[/c][c darkgray], [/c][c orangered]usually singular[/c] [c darkgray] [/c]{{d}}your ability to remember things{{/d}}
    [m2][ex][*]• [/*][/ex][ex][*]{{x}} When I saw the exam questions my {{/x}} [/*][/ex][b][c darkslategray]{{cl}}mind{{/cl}} [/c][/b][ex][*]{{x}} just {{/x}} [/*][/ex][b][c darkslategray]{{cl}}went blank{{/cl}} [/c][/b][c darkgray] [/c][c darkslategray]{{gl}}(= I couldn't remember anything){{/gl}}[/c][ex][*]{{x}}.{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}} Sorry— your name has gone right out of my mind.{{/x}} [/*][/ex][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c]
    [m2][c darkcyan][b] more at [/b][/c] [c dimgray]at the back of your mind[/c][c darkcyan][b] at [/b][/c] ↑<<back>> [c darkgray] [/c][c rosybrown][sub]{{xp}}n.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray]bend your mind/efforts to sth[/c][c darkcyan][b] at [/b][/c] ↑<<bend>> [c darkgray] [/c][c rosybrown][sub]{{xp}}v.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray]blow your mind[/c][c darkcyan][b] at [/b][/c] ↑<<blow>> [c darkgray] [/c][c rosybrown][sub]{{xp}}v.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray]sth boggles the mind[/c][c darkcyan][b] at [/b][/c] ↑<<boggle>>[c darkgray], [/c][c dimgray]cast your mind back[/c][c darkcyan][b] at [/b][/c] ↑<<cast>> [c darkgray] [/c][c rosybrown][sub]{{xp}}v.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray]change your/sb's mind[/c][c darkcyan][b] at [/b][/c] ↑<<change>> [c darkgray] [/c][c rosybrown][sub]{{xp}}v.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray]change of mind[/c][c darkcyan][b] at [/b][/c] ↑<<change>> [c darkgray] [/c][c rosybrown][sub]{{xp}}n.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray]close your mind to sth[/c][c darkcyan][b] at [/b][/c] ↑<<close>> [sup]{{xhm}}1{{/xhm}} [/sup][c darkgray] [/c][c rosybrown][sub]{{xp}}v.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray]cross your mind[/c][c darkcyan][b] at [/b][/c] ↑<<cross>> [c darkgray] [/c][c rosybrown][sub]{{xp}}v.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray]be etched on your heart/memory/mind[/c][c darkcyan][b] at [/b][/c] ↑<<etch>>[c darkgray], [/c][c dimgray]great minds think alike[/c][c darkcyan][b] at [/b][/c] ↑<<great>> [c darkgray] [/c][c rosybrown][sub]{{xp}}adj.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray]know your own mind[/c][c darkcyan][b] at [/b][/c] ↑<<know>> [c darkgray] [/c][c rosybrown][sub]{{xp}}v.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray]a meeting of minds[/c][c darkcyan][b] at [/b][/c] ↑<<meeting>>[c darkgray], [/c][c dimgray]have/keep an open mind (about/on sth)[/c][c darkcyan][b] at [/b][/c] ↑<<open>> [c darkgray] [/c][c rosybrown][sub]{{xp}}adj.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray]open your/sb's mind to sth[/c][c darkcyan][b] at [/b][/c] ↑<<open>> [c darkgray] [/c][c rosybrown][sub]{{xp}}v.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray]give sb a piece of your mind[/c][c darkcyan][b] at [/b][/c] ↑<<piece>> [c darkgray] [/c][c rosybrown][sub]{{xp}}n.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray]prey on sb's mind[/c][c darkcyan][b] at [/b][/c] ↑<<prey>> [c darkgray] [/c][c rosybrown][sub]{{xp}}v.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray]push sth to the back of your mind[/c][c darkcyan][b] at [/b][/c] ↑<<push>> [c darkgray] [/c][c rosybrown][sub]{{xp}}v.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray](not) in your right mind[/c][c darkcyan][b] at [/b][/c] ↑<<right>> [c darkgray] [/c][c rosybrown][sub]{{xp}}adj.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray]have a mind/memory like a sieve[/c][c darkcyan][b] at [/b][/c] ↑<<sieve>> [c darkgray] [/c][c rosybrown][sub]{{xp}}n.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray]out of sight, out of mind[/c][c darkcyan][b] at [/b][/c] ↑<<sight>> [c darkgray] [/c][c rosybrown][sub]{{xp}}n.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray]slip your mind[/c][c darkcyan][b] at [/b][/c] ↑<<slip>> [c darkgray] [/c][c rosybrown][sub]{{xp}}v.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray]speak your mind[/c][c darkcyan][b] at [/b][/c] ↑<<speak>>[c darkgray], [/c][c dimgray]stick in your mind[/c][c darkcyan][b] at [/b][/c] ↑<<stick>> [c darkgray] [/c][c rosybrown][sub]{{xp}}v.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray]a turn of mind[/c][c darkcyan][b] at [/b][/c] ↑<<turn>> [c darkgray] [/c][c rosybrown][sub]{{xp}}n.{{/xp}}[/sub][/c][c darkgray], [/c][c dimgray]of unsound mind[/c][c darkcyan][b] at [/b][/c] ↑<<unsound>> [m3] 
    {{Word Origin}}[m3][c darkslategray][u]Word Origin:[/u][/c]
    [m3][c darkgray] [/c][c darkslategray]{{lang}}Old English{{/lang}} [/c][c darkgray] [/c][c darkslategray]{{etym_i}}gemynd{{/etym_i}} [/c][c darkgray] [/c][c darkslateblue]{{etym_q}}‘memory, thought’{{/etym_q}}[/c][c dimgray]{{etymology}}, of {{/etymology}} [/c][c darkslategray]{{lang}}Germanic{{/lang}} [/c][c dimgray]{{etymology}} origin, from an {{/etymology}} [/c][c darkslategray]{{lang}}Indo-European{{/lang}} [/c][c dimgray]{{etymology}} root meaning {{/etymology}} [/c][c darkslateblue][b]{{etym_tr}}‘revolve in the mind, think’{{/etym_tr}}[/b][/c][c dimgray]{{etymology}}, shared by {{/etymology}} [/c][c darkslategray]{{lang}}Sanskrit{{/lang}} [/c][c darkgray] [/c][c darkcyan]{{ff}}manas{{/ff}} [/c][c dimgray]{{etymology}} and {{/etymology}} [/c][c darkslategray]{{lang}}Latin{{/lang}} [/c][c darkgray] [/c][c darkcyan]{{ff}}mens{{/ff}} [/c][c darkgray] [/c][c darkslateblue][b]{{etym_tr}}‘mind’{{/etym_tr}}[/b][/c][c dimgray]{{etymology}}.{{/etymology}} [/c] [m3] 
    {{Thesaurus}}[m3][c darkslategray][u]Thesaurus:[/u][/c]
    [m4][b][c darkslateblue]mind[/c][/b] [c darkgray] [/c][c orange]noun[/c]
    [m4][c darkmagenta][b]1.[/b][/c] [c orangered]C[/c][c darkgray], [/c][c orangered]U[/c]
    [m5][ex][*]• [/*][/ex][ex][*]{{x}}All kinds of thoughts ran through my mind.{{/x}} [/*][/ex]
    [m5][c darkslateblue][b]head[/b][/c][c darkslategray] • [/c][c darkslategray] • [/c][c darkslateblue][b]brain[/b][/c][c darkslategray] • [/c][c darkslategray] • [/c][c darkslateblue][b]soul[/b][/c][c darkslategray] • [/c][c darkslategray] • [/c][c darkslateblue][b]spirit[/b][/c][c darkslategray] • [/c][c darkslategray] • [/c][c darkslateblue][b]the/your subconscious[/b][/c][c darkslategray] • [/c][c darkgray]|[/c][c green]psychology[/c] [c darkgray] [/c][c darkslateblue][b]ego[/b][/c][c darkslategray] • [/c]
    [m6]{{x_in_cl_g}} the {{/x_in_cl_g}}[b]{{cl}}human{{/cl}} [/b]{{x_in_cl_g}} mind/brain/soul/spirit{{/x_in_cl_g}}
    [m6]{{x_in_cl_g}} a thought {{/x_in_cl_g}}[b]{{cl}}enters{{/cl}} [/b]{{x_in_cl_g}} sb's mind/head{{/x_in_cl_g}}
    [m6][b]{{cl}}deep in{{/cl}} [/b]{{x_in_cl_g}} your mind/the brain/your subconscious{{/x_in_cl_g}}
    [m5][b]{{hh}}Mind or head?{{/hh}} [/b][b][c dimgray]{{eb}}Head{{/eb}} [/c][/b][c dimgray]{{help}} is slightly more informal than {{/help}} [/c][b][c dimgray]{{eb}}mind{{/eb}} [/c][/b][c dimgray]{{help}} in this meaning and is used especially to talk about thoughts and ideas that {{/help}} [/c][b][c dimgray]{{ei}}get into{{/ei}} [/c][/b][c dimgray]{{help}} your head or that you {{/help}} [/c][b][c dimgray]{{ei}}can't get out of{{/ei}} [/c][/b][c dimgray]{{help}} your head.{{/help}} [/c]
    [m4][c darkmagenta][b]2.[/b][/c] [c orangered]C[/c][c darkgray], [/c][c orangered]usually sing.[/c]
    [m5][ex][*]• [/*][/ex][ex][*]{{x}}His mind is as sharp as ever.{{/x}} [/*][/ex]
    [m5][c darkslateblue][b]intelligence[/b][/c][c darkslategray] • [/c][c darkslategray] • [/c][c darkslateblue][b]intellect[/b][/c][c darkslategray] • [/c][c darkslategray] • [/c][c darkslateblue][b]brain[/b][/c][c darkslategray] • [/c][c darkslategray] • [/c][c darkslateblue][b]wits[/b][/c][c darkslategray] • [/c][c darkslategray] • [/c][c darkslateblue][b]genius[/b][/c][c darkslategray] • [/c][c darkgray]|[/c][c sienna]AmE[/c][c darkgray], [/c][c rosybrown]informal[/c] [c darkgray] [/c][c darkslateblue][b]smarts[/b][/c][c darkslategray] • [/c]
    [m6]{{x_in_cl_g}}(a) {{/x_in_cl_g}}[b]{{cl}}great{{/cl}} [/b]{{x_in_cl_g}} mind/intelligence/intellect/brain/genius{{/x_in_cl_g}}
    [m6][b]{{cl}}have{{/cl}} [/b]{{x_in_cl_g}} a …mind/intelligence/intellect/a …brain/…wits/genius/smarts{{/x_in_cl_g}}
    [m6][b]{{cl}}use{{/cl}} [/b]{{x_in_cl_g}} your mind/intelligence/brain/wits/smarts{{/x_in_cl_g}} [m3] 
    {{Synonyms}}[m3][c darkslategray][u]Synonyms:[/u][/c]
    [m3][c darkslategray][b]mad[/b][/c]
    [m3][c darkslateblue]{{subhead}}crazy{{/subhead}} [/c][c darkslategray] • [/c][c darkslateblue]{{subhead}}nuts{{/subhead}} [/c][c darkslategray] • [/c][c darkslateblue]{{subhead}}batty{{/subhead}} [/c][c darkslategray] • [/c][c darkslateblue]{{subhead}}out of your mind{{/subhead}} [/c][c darkslategray] • [/c][c darkslateblue]{{subhead}}(not) in your right mind{{/subhead}} [/c]
    [m4]{{para}}These are all informal words that describe sb who has a mind that does not work normally.{{/para}}
    [m4]{{para}} {{/para}}[c darkslateblue][b]mad[/b][/c][c darkslategray] • [/c]{{para}} ({{/para}}[c rosybrown]{{unei}}informal{{/unei}}[/c]{{para}}, {{/para}}[c sienna][i]{{ungi}}especially BrE{{/ungi}}[/i][/c]{{para}}) having a mind that does not work normally: {{/para}}[ex][*][b]▪[/b] {{unx}}I thought I'd go mad if I stayed any longer.{{/unx}} [/*][/ex]
    [m4]{{para}} {{/para}}[b]{{arbd1}}Mad{{/arbd1}} [/b]{{para}} is an informal word used to suggest that sb's behaviour is very strange, often because of extreme emotional pressure. It is offensive if used to describe sb suffering from a real mental illness; use {{/para}}[b]{{arbd1}}mentally ill{{/arbd1}} [/b]{{para}} instead. {{/para}}[b]{{arbd1}}Mad{{/arbd1}} [/b]{{para}} is not usually used in this meaning in North American English; use {{/para}}[b]{{arbd1}}crazy{{/arbd1}} [/b]{{para}} instead.{{/para}}
    [m4]{{para}} {{/para}}[c darkslateblue][b]crazy[/b][/c][c darkslategray] • [/c]{{para}} ({{/para}}[c rosybrown]{{unei}}informal{{/unei}}[/c]{{para}}, {{/para}}[c sienna][i]{{ungi}}especially NAmE{{/ungi}}[/i][/c]{{para}}) having a mind that does not work normally: {{/para}}[ex][*][b]▪[/b] {{unx}}A crazy old woman rented the upstairs room.{{/unx}} [/*][/ex]
    [m4]{{para}} Like {{/para}}[b]{{arbd1}}mad{{/arbd1}}[/b]{{para}}, {{/para}}[b]{{arbd1}}crazy{{/arbd1}} [/b]{{para}} is offensive if used to describe sb suffering from a real mental illness.{{/para}}
    [m4]{{para}} {{/para}}[c darkslateblue][b]nuts[/b][/c][c darkslategray] • [/c]{{para}} \[not before noun\] ({{/para}}[c rosybrown]{{unei}}informal{{/unei}}[/c]{{para}}) mad: {{/para}}[ex][*][b]▪[/b] {{unx}}That noise is driving me nuts!{{/unx}} [/*][/ex]{{para}} {{/para}}{{z_xsym}}◇{{/z_xsym}}{{para}} {{/para}}[ex][*][b]▪[/b] {{unx}}You guys are nuts!{{/unx}} [/*][/ex]
    [m4]{{para}} {{/para}}[c darkslateblue][b]batty[/b][/c][c darkslategray] • [/c]{{para}} ({{/para}}[c rosybrown]{{unei}}informal{{/unei}}[/c]{{para}}, {{/para}}[c sienna][i]{{ungi}}especially BrE{{/ungi}}[/i][/c]{{para}}) slightly mad, in a harmless way: {{/para}}[ex][*][b]▪[/b] {{unx}}Her mum's completely batty.{{/unx}} [/*][/ex]
    [m4]{{para}} {{/para}}[c darkslateblue][b]out of your mind[/b][/c][c darkslategray] • [/c]{{para}} ({{/para}}[c rosybrown]{{unei}}informal{{/unei}}[/c]{{para}}) unable to think or behave normally, especially because of extreme shock or anxiety: {{/para}}[ex][*][b]▪[/b] {{unx}}She was out of her mind with grief.{{/unx}} [/*][/ex]
    [m4]{{para}} {{/para}}[c darkslateblue][b](not) in your right mind[/b][/c][c darkslategray] • [/c]{{para}} ({{/para}}[c rosybrown]{{unei}}informal{{/unei}}[/c]{{para}}) (not) mentally normal: {{/para}}[ex][*][b]▪[/b] {{arbd1}}No one in their right mind{{/arbd1}} [/*][/ex][ex][*][b]▪[/b] {{unx}} would choose to work there.{{/unx}} [/*][/ex]
    [m4]{{para}}to be mad/crazy/nuts/out of your mind/not in your right mind {{/para}}[b]{{arbd1}}to do sth{{/arbd1}} [/b]
    [m4]{{para}}to {{/para}}[b]{{arbd1}}go{{/arbd1}} [/b]{{para}} mad/crazy/nuts/batty{{/para}}
    [m4]{{para}}to {{/para}}[b]{{arbd1}}drive sb{{/arbd1}} [/b]{{para}} mad/crazy/nuts/batty/out of their mind{{/para}}
    [m4][b]{{arbd1}}completely{{/arbd1}} [/b]{{para}} mad/crazy/nuts/batty/out of your mind{{/para}} [m3] 
    {{Example Bank}}[m3][c darkslategray][u]Example Bank:[/u][/c]
    [m4][ex][*]• [/*][/ex][ex][*]{{x}}Exhaustion clouded her mind.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}He feared he was losing his mind.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}He had closed his mind to anything new.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}He occupied his mind by playing cards against himself.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}He wanted us to focus our minds on unsolved problems.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}He's in rather a negative frame of mind.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Her mind began to wander.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Her mind was still reeling from the shock.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Here are some important points to keep in mind…{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}His comments did nothing to ease my mind.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}His mind raced, trying to think of a way out of the situation.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Honestly, all you ever talk about is sex— you have a one-track mind!{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}I couldn't get my mind around the concept.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}I have a lot on my mind at the moment.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}I need a clear mind if I want to continue with my work.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}I'll keep what you say in mind.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}I'll never understand how his mind works.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}I'm sorry I forgot your birthday— it completely slipped my mind.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}I'm sure someone can help you, but no one immediately springs to mind.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}It was something she had never imagined, not even in the deepest recesses of her mind.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}It's been preying on my mind ever since it happened.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Just free your mind and write whatever comes.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Kate desperately searched her mind for some excuse.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}My mind turned to more practical matters.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Our subconscious mind tries to protect us.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Serious doubts began to flood my mind.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}She was poisoning his mind and turning him against his family.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}She was the only person who understood his mind.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Tell me what you want— I can't read your mind!{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}The problem was always at the back of my mind.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}The thought never crossed my mind!{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Their own problems of course remained uppermost in their minds.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}There was absolutely no doubt in my mind that he was guilty.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Try meditating to clear your mind of negative thoughts.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Try to keep an open mind until you've heard all the facts.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Try to keep safety in the forefront of your mind at all times.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}What kind of party do you have in mind?{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Who in their right mind would want to marry a murderer?{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}You can do whatever you set your mind to.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}You have to train your mind to think positively.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}You've been in my mind a lot lately.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}a collection of photographs that will blow your mind{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}a problem that has defeated the world's finest minds{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}a subject which was on the nation's collective mind{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}impressionable young minds that are easily influenced{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}influencing impressionable young minds{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}refreshed in mind and body{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}terrible images that will be imprinted on our minds for ever{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}the complex nature of the human mind{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}‘Drugs’ are associated in most people's minds with drug abuse.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Did you know you have a nasty suspicious mind?{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}He had probably the finest mind of the whole group.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}He has the body of a man but the mind of a child.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}I wish I had that type of creative mind.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}I've no idea how her mind works.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}She has a brilliant mind.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}She has lively and enquiring mind.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}She was in a disturbed state of mind.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Their evidence might give us some insight into the criminal mind.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}There was no doubt in his mind that he'd get the job.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}When I saw the exam questions my mind just went blank.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}When you go to sleep it is only the conscious mind that shuts down.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}You don't have to do anything about it now… just bear it in mind.{{/x}} [/*][/ex]
    {{Idiom}}[m3][c darkslategray][u]Idioms:[/u][/c] I don't mind admitting/telling you … [c darkslategray][b]▪[/b][/c] ↑<<I don't mind if I do>> [c darkslategray][b]▪[/b][/c] I wouldn't mind something sth [c darkslategray][b]▪[/b][/c] ↑<<all in the mind>> [c darkslategray][b]▪[/b][/c] ↑<<bear in mind that …>> [c darkslategray][b]▪[/b][/c] ↑<<bear somebody in mind>> [c darkslategray][b]▪[/b][/c] bored/frightened/pissed/stoned out of your mind [c darkslategray][b]▪[/b][/c] ↑<<call somebody to mind>> [c darkslategray][b]▪[/b][/c] ↑<<come to mind>> [c darkslategray][b]▪[/b][/c] ↑<<do you mind?>> [c darkslategray][b]▪[/b][/c] ↑<<have a good mind to do something>> [c darkslategray][b]▪[/b][/c] ↑<<have a mind of your own>> [c darkslategray][b]▪[/b][/c] ↑<<have half a mind to do something>> [c darkslategray][b]▪[/b][/c] ↑<<have it in mind to do something>> [c darkslategray][b]▪[/b][/c] ↑<<have somebody in mind>> [c darkslategray][b]▪[/b][/c] ↑<<if you don't mind>> [c darkslategray][b]▪[/b][/c] ↑<<if you don't mind me saying so …>> [c darkslategray][b]▪[/b][/c] ↑<<if you wouldn't mind>> [c darkslategray][b]▪[/b][/c] ↑<<in two minds about about doing something>> [c darkslategray][b]▪[/b][/c] ↑<<lose your mind>> [c darkslategray][b]▪[/b][/c] ↑<<make up your mind>> [c darkslategray][b]▪[/b][/c] ↑<<make your mind up>> [c darkslategray][b]▪[/b][/c] ↑<<mind over matter>> [c darkslategray][b]▪[/b][/c] ↑<<mind the shop>> [c darkslategray][b]▪[/b][/c] ↑<<mind you>> [c darkslategray][b]▪[/b][/c] ↑<<mind your Ps and Qs>> [c darkslategray][b]▪[/b][/c] ↑<<mind your own business>> [c darkslategray][b]▪[/b][/c] ↑<<my mind>> [c darkslategray][b]▪[/b][/c] ↑<<never mind>> [c darkslategray][b]▪[/b][/c] ↑<<never mind something>> [c darkslategray][b]▪[/b][/c] ↑<<never you mind>> [c darkslategray][b]▪[/b][/c] ↑<<of one same mind>> [c darkslategray][b]▪[/b][/c] ↑<<on your mind>> [c darkslategray][b]▪[/b][/c] out of your mind [c darkslategray][b]▪[/b][/c] ↑<<out of your mind with worry>> [c darkslategray][b]▪[/b][/c] ↑<<put somebody in mind of somebody>> [c darkslategray][b]▪[/b][/c] ↑<<put somebody's mind at ease>> [c darkslategray][b]▪[/b][/c] ↑<<put something out of your mind>> [c darkslategray][b]▪[/b][/c] ↑<<put your mind to something>> [c darkslategray][b]▪[/b][/c] ↑<<set your mind on something>> [c darkslategray][b]▪[/b][/c] ↑<<take your mind off something>> [c darkslategray][b]▪[/b][/c] ↑<<your mind's eye>>{{/Idiom}}
    {{Derived}}[m3][c darkslategray][u]Derived:[/u][/c] ↑<<mind out>>{{/Derived}} [m1] 
    [m0][c orange] verb[/c] [c darkgray] [/c] [m0] 
    [m0][c darkmagenta][b]BE UPSET/ANNOYED[/b][/c]
    [m1][c red][b]1.[/b][/c] [c orangered]transitive[/c][c darkgray], [/c][c orangered]intransitive[/c] [c darkgray] ([/c][c dimgray]{{u}}used especially in questions or with negatives; not used in the passive{{/u}}[/c][c darkgray]) [/c]{{d}}to be upset, annoyed or worried by sth{{/d}}
    [m2][ex][*]• [/*][/ex][b]{{cf}}\~ (sth){{/cf}} [/b][c darkgray] [/c][ex][*]{{x}} I don't mind the cold— it's the rain I don't like.{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}} I hope you don't mind the noise.{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}He wouldn't have minded so much if she'd told him the truth.{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][b]{{cf}}\~ about sth{{/cf}} [/b][c darkgray] [/c][ex][*]{{x}}Did she mind about not getting the job?{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][b]{{cf}}\~ doing sth{{/cf}} [/b][c darkgray] [/c][ex][*]{{x}}Did she mind not getting the job?{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][b]{{cf}}\~ sb/sth doing sth{{/cf}} [/b][c darkgray] [/c][ex][*]{{x}}Do your parents mind you leaving home?{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] ([/c][c rosybrown]formal[/c][c darkgray]) [/c][ex][*]{{x}}Do your parents mind your leaving home?{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][b]{{cf}}\~ how, what, etc…{{/cf}} [/b][c darkgray] [/c][ex][*]{{x}}She never minded how hot it was.{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][b]{{cf}}\~ that…{{/cf}} [/b][c darkgray] [/c][ex][*]{{x}}He minded that he hadn't been asked.{{/x}} [/*][/ex][c darkgray] [/c] [m0] 
    [m0][c darkmagenta][b]ASKING PERMISSION[/b][/c]
    [m1][c red][b]2.[/b][/c] [c orangered]intransitive[/c][c darkgray], [/c][c orangered]transitive[/c] [c darkgray] [/c][c darkslategray]{{ud}}used to ask for permission to do sth, or to ask sb in a polite way to do sth{{/ud}} [/c]
    [m2][ex][*]• [/*][/ex][ex][*]{{x}} Do you mind if I open the window?{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][b]{{cf}}\~ sb doing sth{{/cf}} [/b][c darkgray] [/c][ex][*]{{x}} Are you married, if you don't mind me asking?{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] ([/c][c rosybrown]formal[/c][c darkgray]) [/c][ex][*]{{x}}Are you married, if you don't mind my asking?{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][b]{{cf}}\~ doing sth{{/cf}} [/b][c darkgray] [/c][ex][*]{{x}}Would you mind explaining that again, please?{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Do you mind driving? I'm feeling pretty tired.{{/x}} [/*][/ex][c darkgray] [/c] [m0] 
    [m0][c darkmagenta][b]NOT CARE/WORRY[/b][/c]
    [m1][c red][b]3.[/b][/c] [b]not mind[/b][c darkgray] [/c][c orangered]intransitive[/c][c darkgray], [/c][c orangered]transitive[/c][c darkgray], [/c][c orangered]no passive[/c] [c darkgray] [/c]{{d}}to not care or not be concerned about sth{{/d}}
    [m2][ex][*]• [/*][/ex][ex][*]{{x}} ‘Would you like tea or coffee?’ ‘I don't mind— either's fine.’{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][b]{{cf}}\~ sb{{/cf}} [/b][c darkgray] [/c][ex][*]{{x}} Don't mind her— she didn't mean what she said.{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Don't mind me {{/x}} [/*][/ex][c darkslategray]{{gl}}(= don't let me disturb you){{/gl}} [/c][ex][*]{{x}} — I'll just sit here quietly.{{/x}} [/*][/ex][c darkgray] [/c] [m0] 
    [m0][c darkmagenta][b]BE WILLING[/b][/c]
    [m1][c red][b]4.[/b][/c] [b]not mind doing sth[/b][c darkgray] [/c][c orangered]transitive[/c] [c darkgray] [/c]{{d}}to be willing to do sth{{/d}}
    [m2][ex][*]• [/*][/ex][ex][*]{{x}} I don't mind helping if you can't find anyone else.{{/x}} [/*][/ex][c darkgray] [/c] [m0] 
    [m0][c darkmagenta][b]WARNING[/b][/c]
    [m1][c red][b]5.[/b][/c] [c darkgray]([/c][c sienna]BrE[/c][c darkgray])[/c][c darkgray] ([/c][i][c darkgray]also[/c][/i] [c darkgray] [/c][b]watch[/b] [c darkgray] [/c][c sienna]NAmE[/c][c darkgray], [/c][c sienna]BrE[/c][c darkgray])[/c][c darkgray] [/c][c orangered]transitive[/c] [c darkgray] [/c][c darkslategray]{{ud}}used to tell sb to be careful about sth or warn them about a danger{{/ud}} [/c]
    [m2][ex][*]• [/*][/ex][b]{{cf}}\~ sth{{/cf}} [/b][c darkgray] [/c][ex][*]{{x}} Mind {{/x}} [/*][/ex][c darkslategray]{{gl}}(= Don't fall on){{/gl}} [/c][ex][*]{{x}} that step!{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}} Mind your head! {{/x}} [/*][/ex][c darkslategray]{{gl}}(= for example, be careful you don't hit it on a low ceiling){{/gl}} [/c]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Mind your language! {{/x}} [/*][/ex][c darkslategray]{{gl}}(= don't speak in a rude or offensive way){{/gl}} [/c]
    [m2][ex][*]• [/*][/ex][b]{{cf}}\~ how, where, etc…{{/cf}} [/b][c darkgray] [/c][ex][*]{{x}}Mind how you go! {{/x}} [/*][/ex][c darkslategray]{{gl}}(= often used when you say goodbye to sb){{/gl}} [/c]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Mind where you're treading!{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][b]{{cf}}\~ (that)…{{/cf}} [/b][c darkgray] [/c][ex][*]{{x}}Mind you don't cut yourself— that knife's very sharp.{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}You must be home for dinner, mind.{{/x}} [/*][/ex][c darkgray] [/c][c dimgray]{{help}}‘That’ is nearly always left out in this pattern.{{/help}} [/c][c darkgray] [/c] [m0] 
    [m0][c darkmagenta][b]OBEY[/b][/c]
    [m1][c darkmagenta][b]6.[/b][/c] [c orangered]transitive[/c] [c darkgray] [/c][b]{{cf}}\~ sb{{/cf}} [/b][c darkgray] ([/c][c sienna]NAmE[/c][c darkgray], [/c][c sienna]IrishE[/c][c darkgray]) [/c]{{d}}to pay attention to what sb says, and obey them{{/d}}
    [m2][ex][*]• [/*][/ex][ex][*]{{x}}And the moral of the story is: always mind your mother!{{/x}} [/*][/ex][c darkgray] [/c] [m0] 
    [m0][c darkmagenta][b]TAKE CARE OF[/b][/c]
    [m1][c darkmagenta][b]7.[/b][/c] [c darkgray]([/c][c sienna]especially BrE[/c][c darkgray])[/c][c darkgray] ([/c][c sienna]NAmE usually[/c] [c darkgray] [/c][b]watch[/b][c darkgray])[/c][c darkgray] [/c][c orangered]transitive[/c] [c darkgray] [/c][b]{{cf}}\~ sb/sth{{/cf}} [/b][c darkgray] [/c]{{d}}to take care of sb/sth{{/d}}
    [m2][c darkcyan][b]Syn:[/b][/c] [c darkcyan][b] [/b][/c] [c darkblue]look after[/c]
    [m2][ex][*]• [/*][/ex][ex][*]{{x}}Who's minding the children this evening?{{/x}} [/*][/ex]
    [m2][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Could you mind my bags for a moment?{{/x}} [/*][/ex][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c][c darkgray] [/c]
    [m2][c darkcyan][b] more at [/b][/c] [c dimgray]mind/watch your language[/c][c darkcyan][b] at [/b][/c] ↑<<language>>[c darkgray], [/c][c dimgray]mind/watch your step[/c][c darkcyan][b] at [/b][/c] ↑<<step>> [c darkgray] [/c][c rosybrown][sub]{{xp}}n.{{/xp}} [/sub][/c][c darkgray] [/c]
    {{side_verb_forms}}[m3][c darkslategray][u]Verb forms:[/u][/c] [s]x_verb_forms_mind.jpg[/s]{{/side_verb_forms}} [m3] 
    {{Word Origin}}[m3][c darkslategray][u]Word Origin:[/u][/c]
    [m3][c darkgray] [/c][c darkslategray]{{lang}}Old English{{/lang}} [/c][c darkgray] [/c][c darkslategray]{{etym_i}}gemynd{{/etym_i}} [/c][c darkgray] [/c][c darkslateblue]{{etym_q}}‘memory, thought’{{/etym_q}}[/c][c dimgray]{{etymology}}, of {{/etymology}} [/c][c darkslategray]{{lang}}Germanic{{/lang}} [/c][c dimgray]{{etymology}} origin, from an {{/etymology}} [/c][c darkslategray]{{lang}}Indo-European{{/lang}} [/c][c dimgray]{{etymology}} root meaning {{/etymology}} [/c][c darkslateblue][b]{{etym_tr}}‘revolve in the mind, think’{{/etym_tr}}[/b][/c][c dimgray]{{etymology}}, shared by {{/etymology}} [/c][c darkslategray]{{lang}}Sanskrit{{/lang}} [/c][c darkgray] [/c][c darkcyan]{{ff}}manas{{/ff}} [/c][c dimgray]{{etymology}} and {{/etymology}} [/c][c darkslategray]{{lang}}Latin{{/lang}} [/c][c darkgray] [/c][c darkcyan]{{ff}}mens{{/ff}} [/c][c darkgray] [/c][c darkslateblue][b]{{etym_tr}}‘mind’{{/etym_tr}}[/b][/c][c dimgray]{{etymology}}.{{/etymology}} [/c] [m3] 
    {{Thesaurus}}[m3][c darkslategray][u]Thesaurus:[/u][/c]
    [m4][b][c darkslateblue]mind[/c][/b] [c darkgray] [/c][c orange]verb[/c] [c darkgray] [/c][c orangered]T[/c][c darkgray], [/c][c orangered]I[/c][c darkgray], [/c][c orangered]no passive[/c] [c darkgray] ([/c]{{u}}used especially in question or with negatives; not used in the progressive tenses{{/u}}[c darkgray]) ([/c][c rosybrown]especially spoken[/c][c darkgray])[/c]
    [m4][ex][*]• [/*][/ex][ex][*]{{x}}I don't mind wet weather.{{/x}} [/*][/ex]
    [m4][c darkslateblue][b]care[/b][/c][c darkslategray] • [/c][c darkgray]|[/c][c sienna]especially BrE[/c][c darkgray], [/c][c rosybrown]spoken[/c] [c darkgray] [/c][c darkslateblue][b]be bothered[/b][/c][c darkslategray] • [/c]
    [m5]{{x_in_cl_g}} mind/care/be bothered {{/x_in_cl_g}}[b]{{cl}}about{{/cl}} [/b]{{x_in_cl_g}} sth{{/x_in_cl_g}}
    [m5]{{x_in_cl_g}} mind/care/be bothered {{/x_in_cl_g}}[b]{{cl}}that…{{/cl}} [/b]
    [m5][b]{{cl}}not{{/cl}} [/b]{{x_in_cl_g}} mind/care/be bothered {{/x_in_cl_g}}[b]{{cl}}what people think{{/cl}} [/b] [m3] 
    {{Example Bank}}[m3][c darkslategray][u]Example Bank:[/u][/c]
    [m4][ex][*]• [/*][/ex][ex][*]{{x}}His parents didn't seem to mind that he dropped out of college.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}I didn't mind about the money.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}I don't mind at all telling people my age.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Nobody really minded much about what happened to them.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}They had thought the boys wouldn't mind sharing; as it turned out, they minded bitterly.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Would you mind terribly if I went on my own?{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}‘Would you prefer tea or coffee?’ ‘I don't mind— either's fine.’{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Did she mind (about) not getting the job?{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Do you mind driving? I'm feeling pretty tired.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Do you mind if I open a window?{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Don't mind me — I'll just sit here quietly.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}He minded that he hadn't been asked.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}How old are you, if you don't mind me asking?{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}I hope you don't mind the noise.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}I wouldn't have minded so much if you hadn't lied about it.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}No, I don't mind a bit.{{/x}} [/*][/ex]
    [m4][ex][*]• [/*][/ex][c darkgray] [/c][ex][*]{{x}}Would you mind explaining that again?{{/x}} [/*][/ex]
    [m3] [m1] 
    {{See also}}[m3][c darkslategray][u]See also:[/u][/c] ↑<<mind the store>> [c darkslategray][b]▪[/b][/c] ↑<<of two minds about about doing something>> [c darkslategray][b]▪[/b][/c] ↑<<watch>>{{/See also}}
ilius commented 1 year ago

Is indentation working in the branch I gave?

soshial commented 1 year ago

No, it still does not. I think it's because of this line: https://github.com/ilius/pyglossary/blob/e1286aa8db03d38c7f580c876918a51b82e7e596/pyglossary/plugins/dsl/__init__.py#L133

Some files don't have a closing tag [\m].

ilius commented 1 year ago

The file that I have omits the closing [/m] tag. Also, I think that [m0] should be regarded as <hr/>.

The official example does not have m0, and uses m1 for numbered list items. And it does close them.

Why should we change it for all glossaries? Is there any other glossary that uses m0 or is missing close tags?

soshial commented 1 year ago

The example doesn't mention "m0", but the documentation mentions it explicitly: http://lingvo.helpmax.net/en/troubleshooting/dsl-compiler/dsl-tags/ . I will look for other examples.

ilius commented 1 year ago

What if we use <p> instead of <div>? There are no nested paragraphs in html, so closing it is optional. We can't have nested m tags, can we?

soshial commented 1 year ago

According to Goldendict DSL-parsing code comments: https://github.com/goldendict/goldendict/blob/master/dsl_details.cc#L185-L186

Closing the [mN] tags is optional. Quote from https://documentation.help/ABBYY-Lingvo8/paragraph_form.htm: Any paragraph from this tag until the end of card or until system meets an «[/m]» (margin shift toggle off) tag

Also here: https://github.com/goldendict/goldendict/blob/master/dsl_details.cc#L679-L708

I think, what is meant above is that the previous [mN] tag is closed whenever:

soshial commented 1 year ago

Found several dicts, that omit the closing tag. I'll just list some of them:

  1. croatian-english
  2. Russian-Slovene
ilius commented 1 year ago

I pushed to branch dsl-parag. Please try again (with a glossary without m0 for items).

soshial commented 1 year ago

Works great!

One thing I noticed:

  1. \ {{ Here's how you insert an empty space: slash and space after it }} should still be an empty string. You left slash unchanged \.
  2. Also, \{ should be shown in HTML as {.
  3. \~ should be ~
  4. \@ should be @
  5. [']e[/'] should add the acute accent or make the letter bold (some rudiment for Russian language)
ilius commented 1 year ago

You mean \ (baskslash space) maps to html space? (&nbsp;)

soshial commented 1 year ago

Yes, I surmise:

soshial commented 1 year ago

Also, may I ask you to have a closer look at the example from the official documentation:

The first line ([b]1.[/b] [p]гл.[/p] has no [m]) has zero indent/padding, while the second line with [m1] and has 1em padding.

I guess that [m0] is not mentioned that often since it's almost useless for the formatting.

soshial commented 1 year ago

I guess this thread becomes too heavy for your internet. I will create a new ticket if I see any other issue after you will have fixed the issues mentioned above, okay? Thank you so much for being very responsive!

ilius commented 1 year ago

I pushed to dsl-parag. Please try again. Let's continue here. I need to update the test at the end.

soshial commented 1 year ago

Now the HTML code looks correct, but each <p> tag now has a lot of line spacing:

WAS:

Screenshot 2023-05-31 at 19 13 55

NOW:

Screenshot 2023-05-31 at 18 57 43

Maybe having one <div> with <br/> in the end of it. At least Goldendict uses <div> (https://github.com/goldendict/goldendict/blob/4723dac262c44651ceed26745a913c30cf502f29/dsl.cc#L866-L867)

soshial commented 1 year ago

I need to update the test at the end.

I think that this file is really great case for testing: https://github.com/Tvangeste/SampleDSL/blob/master/sample.dsl

soshial commented 1 year ago

Also, pyglossary missed .bmp file and probably will miss .png file in the folder. See this line

https://github.com/ilius/pyglossary/blob/18e1f23bdda18c881541fae91fec93ac698eefd1/pyglossary/plugins/dsl/__init__.py#L156

soshial commented 1 year ago

Also tilda sign usage:

  1. ~ (tilda sign) should be substituted with article head word. You can use tilde in the text of a single card as many times as you want. You can even use multiple tildes in a single subentry headword (for example, you can have the following subentry ~ in ~ – in the “all” gloss, equivalent to all in all).
  2. A ^ sign typed before a tilde changes the case of the first letter of the word the tilde is to be replaced with – if the first letter were capital, it’ll become small, and vice versa. See the following example:
ilius commented 1 year ago

I pushed. Let's leave ~ and `^' out for now. Everything else is ok?

soshial commented 1 year ago

One issue I see: both cases [m0] and no m tag -- have margin 0.3em while all other [mN] have margin 0em.

soshial commented 1 year ago

sample.bmp image does not get added to the Slob.

soshial commented 1 year ago

Also, please add line = line.replace("\\{", "{").replace("\\}", "}")

ilius commented 1 year ago

Yes, the nested lists in official example looks too cramped without additional spaces between root items.

This is why I don't like DSL. Flexibility and clean output. With html you have nice nested lists with no pain. Although some apps don't support lists.

soshial commented 1 year ago

Another: {the }sample headword should not have the the article. Part of the headword in curly brackets should be excluded:

Screenshot 2023-05-31 at 20 02 26
soshial commented 1 year ago

This is why I don't like DSL. Flexibility and clean output. With html you have nice nested lists with no pain. Although some apps don't support lists.

I completely agree with you. It's not flexible and this is a terrible formatting that has tons of exceptions. But so many dictionaries are made in this format... it's depressing :))

soshial commented 1 year ago

Also, <<typcial card>> becomes a href and \<<typcial card\>> is not.

line = line.replace("&lt;&lt;", "<<").replace("&gt;&gt;", ">>") should be changed to line = line.replace("\\<<", "&lt;&lt;").replace("\\>>", "&gt;&gt;")

soshial commented 1 year ago

Also, [ref dict="Marketing (En-Ru)"] was not converted into a href link.

https://github.com/Tvangeste/SampleDSL/blob/c910f190cd1da80158f717c5df9200c8388fd30c/sample.dsl#L209

soshial commented 1 year ago

Duplicate code: https://github.com/ilius/pyglossary/blob/7e6d8a7c1c0f4dc3bb252f852316ede64c419d62/pyglossary/plugins/dsl/__init__.py#L270 and https://github.com/ilius/pyglossary/blob/7e6d8a7c1c0f4dc3bb252f852316ede64c419d62/pyglossary/plugins/dsl/__init__.py#L276

I think that this should be put into <span class="accent">...</span> to be able to change the CSS easily after.

soshial commented 1 year ago

bmp file was not included:

aard-web: GET /slob/eef273cb-0e45-4494-8547-51b69b4b41d5/sample.bmp 404

soshial commented 1 year ago

\<<some word\>> should not become a link becaufe the backslash.

I failed improving your regex :(

On Wed 31 May 2023, 19:58 Saeed Rasooli, @.***> wrote:

Yes, the nested lists in official example looks too cramped without additional spaces between root items.

This is why I don't like DSL. With html you have nice nested lists with no pain.

— Reply to this email directly, view it on GitHub https://github.com/ilius/pyglossary/issues/466#issuecomment-1570671022, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAYSJA3FJWZ43UDMYIE7LDXI6BFVANCNFSM6AAAAAAX7Z2LRQ . You are receiving this because you authored the thread.Message ID: @.***>

ilius commented 1 year ago

I pushed to master. Let's continue in a new issue.

soshial commented 1 year ago

I have checked conversion from DSL with unclosed [m] tags and still no indents.

It's because DSLParser#parse() method removes unclosed [m] tags.

Could you reopen this issue, please?

ilius commented 1 year ago

https://github.com/ilius/pyglossary/issues/487