[SOLVED]"Invisible" Table ?

Hello,

I am a Student writing my Thesis with Scrivener and MMD.

I am trying to figure out how to reach an end-result that looks like this:

I did it with nor mal “Tab” in Scrivener but all i got when i compiled it with MDD to Latex-> PDF was a bunch of text in ONE paragraph.

Can anyone help me out?

The MMD table format is based on defining the cells using the pipe character: |

so a simple two column table would look like:

| A | B | | :-- | :-- | | 1 | 2 | | 3 | 4 | [Table]

The line with the hyphens and colons separates the header row from the rest of the table and controls the text alignment within cells.

There’s much more in the user manual http://fletcher.github.com/peg-multimarkdown/mmd-manual.pdf

Section 4.6 covers tables.

Thank you for the Answer, i also thought about making this as a table, i just thought that it might be possible without…

After some tries i got a table looking like the one i posted EXCEPT for the lines, i dont want lines, or more like i was “invisible” lines, how to configure that?

I don’t know if it is possible to get MMD to compile without the horizontal rules: it might be possible to edit the XSLT files, but that’s well beyond my skills.

For quick and dirty fix you could just live with the lines until the last compile, then hand edit the latex to cut out the \toprule, \midrule and \bottomrule before setting it.

Thank you for the help, editing it by hand did the trick, but there has to be some other way to make it possible as i have several files with the same kind of table…

anyone else who knows how to do so ?

Thanks :slight_smile:

While you will need to use XSLT to automate this for future use, for this particular problem you don’t need to know much (really, any) XSLT programming to do it.

First, I’d recommend duplicating the [b]article.xslt[/b] file in your MultiMarkdown/XSLT folder. If you do not have one of those, then visit this page and click on the Downloads button (kind of out of the way, but its on the right-hand side, below the “branch: master” text)[size=80][1][/size].

All right, call the duplicated file [b]simple-tables.xslt[/b] or whatever you want; I’ll use that in these instructions. I recommend opening this in a syntax highlighting editor. If you do not have one, try TextWrangler, which is free.

The [b]article.xslt[/b] file is a great example for this type of alteration, because it demonstrates how XSLT files can be “layered” so that one or maybe two of them are doing most of the heavy lifting, with a custom style on top, overriding elements from the more thorough stylesheets. So the first thing you’ll want to do is erase the stuff that article does, while leaving intact that things it needs to function as a wrapper for the more complex scripts. The first line to note is the one containing ‘latex-document-class’. Search for that, then select from that line and including it, all the way down to the bottom, but do not select the last line, [b]</xsl:stylesheet>[/b]. You need that line.

You should have something that looks like this (I’ve deleted all of the comments for brevity):

[code]<?xml version='1.0' encoding='utf-8'?>

<xsl:stylesheet
xmlns:xsl=“http://www.w3.org/1999/XSL/Transform
xmlns:html=“http://www.w3.org/1999/xhtml
version=“1.0”>

<xsl:import href="memoir.xslt"/>

<xsl:output method='text' encoding='utf-8'/>

<xsl:strip-space elements="*" />

<xsl:template match="/">
    <xsl:apply-templates select="html:html/html:head"/>
    <xsl:apply-templates select="html:html/html:body"/>
    <xsl:call-template name="latex-footer"/>
</xsl:template>

</xsl:stylesheet>[/code]

Okay, the spot where you just deleted the majority of this file is where you’ll put in your custom overrides. This is where things can get tricky, but in this particular case, all of the hard work (parsing the table code in HTML) has been done for you—you just need the pieces you want to change. For that, load the [b]xhtml2latex.xslt[/b] document. This contains the majority of scripting code that generates the .tex file. The clue that will save you a lot of time is that anything you see in a .tex file that wasn’t typed in by you should be in this file. So for example, you don’t want the \midrule commands—so search for ‘\midrule’. There is only one hit. Here is where a little XML knowledge comes in handy. You’ll need to select the template that adds this text. Here is full template, which you should see in your text editor:

<xsl:template match="html:thead"> <xsl:apply-templates select="html:tr" mode="header"/> <xsl:text>\midrule </xsl:text> </xsl:template>

It is the [b]<xsl:text>[/b] element that is of interest to you. Most likely just want it to do nothing here. So copy this entire xsl:template over to your simple-tables.xslt file, and after you’ve got that in place, select the ‘\midrule’ text and delete it.

Now test it. Whenever messing with this stuff, it is best to do one small change, and then test compile. Consequently, a shorter compile document helps. Try just selecting one folder to compile, in Scrivener. If your tables no longer have midrule and everything typesets without error, you know that:

  • The custom XSLT is using the bigger XSLT files for most of the work
  • It is correctly overriding the one rule you defined
  • That XSLT is correctly assigned to the document

If you still get a midrule, check these in inverse order. First, make sure you set up the project’s Meta-Data in Scrivener’s compiler to see if you added a key for “LaTeX XSLT” and supplied “simple-tables.xslt” for the value. If not, it is just using the default and not the custom stylesheet you just made.

If that is fine, then make sure you pasted the template rule into the correct spot—not in between other elements (except for xsl:stylesheet, of course). If it all looks fine from a syntax standpoint, maybe not every piece you needed was copied over. In this particular case, all you do need is the one template match rule I described. In some cases you might need to dig up a little more and provide more overrides in your custom XSLT file. Say, for instance, in this case if the individual column header cells were doing something you didn’t like, you’d need to track down where that code is coming from, or look at this piece to see where it might be—in this case, the ‘html:tr’ rule in ‘header’ mode. That means, look for something like:

<xsl:template match="html:tr" mode="header"> <!-- ... --> </xsl:template>

Finally, in cases where you get an obviously incomplete .tex file, it might be you accidentally deleted part of the “container” code your custom XSLT file needs to include the larger scripts. Compare with the above code block and make sure all of the important lines are there.

To fully remove all rules, you’ll need overrides for “html:table”, “html:thead”, and “html:tbody” (the latter will remove rules separating sections of the table, as well as the one at the bottom).

The nice thing about this method is that you can build these little custom XSLT files that do one thing, and if you need them in the future, you can either use them as-is, or if you need other things as well, you can import this XSLT after it imports the memoir.xslt. Like so:

<xsl:import href="memoir.xslt"/> <xsl:import href="clean-tables.xslt"/>

So it’s a bit like building your own little group of modules you can add to the system. Or, you can just make a large XSLT that you always use that contains all of your preferences and alterations. Either way works. I prefer lots of little patches, but that’s probably because I have a background in programming, and so re-usable code makes me happy.

Footnotes:[size=80]
1.
Yes, this is the older version of MMD, but it’s the one that Scrivener is still assuming. It is possible to upgrade to MMD3 and still use Scrivener, but to avoid this also turning into a How to Upgrade post; I’ll use MMD2. The good thing is you can still do XSLT stuff with MMD3; so anything you do here will not be wasted time in a month or two if you choose to switch.

[/size]

Halleluyah!

Thank ALOT

Here is the final code of simple-tables.xslt

[code]<xsl:stylesheet
xmlns:xsl=“http://www.w3.org/1999/XSL/Transform
xmlns:html=“http://www.w3.org/1999/xhtml
version=“1.0”>

<xsl:import href="memoir.xslt"/>

<xsl:output method='text' encoding='utf-8'/>

<xsl:strip-space elements="*" />

<xsl:template match="/">
	<xsl:apply-templates select="html:html/html:head"/>
	<xsl:apply-templates select="html:html/html:body"/>
	<xsl:call-template name="latex-footer"/>
</xsl:template>

<xsl:template match="html:thead">
	<xsl:apply-templates select="html:tr" mode="header"/>
</xsl:template>

	<!-- tables -->
	<xsl:template match="html:table">
		<xsl:text>\begin{table}[htbp]
\begin{minipage}{\linewidth}
\setlength{\tymax}{0.5\linewidth}
\centering
\small
</xsl:text>
		<xsl:apply-templates select="html:caption"/>
		<xsl:text>\begin{tabulary}{\linewidth}{@{}</xsl:text>
		<xsl:apply-templates select="html:col"/>
		<xsl:text>@{}} \\ </xsl:text>
		<xsl:apply-templates select="html:thead"/>
		<xsl:apply-templates select="html:tbody"/>
		<xsl:apply-templates select="html:tr"/>
		<xsl:text>\end{tabulary}
\end{minipage}
\end{table}

</xsl:text>
	</xsl:template>
	
	<xsl:template match="html:tbody">
		<xsl:apply-templates select="html:tr"/>
	</xsl:template>

</xsl:stylesheet>[/code]

What i did was delete \toprule, \bottomrule and \midrule and it worked :slight_smile:
Thanks alot for the help…

Now to wrap it all up another question…

How do i use this XSLT file only for specific files in my Scrivener project?
I hav basically have two kinds of Table in my Thesis, the first one being this “invisible-lines” one for Glossary and Materials and Methods, the other one being “normal”, how do i tell Scrivener to use this specific XSLT file only when dealing with some files in Scrivener?

Thanks alot again :slight_smile:

EDIT: and how do i force the Tables to Align to the Left side of the document?

You’re welcome!

Yes, this is possible. Generally speaking, when asking if XSLT can do “X”, the answer is yes. It’s mainly a matter of how much you want to dig into the language. The key idea here is to somehow create an exception to the rule. We want a set of table codes that does something one way for most of them, and another way for the special ones. Tables are pretty good for this, as we have a valuable tool at our disposal: IDs. When you supply a caption to a table with a bracketed phrase after the table, as demonstrated above in MrGruff’s code sample, the square bracket becomes the visible caption, but it is also compressed and used as the ID of the caption within the table in the XHTML—and with XSLT we can search for IDs very easily. We can even search for parts of them, which is how I would approach this particular problem. This will get a little more tricky, but what it will do is allow you to typeset a table in simple mode, simply by giving it a special name prefix, a prefix that is then stripped out of the final reader accessible caption.

The ‘match’ attribute is where you supply the XSLT template with criteria. Currently, the ones you’ve created in this wrapper file are targeting all tables and their components. We want to target only some of them and leave the rest alone. Let’s use the ID prefix “SIMPLE” in all caps. This means if you want a table to be typeset without rules, it should look a bit like this (and incidentally, this also left-aligns; pay heed to the style of dashes used below the header row. A colon on the left means left-aligned, on the right, right-aligned. No colon means default centre alignment).

| Test | Table | | :--- | :---- | | A | B | | C | D | [SIMPLE And here is the public caption.]

The result we want is the “SIMPLE ” part stripped out so only “And here is the public caption.” shows up in the final render. Note that letter case is completely ignored. I have the word all-capped to make it stand out in Scrivener, but the final internal result of this will be ‘simpleandhereisthepubliccaption’. So naturally, if any of your captions start with ‘Simple…’ you might want to pick something that isn’t or doesn’t form a dictionary word when compressed, like SIMTAB.

The first thing to do is adjust the ‘match’ values on these templates. Here they are as-is (without the rest of the code, of course):

<xsl:template match="html:thead"> <xsl:template match="html:table"> <xsl:template match="html:tbody">

The easiest way to handle this is via modes. Modes are a way of supplying alternate templates for the same element matches, depending on context. You saw one of these already. The ‘thead’ template calls for the ‘html:tr’ template in ‘header’ mode, which does something different than the template for ‘html:tr’ without a mode (and both of those are handled in the base XSLT, not in our custom one). We’ll do the same thing here so that the complex match only needs to be performed once.

So, working in the same pattern of small changes and testing before proceeding, let’s set up the basic network and let it fail first. Change these four template items to the following, and while you’re at it, copy in the ‘html:caption’ template and modify it as below, too.

<xsl:template match="html:thead" mode="simpleTable"> <xsl:template match="html:table[child::html:caption[starts-with(@id, 'simple')]]"> <xsl:template match="html:tbody" mode="simpleTable"> <xsl:template match="html:caption" mode="simpleTable">

Okay, the heavy lifting here is done by the ‘html:table’ template, which is now featuring a criteria in brackets that must be matched for this template to trigger. If the table does not have a caption, or the caption doesn’t start with ‘simple’ then it skips over this and uses the main ‘html:table’ template in the other file (and with it, ruled output). Meanwhile the secondary templates have all had their modes changed to “simpleTable”, which means they will no longer be used by anything—we haven’t fixed the routing yet.

Briefly, the criteria works like this: if you put a square bracketted expression into the match pattern, you can narrow things down by the criteria within the brackets. For example:

match="html:span[@class='annotation']"

That will catch all of the annotation spans that Scrivener puts into a compiled document, letting you do something different with the annotation, if you so pleased.

So in this scenario here we are supplying a double-criteria: First, the table must have a caption child, and secondly, that caption child needs to have an ID that starts with the text ‘simple’. We use the special [b]starts-with()[/b] function to determine that. The syntax is [b]starts-with(haystack, needle)[/b]; so in our case, [b]starts-with(@id, 'simple')[/b]. Using starts-with keeps the caption free for other (real) usages as well. We can embed functional directives into an otherwise freeform field.

Compile and make sure that fails (you get a ruled table). That means the selector is working. Now add a caption to your table starting with ‘SIMPLE’ and run it again. You should get a table without the \toprule, but the rest will be normal. That’s because we haven’t told the alternate table template to use the new simpleTable mode for its children, so only the basic skeleton of the table is altered by this exception.

So the next step is to wire this all up. Here is what the modified table code should look like:

[code] <xsl:template match=“html:table[child::html:caption[starts-with(@id, ‘simple’)]]”>
xsl:text\begin{table}[htbp]
\begin{minipage}{\linewidth}
\setlength{\tymax}{0.5\linewidth}
\centering
\small
</xsl:text>
<xsl:apply-templates select=“html:caption” mode=“simpleTable”/>
xsl:text\begin{tabulary}{\linewidth}{@{}</xsl:text>
<xsl:apply-templates select=“html:col”/>
xsl:text@{}} \ </xsl:text>
<xsl:apply-templates select=“html:thead” mode=“simpleTable”/>
<xsl:apply-templates select=“html:tbody” mode=“simpleTable”/>
<xsl:apply-templates select=“html:tr”/>
xsl:text\end{tabulary}
\end{minipage}
\end{table}

</xsl:text>
</xsl:template>[/code]

This will check for the existence of a caption starting with ‘simple’ and then proceeds to handle the table without rules, by invoking the respective templates that use the simpleTable mode. Note for those templates you haven’t brought over and modified, we leave the mode alone as the stock stuff is fine.

If you compile with that, you should get a clean table. Strip out the caption, or remove the keyword from the front, and you’ll get a normal table. Great, that’s most of the problem. Now we just need to strip out the keyword that was used to set the mode for this type of table. Otherwise your readers will see “SIMPLE Blah blah blah” beneath the table in the book. :slight_smile:

For that we’ll use a handy search and replace function that MMD uses at a higher level. The code for it is, I think, in the main xhtml2latex.xslt file, but wherever it is, it is upwards in the include chain, so we have access to it.

We’ll put this into the custom html:caption template we already copied over. Here is the adjusted template:

<xsl:template match="html:caption" mode="simpleTable"> <xsl:param name="strippedCaption"> <xsl:call-template name="replace-substring"> <xsl:with-param name="original"> <xsl:apply-templates select="node()"/> </xsl:with-param> <xsl:with-param name="substring"> <xsl:text>SIMPLE </xsl:text> </xsl:with-param> <xsl:with-param name="replacement"> <xsl:text/> </xsl:with-param> </xsl:call-template> </xsl:param> <xsl:if test="not(@id='simple')"> <xsl:text>\caption{</xsl:text> <xsl:value-of select="$strippedCaption"/> <xsl:text>} </xsl:text> <xsl:if test="@id"> <xsl:text>\label{</xsl:text> <xsl:value-of select="@id"/> <xsl:text>} </xsl:text> </xsl:if> </xsl:if> </xsl:template>

Basically all of the changes are at the top with two exceptions. The first 12 lines within the template invoke the replace-substring template defined elsewhere, and assigns the result to a parameter. The replace-substring template takes three parameters, the original text, the text you are searching for, and finally the text you wish to replace the searched text with. It’s just a basic search and replace tool. We’ve given the contents of the caption element, [b]node()[/b] as the original text, tell it to look for “SIMPLE ” (note the space), and replace it with an empty text value—stripping it out. This is all done inside of a parameter declaration which we’ve called “strippedCaption”.

By itself that would do nothing. The $strippedCaption parameter would cease to exist after this template is done and that would be that. So we need to also change the line where the caption itself is emitted. Before, it took the contents of the caption element, just as we provided to the search and replace function. We want it to use the parameter we created, instead, since that variable now holds the clean version of the caption. So this line is changed to [b]<xsl:value-of select="$strippedCaption">[/b]. And that is how you insert the contents of a variable into a precise location.

We don’t do this for the ID, because the ID might very well be used elsewhere. Internally, MMD uses these to cross-reference, so if you want to refer to this table elsewhere in the text, you’ll be using its full caption as you see in Scrivener. You could change the \label portion to use the cleaned version, but then you’d have to remember to not copy and paste the SIMPLE part of any table you link to. That’s just up to you, really. The ID/label is effectively invisible once the .tex file is rendered, so it’s no big deal to have the simple keyword in it.

I like to leave this stuff intact because it makes the document more portable. If I don’t want to use this XSLT for some reason, I can switch it off and the IDs will still match up. If I was relying on the XSLT to clean the \label, the MMD document would no longer be internally consistent once that XSLT is removed and the label is no longer cleaned.

A third alternative is tracking down everything that involves cross reference and insert similar code to strip out keywords from each one. Again, I don’t care for this approach because it isn’t very scalable and introduces a lot of maintenance. Say you want to add another type of table (or header, or anything else that needs the cross-referencing system). You’ll have to insert chains of these cleaners in every spot, every time you add an exception like this.

Keeping the ID as-is, we don’t have to worry about any of that. Only the visible \caption is fixed.

Finally, we added another xsl:if check around the emission portion of this. If the caption was originally only “[SIMPLE]”, then all of the rest is skipped. The table will have no visible caption, and it will not be labelled. This matches typical MMD behaviour. If you don’t supply a caption, this stuff would never fire off at all. If the @id is anything but ‘simple’, though, then it runs, and uses the cleaned version of the contents for the visible caption.

That’s it. You should now be able to caption your tables with SIMPLE (and if you do change that keyword to something else, be sure to edit the original ‘html:table’ match, the sub-string search in ‘html:caption’ and the if test statement within it as well) to remove the ruling on them; actual visual caption optional.

P.S. I just realised I might have misread your last query. I provided the trick for left-alignment within cells, but not the entire table. If you want the entire table to be pinned to the left side of the text block then you’ll need to adjust the LaTeX code in the XSLT. I think that removing \centering is all you need to do.

this is GOLD, thanks ALOT, even if i didnt understand the whole post (you lost me at the end) but i managed to do everything :slight_smile: here is how a stripped table with the id: SIMTAB looks like:

Uploaded with ImageShack.us

and this is the code:

[code]<xsl:stylesheet
xmlns:xsl=“http://www.w3.org/1999/XSL/Transform
xmlns:html=“http://www.w3.org/1999/xhtml
version=“1.0”>

<xsl:import href=“memoir.xslt”/>

<xsl:output method=‘text’ encoding=‘utf-8’/>

<xsl:strip-space elements="*" />

<xsl:template match="/">
<xsl:apply-templates select=“html:html/html:head”/>
<xsl:apply-templates select=“html:html/html:body”/>
<xsl:call-template name=“latex-footer”/>
</xsl:template>

<xsl:template match=“html:thead” mode=“simpleTable”>
<xsl:apply-templates select=“html:tr” mode=“header”/>
</xsl:template>

  <!-- tables -->
  <xsl:template match="html:table[child::html:caption[starts-with(@id, 'simtab')]]">
     <xsl:text>\begin{table}[htbp]

\begin{minipage}{\linewidth}
\setlength{\tymax}{0.5\linewidth}
\small
</xsl:text>
<xsl:apply-templates select=“html:caption” mode=“simpleTable”/>
xsl:text\begin{tabulary}{\linewidth}{@{}</xsl:text>
<xsl:apply-templates select=“html:col”/>
xsl:text@{}} \ </xsl:text>
<xsl:apply-templates select=“html:thead” mode=“simpleTable”/>
<xsl:apply-templates select=“html:tbody” mode=“simpleTable”/>
<xsl:apply-templates select=“html:tr”/>
xsl:text\end{tabulary}
\end{minipage}
\end{table}

</xsl:text>
</xsl:template>

<xsl:template match=“html:caption” mode=“simpleTable”>
<xsl:param name=“strippedCaption”>
<xsl:call-template name=“replace-substring”>
<xsl:with-param name=“original”>
<xsl:apply-templates select=“node()”/>
</xsl:with-param>
<xsl:with-param name=“substring”>
xsl:textSIMTAB </xsl:text>
</xsl:with-param>
<xsl:with-param name=“replacement”>
xsl:text/
</xsl:with-param>
</xsl:call-template>
</xsl:param>
<xsl:if test=“not(@id=‘simtab’)”>
xsl:text\caption{</xsl:text>
<xsl:value-of select="$strippedCaption"/>
xsl:text}
</xsl:text>
<xsl:if test="@id">
xsl:text\label{</xsl:text>
<xsl:value-of select="@id"/>
xsl:text}
</xsl:text>
</xsl:if>
</xsl:if>
</xsl:template>

  <xsl:template match="html:tbody" mode="simpleTable">
     <xsl:apply-templates select="html:tr"/>
  </xsl:template>

</xsl:stylesheet>[/code]

i think i have one more question, its more of a finetuning…
If you look at the picture of the table i posted you will see, first that its aligned left (deleted \centered) and second that the word “Germany” is cut into half. This happened because i put the “+” signs into the table to make the words wrap and fit into the page, else, a long text in that cell will exceed the page without making a linebreak.

what i want now is the word “Germany” to be completely in the second line, like deactivating this “Ger-many” thing, how can that be done??

LOADS of THANKS, you should write a guide about XSLT with Scrivener, else i will be asking loaaaaaads of questions here :smiley:

Greeeeets
Blindy

P.S: its so fun when it works ^^

Again, you’re welcome. :slight_smile:

There isn’t MMD syntax for hyphenation control, so you’ll just want to choose the best LaTeX method for this. Maybe something global, and insert it into the preamble, like \hyphenation{Germany} to protect that word from ever hyphenating. That would probably be the easiest.

Of course, for spot corrections, I’d save this step for very, very last. Hyphenation is dependent upon a million other variables (such as adding or removing a word). It’s probably one of those things better left for post-Scrivener final polish. Just work on the .tex file once its down to the phase of getting picky over what is hyphenated and how. You’re really working with digital galleys at that point; where all content is finalised as best as possible.

Also: Look into Scrivener’s Replacement feature in the compiler. It’s like having a global Search & Replace function that only does its thing while compiling. It’s a great way to add your own “syntax”; that is, symbols that expand into larger, potentially raw LaTeX code snippets. This technique can often save you from needing to write an XSLT file for a problem.

And yeah, it is pretty fun when it works. Especially if you are inclined towards solving puzzles. Figuring out a sequence of logical statements that produce an effect is one of the great highs of programming. :slight_smile:

Thanks for the fast answer, now everything is compiling and typesetting, only one problem, somehow the subsections got mixed up…

specially files with those newly made tables…
its hard to explain this, could you take a look at my final tex file? because i have absolutely NO idea why that is happening…

here is the link in pastebin: pastebin.tlhiv.org/BwOZeZUm

in Meta-Data i set Base Header Level to 3
in formating i set to show all text and titles

i have no idea whats wrong, the tables arent under their subsections, they are all put on one page at once, i am puzzled…

Greets
Blindy

By default, LaTeX attempts to locate the best location for a table based on the text block shape around it. If there is a blank area available, it will use that. It does all of this in an attempt to get the best looking flow of text (so you don’t end up with two words on the last page break and such). Sometimes that is a little too inaccurate. If cross-referencing to the tables is not an option, you’ll want to look up the LaTeX codes for forcing a minipage to appear precisely where you place it.

I’m less familiar with that aspect as I’m content to just let tables go wherever they may and use cross-referencing if a particular paragraph needs the table data. So I’m not the best to offer advice on this one as far as the actual LaTeX goes.

Solved the weird Table problem.

One of the tables was simply… too long…
What happened is that LaTex apparently doesnt like tables that go from one page to the other, by replacing the [htpb] to [H] for that table and using the package {floats} OR putting a pagebreak before it the problem was solved :slight_smile:

thank you all for the help :slight_smile: i should write a guide about genereting “materials and methods” with scrivener and tables!

Greets
Blindy

P.S: i will be back with more weird questions :smiley:

Its me again :slight_smile:

I got a Template for my university, i wanted to use the \include option but i have no idea where to place it… any idea?

Another thing, can i make scrivener use two XSLT-Files? the one for the tables (simple-tables.xslt) and the one for snippet (latex-snippet.xslt) ?

Thanks in Advance
Blindy

You put the \input statement in the position where you want the included data to appear. Just imagine the .tex file as though the contents of the inputed file exist wherever you put that token. That’s just TeX stuff though, I’m not sure if that is what you mean. There are some MMD3 meta-data codes for \inputs, but these are not applicable to MMD2.

But to answer your second question: yes, just recall the discussion on importing one XSLT into another that we spoke of when designing the simple table one. The simple table XSLT includes the memoir XSLT, which in turn includes that xhtml2latex base XSLT. So to add another XSLT to the chain, you’d create or modify one that imports the simple table XSLT, and then call that one instead from Scrivener. They must be chained together though, you can’t have two XSLTs working in ignorant parallel to one another as that could cause conflicts. Chaining them sets a clear precedent order in case of conflicting element matching rules.

I think i am a little confused with that…

I tried this now:

[code]<xsl:stylesheet
xmlns:xsl=“http://www.w3.org/1999/XSL/Transform
xmlns:html=“http://www.w3.org/1999/xhtml
version=“1.0”>

<xsl:import href="xhtml2latex.xslt"/>

<xsl:import href="latex-snippet.xslt"/>

<xsl:import href="memoir.xslt"/>

<xsl:import href="simple-tables.xslt"/>

</xsl:stylesheet>[/code]

I also tried a plain xslt file that only calls for simple-tables.xslt and latex-snippet.xslt (in that order) nothing happened… (“ignoring misplaced import comment”), i am sure i am forgetting something very important but i just dont get it…

Thanks in advance
Blindy

I’d actually go the other way around. Duplicate the clean-tables XSLT, and in that file change the import command to use latex-snippet instead of memoir. That way you are essentially just using the simplified latex-snippet stylesheet with your special case table code overriding anything deeper in the chain.

it worked…
Thank you :slight_smile:

And i am back again, something weird is happening, but its not about Tables anymore…

This is a text i wrote, loads of citations (even less than text).

<!--$\beta\text{-Haemolysin/cytolysin}$--> (<!--$\beta\text{-H/C}$--> also called CylE) is a surface-associated, pore-forming toxin that promotes invasion of host cell barriers such as epithelial and endothelial cells of the lung and the blood-brain barrier <!--\cite{Nizet:1996uw,Gibson:1999ui,Doran:2003ky}-->. <!--$\beta\text{-H/C}$--> also contributes to sepsis pathophisiology. In a mouse model for arthritis and bacteraemia, increased bacterial loads and systemic release of proinflammatory cytokines IL-1 and IL-6 have been reported <!--\cite{Puliti:2000ec}-->. Additionally, <!--$\beta\text{-H/C}$ --> stimulates iNOS and NO release in macrophages <!--\cite{Ring:2002kj}-->.Even though the actual structural gene for <!--$\beta\text{H/C}$--> is *cylE*, a whole gene cluster (*cyl*) containing *cylA*, *cylB*, *cylJ* and *cylK* is associated with its post-translational modifications and secretion <!--\cite{Spellerberg:1999vg,Forquin:2007bo,Gottschalk:2006ge}-->.

When i compile, i only get the citations, the text inbetween is missing, could anyone tell me why that is happening?

\beta\text{-Haemolysin/cytolysin} \beta\text{-H/C} [Nizet:1996uw, Gibson:1999ui, Doran:2003ky]\beta\text{-H/C} [Puliti:2000ec]\beta\text{-H/C}  [Ring:2002kj]\beta\text{H/C} [Spellerberg:1999vg, Forquin:2007bo, Gottschalk:2006ge, HeatherCMaisey:gf, STakahashi:1995td, Bohnsack:1997wo, GleichTheurer:2009jn, Cheng:2002tt, GlenSTamura:2006dr] [Silhavy:1995uy] [Tettelin:2002wx, Tettelin:2005jg, Glaser:2002uo] [Lamy:2004hf, Jiang:2005hg, Jiang:2008bj, Poyart:2003tw, Poyart:2001cp, Spellerberg:2002ui] [Rajagopal:2009gm] [Federle:1999wu, Levin:1998ee]\beta\text{-Haemolysin} [Lamy:2004hf, Jiang:2005hg, Jiang:2008bj, FileJr:1998vw, Kaul:1997tz, Bisno:1996ee, Green:1996vw, Shimizu:2010jc]