Pages: « 1 2 3 4 5 6 7 8 9 10 »
 81 
 on: June 22, 2017, 03:34:58 PM 
Started by akheiljain - Last post by tonys
A good place to start would be the Windows Scripting Host documentation. It will tell you what is available to all applications that implement JScript.

 82 
 on: June 22, 2017, 08:44:03 AM 
Started by akheiljain - Last post by akheiljain
Hi Tonys,
 Thank you for your reply, would there be another way to accomplish this in XMetal, I need to launch a URL window, attach an event listener to it and get event data back. I am able to run the JS directly through Chrome, but not sure how to accomplish it through an xmetal macro.

 83 
 on: June 22, 2017, 07:36:35 AM 
Started by Fa - Last post by Fa
Hi!

I have modified the default values of the ct_config file, but I have kept the default attributes (i.e. audience, platform and product), I've only changed the values.

I have then restarted XMetaL and my changes are shown correctly in the "Configure Conditional Text" window.

However, when I want to build my pdf using conditions, from the "Generate output" window I choose "Show/Hide Conditional Text", the values are still the default (e.g. "administrator" and "user" for Audience, etc.).

In my old XMetaL, all I needed to do was to modify ct_config.xml, but it seems XMetaL 12 requires something more, which I have not found from the help.

Also, the help topic (Show conditional text in previews and output) refers to clicking "Advanced" to specify advanced settings, but I can find "Advanced" neither in the "Generate Output" dialog nor in the "Show/Hide Conditional Text". I find an "Advanced" tab under "Configure Output", but nothing there points to settings related to conditional building attributes and values.

Am I missing something? Any help would be very much appreciated!

Fa

 84 
 on: June 21, 2017, 04:57:39 PM 
Started by akheiljain - Last post by tonys
The window object is implemented by web browsers. Since XMetaL is not a browser, it doesn't exist.

 85 
 on: June 21, 2017, 02:52:04 PM 
Started by akheiljain - Last post by akheiljain
XMetal macro JScript wont run
window.open
window.addEventListener

does any one know why or how to make it work?

 86 
 on: June 20, 2017, 08:12:30 AM 
Started by Fa - Last post by Fa
Hi Derek (and anyone else interested)!

Following up on this topic (sorry about the long delay!).

After discussion with my colleagues why they had ended up creating their own elements, it turned out that the main (and probably only) reason why they did that is that the program they develop uses context sensitivity.

The help file they create is a simple "single html file".

Since they are writing their code for the different modules before the corresponding help topics even exist, they already create a context sensitive link within the software pointing to an element that does not yet exist (in a file that does not yet exist either).

At first, they tried to use the topic id attribute value as a unique identifier, but it failed because of the way the conversion is done. When DITA-OT processes the xml topics, it collects all the links and targets (in this case the topic id's), and it renames all targets in the html to "#unique_01", "#unique_02", etc.

I guess the reason behind the behaviour is that since it creates a single html out of lots of small DITA files, it wants to make sure there are no duplicate anchors, and therefore, instead of having a mechanism that checks for duplicate, it just coldly replaces all names for anchors created from elements with new names that it knows are unique.

The drawback in this case is that there is therefore no way of knowing what to link to before the html has been built, and even then it would require a lot of manual work. That's how they came up with the idea of creating the help_anchor elements that they then process to become an html anchor (<a href="...">).

So my question now is: is there
a) a way to force XMetaL (DITA-OT) to keep the elements' IDs intact and transfer them to the href attribute value for anchors (<a>) in the html instead of replacing them by the #unique_nn value
or
b) an existing, valid DITA element that could be use for this purpose?

Thank you!

 87 
 on: June 20, 2017, 02:55:58 AM 
Started by MichaelLohr - Last post by MichaelLohr
Hi Derek,

Thanks a lot for your help.
The suggestion provided with the On_Drop_Files event macro worked for me.

Best regards,
Michael

 88 
 on: June 19, 2017, 05:19:19 PM 
Started by MichaelLohr - Last post by Derek Read
The documentation for all of the customization files supported by XMetaL software (all three editors) is included with XMetaL Developer in the Programmers Guide and the Customization Guide.

When using XMetaL Developer to create an MCR file you start with individual script files (in any scripting language you have a scripting engine installed for, but most often JScript or VBScript) and XMetaL Developer then compiles those into an MCR file when you build your project.

If you don't have XMetaL Developer but do have access to an installation of XMetaL Author Essential or Enterprise there are lots of MCR files included in those installations you could use as examples.

The MCR file format is a simple XML structure containing multiple macros. Each contains a separate script and some metadata that identifies the script language, gives the macro a name, a keyboard shortcut and a few other pieces of metadata that are not really useful for XMAX usage but that may come into play with XMetaL Author Essential or Enterprise.

Here's the simplest of examples of a file containing 2 macros:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MACROS SYSTEM "macros.dtd">
<MACROS>
   <MACRO name="Test 1" lang="JScript"><![CDATA[
      //use JScript to display an alert dialog containing some text
      ActiveDocument.Host.Alert("This is test 1");
   ]]></MACRO>

   <MACRO name="Test 2" lang="VBScript"><![CDATA[
      'use VBScript to display an alert dialog containing some text
      ActiveDocument.Host.Alert "This is test 2"
   ]]></MACRO>
</MACROS>


In the case of Addam's suggestion you would use name="On_Drop_Files" for the macro name. When the macro's name matches an event macro's name (as documented in the Programmers Guide) it fires when that event is triggered.

All other macros are effectively "user triggered" (vs "event triggered"). In the case of XMetaL Author Essential and Enterprise a dialog is available that lists all macros and the user can select one to run, or the user may use a shortcut key to trigger the macro (if defined, which in my example is not the case). XMAX does not provide this type of UI so it would be up to you (as a developer) to expose something like this to the user from your application's own UI. Your code would call XMAX's Run method (see the Programmers Guide) and specify a macro to run. The API method named "Run" can be used to run any macro (in all three editors).

 89 
 on: June 19, 2017, 12:06:46 PM 
Started by Consigliere - Last post by Derek Read
  • Place your plug-in at the correct location inside the DITA Open Toolkit (see the DITA OT documentation or possibly other instructions, which I believe you have already done).
  • Enable the setting named "run_plugin_integrator  =  yes" in the "Other output parameters" section on the Advanced tab in the Configure Output dialog.
  • The next time the DITA OT is run plug-ins will be integrated.

The setting is disabled by default to allow the DITA OT to run slightly faster.

 90 
 on: June 19, 2017, 06:41:49 AM 
Started by Consigliere - Last post by Consigliere
Hi everyone, I'm a newcomer to the XMetaL family. I started my internship as a Tech Comms Trainee a few weeks ago, and one of my first tasks was to figure out how to customize our company's PDF output on XMetaL. I'm using a fresh installation of XMetaL Author Enterprise 12 + DITA-OT 2.4. Before this, I used oXygen during my studies, so I've been burning through all possible material online to catch up with the differences. Which means I've gone through most topics both on this forum and the Yahoo DITA group.
But a very simple question still eludes me:

How, exactly, do I integrate a PDF plugin into XMetaL? I've read DITA for Print, checked various DITA-OT day presentations, lurked on forums, done a fair amount of trial and error, but I still cannot for the life of me understand how to get past this impasse. I've gone through the first ~80 pages of DITA for Print at least half a dozen times, but I never actually get the plugin integrated and working. Creating the plugin is simple enough, and there's always Jarno Elovirta's PDF plugin generator too, but integrating them into the system seems to be the biggest problem here. DITA for Print recommends a batch file with the following in it:

set DITA_DIR=C:\DITA-OT\
call %DITA_DIR%bin\ant -f integrator.xml
pause

This batch file does finish without a hitch, but it doesn't seem to actually do anything. It doesn't add the transtype to the deliverable type dropdown menu in XMetaL, nor does anything else for that matter. I've tried changing the value of cmd_dita_ot_per_user_version = n in order to force XMetaL to load the new plugins, but that didn't solve my problem either.

I've tried a few solutions that were given here - namely creating a new deliverable type and then changing the "Other Output Parameters" to RX_CUSTOM_DIR  =  <path to the plugin folder/customization folder>, but that didn't work either. I also tried specifying an XSL stylesheet to override the default one, but the only visible change I got after going through all XSLs was just a larger margin. It was indeed one of the changes I had made, but I had also increased the font sizes and changed font colors, yet none of those appeared.

Sorry for the lengthy message, but this is driving me up the wall. I must be missing something completely obvious, since no one online seems to have the same problem. Any sort of guidance would be greatly appreciated, but if possible, please explain it like I'm 5 years old. I fear I might be missing some crucial step. It doesn't help either how a lot of the material online just skips this part as something completely obvious.

tl;dr:
-Fresh install of XMetaL 12 and DITA-OT 2.4
-Trying to create a PDF plugin
-Plugin won't integrate and the transtype won't appear in the list

Pages: « 1 2 3 4 5 6 7 8 9 10 »