I need users to mark some section of text with custom tags, I can't use the xml based tags as the whole text will be embedded in XML documents and all the < will be converted to html escape code <. I want users to marks some section of text with tags like skip, bookmark, these tags can have attributes also like bookmark name="first".
Which is the best way of allowing users to mark text using the BB forum way like [b]abcd[/b]
or using {{bookmark name="first"}}.
Or is there any better scheme or technique available.
I don't want to change the structure of the text as down by the markdown or textile, I just want to tag some section of text, like the phpBB tags. The question is there any other style than phpBB? Like in some software I see {{bookmark name = "abcd"}} style.
The three common markups I know of for this purpose are Markdown (used, I believe, by SO), textile, and BBCode. The first two are commonly used for blog sites and CMS frameworks, and BBCode I think is usually associated with bulletin-board sites. Preview and mapping utilities are available for each.
You can have a look at the Textile markup language to see if it fits your needs. It has many implementations and nice documentation.
Related
I am writing documentation that has steps for Windows, Mac, Linux.
I want to make it look like this HTML5 tabbed HTML5 example
there is support for HTML in gitlab markdown
There is a reference to a sanitation class that validates the inline HTML in gitlab marrkdown
My question is:
Recommendations to achieve the tabbed documentation. Is there a workaround for displaying CSS correctly in markdown?
how to make this work?
Simply insert the relevant HTML/CSS/JS into your Markdown document.
As Markdown's Syntax Rules state (emphasis in original):
Markdown's syntax is intended for one purpose: to be used as a format
for writing for the web.
Markdown is not a replacement for HTML, or even close to it. Its
syntax is very small, corresponding only to a very small subset of
HTML tags. The idea is not to create a syntax that makes it easier
to insert HTML tags. In my opinion, HTML tags are already easy to
insert. The idea for Markdown is to make it easy to read, write, and
edit prose. 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.
For any markup that is not covered by Markdown's syntax, you simply
use HTML itself. There's no need to preface it or delimit it to
indicate that you're switching from Markdown to HTML; you just use
the tags.
The only restrictions are that block-level HTML elements -- e.g. <div>,
<table>, <pre>, <p>, etc. -- must be separated from surrounding
content by blank lines, and the start and end tags of the block should
not be indented with tabs or spaces. Markdown is smart enough not
to add extra (unwanted) <p> tags around HTML block-level tags.
However, there is one down side to this:
Note that Markdown formatting syntax is not processed within block-level
HTML tags. E.g., you can't use Markdown-style *emphasis* inside an
HTML block.
Finally, there is the concern that you appear to looking to have this document hosted on a third party site (perhaps in a readme on Gitlab). Most third party sites who process and host Markdown documents (including Gitlab) run the output through an HTML sanitizer for security reasons (to avoid XSS attaches, etc). Therefore, you are likely to find that various required hooks in your HTML will be stripped out and it won't work. Of course, this won't be a problem on your own site where you have total control.
The solution was tried in readme.rd from the text processor used by Microsoft VsCode and commited to gitlab. In the attached picture there is the rendering. It was not as expected. Perhaps the functionality to have tabs will be available soon.
An alternative is "collapsible sections" in GitLab Flavored Markdown. Link to documentation: link
I want to change the words 'bike', 'shed' and 'bike shed' on my 'Your search yielded no results' Drupal page. Is there anyway I can do this without editing the Drupal core? If I do have to edit the Drupal core, what file would I edit?
Any help on this appreciated.
If you are just wanting to replace text with other static text, take a look at the String Overrides Module. From the project page:
Provides a quick and easy way to replace any text on the site.
Features
Easily replace anything that's passed through t()
Locale support, allowing you to override strings in any language
Ability to import/export *.po files, for easy migration from the Locale module
Note that this is not a replacement to Locale as having thousands of
overrides can cause more pain then benefit. Use this only if you need
a few easy text changes.
My thesis is written in b5j documentclass style.
\documentclass[b5j,twoside,12pt]{report}
I have a paper that is appended at the end. However this is written in b5paper style as an article.
\documentclass[12pt,b5paper,twoside]{article}
How do I get the paper to follow the japanese style? Havent found any b5paperj options in the geometry package.. :-/
It is possible to build the paper that must be appended separately and input it in your document using pdfpages. This way you don't have to control both styles and the package provides enough flexibility to make it look like you want to.
I know the topic of removing www.experts-echange.com has been beaten to death but having to type -site:www.experts-exchange.com is tedious. Even the ability to auto add strings to a query would solve this problem. I can probably wrap this into some wget mess but this seems like basic functionality many users would base their search engine of choice on. If you have discovered some easy method to do this for yourself please let me know.
I imagine there is a really slick toolbar that feeds google your text plus the additional strings you choose. There is some internal limit to the number of words and or operators Google searches process (with good reason I suppose).
The Google Custom Search API allows you to include or exclude sites from your search. You can add a custom search engine to your iGoogle home page.
Google custom search: http://www.google.com/coop/cse/
2 easy ways in Firefox:
Write a Grease Monkey script.
Use a search keyword. You type the keyword plus a string in the address bar to trigger a search. In this case the URL is http://www.google.com/search?q=-site:expertsexchange.com%20%s. To search on the site your tab is currently in, use javascript:location='http://www.google.com/search?num=100&q=site:'%20+%20escape(location.hostname)%20+%20'%20%S'%20;%20void%200
As an alternative to excluding results, I have a greasemonkey script that highlights google search results by domain. I configure subtle colors for a few sites of interest to me, like wikipedia & stackoverflow. But I use red for expertsexchange, which allows me to visually skip right over it.
I can publish my script if there is interest...
If you want to whip up your own script, you need to operate on two kinds of elements. Here are the two XPath expressions that I use:
//cite[contains(., '" + domain + "')]/ancestor::li[1]
//span[#class='a'][contains(., '" + domain + "')]/ancestor::div[#class='g']
Then I just apply background-color styles to matching elements. Pretty straight forward.
This is not a programming question per se but a question about searching source code files, which help me in programming.
I use a search tool, X1, which quickly tells me which source code files contain some keywords I am looking for. However it doesn't work well for keywords which have punctuation attached to them. For example, if I search for "show()", X1 shows everything that has "show" in it including the too many results from "MessageBox.Show(.....)" which I don't want to see.
Another example: I need to filter to show ".parent" (notice the dot) and not show everything that has "parent" (no dot) in it.
Anyone knows a text search tool which can filter by keywords that have punctuation? I really prefer a desktop app instead of web based tool like Google (I find it clunky).
I am looking for a tool which indexes words and not a general file searcher like Windows File Explorer.
If you want to search code files efficiently for keywords and punctuation,
consider the SD Source Code Search Engine. It indexes each source langauge according
to langage-specific rules, so it knows exactly the identifiers, keywords,
strings, comments, operators in that langauge and indexes it according to
those elements. It will handle a wide variety of languages: C, C++, Java, VB6, C#, COBOL,
all at once.
Your first query would be posed as:
I=show - I=MessageBox ... '('
(locate identifiers named "show" but eliminate those that are overlapped by
MessageBox leftparen).
You second query would be posed as simply
'.' I=parent
See http://www.semanticdesigns.com/Products/SearchEngine/index.html
It seem to be the job of tools like ctags and cscope.
Ctags is used to index declarations of source files (many languages supported) and Cscope for in-depth c file analysis.
These tools are more suited for a per project use in my opinion. Moreover, you may need to use another tool to use these index, I use vim myself for this purpose, but many text editors use ctags.
The tool from DTSearch.com.