This question already has answers here:
How do I view the source of Markdown files on Github?
(5 answers)
Closed 6 years ago.
Please note this question is about simply browsing Markdown source code on the GitHub website, not how to add preformatted text when writing Markdown (or similar.)
GitHub automatically renders an HTML preview of Markdown files when you browse them in a repository. Here's one (purely random):
https://github.com/linode/docs/blob/master/docs/security/linux-security-basics.md
My question is, how do you switch to the standard GitHub plain text view you would for other code (e.g. a PHP file) – i.e. the source code of the .md file, with the clickable line numbers down the left, so you can refer to a specific line in a specific file in a specific commit in issues etc.
I don't mean 'Raw', because there are no line numbers.
I don't mean 'Edit' – which is better, but you still can't hover and highlight a line number / get a unique URL.
On the MD file page, click on the RAW button. it will take you to a different URL (in this case https://raw.githubusercontent.com/linode/docs/master/docs/security/linux-security-basics.md) but it shows the raw contents of the file, unformatted
Related
I have stored some pages that I have created in Confluence (with an account that doesn't exist anymore) as HTML files a while ago.
I would like to use them in another Confluence account. There are often lots of mathematical expressions within the texts so I cannot simply copy the content of the html files and paste them into the Confluence page (right?).
Is there a way to proceed conveniently?
I noticed that the former Confluence pages are stored as folders with multiple files in it which are mainly of the following file formats: .css and .Download.
screenshot:
You can try the following:
log into confluence
click on Create
click on Import (to the right next to Templates)
pick the right option
More official info here:
https://community.atlassian.com/t5/Confluence-questions/How-to-Export-Import-Confluence-Pages-and-Spaces-plus-Jira/qaq-p/1022504
Is it possible to build a LibreOffice document from code similar to the way a web page is built from HTML and CSS? Can one write an ODF file in which the content and styling are separate, and then/view open in LibreOffice? If so, can one write the code in a text editor as done for HTML/CSS?
There area two reasons I now ask. 1) When I need to make a style change in LibreOffice I have to manually make the same adjustments in a hundred places, such as changing the style of block quotes. 2) I'd like to build documents from a database of text.
I found a question on this in relation to databases but it was about eight years old.
Thank you for any direction you may be able to provide.
Unzip an .odt file that contains styles. You will see two files, content.xml and styles.xml. Edit these files using a text editor and then zip the folder back up to get a modified .odt file.
Be aware that there are two types of styles in the XML files. Named styles are what most people think of as styles, whereas automatic styles are custom formatting, like when you select some text and change the font directly.
The link from tohuwawohu describes utilities to work programmatically with the file. Also as mentioned in the link, it's not too hard to write code yourself. For example in python, import the built-in libraries zipfile and xml.etree.
My badges aren't showing on github README.md file but they show here on stackoverflow. Here are the markdowns:
I also noticed that html tags (that used to work in README.md files) now show as plain text. What am I missing?
There are hexadecimal binary numbers (in place of spaces) in your README.md. That's why it can't be parsed and represented as a markdown file:
Tip: make your editor display spaces/tabulation and other invisible characters. That's what I see when I open your README.md:
Ride my way<0x00>app<0x00>
<0x00>
<0x00>
So nothing to do with the way you display the badges.
I've removed these non asci-characters and just created a pull request (notice how github defines this change as BIN and can't display a diff):
And it's now displayed as it should:
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I am converting a word file into a pdf. Word version is 2016. I need to have hyperlinks active (References to sections, figures, etc.)
I use Export - Create a PDF/XPS Document and Optimized for Standard.
I have references to figures and tables completely working, but references to sections don't work. In the Table of Content, I cannot click on the page numbers. What can be done to have links to sections working?
To retain hyperlinks while converting word to pdf:
In word: Go to file, save as, choose option 'Best for electronic distribution and accessibility' and export.
Printing Word Document as PDF will deactivate all URL or link if it is inside a Text or Picture.
But if you use Save As PDF or Export as PDF Option to make your PDF all URL or link will be active and you can click on that text or picture to visit your desired link or URL.
Using Save as Option
Using Export
When you use Export as PDF,
make sure you are not on the option that says Best for printing
because your document is to be used for Electronic purposes.
Super simple way - Use the web version.
Visit office.com.
Open Word.
Create/Upload the document.
Click on File tab -> Save As -> Download As PDF.
P.S. - On uploading the document if you found it distorted/broken in the web version, just go ahead and download the PDF, it will not be distorted.
This is what worked for me:
Click on File -> Save As
In the popup, select the file type as PDF.
Click on the "Options" button.
Check the check box which says "PDF/A Compliant".
Click on OK and save the file in the required folder.
Also from what I've read, PDF/A is a better format for the future. Read more about it here: PDF/A Compliance
And another answer, but since nobody wrote it yet:
In my PDF no links worked until I deleted all internal links to other places in the doc, like footnotes. Once I deleted all internal links the http-links worked again. Be aware: one single link breaks the whole document!
If you click on Options in Save As, the options dialog will pop up. Under "Include non-printing information check Create bookmarks using ... checkbox, and select Heading radio button.
I used Save as Adobe PDF instead of Save As .. then select pdf format, none of the latter works. Save as Adobe PDF retained the hyperlinks for me, and the file size is a lot smaller too.
Under File, click "options".
Click on "Advanced" on the left side of the Word options pop up.
Uncheck "CTRL + Click to follow hyperlink"
Click "Ok".
Once you're done with this, proceed with converting your word file to pdf. The hyperlinks should be active now.
Github helpfully renders Markdown (.md) files to HTML when viewing on github.com (for example, this README.md).
When viewing any other source file, it is shown as unrendered source code (for example, this .gitignore). A handy feature this gives is linking directly to a line in the source by clicking the line number (for example, like this).
How can I view the unrendered source of Markdown files on Github (so I can link to a particular line in the source)?
note: I know of the "Raw" button, however it does not provide any of the nice UI Github has.
If you don't want to use the "raw" button, you can (since June 2021) add ?plain=1 to your GitHub markdown file URL:
Appending ?plain=1 to the url for any Markdown file will now display the file without rendering.
As with other code files, it will also show line numbers, and can be used to link other users to a specific line or lines.
For example, appending ?plain=1#L52 will highlight line 52 of a plain text Markdown file.
Example:
https://github.com/git/git/blob/master/README.md?plain=1#L49-L51
Since Sept. 2021, there is a button which adds the ?plain=1 for you:
Use the "Raw" button. For instance, if you were looking at README.md there is a Raw button in the Navigation. This can be simple URL change (from blob to raw), but in this case becomes a separate link.
Edit: There is no "pretty" view for the Markdown source. There's the converted HTML view, the Raw view without the UI, and the Blame view. Only the Blame view provides you with the ability to link to a specific line within the source.
Edit 2: The other option is to use Anchors within the README.md. If you take the Installation title for example, you can directly link within the content of the Markdown file. Assuming you don't have anything hidden within the Markdown itself, this is closer still to solving your original question.
Using the "Blame" button, you are able to see the source of the Markdown (for example, like this).
Unfortunately, "Blame" comes with extra UI elements which make the source more cluttered.
Refined Github provides an additional "Raw" button to view the raw source and link to a specific line:
I ran into this issue, as a complete surprise to me, on a file with a .wiki extension. It appears that files with .wiki, .mediawiki, and .wikitext extensions are recognized and rendered as HTML, with a table of contents even. I guess it makes sense, what with GitHub projects having wikis and all.
That's nifty, but this one particular case, I really wanted the raw wikitext to be visible and copy-pasteable, not some rendered representation of it.
The only half-way solution I found was to use a bogus file extension that isn't one of the ones recognized by GitHub, and then a .gitattributes to tell GitHub how to syntax highlight it, e.g.:
*.wiki_ linguist-language=mediawiki
I'm not thrilled about this, but all the good extensions were already "taken" according to the languages.yml linked above.