How to make a Pandoc table wider than textwidth? - layout

I'm adding a table to a document and discovered that the columns are too narrow, making it a bit difficult to read. Therefore I'd like to make the entire table (and thus also the individual columns relative sizes) wider while keeping the textwidth of the rest of the document unchanged. Is it possible to do this using the Pandoc multi-line tables? Or do I need to use pure LaTeX for this table?
This is what the Pandoc markdown for my table looks like:
--------------------------------------------------------------------------------------------------------------------------------------------------------
DSR Activity Description In this thesis
-------------------------------------- --------------------------------------------- -------------------------------------------------------------------
1. Problem Identification & Motivation The specific research problem is defined, The research problem was initially defined by Simon Hacks
and the value of a solution is justified. and Robert Lagerström in a thesis proposal. The value of
the solution is that the produced artifact will establish
a foundation for further work in EAD detection and analysis.
2. Defining Objectives for a Solution The objectives of the solution are infered In order to determine the objectives of the solution the problem
from the problem definition and knowledge definition is examined.
about what is possible and feasible. This
might e.g. be a description of how the
artifact is expected to support solutions
to problems which have not yet been
addressed.
--------------------------------------------------------------------------------------------------------------------------------------------------------
And the resulting PDF (compiled simply using pandoc myfile.md -o myfile.pdf), where you can see that the table is only as wide as the textwidth:
In case it matters, I'm using
\usepackage{fancyhdr}
\pagestyle{fancy}

A crude but effective method is to widen the \columwidth just for the table. You'll probably want to change the \LTleft table margin, like so:
```{=latex}
\newlength{\extraspace}
\setlength\extraspace{4cm}
\setlength\columnwidth{\columnwidth + \extraspace}
\setlength\LTleft{-0.5\extraspace + \tabcolsep}
```
Table goes here
```{=latex}
% restore old columnwidth, table placement
\setlength\columnwidth{\linewidth - 4cm}
\LTleft=\fill
```
Result:

I ended up using this solution:
\usepackage[textwidth=12.1cm,textheight=22cm]{geometry}
...
\newgeometry{textwidth=18cm,textheight=22cm}
<!-- my table here -->
\restoregeometry

Related

Asciidoctor nested table

I am trying to create nested tables in my Asciidoctor pdf output but I cannot find the syntax.
If I understand it right, nested tables should be supported in Asciidoctor as of 1.5.0. I am running a Docker container that has 1.5.5 (https://github.com/asciidoctor/docker-asciidoctor).
I've tried as per example in table 11 here: http://www.methods.co.nz/asciidoc/newtables.html but to no avail.
Note that Asciidoc and Asciidoctor are not the same thing.
Therefore, make sure you are looking at the correct documentation.
I have not tried it, but if a nested table is going to work, the cell containing it will have to use the asciidoc style. You will then most likely have put the table in a block and escape all the pipe symbols (using \| instead of | or using some other delimiter).
A web search turned up this open issue in the AsciiDoctor tracker requesting (improvements to) nested table support. So this seems not to be implemented yet at least in some backends. The first comment contains an example of how to specify a nested table.
Are you sure you cannot use something other than nested tables? They are usually not the most readable thing.
In order to make it work, you need to delete two unintended newlines. Here's the modified content.
[width="75%",cols="1,2a"]
|==============================================
|Normal cell |Cell with nested table
[cols="2,1"]
!==============================================
!Nested table cell 1 !Nested table cell 2
!==============================================
|==============================================
I must say I used asciidoctor-pdf first time and although the process has been streamlined as much as possible with the docker image, there is a much quicker way to get rendered feedback: Asciidoctor.js - a Chrome extension that converts your .adoc file to HTML and reloads when you save the file.
Asciidoctor.js comes from the same great team that created and maintain Asciidoctor, so it has latest Asciidoctor under the hood.

Changing the text on a label in different languages

Not really that easy question here. :)
A customer has a field ownerid that is used as the lookup to a salesperson. I've changed the text of the label from Owner to Hazaa and I can see it take effect.
The problem is that Hazaa only displays in the English version (the base language of the installtion), while the language that is used for the users is Swedish. The users with Swedish language selected see the default translation, while they'd like to see Hazaa instead.
How can this be done?!
I could, perhaps, play around with exporting the language for translation, editing it and, then, importing back. However, that's a little, tiny, wimsy bit overkill for changing a single label. However, I suspect that only a few entities will require hazaa-fication of the ownerid field, while the rest is supposed to be left as is.
The supported way to translate the label is using the translation process (an example can be found here)
Maybe you can consider to create an unmanaged solution that contains only that entity, in order to export only the necessary labels.
There is also a tool recently released by Tanguy Touzard in his toolbox, I didn't use it yet, but you can find more information here:
http://mscrmtools.blogspot.com/2013/08/new-xrmtoolbox-plugin-easy-translator.html

How to refer to an equation in a different page with Mathjax

I have several html pages with a lot of equations rendered by Mathjax. I would like to refer to several equations not especially in the same page.
The problem is that "\eqref" is only working if the equation is in the same page.
One solution would be to use "\tag{}" for all equations and use simple html links.
For example,
\label{myequation} \tag{4.1}
and the link would be
" 4.1 "
The problem with that solution is that I need to have personal tag for all equations.
Does anyone has a solution for referring to equations in different pages by producing tags automatically ?
See the documentation for automatic equation numbering. This allows you to have your equations numbered automatically rather than requiring \tag. Note that any numbered or tagged equation automatically gets an ID that can be used in a link, so there is no requirement to use \label (though it helps if you are adding and removing equations during editing). If an equation is numbered 5, then the id is mjx-eqn-5. There are functions that you can override in order to change the format of the equation numbers. See the equationNumbers section of the TeX configuration parameters documentation.
Edit: Now that I understand your request, I can tell you that to do what you ask for would require MathJax to know the label-to-tag mapping for the other pages in your site (not just the page currently being viewed). MathJax doesn't have that data available to it. The only way to do it would be to create data files for the other pages that includes that data so that MathJax could load it and have it available. While technically possible, it would be a bit cumbersome to do that, especially since JavaScript (normally) can't write files for you.
On the other hand, the only place the label-to-tag mapping is needed is for the text that acts as the link itself (that is, if eq:sum refers to equation 4.1, then you would want "4.1" to be the text that links to that equation. Note that the link itself will be to myotherpage#eq:sum, so the only thing that needs the number is the link text itself. If you were willing to use something like "[sum]" as the link text for eq:sum (e.g., "In equation [sum] we see..."), then you would not need the label-to-tag mapping, and \eqref could be modified to handle that. But if you really want the equation number as the link, you would need a lot more infrastructure to make that happen.

Nonfloating figure spanning two columns in multicol environment

I am using the multicol package, with two columns, and need a figure to span both columns. I am aware of \begin{figure*}, but I do not want the figure to float. I have been googling for about an hour, to no avail. Any help would be great.
Have a look at the package nonfloat (it is part of TeXlive so there is a good chance you already have it). The following example taken from the manual of nonfloat shows how you can have a non-floating figure with caption:
\begin{minipage}{\linewidth}
\centering%
\includegraphics[width=0.8\linewidth,clip=]{input.eps}%
\figcaption{Caption}%
\label{fig:input.eps}%
\end{minipage}
The nonfloat package provides the \figcaption command that can be used outside floats. In order to combine this with multicol I think you have to \end{multicols}, put the figure, and then \begin{multicols}{2}.
Not completely off-topic, http://www.deesaster.org/latex-magazinerstellung.php has an example article showing how to make magazines with latex (see the example LaTeX-Magazinerstellung-Artikel.pdf) which uses multicol and has pictures spanning more than one column. This, I think, is interesting, unfortunately the source code and guide are in German, but I think he does it with a \parbox ...
Well, floating figures in LaTeX can be challenging... But as far as I remember, the core of it is that a figure always is floating and there is no way to change that other than not using a figure but includegraphics directly.
Having that said, chapter 9 "Floating tables and figures" in "Guide to LaTeX" mentions some things that might help you (listed in order mentioned):
\suppressfloats
package flafter
package float
package here
package floatflt

United States State shapes for Office

I want to create visuals along the lines of CNN's "red-state, blue-state" shadings of the states in the U.S. for my project. I'm planning to do something fancier than just shading the state's shape in a color. Are there open source libraries of state shapes/polygons (or - if not open source - others) that I can import into Word, Excel, etc. that I can use to show complicated graphs based on states?
I have Map Point, but haven't been able to figure out how to shade the states in a complex way.
you could try google charts, it looks like http://www.woot.com is doing something similar to what you need
Here is a good example using google maps... I've used code like that before.. perhaps from this exact example.
http://econym.org.uk/gmap/example_states2.htm
EDIT: you might want to consider converting the states.xml into JSON... it'll be smaller (136k of XML right now!) and should load faster in most browsers.
There might be a couple parts to the question you are asking, but to address the first part "Are there open source libraries of state shapes/polygons...", here's a resource to check out:
http://commons.wikimedia.org/wiki/Category:SVG_maps_of_the_United_States
It's a list of various SVG(scalable vector graphics) files which can be imported into a number of applications. Basically a giant xml representation of lines and endpoints. This can be directly converted to XAML, if you're into a more programmatic way of charting(ie, C# w/ Silverlight).
However, to address the second part regarding MS Office, Visio can import SVG files for manipulation as well. I'm unsure what type of graphs you were looking for, but I hope this can assist in some small way on your path to awesomeness ;)

Resources