SOLVED : Unicode symbol for menu item in menu macro

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

SOLVED : Unicode symbol for menu item in menu macro

ferandec
This post was updated on .
Hello,

I'm trying to get a menu path like the following with the Asciidoctor menu macro :

Writing `menu:☰[Toolbox > Scratchpad]` in my asciidoc document doesn't give the expected result :

Is there a simple way to get what I want using menu macro or should I write the entire menu path manually with html entities (i.e. ` ☰ ▸ Toolbox ▸ Scratchpad `) ?

Thanks

Note : I found a post Use right arrow symbol in menu macro but it speaks about the separator symbol and not the menu item

-Ferandec
Reply | Threaded
Open this post in threaded view
|

Re: Unicode symbol for menu item in menu macro

ferandec
This post was updated on .
Hi,

I found a workaround in the thread relative to issue #173.

Dan mentions 2 forms for menu selections :
. menu macro : menu:View[Page Style > No Style]
. free form : "View > Page Style > No Style"

With the second form, I can get what I want with the following syntax : "icon:bars[x2] > Toolbox > Scratchpad".
The result is then :

It is worth to mention that, even with the 2nd form, using the html entity for the unicode symbol known as "trigram for heaven" (☰) in place of the bars icon in the top-level menu doesn't work.
Similarly, using bars icon for the top-level menu in the 1st form of menu selections doesn't give the expected result.

Best regards

-Ferandec
Reply | Threaded
Open this post in threaded view
|

Re: Unicode symbol for menu item in menu macro

mojavelinux
Administrator
I'm glad to hear you found a solution.

FYI, the following now works as of Asciidoctor 1.5.6.1.

menu:☰[Toolbox > Scratchpad]

The reason this didn't work in Asciidoctor <= 1.5.5 is because the "&" was not listed as a valid start character. I've since added it. (See https://github.com/asciidoctor/asciidoctor/issues/2171).

Cheers,

-Dan



On Tue, Aug 29, 2017 at 8:53 AM, ferandec [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hi,

I found a solution in the thread relative to issue #173.

Dan mentions 2 forms for menu selections :
. menu macro : menu:View[Page Style > No Style]
. free form : "View > Page Style > No Style"

With the second form, I can get what I want with the following syntax : "icon:bars[x2] > Toolbox > Scratchpad".
The result is then :

It is worth to mention that, even with the 2nd form, using the html entity for the trigram for heaven unicode symbol (☰) in place of the bars icon in the top-level menu doesn' work.

Best regards

-Ferandec



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Unicode-symbol-for-menu-item-in-menu-macro-tp5869p5870.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Unicode symbol for menu item in menu macro

ferandec
This post was updated on .
Thanks Dan  for your answer and your work !

Sorry to have bothered the community for an already solved issue.

Now, It's time for me to upgrade Asciidoctor and, of course, improve my skills in the use of Github issues tracking system

-ferandec
Reply | Threaded
Open this post in threaded view
|

Re: Unicode symbol for menu item in menu macro

mojavelinux
Administrator
No problem. I'm always glad to help! Best of luck!

-Dan

On Tue, Sep 5, 2017 at 8:13 AM, ferandec [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Thanks Dan  for your answer and your work !

Sorry to have bothered the community for an already solved issue.

Now, It's time for me to update Asciidoctor and, of course, improve my skills in the use of Github issues tracking system

-ferandec


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Unicode-symbol-for-menu-item-in-menu-macro-tp5869p5873.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Unicode symbol for menu item in menu macro

CapitanPrimate
Hello.

First of all, thank you very much for the great work you are doing with Asciidoctor.

I tried ferandec second form (in my case, it is "icon:filter[] > Informes de la semana", but I don't get any stylized text:

This is how a stylized menu should look:

Am I doing something wrong?

Thanks in advance,


Reply | Threaded
Open this post in threaded view
|

Re: Unicode symbol for menu item in menu macro

ferandec
This post was updated on .
Hello CapitanPrimate,

As pointed out in the user manual, using the User Interface Macros, to which menu selections belong, implies that "You must set the experimental attribute to enable these macros."

Have you done that ?

This is done by putting :experimental: in the document header.

-ferandec
Reply | Threaded
Open this post in threaded view
|

Re: Unicode symbol for menu item in menu macro

CapitanPrimate
This post was updated on .
Hello, ferandec.

Yes, I have set that attribute since the beginning and it does work, since the "menu:&#x2630;[Export > CSV]" macro works ok, but I didn't manage to make the solution that you proposed ("icon:bars[x2] > Toolbox > Scratchpad") work like the "menu:" macro (it doesn't render as a stylized text).

--
CP
Reply | Threaded
Open this post in threaded view
|

Re: Unicode symbol for menu item in menu macro

mojavelinux
Administrator
You need to enable both the experimental and icons attributes in order for the second example to work.

:experimental:
:icons: font

"icon:bars[] > Toolbox > Scratchpad"

If the icons attribute is not set, you will just see the alt text "[bars]".

-Dan

On Fri, Sep 8, 2017 at 6:10 AM, CapitanPrimate [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello, ferandec. Yes, I have set that attribute since the beginning and it does work, since the "menu:&#x2630;[Export > CSV]" macro works ok, but I didn't manage to make the solution that you proposed ("icon:bars[x2] > Toolbox > Scratchpad") work like the "menu:" macro (it doesn't render as a stylized text). -- CP


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/SOLVED-Unicode-symbol-for-menu-item-in-menu-macro-tp5869p5887.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Unicode symbol for menu item in menu macro

CapitanPrimate
Yes, I was using both attributes... But I overlooked the quotation marks that the icon:[] was enclosed in.

Now it's working perfectly. Thank you both very much for your help and sorry for any inconveniencies.

Reply | Threaded
Open this post in threaded view
|

Re: Unicode symbol for menu item in menu macro

mojavelinux
Administrator
Super! I'm glad to hear you got it working. Thanks for following up.

-Dan

On Tue, Sep 12, 2017 at 8:35 AM, CapitanPrimate [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Yes, I was using both attributes... But I overlooked the quotation marks that the icon:[] was enclosed in.

Now it's working perfectly. Thank you both very much for your help and sorry for any inconveniencies.




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/SOLVED-Unicode-symbol-for-menu-item-in-menu-macro-tp5869p5893.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux