Reputation: 1502
I want to right justify the dates in the resume below. My failed attempts are shown.
What I show below converts, but the dates are not right justified.
I used how do we right align part of a line in r markdown? and that worked for pdf, but MS Word doesn't seem to right align the text.
Long term goals: I am using markdown and pandoc. I want to create a resume using markdown. I want to be able to export it to docx and pdf. My editor is emacs and I am using Markdown mode and have pandoc installed. I use C-c / O to set the file to docx, the C-c / r to run Pandoc. I am open to having a style file.
---
Font:Tahoma
---
# Summary
Ten years experience solving problems
# Experience
## First Job, Newark, NJ <span align="right"> (5/2014-Present) </span>
### Programmer
* Solved analysis problems using data automation.
## Second Job, Newark, NJ \hfill (01/01/04/2014)
### Data Analyst
* Debugged Programs.
Upvotes: 6
Views: 5124
Reputation: 21
You should try this, it works perfectly:
---
Font:Tahoma
---
# Summary
Ten years experience solving problems
# \textcolor{blue}{Experience}
## First Job, Newark, NJ \textcolor{red}{\hfill (5/2014-Present)}
### Programmer
* Solved analysis problems using data automation.
## Second Job, Newark, NJ \hfill (01/01/04/2014)
### Data Analyst
* Debugged Programs.
You can further adjust colors with:
# Summary
Ten years experience solving problems
# Experience
## First Job, Newark, NJ \hfill (5/2014-Present)
### Programmer
* Solved analysis problems using data automation.
## Second Job, Newark, NJ \hfill (01/01/04/2014)
### Data Analyst
* Debugged Programs.
Output image:
Upvotes: 2
Reputation: 3134
A solution for pandoc, which is probably not the best idea (as markdown does not support alignment) is using "emsp;" which stands for html emphasis space; on top of  . You can think of it as \t tabs.
the markdown would be :
## First Job, Newark, NJ        (5/2014-Present)
### Programmer
## Second Job, Newark, NJ        (01/01/04/2014)
### Data Analyst
* Debugged Programs.
resulting :
## First Job, Newark, NJ (5/2014-Present)
### Programmer
## Second Job, Newark, NJ (01/01/04/2014)
### Data Analyst
* Debugged Programs.
if you wish to have it precisely flushed just make sure you use the right font (fixed width types).
hope this helps.
Upvotes: 3
Reputation: 42685
It is most likely not possible.
First, the original Markdown rules state:
HTML is a publishing format; Markdown is a writing format. Thus, Markdown’s formatting syntax only addresses issues that can be conveyed in plain text.
That being the case, things like left-aligning text is outside the scope of Markdown. Of course, the appropriate way to do that is to use raw HTML, as you have tried. But that's were you run into problems with Pandoc.
Pandoc's documentation states (emphasis added):
Because pandoc’s intermediate representation of a document is less expressive than many of the formats it converts between, one should not expect perfect conversions between every format and every other. Pandoc attempts to preserve the structural elements of a document, but not formatting details such as margin size. And some document elements, such as complex tables, may not fit into pandoc’s simple document model. While conversions from pandoc’s Markdown to all formats aspire to be perfect, conversions from formats more expressive than pandoc’s Markdown can be expected to be lossy.
As left-aligning text is not something you can do in plain Markdown, then it is the sort of thing you can expect to get lost when converting to other formats. The reason it works when converting to HTML is that the raw HTML is simply passed through unaltered. Standard Markdown behavior it to not even parse the HTML. As the output is HTML this works. However, when using Pandoc to convert from Markdown to non-HTML formats, the "formatting details" in the raw HTML is lost.
Sometimes you can successful convert from an HTML document to another format with a little more success, but the supported features outside of Markdown are severely limited. From time to time I have seen people even attempt to create the Word document they want, then use Pandoc to convert that to HTML to see what Pandoc produces. Even then, in most cases the formatting is lost as it is not something that can be conveyed in plain Markdown.
Upvotes: 3