custom notation – ActionMenu with empty entries until the mouse is over

Note: The code below requires version 12.0.

Overview of the problem: I have a strange behavior with a ActionMenu, where menu items only appear when the mouse hovers over them, as shown below. I would be happy to receive information on how to solve this problem.

enter the description of the image here

Context: This is part of a package that I develop to enable sophisticated tag / symbol notation for input and output cells. My specific application is chemistry, but the approach should be more generally applicable. The main idea is to have a list of string notations and associate them with internal symbols, and have them in a TemplateBox with an assigned tag that helps the style. I want the user to be able to set these ratings on the fly, as this is a general tool that I use in teaching. Using this approach for output cells is easy, but is a little harder for input cells because I need a way to enter the string notation already associated with the tag TemplateBox. I have a way to do this using palettes, but I'm exploring a way to do this using an escape-alias and an ActionMenuBox. It is there that I encounter this strange problem.

Code of installation: The following loads the log package, specifies the style sheet, adds a custom style that makes formatting easier, and defines a function that takes a list of label / symbol pairs and generates log associations.

<< Notation`
SetOptions[EvaluationNotebook[], 
  StyleDefinitions -> 
    book[
      {Cell[
         StyleData[StyleDefinitions -> 
         FrontEnd`FileName[{"Report"}, "StandardReport.nb", 
         CharacterEncoding -> "UTF-8"]]],
Cell[StyleData["chemical"]StyleMenuListing -> None,
TagBoxOptions -> {SyntaxForm -> "symbol"},
ShowStringCharacters -> False, ShowAutoStyles -> False,
ZeroWidthTimes -> True,
TemplateBoxOptions ->
{DisplayFunction -> (RowBox[{#}] &)
SyntaxForm -> "symbol"}]}]]AssignLabels[list_] : =
Block[{}, 
    Do[Notation[DoubleLongLeftRightArrow[
      ParsedBoxWrapper@TemplateBox[{"""<>list[[i,1]]<> "" "},
"chemical", modifiable -> false, selectable -> false

,
ParsedBoxWrapper @ SymbolName[list[[i, 2]]]]],
{i, length[list]}];]

The version of the palette that works: To give you an idea of ​​what I'm trying to accomplish, here's how I create a palette to insert labeled labels:

ChemPalette[name_, list_, width_] : =
CreatePalette[Multicolumn[PasteButton @@@ list, width],
Window title -> name]

Example of useThe following code assigns eight sample labels and generates a palette for their input.

assignments = {{"!  ( * SubscriptBox[(C), \(6)]) ! 
( * SubscriptBox[(H), (6)]) O ", C6H6O}, {" (! 
( * SubscriptBox[(NH), (4)]) !  ( * SubscriptBox[
  ()), (2)]) !  ( * SubscriptBox[(SO), (4)]) ",
AmmoniumSulfate}, {"!  ( * SubsuperscriptBox[(SO), (4), 
  ((2)(-))]) ", Sulfate}, {" !  ( * SubscriptBox[(H),  
  (2)]) O (g) ", WaterVapor}, {" !  ( * SubscriptBox[( 
  [CapitalDelta]),  (F )]) ! \ ( * SubsuperscriptBox[(H), 
  (*SubscriptBox[(H), (2)] O  ((g) ) \),  (o )

) ",
[CapitalDelta]fHWaterVapor},  {"!  ( * SubsuperscriptBox[
  (k), (sq), SubscriptBox[(C), (60)]]\) ", ksqC60},
{"!  ( * SubsuperscriptBox[([Null]),  (6 ), \ (12 )]) C ",
Carbon12}, {"[!(*SuperscriptBox[(H), 
  (+)])]", HplusConc}};

In Mathematica, this code looks like this:

enter the description of the image here

So what:

AssignLabels[assignments];
ChemPalette["Example", assignments, 3];

This generates a palette that looks like this:

enter the description of the image here

And then I can use that palette to enter any of my labels and make sure that my input cells (and the resulting output cells) look exactly like the standard chemistry notation.

The ActionMenu version: Because I tend to prefer keyboard input to the palette, I've been exploring ways to do the same thing in a more keyboard-centric way. On the basis of a suggestion from Carl Woll on this thread, I tried the following solutions:

Esc Menu[shortcut_, title_, list_] : =
AddInputAlias[
    shortcut -> 
      ParsedBoxWrapper[ActionMenuBox[title, 
        (ToBoxes[#2] :> NotebookWrite[EvaluationBox[],
ToBoxes @ # 2]) & @@@ listing,
Appearance -> "PopupMenu", AutoAction -> True]]]Esc Menu["chem", "Example", assignments]

That's exactly what I want (well, above all … a bonus question to further refine it below), except that all menu entries are empty until the mouse flies over them (as shown at the top of this question). Ideas?

Bonus question: This approach again requires the mouse. What would be really good is that the Esc-chim-Esc sequences can then be followed by the selection by the arrow keys of the options instead of having to use the mouse. Any ideas on how to implement this?

categories – To display the category of a specific custom publication type

I'm sorry for my English, but I'm French. In my custom search page, the results of my custom message type are displayed and everything is fine. Only, I would like to display above the type of personalized message the category that is his. To view the categories of messages I'm doing:

$ category = get_the_category ();
echo "

Category: "Category[0]-> cat_name. "";

But how to do for the type of personalized post?
Thank you for your help.

magento2 – Definition of the product custom weight of the quote article, without waiting until the shipping

I try to set a custom product weight based on a custom product defined option.
I've tried several things like a plugin, before / after events, real events such as sales_quote_add_item etc.

I am able to define the weight of the product in these processes, but once I can calculate shipping costs, it seems that the weight of the initial product is loaded, not the weight of the product. quote_item table.

At this point, I have deleted everything except the sales_quote_add_item code.
Any help is appreciated and thank you in advance.

Add a dynamic custom attribute as the price to the associated Form M product

I want to know how to add a dynamic attribute such as dynamic price in product bundle form because I want to have in the drop-down list the value of this attribute – and the value of the price now when creating a product bundle , i only see the name + price i want to replace the name by the value of this attribute and i want to have this format valuecustomattribute-price so how to proceed and what should i replace and thanks in advance

Visualization – How to Display the Name and Data in a Custom Map ?, With GeoRegionValuePlot

How to display the name of each division and the data / values ​​(even by customizing the TextStyle to fit different sizes)?

Or how to add names and use
GeoLabels-> True


geometry data available at https://we.tl/t-NqBdMYcOSN

geom = association[Import["Estrada.shp", {"SHP", "Data"}]]["Geometry"] /.Polygon[x_] :> (Polygon[GeoGridPosition[#, "UTMZone29"] & / @ x])
values ​​= RandomInteger[20, 51];
parroquiasss = {"Agar", "Aguións", "San Pedro de Ancorados",
"Santo Tomé de Ancorados", "Arca", "Arnois", "Baloira", "Barbude",
"San Miguel de Barcala", "Barcala", "Berres", "Callobre",
"San Miguel de Castro", "Cereixo", "Codeseda", "Cora", "Couso",
"Curantes", "A Estrada", "Frades", "Guimarei", "Lagartóns",
"Lamas", "Liripio", "Loimil", "Matalobos", "Moreira", "Nigoi",
"Oca", "Olives", "Orazo", "Ouzande", "Parada", "Paradela",
"Pardemarín", "Remesar", "Ribeira", "Ribela", "Riobó", "Rubín",
Sabucedo, Santeles, Somoza, Souto, Tabeiros, Toedo,
"Santo André de Vea", "San Xurxo de Vea", "San Xiao de Vea",
"Santa Cristina de Vea", "Vinseiro"};

GeoRegionValuePlot[AssociationThread[geom, values], Image size - Large

Note1.- I suppose that MAthematica will be in the middle of each region.

Note2.- I think the mathematical documentation would be very useful. In general, all help is for information automatically contained in Mathematica.

Google Custom Search – I want search results to come from subdomain sites that share canonical content.

I have a Google Custom Search on my site, let's call it www.sitename.com and I also have different subdomain sites meant to represent regions of the state. I have so nevada.sitename.com or idaho.sitename.com. Google Custom Search is also active in these subdomains. Regional subdomain sites share the same content as the canonical site (www). I want to be able to get search results in subdomain sites with subdomain URLs, but when I search for them, I do not get any results because Google only has canonical results from the site. I know that Google does not want to crawl duplicate pages, but is there a way to retrieve results with subdomain URLs even if they share the same content as the canonical site?

iframe – Adding basic custom HTML

I'm trying to add a weather to my sharepoint home page but it will not work. I use online sharepoint and a modern page. I'm trying to add the code below with the "Embed" application.